* { box-sizing: border-box; margin: 0; }
:root {
  --bg: #070b1f; --ink: #eef4ff; --dim: #8ea0c8;
  --coral: #ff5964; --amber: #ffbe0b; --mint: #80ffdb; --teal: #12e5c8;
  --panel: rgba(12, 18, 44, 0.86);
}
body { background: var(--bg); color: var(--ink); font: 16px/1.5 "Segoe UI", system-ui, sans-serif; }
button { font: inherit; }

/* ---------- game page ---------- */
.game-body { overflow: hidden; height: 100vh; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; }

#hud { position: fixed; inset: 0; pointer-events: none; }
.hud-top { display: flex; gap: 14px; padding: 10px 14px; align-items: baseline; }
#score-box { font-size: 20px; font-weight: 700; letter-spacing: .12em; color: var(--mint); }
#score-box span { font-size: 26px; }
#combo-box { font-size: 18px; color: var(--amber); font-weight: 700; }
#combo-box.dim { color: var(--dim); }
#health-wrap { position: fixed; top: 52px; left: 14px; width: 180px; height: 10px;
  background: rgba(255,255,255,.12); border-radius: 5px; overflow: hidden; }
#health-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--coral), var(--mint)); }
#progress-wrap { position: fixed; top: 52px; right: 14px; width: 180px; height: 6px;
  background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
#progress-bar { height: 100%; width: 0%; background: var(--teal); }
#judge { position: fixed; top: 34%; left: 0; right: 0; text-align: center;
  font-size: 34px; font-weight: 800; letter-spacing: .18em; opacity: 0;
  transition: opacity .12s; text-shadow: 0 0 18px currentColor; }

#touch-ui { position: fixed; bottom: 12px; left: 0; right: 0; display: flex;
  justify-content: space-between; padding: 0 14px; }
.tbtn { pointer-events: auto; width: 84px; height: 62px; border-radius: 14px;
  border: 1px solid rgba(128,255,219,.5); background: rgba(12,18,44,.66);
  color: var(--mint); font-size: 20px; font-weight: 700; }
.tbtn:active { background: rgba(128,255,219,.25); }
#t-hit { width: 110px; color: var(--amber); border-color: rgba(255,190,11,.5); }

#overlay { position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(4,6,18,.72); }
.panel { max-width: 560px; margin: 16px; padding: 28px 30px; border-radius: 18px;
  background: var(--panel); border: 1px solid rgba(128,255,219,.25);
  box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.panel h1 { font-size: 40px; letter-spacing: .12em; color: var(--mint); }
.panel .tag { color: var(--dim); margin: 8px 0 14px; }
.keys { list-style: none; color: var(--ink); margin-bottom: 18px; }
.keys li { margin: 4px 0; }
.keys b { color: var(--amber); }
.cta { display: inline-block; padding: 13px 34px; border-radius: 999px; border: none;
  background: linear-gradient(90deg, var(--teal), var(--mint)); color: #04211c;
  font-weight: 800; font-size: 18px; letter-spacing: .06em; cursor: pointer; }
.cta:hover { filter: brightness(1.15); }

/* ---------- landing page ---------- */
.landing-body { overflow-x: hidden; }
.nav { display: flex; justify-content: space-between; align-items: center;
  padding: 18px 5vw; }
.logo { font-weight: 800; letter-spacing: .18em; font-size: 20px; color: var(--mint); }
.logo span { color: var(--coral); }
.nav-play { color: var(--ink); text-decoration: none; border: 1px solid rgba(128,255,219,.4);
  padding: 8px 18px; border-radius: 999px; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center;
  padding: 30px 5vw 60px; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); letter-spacing: .1em; line-height: 1;
  color: var(--ink); text-shadow: 0 0 30px rgba(18,229,200,.45); }
.tagline { color: var(--dim); font-size: 19px; margin: 14px 0 22px; max-width: 34ch; }
#play-now { display: inline-block; padding: 15px 34px; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--mint)); color: #04211c;
  font-weight: 800; text-decoration: none; letter-spacing: .05em;
  box-shadow: 0 10px 34px rgba(18,229,200,.35); }
.tiny { margin-top: 12px; color: var(--dim); font-size: 13px; }
.hero-canvas-wrap { position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(128,255,219,.3); box-shadow: 0 22px 70px rgba(0,0,0,.55);
  aspect-ratio: 16 / 10; }
#hero-mount, #hero-mount canvas { position: absolute; inset: 0; }
#hero-mount canvas { width: 100% !important; height: 100% !important; }
.band { padding: 30px 5vw; text-align: center;
  background: linear-gradient(180deg, rgba(18,229,200,.08), transparent); }
.band h2 { font-size: 28px; margin-bottom: 10px; color: var(--mint); }
.band p { color: var(--dim); max-width: 62ch; margin: 0 auto; }
.section { padding: 44px 5vw; }
.section h2 { font-size: 24px; margin-bottom: 16px; letter-spacing: .08em; }
#gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
#gallery img { width: 100%; border-radius: 12px; border: 1px solid rgba(128,255,219,.25);
  background: var(--bg); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
#features { padding-left: 20px; color: var(--dim); }
#features li { margin: 8px 0; }
#controls { color: var(--dim); }
#controls ul { padding-left: 20px; margin-top: 8px; }
#controls li { margin: 6px 0; }
#controls b { color: var(--amber); }
.foot { padding: 24px 5vw; color: var(--dim); font-size: 13px; text-align: center;
  border-top: 1px solid rgba(128,255,219,.15); }
.offscreen { position: fixed; left: -3000px; top: 0; width: 480px; height: 300px; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .split { grid-template-columns: 1fr; }
  #gallery { grid-template-columns: 1fr; }
}
