/* ============================================================
   SPACEBOY GALACTIC v2 — MASTER STYLESHEET
   Bold. Immersive. Maximum Space Energy.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Syncopate:wght@400;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --void:         #020208;
  --deep:         #06061a;
  --mid:          #0c0c30;
  --lime:         #b8ff00;
  --purple:       #9d00ff;
  --blue:         #00d4ff;
  --pink:         #ff006e;
  --red:          #fc3d21;
  --gold:         #ffd700;
  --white:        #ffffff;
  --glass:        rgba(255,255,255,0.04);
  --glass-b:      rgba(255,255,255,0.08);
  --blur:         blur(16px);
  --ease:         0.3s cubic-bezier(0.4,0,0.2,1);
  --bounce:       0.5s cubic-bezier(0.34,1.56,0.64,1);
  --glow-p:       0 0 30px rgba(157,0,255,0.6), 0 0 80px rgba(157,0,255,0.2);
  --glow-b:       0 0 30px rgba(0,212,255,0.6), 0 0 80px rgba(0,212,255,0.2);
  --glow-l:       0 0 30px rgba(184,255,0,0.6), 0 0 80px rgba(184,255,0,0.15);
  --glow-r:       0 0 30px rgba(252,61,33,0.6), 0 0 80px rgba(252,61,33,0.2);
  --font-hud:     'Orbitron', sans-serif;
  --font-display: 'Syncopate', sans-serif;
  --font-body:    'Space Grotesk', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--void); color: var(--white); font-family: var(--font-body); overflow-x: hidden; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, select { font-family: var(--font-body); }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--purple), var(--blue)); border-radius: 2px; }
::selection { background: var(--purple); color: #fff; }

/* ── Canvas starfield ─────────────────────────── */
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#cursor-glow { position: fixed; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(157,0,255,0.06), transparent 70%); pointer-events: none; z-index: 0; transform: translate(-50%,-50%); transition: left 0.08s, top 0.08s; mix-blend-mode: screen; }
.page-flash { position: fixed; inset: 0; background: var(--purple); z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.page-flash.active { opacity: 0.07; }

/* ============================================================
   NAV HUD
   ============================================================ */
.nav-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 72px; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(2,2,8,0.75);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-b);
  transition: var(--ease);
}
.nav-hud.scrolled { background: rgba(2,2,8,0.96); border-bottom-color: rgba(157,0,255,0.4); box-shadow: 0 2px 40px rgba(157,0,255,0.1); }

.nav-logo { display: flex; align-items: center; gap: 0.85rem; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(from 0deg, var(--purple), var(--blue), var(--lime), var(--purple));
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  animation: logo-hue 8s linear infinite;
  box-shadow: var(--glow-p);
}
@keyframes logo-hue { to { filter: hue-rotate(360deg); } }
.logo-text { font-family: var(--font-hud); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; line-height: 1.2; }
.logo-text span { display: block; font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.3); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 0.1rem; list-style: none; }
.nav-links a {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.8rem; border-radius: 6px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); transition: var(--ease); position: relative;
}
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) scaleX(0); width: 70%; height: 1.5px; background: var(--lime); transition: transform var(--ease); border-radius: 1px; }
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.nav-links a:hover::after, .nav-links a.active::after { transform: translateX(-50%) scaleX(1); }
.nav-links a.active { color: var(--lime); }

.nav-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; color: rgba(255,255,255,0.3); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: blink 2s ease-in-out infinite; }
.status-dot.err { background: var(--red); animation: none; }
@keyframes blink { 0%,100% { opacity: 1; box-shadow: 0 0 6px var(--lime); } 50% { opacity: 0.3; box-shadow: none; } }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 1px; transition: var(--ease); }

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-links { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; background: rgba(2,2,8,0.98); padding: 1.5rem; gap: 0.4rem; transform: translateY(-115%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); border-bottom: 1px solid var(--glass-b); z-index: 999; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 0.95rem; padding: 0.75rem 1rem; }
  .nav-status { display: none; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page-wrapper { position: relative; z-index: 1; padding-top: 72px; }
.section { padding: 6rem 2rem; max-width: 1500px; margin: 0 auto; }
.section-sm { padding: 3rem 2rem; max-width: 1500px; margin: 0 auto; }
.section-header { margin-bottom: 3.5rem; }
.section-tag { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.75rem; }
.section-tag::before { content: ''; display: block; width: 18px; height: 1px; background: var(--blue); }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem,4vw,3.2rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.section-title .lime { color: var(--lime); }
.section-title .blue { color: var(--blue); }
.section-title .purple { color: var(--purple); }
.section-title .red { color: var(--red); }
.section-desc { max-width: 540px; color: rgba(255,255,255,0.45); line-height: 1.75; margin-top: 0.75rem; font-size: 0.93rem; }
.divider { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--glass-b), transparent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 2rem; border-radius: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; transition: var(--ease); position: relative; overflow: hidden; cursor: pointer; }
.btn::before { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity var(--ease); }
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--purple), #5500cc); color: #fff; box-shadow: 0 4px 24px rgba(157,0,255,0.35); }
.btn-primary::before { background: linear-gradient(135deg, #b033ff, var(--purple)); }
.btn-primary:hover { box-shadow: var(--glow-p); }
.btn-outline { background: transparent; color: var(--lime); border: 1px solid rgba(184,255,0,0.4); }
.btn-outline::before { background: rgba(184,255,0,0.07); }
.btn-outline:hover { border-color: var(--lime); box-shadow: var(--glow-l); }
.btn-danger { background: linear-gradient(135deg, var(--red), #c92200); color: #fff; box-shadow: 0 4px 24px rgba(252,61,33,0.3); }
.btn-danger:hover { box-shadow: var(--glow-r); }
.btn-blue { background: linear-gradient(135deg, var(--blue), #0066aa); color: #000; font-weight: 800; box-shadow: 0 4px 24px rgba(0,212,255,0.3); }
.btn-blue:hover { box-shadow: var(--glow-b); }
.btn-ghost { background: var(--glass); color: rgba(255,255,255,0.7); border: 1px solid var(--glass-b); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); color: #fff; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.7rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 0.85rem; }
.btn-xl { padding: 1.1rem 3rem; font-size: 0.9rem; border-radius: 10px; }

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass-card {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-b); border-radius: 16px;
  transition: var(--ease); position: relative; overflow: hidden;
}
.glass-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); }
.glass-card:hover { border-color: rgba(157,0,255,0.35); transform: translateY(-4px) scale(1.005); box-shadow: 0 24px 60px rgba(0,0,0,0.5), var(--glow-p); }
.glass-card.card-lime { border-color: rgba(184,255,0,0.18); }
.glass-card.card-lime:hover { border-color: rgba(184,255,0,0.4); box-shadow: 0 24px 60px rgba(0,0,0,0.5), var(--glow-l); }
.glass-card.card-blue { border-color: rgba(0,212,255,0.18); }
.glass-card.card-blue:hover { border-color: rgba(0,212,255,0.4); box-shadow: 0 24px 60px rgba(0,0,0,0.5), var(--glow-b); }
.glass-card.card-red { border-color: rgba(252,61,33,0.18); }
.glass-card.card-red:hover { border-color: rgba(252,61,33,0.4); box-shadow: 0 24px 60px rgba(0,0,0,0.5), var(--glow-r); }
.glass-card.card-purple { border-color: rgba(157,0,255,0.22); }
.glass-card.card-purple:hover { border-color: rgba(157,0,255,0.45); box-shadow: 0 24px 60px rgba(0,0,0,0.5), var(--glow-p); }

/* ============================================================
   HERO — INDEX
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem; overflow: hidden;
}
.hero-bg-img { position: absolute; inset: 0; background-image: url('../assets/images/starfield_hero.jpg'); background-size: cover; background-position: center; opacity: 0.4; z-index: 0; animation: hero-pan 60s linear infinite; }
@keyframes hero-pan { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.hero-grad { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, transparent 0%, rgba(2,2,8,0.9) 70%); z-index: 0; }
.hero-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,0.04); animation: orbit-spin linear infinite; pointer-events: none; z-index: 1; }
.hero-orbit:nth-child(3) { width: 600px; height: 600px; animation-duration: 40s; border-color: rgba(157,0,255,0.08); }
.hero-orbit:nth-child(4) { width: 950px; height: 950px; animation-duration: 70s; animation-direction: reverse; border-color: rgba(0,212,255,0.05); }
.hero-orbit:nth-child(5) { width: 1400px; height: 1400px; animation-duration: 110s; border-color: rgba(184,255,0,0.03); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.hero-orb-1 { width: 700px; height: 700px; background: var(--purple); top: -200px; left: -200px; opacity: 0.12; }
.hero-orb-2 { width: 500px; height: 500px; background: var(--blue); bottom: -150px; right: -150px; opacity: 0.1; }
.hero-orb-3 { width: 400px; height: 400px; background: var(--lime); bottom: 20%; left: 15%; opacity: 0.05; }
.hero-content { position: relative; z-index: 2; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 1.2rem; border-radius: 100px; border: 1px solid rgba(184,255,0,0.35); background: rgba(184,255,0,0.06); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--lime); margin-bottom: 1.75rem; animation: fade-up 0.8s ease both; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: blink 2s ease-in-out infinite; }
.hero-title { font-family: var(--font-display); font-size: clamp(3.5rem, 11vw, 10rem); font-weight: 700; line-height: 0.88; letter-spacing: -0.02em; margin-bottom: 1.75rem; animation: fade-up 0.8s 0.1s ease both; }
.hero-title .t1 { display: block; }
.hero-title .t2 { display: block; background: linear-gradient(90deg, var(--purple), var(--blue), var(--lime), var(--pink)); background-size: 300% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: grad-move 5s linear infinite; }
@keyframes grad-move { to { background-position: 300% center; } }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.7; color: rgba(255,255,255,0.5); max-width: 580px; margin: 0 auto 3rem; animation: fade-up 0.8s 0.2s ease both; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; animation: fade-up 0.8s 0.3s ease both; }
.hero-stats-bar { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; background: rgba(2,2,8,0.85); border-top: 1px solid var(--glass-b); backdrop-filter: blur(8px); }
.h-stat { flex: 1; max-width: 200px; padding: 1.25rem 1rem; text-align: center; border-right: 1px solid var(--glass-b); }
.h-stat:last-child { border-right: none; }
.h-stat-num { font-family: var(--font-hud); font-size: 1.5rem; color: var(--lime); line-height: 1; }
.h-stat-label { font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-top: 0.3rem; }
.scroll-hint { position: absolute; bottom: 5rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.2); animation: fade-up 1s 0.7s ease both; }
.scroll-line { width: 1px; height: 45px; background: linear-gradient(to bottom, transparent, var(--lime)); animation: scroll-pulse 2.2s ease-in-out infinite; }
@keyframes scroll-pulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(35px); } to { opacity: 1; transform: translateY(0); } }

/* ── APOD ──────────────────────────────────────── */
.apod-wrap { padding: 4rem 2rem 6rem; max-width: 1500px; margin: 0 auto; }
.apod-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2px; border-radius: 20px; overflow: hidden; border: 1px solid var(--glass-b); min-height: 580px; }
.apod-media { position: relative; overflow: hidden; background: var(--deep); min-height: 400px; }
.apod-media img, .apod-media iframe { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s ease; }
.apod-media:hover img { transform: scale(1.05); }
.apod-media iframe { border: none; min-height: 400px; }
.apod-date-chip { position: absolute; top: 1.5rem; left: 1.5rem; background: rgba(2,2,8,0.85); backdrop-filter: blur(8px); border: 1px solid var(--glass-b); border-radius: 100px; padding: 0.28rem 0.9rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; color: var(--lime); text-transform: uppercase; }
.apod-info { padding: 3rem; background: rgba(6,6,26,0.85); backdrop-filter: var(--blur); display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; }
.apod-label { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--blue); display: flex; align-items: center; gap: 0.5rem; }
.apod-label::before { content: ''; display: block; width: 14px; height: 1px; background: var(--blue); }
.apod-title { font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.9rem); font-weight: 700; line-height: 1.2; }
.apod-explanation { font-size: 0.87rem; line-height: 1.8; color: rgba(255,255,255,0.55); display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.apod-copyright { font-size: 0.68rem; color: rgba(255,255,255,0.25); }
.apod-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.apod-skel { background: linear-gradient(90deg, var(--deep) 25%, rgba(255,255,255,0.04) 50%, var(--deep) 75%); background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite; min-height: 400px; }
.apod-skel-info { padding: 3rem; display: flex; flex-direction: column; gap: 1rem; }
.skel-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 75%); background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 900px) { .apod-grid { grid-template-columns: 1fr; } .apod-info { padding: 2rem; } .apod-media { min-height: 280px; } }

/* ── Countdown ─────────────────────────────────── */
.countdown-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 1.25rem; }
.launch-tile { padding: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.l-agency { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; padding: 0.22rem 0.6rem; border-radius: 4px; display: inline-block; width: fit-content; }
.a-nasa { background: rgba(252,61,33,0.12); color: var(--red); border: 1px solid rgba(252,61,33,0.25); }
.a-spacex { background: rgba(0,212,255,0.1); color: var(--blue); border: 1px solid rgba(0,212,255,0.2); }
.a-esa { background: rgba(184,255,0,0.1); color: var(--lime); border: 1px solid rgba(184,255,0,0.2); }
.a-roscosmos { background: rgba(157,0,255,0.1); color: var(--purple); border: 1px solid rgba(157,0,255,0.2); }
.a-isro { background: rgba(255,165,0,0.1); color: #ffa500; border: 1px solid rgba(255,165,0,0.2); }
.launch-name { font-family: var(--font-hud); font-size: 0.88rem; font-weight: 700; line-height: 1.3; }
.launch-clock { display: flex; gap: 0.65rem; }
.clock-unit { flex: 1; text-align: center; }
.clock-digit { font-family: var(--font-hud); font-size: 1.65rem; font-weight: 900; color: var(--lime); display: block; background: rgba(184,255,0,0.06); border-radius: 6px; padding: 0.38rem 0.1rem; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.clock-label { font-size: 0.5rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.28); display: block; margin-top: 0.3rem; }
.launch-date { font-size: 0.7rem; color: rgba(255,255,255,0.32); display: flex; align-items: center; gap: 0.4rem; }

/* ── Feature Cards ─────────────────────────────── */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.5rem; }
.promo-card { padding: 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.promo-icon { font-size: 2.5rem; width: 64px; height: 64px; background: rgba(255,255,255,0.04); border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-b); transition: var(--ease); }
.promo-card:hover .promo-icon { transform: scale(1.1) rotate(-5deg); }
.promo-title { font-family: var(--font-hud); font-size: 0.9rem; font-weight: 700; }
.promo-desc { font-size: 0.83rem; color: rgba(255,255,255,0.45); line-height: 1.75; flex: 1; }

/* ============================================================
   MARS PAGE
   ============================================================ */
.mars-hero { padding: 4rem 2rem 2rem; text-align: center; position: relative; overflow: hidden; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mars-bg { position: absolute; inset: 0; background-image: url('../assets/images/starfield_mars.jpg'); background-size: cover; background-position: center; opacity: 0.2; z-index: 0; }
.mars-atmo { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(200,80,40,0.08), transparent 60%); z-index: 0; }
.mars-content { position: relative; z-index: 1; }
.mars-planet { width: 200px; height: 200px; border-radius: 50%; background-image: url('../assets/images/planet_mars.jpg'); background-size: cover; background-position: center; box-shadow: inset -50px -25px 70px rgba(0,0,0,0.7), 0 0 80px rgba(200,80,40,0.4), 0 0 160px rgba(200,80,40,0.15); animation: mars-float 7s ease-in-out infinite; margin: 0 auto 2rem; position: relative; }
.mars-planet::after { content: ''; position: absolute; inset: -20px; border-radius: 50%; border: 1px solid rgba(255,100,50,0.12); animation: orbit-spin 10s linear infinite; }
@keyframes mars-float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }

.rover-controls { max-width: 960px; margin: 0 auto 2rem; padding: 0 2rem; }
.controls-inner { padding: 2rem; }
.controls-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 1rem; align-items: end; }
@media (max-width: 680px) { .controls-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.38); }
.form-input, .form-select { background: rgba(255,255,255,0.04); border: 1px solid var(--glass-b); border-radius: 8px; padding: 0.72rem 1rem; color: var(--white); font-size: 0.88rem; transition: var(--ease); appearance: none; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.4)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-color: rgba(255,255,255,0.04); padding-right: 2.5rem; cursor: pointer; }
.form-select option { background: #0c0c30; }
.form-input:focus, .form-select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(157,0,255,0.15); }

.rover-tabs { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.rover-tab { padding: 0.45rem 1.2rem; border-radius: 100px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--glass-b); color: rgba(255,255,255,0.45); cursor: pointer; transition: var(--ease); background: transparent; }
.rover-tab:hover { border-color: rgba(212,85,43,0.5); color: var(--white); }
.rover-tab.active { background: linear-gradient(135deg, #d4552b, #8b2500); border-color: transparent; color: #fff; box-shadow: 0 4px 20px rgba(212,85,43,0.4); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1rem; }
.photo-tile { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; border: 1px solid var(--glass-b); background: var(--deep); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.photo-tile:hover img { transform: scale(1.1); }
.photo-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(2,2,8,0.9) 0%, transparent 60%); opacity: 0; transition: var(--ease); display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; }
.photo-tile:hover .photo-overlay { opacity: 1; }
.photo-cam { font-weight: 700; color: var(--lime); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; }
.photo-meta { font-size: 0.7rem; color: rgba(255,255,255,0.6); line-height: 1.5; margin-top: 0.2rem; }
.skel-photo { aspect-ratio: 4/3; border-radius: 12px; background: linear-gradient(90deg, var(--deep) 25%, rgba(255,255,255,0.04) 50%, var(--deep) 75%); background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite; }
.whir-overlay { position: fixed; inset: 0; background: radial-gradient(ellipse at center, rgba(212,85,43,0.1), transparent 70%); pointer-events: none; opacity: 0; z-index: 500; transition: opacity 0.5s ease; }
.whir-overlay.active { opacity: 1; }
.rover-stats { display: flex; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.rover-stat { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.rover-stat strong { color: var(--lime); font-family: var(--font-hud); font-size: 1.1rem; }

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-hero { padding: 5rem 2rem 2rem; text-align: center; position: relative; overflow: hidden; }
.gallery-bg { position: absolute; inset: 0; background-image: url('../assets/images/starfield_gallery.jpg'); background-size: cover; background-position: center; opacity: 0.25; z-index: 0; }
.gallery-nebula-orb { position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.gallery-nebula-orb-1 { width: 600px; height: 400px; background: var(--purple); top: -150px; left: -100px; opacity: 0.1; animation: orb-drift 20s ease-in-out infinite; }
.gallery-nebula-orb-2 { width: 500px; height: 500px; background: var(--blue); bottom: -100px; right: -100px; opacity: 0.08; animation: orb-drift 28s ease-in-out infinite reverse; }
@keyframes orb-drift { 0%,100% { transform: translate(0,0); } 33% { transform: translate(30px,-20px); } 66% { transform: translate(-20px,25px); } }
.gallery-content { position: relative; z-index: 1; }
.filter-bar { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin: 2rem 0 1rem; }
.filter-btn { padding: 0.42rem 1.2rem; border-radius: 100px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--glass-b); color: rgba(255,255,255,0.45); transition: var(--ease); background: transparent; cursor: pointer; }
.filter-btn:hover { border-color: rgba(255,255,255,0.3); color: var(--white); background: rgba(255,255,255,0.04); }
.filter-btn.active { background: linear-gradient(135deg, var(--purple), #5500cc); border-color: transparent; color: #fff; box-shadow: 0 4px 20px rgba(157,0,255,0.35); }
.gallery-search { display: flex; max-width: 500px; margin: 1rem auto 0; gap: 0.5rem; }
.gallery-search input { flex: 1; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-b); border-radius: 8px; padding: 0.65rem 1.1rem; color: var(--white); font-size: 0.88rem; transition: var(--ease); }
.gallery-search input::placeholder { color: rgba(255,255,255,0.22); }
.gallery-search input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(157,0,255,0.15); }
.masonry { columns: 4 260px; column-gap: 1rem; padding: 0 2rem 6rem; max-width: 1600px; margin: 0 auto; }
.masonry-item { break-inside: avoid; margin-bottom: 1rem; border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; border: 1px solid var(--glass-b); background: var(--deep); transition: var(--ease); }
.masonry-item:hover { transform: scale(1.018); border-color: rgba(157,0,255,0.5); box-shadow: 0 20px 60px rgba(0,0,0,0.6), var(--glow-p); z-index: 10; }
.masonry-item img { width: 100%; display: block; transition: transform 0.8s ease; }
.masonry-item:hover img { transform: scale(1.06); }
.masonry-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem 1rem 1rem; background: linear-gradient(to top, rgba(2,2,8,0.96), transparent); transform: translateY(100%); transition: transform var(--ease); }
.masonry-item:hover .masonry-info { transform: translateY(0); }
.masonry-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; line-height: 1.3; }
.masonry-meta { font-size: 0.65rem; color: rgba(255,255,255,0.4); display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.3rem; }
.img-tag { display: inline-block; padding: 0.12rem 0.45rem; border-radius: 3px; font-size: 0.56rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tag-jwst { background: rgba(184,255,0,0.15); color: var(--lime); }
.tag-hubble { background: rgba(0,212,255,0.15); color: var(--blue); }
.tag-nasa { background: rgba(252,61,33,0.15); color: var(--red); }
.tag-planet { background: rgba(255,165,0,0.15); color: #ffa500; }
.tag-galaxy { background: rgba(157,0,255,0.15); color: var(--purple); }
.gallery-meta { text-align: center; font-size: 0.72rem; color: rgba(255,255,255,0.3); margin: 0 0 2rem; letter-spacing: 0.08em; }
.gallery-meta strong { color: var(--lime); }
@media (max-width: 600px) { .masonry { columns: 2 130px; } }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 2rem; background: rgba(0,0,0,0); pointer-events: none; transition: background 0.3s; }
.lightbox.open { background: rgba(0,0,0,0.96); pointer-events: all; }
.lightbox-inner { position: relative; max-width: 92vw; transform: scale(0.88) translateY(24px); opacity: 0; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s; }
.lightbox.open .lightbox-inner { transform: scale(1) translateY(0); opacity: 1; }
.lightbox-inner img { max-width: 88vw; max-height: 76vh; object-fit: contain; border-radius: 12px; border: 1px solid var(--glass-b); box-shadow: 0 0 80px rgba(157,0,255,0.3), 0 0 160px rgba(0,212,255,0.1); }
.lightbox-caption { margin-top: 1.25rem; text-align: center; max-width: 700px; margin-inline: auto; }
.lightbox-caption h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.4rem; }
.lightbox-caption p { font-size: 0.82rem; color: rgba(255,255,255,0.45); line-height: 1.65; }
.lb-close { position: absolute; top: -1rem; right: -1rem; width: 38px; height: 38px; background: var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff; cursor: pointer; transition: var(--ease); border: 2px solid rgba(255,255,255,0.1); }
.lb-close:hover { transform: scale(1.15) rotate(90deg); }
.lb-glow { position: absolute; inset: -30px; border-radius: 20px; pointer-events: none; animation: lb-glow-pulse 3s ease-in-out infinite; }
@keyframes lb-glow-pulse { 0%,100% { box-shadow: 0 0 80px rgba(157,0,255,0.25), 0 0 160px rgba(0,212,255,0.1); } 50% { box-shadow: 0 0 120px rgba(157,0,255,0.45), 0 0 240px rgba(0,212,255,0.2); } }
.ambient-ind { position: fixed; top: 80px; right: 1.5rem; z-index: 500; background: rgba(2,2,8,0.88); backdrop-filter: blur(8px); border: 1px solid rgba(157,0,255,0.35); border-radius: 100px; padding: 0.38rem 1rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple); display: none; align-items: center; gap: 0.4rem; }
.ambient-ind.on { display: flex; }
.wave-bars { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.wave-bars span { display: block; width: 2px; border-radius: 1px; background: var(--purple); animation: wave-anim 0.9s ease-in-out infinite; }
.wave-bars span:nth-child(1) { height: 6px; } .wave-bars span:nth-child(2) { height: 12px; animation-delay: 0.15s; } .wave-bars span:nth-child(3) { height: 8px; animation-delay: 0.3s; } .wave-bars span:nth-child(4) { height: 14px; animation-delay: 0.45s; }
@keyframes wave-anim { 0%,100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* ============================================================
   SOLAR SYSTEM PAGE
   ============================================================ */
.solar-hero { padding: 4rem 2rem 2rem; text-align: center; position: relative; overflow: hidden; }
.solar-bg { position: absolute; inset: 0; background-image: url('../assets/images/starfield_dark.jpg'); background-size: cover; background-position: center; opacity: 0.22; z-index: 0; }
.solar-content { position: relative; z-index: 1; }
.orrery-wrap { position: relative; width: 100%; max-width: 900px; margin: 2rem auto 0; height: 640px; }
.orrery-svg { width: 100%; height: 100%; }
.planet-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1rem; padding: 2rem 2rem 4rem; max-width: 1500px; margin: 0 auto; }
.planet-card { padding: 1.5rem; cursor: pointer; text-align: center; transition: var(--ease); }
.planet-card:hover { transform: translateY(-6px); }
.planet-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 2px solid var(--glass-b); transition: var(--ease); }
.planet-card:hover img { border-color: var(--purple); box-shadow: var(--glow-p); transform: scale(1.1); }
.planet-card-name { font-family: var(--font-hud); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; }
.planet-card-fact { font-size: 0.7rem; color: rgba(255,255,255,0.38); line-height: 1.5; }
.planet-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 2rem; background: rgba(0,0,0,0); pointer-events: none; transition: background 0.3s; }
.planet-modal.open { background: rgba(0,0,0,0.93); pointer-events: all; }
.planet-modal-box { max-width: 880px; width: 100%; transform: scale(0.9); opacity: 0; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s; position: relative; }
.planet-modal.open .planet-modal-box { transform: scale(1); opacity: 1; }
.planet-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: 20px; overflow: hidden; border: 1px solid var(--glass-b); }
.planet-modal-visual { background: var(--deep); display: flex; align-items: center; justify-content: center; padding: 3rem; min-height: 300px; }
.planet-modal-visual img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; box-shadow: var(--glow-p); animation: planet-rotate 20s linear infinite; }
@keyframes planet-rotate { to { filter: hue-rotate(15deg); } }
.planet-modal-info { padding: 2.5rem; background: rgba(6,6,26,0.9); backdrop-filter: var(--blur); overflow-y: auto; }
.planet-modal-close { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--ease); border: 1px solid var(--glass-b); color: rgba(255,255,255,0.6); font-size: 1rem; z-index: 1; }
.planet-modal-close:hover { background: var(--red); border-color: transparent; color: #fff; transform: rotate(90deg); }
.planet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.25rem; }
.p-stat { background: rgba(255,255,255,0.04); border-radius: 8px; padding: 0.75rem; border: 1px solid var(--glass-b); }
.p-stat-label { font-size: 0.56rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 0.2rem; }
.p-stat-value { font-family: var(--font-hud); font-size: 0.88rem; color: var(--lime); }
@media (max-width: 700px) { .planet-modal-grid { grid-template-columns: 1fr; } .planet-modal-info { padding: 1.5rem; } }

/* ============================================================
   ENCYCLOPEDIA PAGE
   ============================================================ */
.enc-hero { padding: 5rem 2rem 2rem; text-align: center; position: relative; }
.enc-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(157,0,255,0.1), transparent 60%); z-index: 0; pointer-events: none; }
.enc-content { position: relative; z-index: 1; }
.enc-search { max-width: 640px; margin: 2rem auto 0; }
.enc-search input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(157,0,255,0.3); border-radius: 12px; padding: 1rem 1.5rem; color: var(--white); font-size: 1rem; transition: var(--ease); }
.enc-search input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(157,0,255,0.15), var(--glow-p); }
.enc-search input::placeholder { color: rgba(255,255,255,0.22); }
.enc-cats { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin: 2rem 0; }
.enc-cat { padding: 0.38rem 1.1rem; border-radius: 100px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--glass-b); color: rgba(255,255,255,0.45); transition: var(--ease); background: transparent; cursor: pointer; }
.enc-cat:hover { color: var(--white); border-color: rgba(255,255,255,0.3); }
.enc-cat.active { background: rgba(157,0,255,0.2); border-color: var(--purple); color: var(--purple); }
.enc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 1.25rem; padding: 0 2rem 6rem; max-width: 1500px; margin: 0 auto; }
.enc-card { padding: 2rem; cursor: pointer; transition: var(--ease); }
.enc-card:hover { transform: translateY(-5px); }
.enc-card-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.enc-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; border: 1px solid var(--glass-b); transition: var(--ease); }
.enc-card:hover .enc-icon { transform: scale(1.1) rotate(-8deg); }
.enc-cat-label { font-size: 0.56rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 0.2rem; }
.enc-card-title { font-family: var(--font-hud); font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.enc-card-excerpt { font-size: 0.8rem; color: rgba(255,255,255,0.42); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.enc-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--glass-b); }
.enc-tag { font-size: 0.58rem; font-weight: 700; padding: 0.18rem 0.5rem; border-radius: 4px; }
.enc-read { font-size: 0.7rem; color: var(--blue); font-weight: 600; display: flex; align-items: center; gap: 0.3rem; transition: var(--ease); }
.enc-card:hover .enc-read { gap: 0.6rem; color: var(--lime); }
.enc-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 2rem; background: rgba(0,0,0,0); pointer-events: none; transition: background 0.3s; overflow-y: auto; }
.enc-modal.open { background: rgba(0,0,0,0.94); pointer-events: all; }
.enc-modal-inner { max-width: 860px; width: 100%; transform: translateY(30px); opacity: 0; transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s; margin: auto; }
.enc-modal.open .enc-modal-inner { transform: translateY(0); opacity: 1; }
.enc-article { background: rgba(6,6,26,0.96); border: 1px solid var(--glass-b); border-radius: 20px; overflow: hidden; backdrop-filter: var(--blur); position: relative; }
.enc-article-top { padding: 3rem; border-bottom: 1px solid var(--glass-b); }
.enc-article-body { padding: 2.5rem 3rem; font-size: 0.92rem; line-height: 1.85; color: rgba(255,255,255,0.62); }
.enc-article-body h3 { font-family: var(--font-hud); font-size: 0.9rem; color: var(--lime); margin: 1.75rem 0 0.6rem; }
.enc-article-body p { margin-bottom: 1rem; }
.enc-article-body strong { color: var(--white); font-weight: 600; }
.enc-article-body .fact-box { background: rgba(157,0,255,0.06); border: 1px solid rgba(157,0,255,0.2); border-radius: 10px; padding: 1.25rem; margin: 1.25rem 0; }
.enc-close { position: absolute; top: 1.5rem; right: 1.5rem; width: 38px; height: 38px; background: rgba(255,255,255,0.07); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--ease); border: 1px solid var(--glass-b); color: rgba(255,255,255,0.55); font-size: 1rem; }
.enc-close:hover { background: var(--red); border-color: transparent; color: #fff; transform: rotate(90deg); }
@media (max-width: 600px) { .enc-article-top, .enc-article-body { padding: 1.5rem; } }

/* ============================================================
   MUSIC PLAYER PAGE
   ============================================================ */
.music-hero { padding: 5rem 2rem 2rem; text-align: center; position: relative; overflow: hidden; }
.music-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(157,0,255,0.12), transparent 50%), radial-gradient(ellipse at 70% 50%, rgba(0,212,255,0.08), transparent 50%); z-index: 0; }
.music-content { position: relative; z-index: 1; }
.viz-bg-bars { position: absolute; bottom: 0; left: 0; right: 0; height: 180px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; opacity: 0.12; z-index: 0; pointer-events: none; }
.viz-bar { width: 6px; border-radius: 3px 3px 0 0; background: linear-gradient(to top, var(--purple), var(--blue)); animation: viz-idle 1.5s ease-in-out infinite; }
@keyframes viz-idle { 0%,100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
.player-wrap { max-width: 1100px; margin: 0 auto; padding: 0 2rem 5rem; }
.np-card { padding: 2.5rem; display: flex; gap: 2.5rem; align-items: center; margin-bottom: 1.5rem; }
@media (max-width: 700px) { .np-card { flex-direction: column; text-align: center; } }
.np-art { width: 180px; height: 180px; flex-shrink: 0; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 4rem; box-shadow: var(--glow-p); animation: art-spin 24s linear infinite paused; position: relative; overflow: hidden; }
.np-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, var(--purple), var(--blue), var(--lime)); opacity: 0.9; }
.np-art-emoji { position: relative; z-index: 1; font-size: 3.5rem; }
.np-art.playing { animation-play-state: running; }
@keyframes art-spin { to { transform: rotate(360deg); } }
.np-info { flex: 1; }
.np-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.5rem; }
.np-title { font-family: var(--font-display); font-size: clamp(1.1rem, 3vw, 1.8rem); font-weight: 700; margin-bottom: 0.35rem; line-height: 1.2; }
.np-artist { font-size: 0.88rem; color: rgba(255,255,255,0.4); margin-bottom: 1.5rem; }
.progress-wrap { margin-bottom: 1.25rem; }
.progress-bg { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; cursor: pointer; position: relative; }
.progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--purple), var(--blue)); transition: width 0.25s linear; }
.progress-thumb { position: absolute; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--white); margin-left: -6px; box-shadow: 0 0 8px rgba(157,0,255,0.8); pointer-events: none; }
.progress-times { display: flex; justify-content: space-between; margin-top: 0.4rem; font-size: 0.66rem; color: rgba(255,255,255,0.32); font-family: var(--font-hud); }
.controls { display: flex; align-items: center; justify-content: center; gap: 0.85rem; }
.ctrl { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-b); color: rgba(255,255,255,0.6); font-size: 1rem; cursor: pointer; transition: var(--ease); }
.ctrl:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.ctrl.play { width: 56px; height: 56px; font-size: 1.3rem; background: linear-gradient(135deg, var(--purple), #5500cc); border-color: transparent; color: #fff; box-shadow: var(--glow-p); }
.ctrl.play:hover { transform: scale(1.1); }
.ctrl.active { color: var(--lime); border-color: rgba(184,255,0,0.3); }
.vol-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
.vol-icon { font-size: 0.9rem; color: rgba(255,255,255,0.35); cursor: pointer; }
.vol-slider { flex: 1; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; appearance: none; cursor: pointer; }
.vol-slider::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--white); cursor: pointer; box-shadow: 0 0 6px rgba(157,0,255,0.6); }
.viz-canvas-wrap { margin: 1.5rem 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-b); background: var(--deep); height: 110px; position: relative; }
#viz-canvas { width: 100%; height: 100%; display: block; }
.viz-label { position: absolute; top: 0.65rem; left: 1rem; font-size: 0.56rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.22); }
.track-list { display: flex; flex-direction: column; gap: 0.5rem; }
.track-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: 10px; cursor: pointer; transition: var(--ease); border: 1px solid transparent; }
.track-item:hover { background: rgba(255,255,255,0.04); border-color: var(--glass-b); }
.track-item.active { background: rgba(157,0,255,0.1); border-color: rgba(157,0,255,0.28); }
.track-num { font-family: var(--font-hud); font-size: 0.72rem; color: rgba(255,255,255,0.22); width: 20px; text-align: center; flex-shrink: 0; }
.track-item.active .track-num { color: var(--purple); }
.track-emoji { font-size: 1.1rem; width: 30px; flex-shrink: 0; }
.track-info { flex: 1; }
.track-name { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.15rem; }
.track-desc { font-size: 0.7rem; color: rgba(255,255,255,0.32); }
.track-dur { font-family: var(--font-hud); font-size: 0.7rem; color: rgba(255,255,255,0.28); flex-shrink: 0; }
.track-eq { display: none; gap: 2px; align-items: flex-end; height: 16px; }
.track-item.active .track-eq { display: flex; }
.track-eq span { display: block; width: 3px; background: var(--purple); border-radius: 2px; animation: wave-anim 0.9s ease-in-out infinite; }
.track-eq span:nth-child(2) { animation-delay: 0.15s; } .track-eq span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wave-anim { 0%,100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.sound-toggle { position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 100; background: rgba(2,2,8,0.85); backdrop-filter: blur(12px); border: 1px solid var(--glass-b); border-radius: 100px; padding: 0.55rem 1.1rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.45); cursor: pointer; transition: var(--ease); display: flex; align-items: center; gap: 0.4rem; }
.sound-toggle:hover { border-color: var(--lime); color: var(--lime); }

/* ============================================================
   FOOTER
   ============================================================ */
.system-footer { border-top: 1px solid var(--glass-b); background: rgba(2,2,8,0.88); backdrop-filter: var(--blur); padding: 1.5rem 2rem; }
.footer-inner { max-width: 1500px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-brand { font-family: var(--font-hud); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; color: rgba(255,255,255,0.28); }
.footer-brand span { color: var(--lime); }
.sys-status { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.sys-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; color: rgba(255,255,255,0.28); }
.sys-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.sys-dot.warn { background: var(--gold); }
.sys-dot.err { background: var(--red); }
.footer-copy { font-size: 0.62rem; color: rgba(255,255,255,0.15); }

/* ============================================================
   ERRORS / UTILS
   ============================================================ */
.error-state { text-align: center; padding: 5rem 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.error-icon { font-size: 3rem; opacity: 0.5; }
.error-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--red); }
.error-desc { font-size: 0.87rem; color: rgba(255,255,255,0.4); max-width: 400px; line-height: 1.7; }
.fade-in { animation: fade-in 0.5s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.stagger > * { animation: fade-in 0.5s ease both; }
.stagger > *:nth-child(1){animation-delay:.04s}.stagger > *:nth-child(2){animation-delay:.08s}.stagger > *:nth-child(3){animation-delay:.12s}.stagger > *:nth-child(4){animation-delay:.16s}.stagger > *:nth-child(5){animation-delay:.20s}.stagger > *:nth-child(6){animation-delay:.24s}.stagger > *:nth-child(7){animation-delay:.28s}.stagger > *:nth-child(8){animation-delay:.32s}.stagger > *:nth-child(9){animation-delay:.36s}.stagger > *:nth-child(10){animation-delay:.40s}
@media (max-width: 480px) { .section, .section-sm { padding: 4rem 1.25rem; } .hero-stats-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
