:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #111722;
  --panel-2: #182130;
  --text: #f2f7ff;
  --muted: #9fb0c7;
  --accent: #42e8c7;
  --danger: #ff5f72;
  --gold: #ffd166;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(66, 232, 199, 0.13), transparent 26rem),
    linear-gradient(135deg, #0a0c0a 0%, #171711 48%, #071312 100%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  display: grid;
  place-items: center;
  padding: 24px;
}

.shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: start;
}

.game-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #05070b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #11150f;
}

.hud {
  display: grid;
  gap: 10px;
}

.hud div {
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}

.hud span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hud strong {
  display: block;
  margin-top: 6px;
  font-size: 1.7rem;
  line-height: 1;
}

.hud-action button {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}

.overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 28px;
  text-align: center;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(4px);
}

.overlay.visible {
  display: grid;
}

.overlay h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.92;
  color: var(--accent);
  text-shadow: 0 0 28px rgba(66, 232, 199, 0.4);
}

.overlay p {
  max-width: 520px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

button {
  min-width: 150px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--accent);
  color: #06100e;
  cursor: pointer;
  font: 700 0.95rem "Segoe UI", system-ui, sans-serif;
}

button:hover,
button:focus-visible {
  background: #7bf7dc;
  outline: 3px solid rgba(66, 232, 199, 0.28);
}

@media (max-width: 820px) {
  body {
    padding: 12px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

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

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

  .hud strong {
    font-size: 1.2rem;
  }
}
