:root {
  --ink: #f4f3ff;
  --muted: #8b8ea9;
  --dim: #555873;
  --bg: #070a19;
  --panel: rgba(15, 19, 43, .8);
  --line: rgba(143, 150, 197, .19);
  --cyan: #61f6e0;
  --pink: #ff5aa8;
  --yellow: #ffd166;
  --violet: #9a82ff;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 55% -20%, #1b1d4b 0, #0c1030 37%, var(--bg) 76%); }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.shell { width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 28px 0 34px; }
.topbar { display: flex; align-items: center; height: 36px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 12px; letter-spacing: .14em; font-weight: 600; }
.brand b { color: var(--cyan); font-weight: 600; }
.brand-mark { display: flex; align-items: end; gap: 3px; width: 24px; height: 22px; transform: skew(-18deg); }
.brand-mark i { display: block; width: 5px; border-radius: 1px; background: var(--cyan); box-shadow: 0 0 12px rgba(97,246,224,.65); }
.brand-mark i:nth-child(1) { height: 10px; opacity: .55; }.brand-mark i:nth-child(2) { height: 16px; opacity: .8; }.brand-mark i:nth-child(3) { height: 22px; }
.status-pill { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 22px; color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .12em; }
.status-dot, .live-spark { width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 10px var(--cyan); animation: pulse 2s infinite; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--cyan); background: rgba(255,255,255,.02); font: 15px "DM Mono", monospace; }
.icon-button:hover { border-color: var(--cyan); background: rgba(97,246,224,.1); }.sound-off { display: none; color: var(--pink); }.icon-button.is-muted .sound-on { display: none; }.icon-button.is-muted .sound-off { display: inline; }
.hero-copy { padding: 65px 0 38px; max-width: 640px; }
.eyebrow, .eyebrow-small { display: flex; align-items: center; gap: 10px; color: var(--cyan); font: 10px "DM Mono", monospace; letter-spacing: .18em; }
.eyebrow-line { display: inline-block; width: 42px; height: 1px; background: rgba(97,246,224,.5); }
h1, h2, p { margin: 0; }.hero-copy h1 { margin-top: 16px; font-size: clamp(48px, 7vw, 84px); line-height: .93; letter-spacing: -.07em; font-weight: 600; }.hero-copy h1 em, .canvas-overlay em { color: var(--pink); font-style: normal; }.hero-copy p { max-width: 420px; margin-top: 21px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; align-items: start; }
.game-card, .leaderboard-card { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(12px); }
.game-card { min-width: 0; }.hud { display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 21px; border-bottom: 1px solid var(--line); }.hud-block { min-width: 120px; }.hud-right { text-align: right; }.hud-label { display: block; color: var(--dim); font: 9px "DM Mono", monospace; letter-spacing: .15em; margin-bottom: 6px; }.hud strong { color: var(--ink); font: 500 17px "DM Mono", monospace; letter-spacing: .07em; }.hud-right strong { color: var(--pink); font-size: 14px; letter-spacing: .11em; }.hud-center { text-align: center; }.phase-label { display: block; color: var(--cyan); font: 10px "DM Mono", monospace; letter-spacing: .14em; }.wave-label { display: block; margin-top: 5px; color: var(--dim); font: 9px "DM Mono", monospace; letter-spacing: .1em; }
.canvas-wrap { position: relative; aspect-ratio: 16 / 9; min-height: 300px; overflow: hidden; background: #060817; }.canvas-wrap::after { position: absolute; inset: 0; pointer-events: none; content: ""; background: linear-gradient(transparent 50%, rgba(97,246,224,.025) 50%); background-size: 100% 4px; mix-blend-mode: screen; }.canvas-wrap canvas { display: block; width: 100%; height: 100%; image-rendering: auto; }
.canvas-overlay { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle, rgba(12,17,51,.65), rgba(5,7,20,.88)); }.canvas-overlay.hidden, .hidden { display: none !important; }.overlay-kicker { color: var(--cyan); font: 9px "DM Mono", monospace; letter-spacing: .2em; }.overlay-kicker.danger { color: var(--pink); }.canvas-overlay h2 { margin: 14px 0 10px; color: var(--ink); font-size: clamp(32px, 4vw, 51px); line-height: .95; letter-spacing: -.06em; font-weight: 600; }.canvas-overlay p { color: var(--muted); font: 10px "DM Mono", monospace; letter-spacing: .08em; }.canvas-overlay p span { color: var(--pink); margin: 0 6px; }.launch-beacon { position: relative; width: 54px; height: 54px; margin-bottom: 9px; border: 1px solid rgba(97,246,224,.35); border-radius: 50%; }.launch-beacon::before, .launch-beacon::after, .launch-beacon span { position: absolute; content: ""; border: 1px solid rgba(97,246,224,.45); border-radius: 50%; inset: 9px; }.launch-beacon::after { inset: 18px; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); border: 0; }.launch-beacon span:nth-child(1) { inset: -9px; border-color: rgba(255,90,168,.24); }.launch-beacon span:nth-child(2) { inset: 27px; border: 0; background: var(--pink); box-shadow: 0 0 13px var(--pink); }.launch-beacon span:nth-child(3) { inset: 50% auto auto -11px; width: 76px; height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--cyan), transparent); transform: rotate(45deg); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 42px; border: 0; color: var(--bg); font-size: 11px; font-weight: 600; letter-spacing: .02em; transition: transform .2s, box-shadow .2s, background .2s; }.primary-button { margin-top: 22px; padding: 0 12px 0 16px; background: var(--cyan); box-shadow: 0 0 22px rgba(97,246,224,.12); }.primary-button b, .secondary-button b { font-size: 18px; font-weight: 400; line-height: 1; }.primary-button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(97,246,224,.22); }.secondary-button { padding: 0 14px 0 17px; margin-top: 19px; color: var(--ink); background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.2); }.secondary-button:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.final-score { display: flex; align-items: baseline; gap: 10px; margin-top: 20px; }.final-score span { color: var(--dim); font: 9px "DM Mono", monospace; letter-spacing: .12em; }.final-score strong { color: var(--yellow); font: 500 25px "DM Mono", monospace; text-shadow: 0 0 17px rgba(255,209,102,.35); }
.game-footer { display: flex; align-items: center; gap: 22px; height: 43px; padding: 0 21px; border-top: 1px solid var(--line); color: var(--muted); font: 9px "DM Mono", monospace; letter-spacing: .08em; }.footer-tip { display: flex; align-items: center; gap: 7px; }.footer-right { margin-left: auto; }.keycap { padding: 4px 6px; color: var(--ink); border: 1px solid var(--line); font-size: 8px; }.live-spark { display: inline-block; width: 5px; height: 5px; }
.leaderboard-card { min-height: 409px; padding: 21px 21px 17px; }.leaderboard-heading { display: flex; justify-content: space-between; align-items: flex-start; }.eyebrow-small { display: block; color: var(--pink); font-size: 8px; letter-spacing: .14em; }.leaderboard-heading h2 { margin-top: 8px; font-size: 25px; line-height: 1; letter-spacing: -.05em; }.rank-mark { color: var(--dim); font: 9px "DM Mono", monospace; }.leaderboard-rule { height: 1px; margin: 19px 0 5px; background: var(--line); }.leaderboard-state { color: var(--muted); font: 10px "DM Mono", monospace; padding: 14px 0 8px; }.leaderboard-state[data-state="empty"] { color: var(--dim); }.leaderboard-state[data-state="error"] { color: var(--pink); line-height: 1.5; }.loading-dots { color: var(--cyan); }.leaderboard-card ol { list-style: none; padding: 0; margin: 0; }.leaderboard-card li { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; min-height: 31px; border-bottom: 1px solid rgba(143,150,197,.1); font: 11px "DM Mono", monospace; }.leaderboard-card li:first-child { color: var(--yellow); }.rank { color: var(--dim); font-size: 9px; }.pilot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.pilot-score { color: var(--ink); }.leaderboard-card li:first-child .pilot-score { color: var(--yellow); }.leaderboard-note { margin-top: 18px; color: var(--dim); font: 9px "DM Mono", monospace; line-height: 1.55; }
.score-submit { display: flex; justify-content: space-between; gap: 40px; align-items: center; margin-top: 18px; padding: 22px 24px; border: 1px solid rgba(255,90,168,.25); background: linear-gradient(110deg, rgba(255,90,168,.08), rgba(15,19,43,.75)); }.score-submit h2 { margin-top: 6px; font-size: 25px; letter-spacing: -.05em; }.score-submit p { margin-top: 6px; color: var(--muted); font-size: 12px; }.score-submit form { flex: 0 1 520px; }.score-submit label { display: block; margin-bottom: 8px; color: var(--muted); font: 9px "DM Mono", monospace; letter-spacing: .12em; }.score-submit label span { color: var(--dim); }.form-row { display: flex; gap: 8px; }.form-row input { min-width: 0; flex: 1; height: 42px; padding: 0 13px; border: 1px solid var(--line); outline: 0; color: var(--ink); background: rgba(6,8,23,.65); font: 11px "DM Mono", monospace; text-transform: uppercase; }.form-row input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(97,246,224,.1); }.form-row input::placeholder { color: var(--dim); }.form-row .primary-button { flex: 0 0 auto; margin: 0; }.form-message { min-height: 15px; color: var(--pink) !important; font: 10px "DM Mono", monospace !important; }.form-message.success { color: var(--cyan) !important; }
.touch-controls { display: none; }.page-footer { display: flex; justify-content: space-between; padding-top: 26px; color: var(--dim); font: 9px "DM Mono", monospace; letter-spacing: .13em; }
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
@media (max-width: 860px) { .shell { width: min(100% - 30px, 650px); padding-top: 18px; }.hero-copy { padding: 53px 0 30px; }.game-layout { grid-template-columns: 1fr; }.leaderboard-card { min-height: auto; }.leaderboard-note { display: none; }.score-submit { align-items: stretch; flex-direction: column; gap: 18px; }.score-submit form { flex-basis: auto; } }
@media (max-width: 560px) { .shell { width: calc(100% - 24px); }.status-pill { margin-right: 12px; }.hero-copy { padding-top: 45px; }.hero-copy h1 { font-size: 52px; }.game-card { margin-inline: -1px; }.hud { padding: 0 13px; height: 59px; }.hud-block { min-width: 95px; }.hud strong { font-size: 14px; }.hud-right strong { font-size: 11px; }.phase-label { font-size: 8px; }.canvas-wrap { min-height: 0; }.game-footer { padding: 0 13px; gap: 8px; height: 39px; }.footer-tip:not(.footer-right) { display: none; }.footer-right { margin-left: 0; }.leaderboard-card { padding: 18px 15px; }.form-row { flex-direction: column; }.form-row .primary-button { min-height: 42px; }.page-footer { font-size: 7px; }.touch-controls { display: flex; align-items: center; justify-content: space-between; padding: 24px 7px 0; }.touch-dpad { position: relative; width: 138px; height: 112px; }.touch-dpad button { position: absolute; display: grid; place-items: center; width: 41px; height: 41px; border: 1px solid var(--line); color: var(--cyan); background: rgba(15,19,43,.75); font-size: 20px; touch-action: none; }.touch-dpad button:active { background: rgba(97,246,224,.2); }.touch-dpad button[data-control="left"] { left: 0; top: 35px; }.touch-dpad button[data-control="right"] { right: 0; top: 35px; }.touch-dpad button[data-control="up"] { left: 48px; top: 0; }.touch-dpad button[data-control="down"] { left: 48px; bottom: 0; }.fire-button { display: grid; place-items: center; width: 88px; height: 88px; border: 1px solid rgba(255,90,168,.6); border-radius: 50%; color: var(--pink); background: rgba(255,90,168,.08); font: 10px "DM Mono", monospace; letter-spacing: .15em; touch-action: none; box-shadow: 0 0 25px rgba(255,90,168,.08); }.fire-button i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--pink); }.fire-button:active { background: rgba(255,90,168,.2); } }
