:root {
  color-scheme: dark;
  --bg: #050812;
  --panel: rgba(5, 8, 18, 0.64);
  --ink: #f8fbff;
  --muted: #a5b7d0;
  --cyan: #35e7ff;
  --pink: #ff3b98;
  --lime: #b8ff58;
  --gold: #ffd166;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 12%, rgba(53, 231, 255, 0.2), transparent 24rem),
    radial-gradient(circle at 82% 78%, rgba(255, 59, 152, 0.2), transparent 25rem),
    linear-gradient(135deg, #050812, #0a1024 48%, #050812);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
}

.game-wrap {
  position: relative;
  width: min(100%, 1120px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #060a16;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  position: absolute;
  inset: 14px 14px auto 14px;
  display: flex;
  gap: 10px;
  pointer-events: none;
}

.hud div {
  min-width: 90px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(5, 8, 18, 0.2), rgba(5, 8, 18, 0.88)),
    radial-gradient(circle at 50% 38%, rgba(53, 231, 255, 0.15), transparent 18rem);
}

.overlay.is-hidden {
  display: none;
}

.overlay h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.94;
  letter-spacing: 0;
  text-transform: uppercase;
}

.overlay p {
  max-width: 620px;
  margin: 0 auto;
  color: #dce9f9;
  font-size: clamp(15px, 2.2vw, 20px);
}

.overlay span {
  color: var(--muted);
  font-size: 14px;
}

button {
  justify-self: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #041018;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(53, 231, 255, 0.28);
}

button:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  .shell {
    padding: 0;
  }

  .game-wrap {
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
    aspect-ratio: auto;
  }

  .hud {
    inset: 10px 10px auto 10px;
  }

  .hud div {
    min-width: 70px;
    padding: 8px 9px;
  }
}
