﻿:root {
  --bg: #0d1425;
  --panel: #152038;
  --panel-2: #1d2b49;
  --gold: #f4c95d;
  --ink: #f8fafc;
  --muted: #b5c3db;
  --line: rgba(255, 255, 255, 0.12);
  --edu: #f4c95d;
  --skill: #6ee7f0;
  --company: #f9a8d4;
  --ai: #a7f3d0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(244, 201, 93, 0.2), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(143, 211, 255, 0.16), transparent 26%),
    linear-gradient(160deg, #0b1020, #111827 55%, #1b2237);
}
.shell { width: min(1380px, 95vw); margin: 0 auto; padding: 28px 0 52px; }
.hero-card, .game-wrap, .timeline-panel, .panel-card { border: 1px solid var(--line); box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32); }
.hero-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: stretch;
  padding: 24px; border-radius: 30px; background: linear-gradient(145deg, rgba(29, 43, 73, 0.94), rgba(12, 17, 31, 0.88));
}
.eyebrow {
  margin: 0 0 10px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 800;
}
h1, .timeline-panel h2, .panel-card h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; }
h1 { font-size: clamp(2.4rem, 5vw, 4.9rem); line-height: 0.95; margin-bottom: 14px; }
.subtitle, .timeline-copy, .panel-card p, .mile-copy, .legend-list small, .stage-list span { color: var(--muted); line-height: 1.65; }
.subtitle { max-width: 900px; margin: 0; }
.hero-actions, .hero-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions { margin-top: 18px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0.85rem 1.15rem;
  border-radius: 999px; border: 1px solid transparent; text-decoration: none; font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.cta:hover { transform: translateY(-1px); }
.cta-primary { color: #1a1407; background: linear-gradient(180deg, #ffe082, #f4c95d); }
.cta-secondary { color: var(--ink); background: rgba(255, 255, 255, 0.08); border-color: var(--line); }
.hero-stats { margin-top: 18px; }
.stat-pill, .panel-card, .hud > div, .mile-card { background: rgba(255, 255, 255, 0.06); }
.stat-pill { min-width: 170px; padding: 0.9rem 1rem; border-radius: 18px; border: 1px solid var(--line); }
.stat-pill span, .label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.stat-pill strong, .hud strong { display: block; margin-top: 4px; }
.mission-panel {
  display: grid; gap: 10px; padding: 18px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}
.mission-panel strong { font-size: 1.1rem; }
.mission-panel span { color: var(--muted); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 22px; }
.game-wrap {
  position: relative; padding: 14px; overflow: hidden; border-radius: 30px;
  background: linear-gradient(180deg, rgba(21, 32, 56, 0.95), rgba(10, 16, 30, 0.98));
}
.hud { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 4px 14px; }
.hud > div { min-width: 118px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); }
#restartBtn, .mobile-controls button { border: 0; border-radius: 14px; font-weight: 800; cursor: pointer; }
#restartBtn {
  margin-left: auto; padding: 12px 16px; color: #1a1407; background: linear-gradient(180deg, #ffe082, #f4c95d); box-shadow: 0 5px 0 #a67812;
}
#restartBtn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a67812; }
canvas { width: 100%; height: auto; display: block; background: #8fd3ff; border-radius: 22px; }
.toast {
  position: absolute; left: 26px; bottom: 24px; max-width: min(600px, 82%); padding: 12px 16px; border-radius: 16px;
  background: rgba(7, 12, 25, 0.84); border: 1px solid var(--line); color: var(--muted);
  opacity: 0; transform: translateY(12px); transition: opacity 220ms ease, transform 220ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast strong { color: var(--gold); }
.insight-panel { display: grid; gap: 14px; }
.panel-card { padding: 18px; border-radius: 22px; }
.panel-card h2 { margin-bottom: 10px; font-size: 1.3rem; }
.legend-list, .stage-list { display: grid; gap: 10px; }
.legend-list div, .stage-list div { display: grid; grid-template-columns: 14px auto; gap: 10px; align-items: start; }
.stage-list div { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.stage-list div.is-active { border-color: rgba(244, 201, 93, 0.56); background: rgba(244, 201, 93, 0.12); }
.stage-list b, .legend-list b { display: block; margin-bottom: 2px; }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; }
.legend-edu { background: var(--edu); }
.legend-skill { background: var(--skill); }
.legend-company { background: var(--company); }
.legend-ai { background: var(--ai); }
.mobile-controls { display: none; justify-content: center; gap: 12px; padding: 14px 0 4px; }
.mobile-controls button { width: 82px; height: 52px; background: rgba(255, 255, 255, 0.12); color: #fff; }
.timeline-panel {
  margin-top: 22px; padding: 22px; border-radius: 30px; background: linear-gradient(180deg, rgba(21, 32, 56, 0.8), rgba(11, 17, 30, 0.82));
}
.timeline-heading { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.timeline-panel h2 { font-size: 2rem; }
.timeline-copy { max-width: 520px; margin: 0; }
.timeline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.mile-card { padding: 16px; border-radius: 20px; border: 1px solid var(--line); }
.mile-card.is-active { border-color: rgba(244, 201, 93, 0.6); box-shadow: inset 0 0 0 1px rgba(244, 201, 93, 0.15); }
.mile-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mile-meta span { color: var(--gold); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; }
.mile-card h3 { margin: 10px 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; }
.mile-copy { margin: 0; }
.reward-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.reward-pill { display: inline-flex; align-items: center; padding: 0.42rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 800; border: 1px solid transparent; }
.reward-edu { color: #3d2b05; background: rgba(244, 201, 93, 0.88); }
.reward-skill { color: #052d32; background: rgba(110, 231, 240, 0.88); }
.reward-company { color: #43192f; background: rgba(249, 168, 212, 0.88); }
.reward-ai { color: #143a28; background: rgba(167, 243, 208, 0.92); }
@media (max-width: 1120px) {
  .hero-card, .game-layout, .timeline-heading { grid-template-columns: 1fr; display: grid; }
  .timeline-heading { align-items: start; }
}
@media (max-width: 820px) {
  .shell { width: min(94vw, 94vw); }
  .mobile-controls { display: flex; }
  .toast { left: 18px; bottom: 92px; }
  .hud { gap: 8px; }
  .hud > div { min-width: 98px; }
  #restartBtn { margin-left: 0; }
}
