/* ═══════════════════════════════════════════════════════════
   Young Bucks Course — shared styles
   Brand tokens mirror /index.html Tailwind config
   ═══════════════════════════════════════════════════════════ */

:root {
  --lime:       #8ACE00;
  --lime-dark:  #6BA300;
  --lime-light: #A8E830;
  --electric:   #4ADE80;
  --gold:       #F4C430;
  --gold-dark:  #D4A017;
  --navy:       #0A0F1E;
  --navy-mid:   #111827;
  --navy-card:  #161E2E;
  --navy-border:#1F2D44;
  --text:       #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim:   #64748B;

  --shadow-lime-glow: 0 0 30px rgba(138,206,0,0.25);
  --shadow-lime-sm:   0 0 12px rgba(138,206,0,0.15);
  --shadow-gold-glow: 0 0 20px rgba(244,196,48,0.2);
  --shadow-card:      0 4px 24px rgba(0,0,0,0.4);

  --radius-card:  20px;
  --radius-pill:  999px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 { font-family: 'Sora', sans-serif; letter-spacing: -0.01em; }

a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-light); }

/* ── App chrome ────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(10,15,30,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-border);
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 16px;
  color: var(--text);
}
.topbar .brand .deer { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; display: inline-block; vertical-align: middle; }
.topbar .hud {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Sora', sans-serif; font-size: 13px;
}
.topbar .xp-chip {
  background: rgba(138,206,0,0.12);
  border: 1px solid rgba(138,206,0,0.3);
  color: var(--lime);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(138,206,0,0.5);
}
.topbar .rank-chip {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Stage (scene container) ───────────────────── */
#stage {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  min-height: calc(100vh - 60px);
}

/* ── Cards ─────────────────────────────────────── */
.card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.card-hover { transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(138,206,0,0.45);
  box-shadow: var(--shadow-lime-sm);
}

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--lime);
  color: var(--navy);
  font-family: 'Sora', sans-serif; font-weight: 800;
  padding: 14px 28px;
  border: 0; border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-lime-glow);
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); background: var(--lime-light); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--navy-border);
  box-shadow: none;
  font-weight: 700;
  padding: 12px 22px;
}
.btn-ghost:hover { border-color: var(--lime); background: transparent; }

.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── HUD primitives ────────────────────────────── */
.lives { display: inline-flex; gap: 8px; }
.lives .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(138,206,0,0.5);
  transition: background .2s ease, box-shadow .2s ease;
}
.lives .dot.lost { background: #374151; box-shadow: none; }

.progress-bar {
  height: 4px; background: var(--navy-border);
  border-radius: var(--radius-pill); overflow: hidden;
}
.progress-bar .fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--lime), var(--electric));
  box-shadow: 0 0 10px rgba(138,206,0,0.6);
  transition: width .4s ease;
}

.timer-ring {
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid var(--lime);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 18px;
  color: var(--lime);
  transition: color .2s ease, border-color .2s ease;
}
.timer-ring.warn  { border-color: var(--gold); color: var(--gold); }
.timer-ring.danger{ border-color: #F87171;    color: #F87171;    }

.pill {
  display: inline-block;
  background: rgba(138,206,0,0.12);
  border: 1px solid rgba(138,206,0,0.3);
  color: var(--lime);
  font-family: 'Sora', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-pill);
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--navy-card);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: var(--radius-pill);
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 13px;
  box-shadow: var(--shadow-gold-glow);
}

/* ── Hub: world grid ───────────────────────────── */
.world-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
@media (max-width: 640px) { .world-grid { grid-template-columns: 1fr; } }

.world-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-align: left;
  font-family: inherit; color: inherit;
}
.world-card:hover:not(.locked) {
  transform: translateY(-3px);
  border-color: rgba(138,206,0,0.45);
  box-shadow: var(--shadow-lime-sm);
}
.world-card.locked { opacity: 0.55; cursor: pointer; }
.world-card.locked:hover { border-color: rgba(244,196,48,0.4); }
.world-card .wc-top { display: flex; justify-content: space-between; align-items: center; }
.world-card .wc-emoji { font-size: 40px; }
.world-card .wc-lock { font-size: 16px; color: var(--gold); }
.world-card h3 { font-size: 20px; font-weight: 700; color: var(--text); }
.world-card .wc-tagline { font-size: 14px; color: var(--text-muted); }
.world-card .wc-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-dim);
  margin-top: 4px;
}

/* ── Cutscene / intro screens ──────────────────── */
.cutscene { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 40px 20px; }
.cutscene .buck-art { font-size: 96px; filter: drop-shadow(0 8px 24px rgba(138,206,0,0.35)); }
.cutscene h1 { font-size: clamp(28px, 5vw, 44px); }
.cutscene .buck-say {
  max-width: 520px;
  padding: 18px 22px;
  background: rgba(138,206,0,0.08);
  border: 1px solid rgba(138,206,0,0.25);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px; line-height: 1.55;
}

/* ── XP pop animation (reused from Money Mission) ── */
@keyframes xpPop {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  20%  { opacity: 1; transform: translate(-50%, -20px) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(1); }
}
.xp-pop {
  position: fixed;
  left: 50%;
  top: 35%;
  transform: translate(-50%, 0);
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: var(--lime);
  text-shadow: 0 0 20px rgba(138,206,0,0.8);
  pointer-events: none;
  animation: xpPop 0.9s ease-out forwards;
  z-index: 100;
}

/* ── Utility ───────────────────────────────────── */
.hidden { display: none !important; }
.muted  { color: var(--text-muted); }
.dim    { color: var(--text-dim); }
.center { text-align: center; }
.mt-sm  { margin-top: 10px; }
.mt-md  { margin-top: 20px; }
.mt-lg  { margin-top: 32px; }
.gap-sm { gap: 10px; }
.gap-md { gap: 18px; }
.flex-row { display: flex; flex-direction: row; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
