:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070914;
  color: #f5f7ff;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 22% 5%, rgba(123, 97, 255, .26), transparent 26rem),
    radial-gradient(circle at 78% 84%, rgba(0, 231, 201, .12), transparent 30rem),
    #070914;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .35;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black, transparent 76%);
}

.game-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 0 26px;
  display: grid;
  grid-template-columns: minmax(205px, .67fr) minmax(0, 1.7fr);
  grid-template-rows: 1fr auto;
  gap: 24px clamp(24px, 5vw, 72px);
  align-items: center;
}

.intro { align-self: center; }
.eyebrow, .hud span, footer, .message-kicker {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow { margin: 0 0 14px; color: #64fbd9; font-size: .72rem; }
h1 { margin: 0; font-size: clamp(3.1rem, 7vw, 6.5rem); line-height: .78; letter-spacing: -.08em; font-weight: 850; }
h1 span { color: #8b7dff; text-shadow: 0 0 42px rgba(139, 125, 255, .4); }
.tagline { max-width: 20rem; margin: 24px 0 0; color: #b5b8cc; font-size: 1rem; line-height: 1.65; }

.game-frame {
  position: relative;
  min-height: min(68vh, 660px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(191, 196, 255, .32);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(25, 22, 59, .9), rgba(7, 11, 27, .94));
  box-shadow: 0 36px 100px rgba(0, 0, 0, .38), inset 0 0 48px rgba(84, 59, 255, .1);
}
.game-frame::before { position: absolute; inset: 0; z-index: 3; content: ""; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
#game { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: crosshair; }
.scanlines { position: absolute; inset: 0; z-index: 2; opacity: .17; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(255,255,255,.13) 0 1px, transparent 1px 4px); mix-blend-mode: overlay; }

.hud { position: absolute; z-index: 4; top: 0; left: 0; right: 0; padding: 20px 22px; display: flex; gap: 20px; pointer-events: none; }
.hud div { min-width: 72px; display: grid; gap: 3px; }
.hud .speed { margin-left: auto; text-align: right; }
.hud span { color: #9aa0c1; font-size: .6rem; }
.hud strong { color: #fff; font-size: 1.05rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.message { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; padding: 28px; text-align: center; background: linear-gradient(180deg, rgba(7,9,20,.04), rgba(7,9,20,.42)); transition: opacity .25s ease, visibility .25s ease; }
.message.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.message-kicker { margin: 0 0 12px; color: #64fbd9; font-size: .72rem; }
.message h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.045em; }
.message p:not(.message-kicker) { max-width: 23rem; margin: 12px 0 25px; color: #c2c6db; line-height: 1.55; }
button { border: 0; border-radius: 999px; padding: 13px 20px 13px 23px; color: #0a0c1b; background: #e8fcf7; box-shadow: 0 0 28px rgba(100, 251, 217, .32); font: 750 .92rem/1 inherit; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
button:hover { transform: translateY(-2px); box-shadow: 0 0 38px rgba(100, 251, 217, .48); }
button span { margin-left: 7px; font-size: 1.05rem; }
.controls { position: absolute; z-index: 4; right: 20px; bottom: 18px; display: flex; gap: 8px; color: rgba(230,233,255,.72); font: .62rem/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.controls span { padding: 6px 7px; border: 1px solid rgba(197, 202, 255, .22); border-radius: 4px; background: rgba(11, 14, 34, .45); }

footer { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; color: #747a9c; font-size: .64rem; }

@media (max-width: 760px) {
  .game-shell { min-height: auto; grid-template-columns: 1fr; padding-top: 36px; }
  .intro { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: end; }
  .eyebrow, .tagline { grid-column: 1 / -1; }
  .tagline { margin-top: 15px; }
  .game-frame { min-height: min(65vh, 580px); }
  footer { flex-wrap: wrap; }
}
