/* ─── Reset & base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #050510;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  font-family: 'Courier New', monospace;
  color: #e0e0ff;
}

/* ─── Canvas ─────────────────────────────────────────────────────── */
#gameCanvas {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 60px 4px rgba(80, 0, 220, 0.4),
              0 0 120px 10px rgba(0, 200, 255, 0.15);
}

/* ─── HUD ────────────────────────────────────────────────────────── */
#hud {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  align-items: flex-start;
  z-index: 10;
  pointer-events: none;
  width: min(1024px, 96vw);
  justify-content: space-between;
}

.hud-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: #7070cc;
  margin-bottom: 4px;
}

/* Health bar */
#health-bar-wrap {
  width: 200px;
  height: 10px;
  background: #1a1a3a;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #3030aa;
}
#health-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00ccff, #aa00ff);
  border-radius: 5px;
  transition: width 0.15s ease;
  box-shadow: 0 0 8px #00ccff;
}

/* Score / Deflection count */
#hud-center {
  text-align: center;
}
#score-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: #7070cc;
  margin-bottom: 4px;
}
#score {
  font-size: 28px;
  font-weight: bold;
  color: #00ccff;
  text-shadow: 0 0 12px #00ccff;
}

/* Volley multiplier */
#hud-right {
  text-align: right;
}
#volley {
  font-size: 20px;
  font-weight: bold;
  color: #ff44aa;
  text-shadow: 0 0 10px #ff44aa;
}

/* ─── Controls hint ──────────────────────────────────────────────── */
#controls {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 2px;
  color: #55558a;
  z-index: 10;
  pointer-events: none;
}

/* ─── Start / Game-Over overlay ──────────────────────────────────── */
#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  background: rgba(5, 5, 16, 0.85);
  z-index: 20;
  backdrop-filter: blur(4px);
}

#overlay-title {
  font-size: 52px;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #00ccff;
  text-shadow: 0 0 30px #00ccff, 0 0 60px #0044ff;
}

#overlay-sub {
  font-size: 14px;
  letter-spacing: 2px;
  color: #9090cc;
}

#overlay-btn {
  margin-top: 12px;
  padding: 14px 48px;
  background: transparent;
  border: 2px solid #aa00ff;
  color: #aa00ff;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  letter-spacing: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
  box-shadow: 0 0 16px rgba(170, 0, 255, 0.4);
}
#overlay-btn:hover {
  background: rgba(170, 0, 255, 0.15);
  box-shadow: 0 0 30px rgba(170, 0, 255, 0.7);
  color: #cc44ff;
  border-color: #cc44ff;
}

#overlay.hidden { display: none; }
