/* =====================================================
   BASE · Reset, Header, Nav, Layout
   ===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f0f1e;
  color: #fff;
}

body {
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0f0f1e 60%);
}

/* ===== SFONDO STELLATO ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.3), transparent);
  background-size: 200% 200%;
  animation: stars 60s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes stars {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 15, 30, 0.4) 100%);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
  z-index: 10;
}

.logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  flex: 1;
}

.currencies {
  display: flex;
  gap: 6px;
}

.currency {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== NAV BOTTOM ===== */
nav {
  display: flex;
  justify-content: space-around;
  padding: 8px 4px 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.nav-btn .icon { font-size: 20px; }

.nav-btn.active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.nav-btn .nav-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #0f0f1e;
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.2); opacity: 0.7; }
}

/* ===== BETA BADGE ===== */
.beta-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  margin-left: 6px !important;
  vertical-align: middle !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.6) !important;
  -webkit-text-fill-color: #ffffff !important;
  animation: betaPulse 2s ease-in-out infinite;
  line-height: 1;
  position: relative;
  top: -2px;
  flex-shrink: 0 !important;
}

.version-badge {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  margin-left: 6px;
}

@keyframes betaPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ===== STILI PER LE MISSIONI ===== */
.mission-category {
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
  margin: 20px 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mission-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.mission-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.mission-tab.active {
  background: #fbbf24;
  color: #1a1a2e;
  border-color: #fbbf24;
}

/* ===== NUVOLETTA FEEDBACK ===== */
.feedback-fab {
  position: fixed;
  bottom: 85px;
  right: 15px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  animation: floatCloud 3s ease-in-out infinite;
}

.feedback-fab:active { transform: scale(0.9); }

@keyframes floatCloud {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.btn-secondary:active { background: rgba(255, 255, 255, 0.15); }

/* ===== RESPONSIVE ===== */
@media (max-width: 360px) {
  .logo { font-size: 11px; }
  .currency { padding: 3px 6px; font-size: 11px; }
  .nav-btn { font-size: 9px; padding: 4px 6px; }
  .nav-btn .icon { font-size: 18px; }
  .beta-badge { font-size: 8px !important; padding: 2px 5px !important; }
  .version-badge { display: none; }
}

@media (max-width: 600px) {
  nav { padding: 6px 4px 8px; }
  .nav-btn .icon { font-size: 18px; }
}