:root {
  color-scheme: dark;
  --bg: #050913;
  --panel: rgba(9, 18, 35, 0.92);
  --cyan: #70e8ff;
  --blue: #3185ff;
  --white: #eef9ff;
  --muted: #8ca2b8;
  --danger: #ff668c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 50% -20%, #153153 0, transparent 40%),
    linear-gradient(180deg, #050913, #02040a 80%);
}

button, select { font: inherit; }

.game-shell {
  width: min(1040px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 42px) 20px;
  display: flex;
  flex-direction: column;
}

.topbar, .stats, footer { display: flex; align-items: center; }
.topbar { justify-content: space-between; margin-bottom: 18px; }
.eyebrow, .panel-kicker { margin: 0 0 5px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(23px, 4vw, 36px); letter-spacing: -.04em; }

.icon-button {
  width: 45px; height: 45px; border: 1px solid #284664; border-radius: 50%;
  color: var(--cyan); background: #091526; cursor: pointer;
}

.stats {
  justify-content: space-between; gap: 12px; padding: 13px 18px;
  border: 1px solid #172b42; border-radius: 14px 14px 0 0; background: #07101e;
}
.stats div { display: grid; gap: 3px; }
.stats span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.stats strong { font-size: 15px; }
.stats strong span { color: inherit; font-size: inherit; text-transform: none; letter-spacing: normal; }
.lives { color: var(--cyan); letter-spacing: 4px; }

.arena-wrap {
  position: relative; flex: 1; min-height: 580px; overflow: hidden;
  border: 1px solid #172b42; border-top: 0; border-radius: 0 0 18px 18px;
  background: #030811; box-shadow: 0 30px 90px rgba(0, 0, 0, .4);
}

canvas { display: block; width: 100%; height: 100%; min-height: 580px; }

.panel {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: min(470px, calc(100% - 32px)); padding: 34px; text-align: center;
  border: 1px solid #244661; border-radius: 20px; background: var(--panel);
  box-shadow: 0 0 80px rgba(48, 133, 255, .16); backdrop-filter: blur(10px);
}
.panel h2 { margin: 8px 0 14px; font-size: clamp(28px, 5vw, 44px); line-height: 1.04; letter-spacing: -.05em; }
.panel p:not(.panel-kicker) { color: #b7c8d8; line-height: 1.55; }
.panel label { display: block; margin: 22px 0 7px; color: var(--muted); font-size: 12px; }
.panel select { width: 100%; padding: 11px; border: 1px solid #294966; border-radius: 9px; color: var(--white); background: #081424; }
.panel small { display: block; margin-top: 14px; color: var(--muted); }
.primary {
  width: 100%; margin-top: 12px; padding: 13px; border: 0; border-radius: 9px;
  color: #00131a; font-weight: 900; background: linear-gradient(135deg, var(--cyan), #74a9ff); cursor: pointer;
  box-shadow: 0 8px 30px rgba(112, 232, 255, .22);
}
.primary:hover { filter: brightness(1.08); }
.hidden { display: none !important; }
.pause-label { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); font-size: 48px; font-weight: 900; letter-spacing: .2em; text-shadow: 0 0 30px var(--blue); }

footer { justify-content: space-between; padding-top: 14px; color: var(--muted); font-size: 12px; }
kbd { padding: 2px 6px; border: 1px solid #31465c; border-radius: 4px; color: var(--white); background: #111b27; }

@media (max-width: 680px) {
  .game-shell { padding: 14px 10px; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .stats div:nth-child(4), .stats div:nth-child(5) { grid-column: span 1; }
  .arena-wrap, canvas { min-height: 520px; }
  .panel { padding: 24px 18px; }
}
