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

body {
  overflow: hidden;
  background: #020208;
  font-family: "Courier New", monospace;
  cursor: crosshair;
  user-select: none;
}

canvas {
  display: block;
}

#flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,235,200,0.95) 40%, rgba(255,180,80,0.7) 100%);
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  mix-blend-mode: screen;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 24px;
  pointer-events: none;
  z-index: 10;
  color: #00e5ff;
}

.label {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-bottom: 4px;
}

#score-panel span,
#wave-panel span {
  font-size: 26px;
  font-weight: bold;
  text-shadow: 0 0 8px #00e5ff;
}

#wave-panel {
  text-align: center;
}

#ammo-panel {
  text-align: right;
}

#battery-ammo {
  display: flex;
  gap: 14px;
  margin-top: 2px;
}

.battery {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
  padding: 2px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 2px;
}

.battery span {
  width: 5px;
  height: 100%;
  background: #00e5ff;
  box-shadow: 0 0 4px #00e5ff;
}

.battery span.empty {
  background: rgba(0, 229, 255, 0.12);
  box-shadow: none;
}

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 2, 8, 0.82);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s;
}

#overlay.visible {
  opacity: 1;
  visibility: visible;
}

#overlay-box {
  text-align: center;
  color: #00e5ff;
}

#overlay-title {
  font-size: 52px;
  letter-spacing: 10px;
  text-shadow: 0 0 24px #00e5ff, 0 0 60px rgba(0, 229, 255, 0.5);
  margin-bottom: 24px;
}

#overlay-text {
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 2px;
  opacity: 0.85;
  margin-bottom: 36px;
  white-space: pre-line;
}

#overlay-btn {
  font-family: inherit;
  font-size: 18px;
  letter-spacing: 4px;
  color: #020208;
  background: #00e5ff;
  border: none;
  padding: 14px 46px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
  transition: transform 0.15s, box-shadow 0.15s;
}

#overlay-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.9);
}

#wave-banner {
  position: fixed;
  top: 40%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 34px;
  letter-spacing: 8px;
  color: #ff9500;
  text-shadow: 0 0 18px #ff9500;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

#wave-banner.visible {
  opacity: 1;
}
