* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; }
canvas { display: block; width: 100%; height: 100%; }

/* HUD overlay */
#hud {
  position: absolute; top: 0; left: 0; width: 100%; pointer-events: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: flex-start;
  padding: 12px 20px; font-family: 'Courier New', monospace;
  font-size: 16px; text-shadow: 0 0 6px rgba(255,255,255,0.4);
  z-index: 10;
}
#hud-players {
  display: grid; grid-template-columns: repeat(2, minmax(120px, max-content));
  gap: 10px 18px;
}
#hud .right { text-align: right; }
#hud .center { text-align: center; }
.player-hud {
  display: flex; flex-direction: column; gap: 2px;
}
.player-hud .score { font-size: 18px; }
.player-hud .lives { font-size: 14px; }
.player-hud .powerups { font-size: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.player-hud .out-label { font-size: 12px; color: #f44; margin-top: 2px; }

/* Overlays */
.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: 'Courier New', monospace; color: #fff; z-index: 20;
  pointer-events: none; opacity: 1; transition: opacity 0.3s;
}
.overlay.hidden { opacity: 0; pointer-events: none; }
.overlay h1 { font-size: 48px; margin-bottom: 8px; text-shadow: 0 0 20px #fff; }
.overlay p  { font-size: 18px; opacity: 0.85; }
.overlay .sub { font-size: 14px; opacity: 0.6; margin-top: 16px; }
.player-select {
  display: flex; gap: 8px; margin: 14px 0 16px; pointer-events: auto;
}
.player-select button {
  font: bold 16px 'Courier New', monospace; color: #fff; background: #050505;
  border: 1px solid rgba(255,255,255,0.55); padding: 8px 12px; cursor: pointer;
}
.player-select button.selected {
  color: #000; background: #fff; box-shadow: 0 0 16px rgba(255,255,255,0.55);
}
