:root {
  color-scheme: dark;
  --bg: #080b13;
  --panel: rgba(8, 12, 24, 0.82);
  --text: #f8fbff;
  --muted: #9fb1c8;
  --line: rgba(255, 255, 255, 0.16);
  --cyan: #6ee7ff;
  --green: #7fffd4;
  --pink: #ff6bcb;
  --orange: #ffb84d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(110, 231, 255, 0.18), transparent 22rem),
    radial-gradient(circle at 84% 24%, rgba(255, 107, 203, 0.16), transparent 24rem),
    linear-gradient(145deg, #080b13 0%, #10172a 48%, #1b1128 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  min-height: 42px;
  border: 1px solid rgba(110, 231, 255, 0.46);
  border-radius: 6px;
  background: rgba(110, 231, 255, 0.14);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: rgba(110, 231, 255, 0.24);
}

.game-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.game-stage {
  position: relative;
  width: min(1180px, 100%);
  display: grid;
  gap: 12px;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr)) minmax(110px, 0.7fr);
  gap: 10px;
  align-items: stretch;
}

.hud > div,
.hud button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.hud > div {
  min-height: 68px;
  padding: 12px 14px;
}

.hud-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  color: var(--green);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
}

canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid rgba(110, 231, 255, 0.28);
  border-radius: 8px;
  background: #071427;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    0 0 70px rgba(110, 231, 255, 0.12);
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 80px 0 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 7, 18, 0.58);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

.overlay.hidden {
  display: none;
}

.overlay > div {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 16, 32, 0.9);
  padding: clamp(22px, 5vw, 42px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.94;
}

p {
  margin: 0 auto 24px;
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
}

.overlay button {
  min-width: min(220px, 100%);
  padding: 0 20px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.28), rgba(127, 255, 212, 0.18));
}

.fire-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 74px;
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 50%;
  display: none;
  background: rgba(255, 107, 203, 0.24);
  border-color: rgba(255, 107, 203, 0.62);
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .game-shell {
    align-items: start;
    padding: 12px;
  }

  .hud {
    grid-template-columns: repeat(3, 1fr);
  }

  .hud button {
    grid-column: 1 / -1;
  }

  .hud > div {
    min-height: 58px;
    padding: 10px;
  }

  .overlay {
    inset: 168px 0 0;
  }

  .fire-button {
    display: block;
  }
}
