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

body {
  background: #000;
  overflow: hidden;
  font-family: 'Segoe UI', 'Consolas', monospace;
  color: #fff;
  cursor: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- HUD --- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud.hidden { display: none; }

/* Crosshair */
#crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
}
.ch {
  position: absolute;
  background: rgba(0, 255, 0, 0.85);
}
.ch-t { width: 2px; height: 10px; left: -1px; top: -14px; }
.ch-b { width: 2px; height: 10px; left: -1px; top: 4px; }
.ch-l { width: 10px; height: 2px; left: -14px; top: -1px; }
.ch-r { width: 10px; height: 2px; left: 4px;  top: -1px; }

/* Hit Marker */
#hit-marker { position: absolute; top: 0; left: 0; }
#hit-marker.hidden { display: none; }
.hm {
  position: absolute;
  width: 8px; height: 2px;
  background: #fff;
  transform-origin: center;
}
.hm-1 { transform: translate(-8px,-8px) rotate(45deg); }
.hm-2 { transform: translate(2px,-8px) rotate(-45deg); }
.hm-3 { transform: translate(-8px,6px) rotate(-45deg); }
.hm-4 { transform: translate(2px,6px) rotate(45deg); }

/* HP */
#hp-section {
  position: absolute;
  bottom: 30px; left: 30px;
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: bold;
}
#hp-icon { color: #f44; font-size: 24px; }
#hp-bar-bg {
  width: 200px; height: 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px; overflow: hidden;
}
#hp-bar {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, #f44, #f88);
  transition: width 0.2s;
}

/* Ammo */
#ammo-section {
  position: absolute;
  bottom: 30px; right: 30px;
  font-size: 28px; font-weight: bold;
}
#ammo-current { font-size: 36px; }
#ammo-sep { color: rgba(255,255,255,0.4); margin: 0 4px; }
#ammo-reserve { color: rgba(255,255,255,0.6); }

/* Score */
#score-section {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 18px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

/* Kill Feed */
#kill-feed {
  position: absolute;
  top: 50px; right: 30px;
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-end;
}
.kill-msg {
  background: rgba(0,0,0,0.5);
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 2px;
  animation: fadeSlide 3s forwards;
}
@keyframes fadeSlide {
  0%, 60% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(20px); }
}

/* Reload */
#reload-hint {
  position: absolute;
  bottom: 60px; right: 30px;
  font-size: 14px;
  color: #ff0;
  animation: pulse 0.6s infinite alternate;
}
#reload-hint.hidden { display: none; }
@keyframes pulse { from { opacity: 0.5; } to { opacity: 1; } }

/* Damage Overlay */
#damage-overlay {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(180,0,0,0.4) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s;
  z-index: 9;
}
#damage-overlay.active { opacity: 1; }

/* --- Screens --- */
#start-screen, #game-over {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85);
  z-index: 20;
  cursor: default;
}
#start-screen.hidden, #game-over.hidden { display: none; }

#start-screen h1 {
  font-size: 64px;
  letter-spacing: 12px;
  text-shadow: 0 0 30px rgba(255,100,0,0.6);
  margin-bottom: 8px;
}
.subtitle { font-size: 16px; color: #888; letter-spacing: 6px; margin-bottom: 40px; }
.start-hint { font-size: 18px; color: #aaa; margin-bottom: 30px; }
.controls {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  max-width: 500px;
}
.controls span {
  background: rgba(255,255,255,0.1);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.15);
}

#game-over h2 {
  font-size: 48px;
  color: #f44;
  letter-spacing: 8px;
  margin-bottom: 20px;
}
#game-over p { font-size: 20px; margin-bottom: 10px; }
