/* ═══════════════════════════════════════════════════════
   GhostNet Academy — Design System
   Theme: Cyberpunk Classroom · Dark Navy · Terminal Green
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:        #080d14;
  --bg2:       #0d1520;
  --bg3:       #111e2e;
  --surface:   #0f1c2d;
  --border:    #1a2e45;
  --border2:   #243d5a;
  --green:     #00ff88;
  --green-dim: #00cc6a;
  --green-dark:#004422;
  --cyan:      #00ccff;
  --yellow:    #ffcc00;
  --red:       #ff4466;
  --purple:    #aa44ff;
  --text:      #c8ddf0;
  --text-dim:  #6a8aaa;
  --text-bright:#e8f4ff;
  --white:     #ffffff;
  --font-head: 'Orbitron', monospace;
  --font-body: 'Nunito', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius:    8px;
  --radius-lg: 16px;
  --glow-green: 0 0 20px rgba(0,255,136,0.3);
  --glow-cyan:  0 0 20px rgba(0,204,255,0.3);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-dim); }

img { max-width: 100%; }

/* ── Scanlines ──────────────────────────────────────── */
.scanlines {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

/* ── Container ──────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--green); color: var(--bg);
  font-family: var(--font-body); font-weight: 800; font-size: .95rem;
  padding: .65rem 1.4rem; border-radius: var(--radius);
  border: none; cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--green-dim); color: var(--bg); transform: translateY(-1px); box-shadow: var(--glow-green); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .4rem;
  background: transparent; color: var(--green);
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  padding: .65rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--green); cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(0,255,136,.08); color: var(--green); }

.btn-outline {
  display: inline-flex; align-items: center; gap: .4rem;
  background: transparent; color: var(--text-bright);
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  padding: .65rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--border2); cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }

.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 64px;
  background: rgba(8,13,20,.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--text-bright);
}
.logo-ghost { font-size: 1.4rem; }
.logo-text {
  font-family: var(--font-head); font-size: .9rem;
  color: var(--text-bright); letter-spacing: .05em;
}
.logo-text em { color: var(--green); font-style: normal; }

.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  color: var(--text-dim); font-weight: 600; font-size: .9rem;
  padding: .4rem .8rem; border-radius: var(--radius);
  transition: all .2s; text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--text-bright); background: var(--bg3); }
.nav-btn { margin-left: .5rem; padding: .45rem 1rem; font-size: .9rem; }

.nav-agent { font-weight: 700; color: var(--text-bright); }
.nav-xp { font-size: .8rem; color: var(--green); margin-left: .3rem; font-family: var(--font-mono); }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: .5rem; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }

.mobile-nav {
  display: none; flex-direction: column;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem; gap: .5rem;
}
.mobile-nav a { color: var(--text); font-weight: 600; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.mobile-nav.open { display: flex; }

/* ── Flash messages ──────────────────────────────────── */
.flash-container { padding: 1rem 2rem; }
.flash { padding: .75rem 1rem; border-radius: var(--radius); font-weight: 600; }
.flash-success { background: rgba(0,255,136,.1); border: 1px solid var(--green); color: var(--green); }
.flash-error { background: rgba(255,68,102,.1); border: 1px solid var(--red); color: var(--red); }

/* ── Page header ─────────────────────────────────────── */
.page-header {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.page-title { font-family: var(--font-head); font-size: 1.8rem; color: var(--text-bright); margin-bottom: .5rem; }
.page-sub { color: var(--text-dim); font-size: 1rem; }

/* ── Section titles ──────────────────────────────────── */
.section-title {
  font-family: var(--font-head); font-size: 1.5rem;
  color: var(--text-bright); text-align: center;
  margin-bottom: .75rem;
}
.section-sub { color: var(--text-dim); text-align: center; margin-bottom: 3rem; }
.section-sub-title { font-family: var(--font-head); font-size: 1rem; color: var(--text-dim); margin: 2rem 0 1rem; letter-spacing: .1em; text-transform: uppercase; }

/* ══════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════ */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 64px);
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 3rem;
  padding: 5rem 4rem;
}

.hero-bg-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,255,136,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,.04) 1px, transparent 1px);
  background-size: 50px 50px;
}
.hero-particles { position: absolute; inset: 0; z-index: 0; }
.hero-particles canvas { width: 100% !important; height: 100% !important; }

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-block;
  background: rgba(0,255,136,.1); border: 1px solid var(--green);
  color: var(--green); font-size: .8rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 99px; margin-bottom: 1.5rem;
  letter-spacing: .05em;
}

.hero-title {
  font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--text-bright); line-height: 1.1; margin-bottom: 1.2rem;
}

/* Glitch effect */
.glitch {
  position: relative; color: var(--green);
  display: inline-block;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--green);
}
.glitch::before {
  animation: glitch1 3s infinite;
  color: var(--cyan); clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
}
.glitch::after {
  animation: glitch2 3s infinite;
  color: var(--red); clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
}
@keyframes glitch1 {
  0%,90%,100% { transform: translate(0); }
  92% { transform: translate(-2px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(0); }
}
@keyframes glitch2 {
  0%,90%,100% { transform: translate(0); }
  91% { transform: translate(2px, 1px); }
  93% { transform: translate(-1px, -1px); }
  95% { transform: translate(0); }
}

.hero-sub { color: var(--text-dim); font-size: 1.1rem; line-height: 1.7; margin-bottom: 2rem; max-width: 480px; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.hero-stats {
  display: flex; align-items: center; gap: 1.5rem;
  font-family: var(--font-mono); font-size: .85rem;
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--green); line-height: 1; }
.stat-label { color: var(--text-dim); font-size: .75rem; }
.stat-divider { width: 1px; height: 40px; background: var(--border2); }

/* Terminal widget */
.hero-terminal {
  position: relative; z-index: 1;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 0 60px rgba(0,255,136,.1), 0 40px 80px rgba(0,0,0,.4);
  font-family: var(--font-mono);
}
.term-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem;
  background: var(--bg3); border-bottom: 1px solid var(--border);
}
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot.red    { background: #ff5f57; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green  { background: #28ca41; }
.term-title { color: var(--text-dim); font-size: .8rem; margin-left: .5rem; }
.term-body { padding: 1.5rem; min-height: 200px; font-size: .85rem; }
.term-line { color: var(--green); margin-bottom: .3rem; opacity: 0; animation: fadeIn .3s forwards; }
.term-line.cursor::after { content: ''; display: inline-block; width: 8px; height: 1em; background: var(--green); margin-left: 2px; animation: blink 1s infinite; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ══════════════════════════════════════════════════════
   FEATURES
   ══════════════════════════════════════════════════════ */
.features {
  padding: 6rem 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  transition: all .25s;
}
.feature-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 20px 40px rgba(0,0,0,.3); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-family: var(--font-head); font-size: .95rem; color: var(--text-bright); margin-bottom: .5rem; }
.feature-card p { color: var(--text-dim); font-size: .9rem; line-height: 1.6; }

/* ══════════════════════════════════════════════════════
   ZONES PREVIEW (index page)
   ══════════════════════════════════════════════════════ */
.zones-preview { padding: 6rem 0; }

.zones-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
}
.zone-card-preview {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem 1rem 1rem;
  text-decoration: none; transition: all .25s;
  display: flex; flex-direction: column;
  border-top: 3px solid var(--zone-color, var(--green));
}
.zone-card-preview:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,.3), 0 0 30px rgba(var(--zone-color),0.1);
  border-color: var(--zone-color, var(--green));
}
.zone-card-preview .zone-icon { font-size: 2rem; margin-bottom: .75rem; }
.zone-card-preview .zone-num { font-family: var(--font-mono); font-size: .7rem; color: var(--text-dim); margin-bottom: .25rem; }
.zone-card-preview .zone-name { font-family: var(--font-head); font-size: .8rem; color: var(--text-bright); margin-bottom: .4rem; line-height: 1.3; }
.zone-card-preview .zone-sub { font-size: .75rem; color: var(--text-dim); flex: 1; margin-bottom: .75rem; }
.zone-card-preview .zone-grade {
  font-size: .7rem; font-weight: 700; color: var(--zone-color, var(--green));
  background: rgba(0,0,0,.3); padding: .2rem .5rem; border-radius: 99px;
  width: fit-content; margin-bottom: .5rem;
}
.zone-card-preview .zone-arrow { color: var(--zone-color, var(--green)); font-size: .9rem; font-weight: 700; }

/* ══════════════════════════════════════════════════════
   CTA BAND
   ══════════════════════════════════════════════════════ */
.cta-band {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--bg2) 60%);
  border-top: 1px solid var(--border);
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-text h2 { font-family: var(--font-head); font-size: 1.6rem; color: var(--text-bright); margin-bottom: .5rem; }
.cta-text p { color: var(--text-dim); }
.cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════
   ZONES PAGE
   ══════════════════════════════════════════════════════ */
.zones-page { padding: 2.5rem 0 5rem; }

.agent-bar {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  margin-top: 1rem; font-family: var(--font-mono); font-size: .85rem;
}
.agent-name { color: var(--text); }
.agent-xp { color: var(--green); }
.agent-stars { color: var(--yellow); }

.overall-progress {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2.5rem; flex-wrap: wrap;
}
.op-label { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); white-space: nowrap; }
.op-bar-wrap { flex: 1; min-width: 120px; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.op-bar { height: 100%; background: var(--green); border-radius: 99px; transition: width .5s ease; }
.op-count { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); white-space: nowrap; }

.zones-list { display: flex; flex-direction: column; gap: 0; }

.zone-row {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 1.5rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--zone-color, var(--green));
  border-radius: var(--radius-lg); padding: 1.75rem;
  transition: all .2s;
}
.zone-row:hover { border-color: var(--zone-color, var(--green)); box-shadow: 0 8px 30px rgba(0,0,0,.3); }

.zone-row-icon { font-size: 2.5rem; text-align: center; }

.zone-row-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }

.zone-num-badge, .zone-grade-badge, .zone-complete-badge {
  font-size: .7rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 99px; font-family: var(--font-mono);
}
.zone-num-badge { background: var(--bg3); color: var(--text-dim); border: 1px solid var(--border); }
.zone-grade-badge { background: rgba(0,204,255,.1); color: var(--cyan); border: 1px solid rgba(0,204,255,.2); }
.zone-complete-badge { background: rgba(0,255,136,.1); color: var(--green); border: 1px solid rgba(0,255,136,.2); }

.zone-row-title { font-family: var(--font-head); font-size: 1.1rem; color: var(--text-bright); margin-bottom: .4rem; }
.zone-row-desc { color: var(--text-dim); font-size: .9rem; margin-bottom: 1rem; }

.zone-progress { display: flex; align-items: center; gap: .75rem; }
.zp-bar-wrap { flex: 1; max-width: 200px; height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.zp-bar { height: 100%; background: var(--zone-color, var(--green)); border-radius: 99px; }
.zp-count { font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); white-space: nowrap; }

.zone-row-action { display: flex; flex-direction: column; align-items: center; gap: .75rem; min-width: 130px; }

.btn-zone {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; background: var(--zone-color, var(--green)); color: var(--bg);
  font-weight: 800; font-size: .9rem; padding: .65rem 1.2rem;
  border-radius: var(--radius); text-decoration: none; transition: all .2s;
}
.btn-zone:hover { opacity: .85; color: var(--bg); transform: translateX(2px); }
.btn-arrow { font-size: 1rem; }

.zone-stars { display: flex; gap: .2rem; }
.star { font-size: 1rem; color: var(--border2); transition: color .2s; }
.star.filled { color: var(--yellow); }

.zone-connector {
  display: flex; flex-direction: column; align-items: center;
  margin: 0 auto; height: 36px; position: relative;
}
.connector-line { flex: 1; width: 2px; background: var(--border2); }
.connector-dot { color: var(--text-dim); font-size: .7rem; }

/* ══════════════════════════════════════════════════════
   ZONE PAGE (individual)
   ══════════════════════════════════════════════════════ */
.zone-header {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
  border-top: 4px solid var(--zone-color, var(--green));
}
.back-link { color: var(--text-dim); font-size: .85rem; display: inline-block; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--green); }
.zh-icon { font-size: 3rem; margin-bottom: .75rem; }
.zh-meta { display: flex; gap: .5rem; margin-bottom: .75rem; }
.zh-title { font-family: var(--font-head); font-size: 2rem; color: var(--text-bright); margin-bottom: .75rem; }
.zh-desc { color: var(--text-dim); max-width: 600px; font-size: 1rem; }

.zone-page { padding: 2.5rem 0 5rem; }

.missions-list { display: flex; flex-direction: column; gap: .75rem; }

.mission-card {
  display: grid; grid-template-columns: 48px 1fr auto;
  gap: 1.25rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  transition: all .2s;
}
.mission-card:hover { border-color: var(--border2); }
.mission-done { opacity: .6; }
.mission-done:hover { opacity: .8; }

.mc-num {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 50%; font-family: var(--font-mono); font-size: .9rem; color: var(--text-dim);
  flex-shrink: 0;
}
.mc-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .35rem; }
.mc-type {
  font-size: .65rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 99px; font-family: var(--font-mono);
  background: var(--bg3); color: var(--text-dim); border: 1px solid var(--border);
}
.type-quiz { color: var(--cyan); border-color: rgba(0,204,255,.3); }
.type-lesson { color: var(--green); border-color: rgba(0,255,136,.3); }
.type-interactive { color: var(--purple); border-color: rgba(170,68,255,.3); }
.type-challenge { color: var(--yellow); border-color: rgba(255,204,0,.3); }

.mc-xp { font-size: .75rem; font-family: var(--font-mono); color: var(--green); }
.mc-star { font-size: .75rem; font-family: var(--font-mono); color: var(--yellow); }
.mc-title { font-weight: 800; color: var(--text-bright); margin-bottom: .2rem; }
.mc-desc { color: var(--text-dim); font-size: .875rem; }

.mc-action { min-width: 90px; text-align: right; }
.btn-mission {
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text-bright); font-weight: 700; font-size: .85rem;
  padding: .5rem 1rem; border-radius: var(--radius);
  cursor: pointer; transition: all .2s; text-decoration: none;
  display: inline-block;
}
.btn-mission:hover { border-color: var(--green); color: var(--green); }
.mc-done-badge { color: var(--green); font-weight: 700; font-size: .85rem; font-family: var(--font-mono); }

.empty-zone { text-align: center; padding: 5rem 2rem; }
.eq-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-zone h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--text-bright); margin-bottom: .5rem; }
.empty-zone p { color: var(--text-dim); margin-bottom: 1.5rem; }

.zone-nav { margin-top: 2.5rem; display: flex; gap: 1rem; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.8); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); padding: 2.5rem;
  max-width: 480px; width: 100%; position: relative;
  box-shadow: 0 0 60px rgba(0,255,136,.1);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--text-dim);
  font-size: 1.1rem; cursor: pointer; padding: .25rem .5rem;
}
.modal-close:hover { color: var(--text-bright); }
.modal-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.modal-title { font-family: var(--font-head); font-size: 1.1rem; color: var(--text-bright); margin-bottom: 1rem; }
.modal-body { color: var(--text-dim); font-size: .9rem; margin-bottom: 1.5rem; line-height: 1.7; }
.modal-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.modal-msg { margin-top: 1rem; font-family: var(--font-mono); font-size: .8rem; color: var(--green); }

/* ══════════════════════════════════════════════════════
   LEADERBOARD
   ══════════════════════════════════════════════════════ */
.leaderboard-table {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  margin: 2.5rem 0;
}
.lb-header {
  display: grid; grid-template-columns: 60px 1fr 60px 80px 100px;
  gap: 1rem; align-items: center;
  padding: .75rem 1.5rem;
  background: var(--bg3); border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim);
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
}
.lb-row {
  display: grid; grid-template-columns: 60px 1fr 60px 80px 100px;
  gap: 1rem; align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--bg3); }
.lb-me { background: rgba(0,255,136,.05) !important; }
.lb-gold .lb-rank { color: #ffd700; font-size: 1.1rem; }
.lb-silver .lb-rank { color: #c0c0c0; font-size: 1.1rem; }
.lb-bronze .lb-rank { color: #cd7f32; font-size: 1.1rem; }
.lb-rank { font-family: var(--font-mono); font-size: .9rem; color: var(--text-dim); }
.lb-name { font-weight: 700; color: var(--text-bright); }
.lb-grade { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); }
.lb-stars { color: var(--yellow); font-family: var(--font-mono); font-size: .85rem; }
.lb-xp { color: var(--green); font-family: var(--font-mono); font-size: .85rem; font-weight: 700; }
.lb-empty { padding: 3rem; text-align: center; color: var(--text-dim); }

/* ══════════════════════════════════════════════════════
   AUTH PAGES
   ══════════════════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.5rem;
  background: radial-gradient(ellipse at center, var(--bg2) 0%, var(--bg) 70%);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
}
.auth-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.auth-title { font-family: var(--font-head); font-size: 1.3rem; color: var(--text-bright); margin-bottom: .4rem; }
.auth-sub { color: var(--text-dim); font-size: .9rem; margin-bottom: 1.75rem; }
.auth-error {
  background: rgba(255,68,102,.1); border: 1px solid var(--red);
  color: var(--red); padding: .75rem 1rem; border-radius: var(--radius);
  font-size: .875rem; margin-bottom: 1.25rem;
}
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .875rem; color: var(--text-dim); }

.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 700; color: var(--text-dim); }
.field-hint { font-weight: 400; color: var(--text-dim); opacity: .7; }
.field input, .field select {
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text-bright); font-family: var(--font-body); font-size: .95rem;
  padding: .65rem .9rem; border-radius: var(--radius);
  transition: border-color .2s; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,255,136,.1); }
.field input::placeholder { color: var(--text-dim); opacity: .5; }
.field select option { background: var(--bg2); }

/* ══════════════════════════════════════════════════════
   PROFILE
   ══════════════════════════════════════════════════════ */
.profile-page { padding: 2.5rem 0 5rem; }
.profile-card {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 1.5rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  margin-bottom: 2.5rem;
}
.profile-avatar {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--green-dark), var(--bg3));
  border: 2px solid var(--green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 1.8rem; color: var(--green);
}
.profile-info h2 { font-family: var(--font-head); font-size: 1.1rem; color: var(--text-bright); }
.profile-handle { color: var(--text-dim); font-family: var(--font-mono); font-size: .8rem; margin: .2rem 0; }
.profile-meta { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-dim); }
.profile-stats { display: flex; gap: 1.5rem; }
.pstat { display: flex; flex-direction: column; align-items: center; }
.pstat-num { font-family: var(--font-head); font-size: 1.5rem; color: var(--green); }
.pstat-label { font-size: .75rem; color: var(--text-dim); font-family: var(--font-mono); }

.history-list { display: flex; flex-direction: column; gap: .5rem; }
.history-row {
  display: grid; grid-template-columns: 150px 1fr 80px 100px;
  gap: 1rem; align-items: center;
  padding: .75rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .85rem;
}
.hr-zone { color: var(--text-dim); font-size: .75rem; }
.hr-title { color: var(--text-bright); font-weight: 600; }
.hr-xp { color: var(--green); font-family: var(--font-mono); }
.hr-date { color: var(--text-dim); font-family: var(--font-mono); font-size: .75rem; }
.empty-state { color: var(--text-dim); padding: 2rem 0; }

/* ══════════════════════════════════════════════════════
   LOGIN NUDGE
   ══════════════════════════════════════════════════════ */
.login-nudge {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin: 2rem 0;
}
.ln-inner {
  display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem;
  flex-wrap: wrap;
}
.ln-icon { font-size: 2rem; }
.ln-text { flex: 1; min-width: 160px; }
.ln-text strong { color: var(--text-bright); display: block; margin-bottom: .25rem; }
.ln-text p { color: var(--text-dim); font-size: .875rem; }
.ln-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 4rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: .5rem; font-family: var(--font-head); font-size: .9rem; color: var(--text-bright); margin-bottom: .5rem; }
.footer-tagline { color: var(--text-dim); font-size: .875rem; margin-bottom: 1.25rem; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.footer-links a { color: var(--text-dim); font-size: .85rem; }
.footer-links a:hover { color: var(--green); }
.footer-copy { color: var(--border2); font-size: .75rem; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem; min-height: auto; }
  .hero-terminal { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .zones-grid { grid-template-columns: repeat(2, 1fr); }
  .zone-row { grid-template-columns: 60px 1fr; }
  .zone-row-action { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .profile-card { grid-template-columns: 72px 1fr; }
  .profile-stats { grid-column: 1 / -1; justify-content: flex-start; }
  .history-row { grid-template-columns: 1fr 80px; }
  .hr-zone, .hr-date { display: none; }
  .lb-header, .lb-row { grid-template-columns: 50px 1fr 80px 100px; }
  .lb-grade { display: none; }
}

@media (max-width: 600px) {
  .navbar { padding: 0 1rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .zones-grid { grid-template-columns: 1fr; }
  .zone-row { grid-template-columns: 1fr; }
  .zone-row-icon { display: none; }
  .hero-title { font-size: 2rem; }
  .cta-inner { flex-direction: column; text-align: center; }
  .auth-card { padding: 1.75rem; }
  .mission-card { grid-template-columns: 40px 1fr; }
  .mc-action { grid-column: 1 / -1; text-align: left; }
  .lb-header, .lb-row { grid-template-columns: 40px 1fr 80px; }
  .lb-stars { display: none; }
}
