*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  overflow: hidden;
  background: #050510;
  font-family: 'Nunito', sans-serif;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* ─── Overlays ──────────────────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.4s ease;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.title {
  font-family: 'Bangers', cursive;
  font-size: clamp(3.5rem, 12vw, 7rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: #dc2626;
  text-shadow:
    0 0 30px rgba(220, 38, 38, 0.6),
    0 0 80px rgba(220, 38, 38, 0.3),
    0 4px 0 #7f1d1d;
}

.title span {
  color: #3b82f6;
  text-shadow:
    0 0 30px rgba(59, 130, 246, 0.6),
    0 0 80px rgba(59, 130, 246, 0.3),
    0 4px 0 #1e3a5f;
}

.title--over {
  color: #ef4444;
}

.title--over span {
  color: #f97316;
  text-shadow:
    0 0 30px rgba(249, 115, 22, 0.6),
    0 0 80px rgba(249, 115, 22, 0.3),
    0 4px 0 #7c2d12;
}

.subtitle {
  color: rgba(200, 200, 255, 0.5);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  margin-top: -0.3rem;
}

.score-line {
  font-family: 'Bangers', cursive;
  font-size: 2rem;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
  letter-spacing: 0.03em;
}

.btn {
  margin-top: 0.8rem;
  padding: 0.7rem 2.2rem;
  font-family: 'Bangers', cursive;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  box-shadow: 0 4px 24px rgba(220, 38, 38, 0.3);
}

.btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 32px rgba(220, 38, 38, 0.5);
}

.credit {
  color: rgba(200, 200, 255, 0.25);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* ─── HUD ───────────────────────────────────────────────── */

#hud {
  position: fixed;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

#hud.hidden {
  display: none;
}

#hud-score {
  font-family: 'Bangers', cursive;
  font-size: 1.6rem;
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.5), 0 2px 0 rgba(0,0,0,0.6);
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.3rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.15);
}
