/* Premium CoD-style HUD shell — dense, readable, military-glass */

:root {
  --hud-green: #7dffb3;
  --hud-amber: #ffc857;
  --hud-red: #ff4d4d;
  --hud-cyan: #5ee7ff;
  --hud-dim: rgba(180, 200, 210, 0.55);
  --panel: rgba(8, 14, 20, 0.72);
  --panel-border: rgba(126, 255, 179, 0.28);
  --font: "Segoe UI", "SF Pro Display", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "Cascadia Code", "Consolas", ui-monospace, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070a;
  color: #e8f0f4;
  font-family: var(--font);
  user-select: none;
  -webkit-user-select: none;
}

#game-root {
  position: relative;
  width: 100%;
  height: 100%;
}

#c {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  background: #0a1018;
}

/* Crosshair — size is live-driven by aim cone via --xh-size (i28) */
#crosshair {
  --xh-size: 23.94px; /* idle hip pure cone (resolveCrosshairSizePx); JS overwrites live */
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--xh-size);
  height: var(--xh-size);
  margin: calc(var(--xh-size) * -0.5) 0 0 calc(var(--xh-size) * -0.5);
  pointer-events: none;
  z-index: 20;
  opacity: 0.9;
  transition: transform 0.1s ease-out, opacity 0.12s ease-out, width 0.1s ease-out,
    height 0.1s ease-out, margin 0.1s ease-out;
}

/* ADS: lower opacity (size comes from live spread) */
#crosshair.ads {
  opacity: 0.72;
}

/* Crouch (no ADS): stable-platform opacity cue */
#crosshair.crouch:not(.ads) {
  opacity: 0.82;
}

/* Tactical slide: slightly wider gap cue (size still live from spread) */
#crosshair.slide:not(.ads) {
  opacity: 0.76;
  filter: drop-shadow(0 0 3px rgba(120, 200, 255, 0.35));
}

/* Braced crouch + lean peek: denser opacity (size still live) */
#crosshair.crouch.lean-left:not(.ads),
#crosshair.crouch.lean-right:not(.ads) {
  opacity: 0.78;
}

/* Lean peek (Q/E): subtle reticle tilt — cue that eye is offset */
#crosshair.lean-left:not(.ads) {
  transform: rotate(-8deg);
}
#crosshair.lean-right:not(.ads) {
  transform: rotate(8deg);
}
#crosshair.lean-left.hit:not(.ads) {
  transform: rotate(-8deg) scale(1.35);
}
#crosshair.lean-right.hit:not(.ads) {
  transform: rotate(8deg) scale(1.35);
}
/* Braced peek hit: keep lean tilt + slightly smaller punch */
#crosshair.crouch.lean-left.hit:not(.ads) {
  transform: rotate(-10deg) scale(1.28);
}
#crosshair.crouch.lean-right.hit:not(.ads) {
  transform: rotate(10deg) scale(1.28);
}

#crosshair.hit {
  transform: scale(1.35);
  filter: drop-shadow(0 0 4px var(--hud-amber));
}

#crosshair.ads.hit {
  transform: scale(1.2);
}

#crosshair.hit.headshot {
  transform: scale(1.5);
  filter: drop-shadow(0 0 6px #ff3344);
}

#crosshair.ads.hit.headshot {
  transform: scale(1.35);
}

/* Kill confirmation punch (i23) — must outrank stance hit transforms (i28) */
#crosshair.hit.kill {
  transform: scale(1.55);
  filter: drop-shadow(0 0 8px var(--hud-amber));
}

#crosshair.hit.kill.headshot {
  transform: scale(1.7);
  filter: drop-shadow(0 0 10px #ff3344);
}

#crosshair.ads.hit.kill {
  transform: scale(1.4);
}

#crosshair.ads.hit.kill.headshot {
  transform: scale(1.55);
}

/* Lean + kill: keep peek tilt, use kill-scale (outranks braced hit 1.28) */
#crosshair.lean-left.hit.kill:not(.ads),
#crosshair.crouch.lean-left.hit.kill:not(.ads) {
  transform: rotate(-10deg) scale(1.6);
  filter: drop-shadow(0 0 8px var(--hud-amber));
}
#crosshair.lean-right.hit.kill:not(.ads),
#crosshair.crouch.lean-right.hit.kill:not(.ads) {
  transform: rotate(10deg) scale(1.6);
  filter: drop-shadow(0 0 8px var(--hud-amber));
}
#crosshair.lean-left.hit.kill.headshot:not(.ads),
#crosshair.crouch.lean-left.hit.kill.headshot:not(.ads) {
  transform: rotate(-10deg) scale(1.75);
  filter: drop-shadow(0 0 10px #ff3344);
}
#crosshair.lean-right.hit.kill.headshot:not(.ads),
#crosshair.crouch.lean-right.hit.kill.headshot:not(.ads) {
  transform: rotate(10deg) scale(1.75);
  filter: drop-shadow(0 0 10px #ff3344);
}

#crosshair::before,
#crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

#crosshair::before {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  margin-left: -1px;
}

#crosshair::after {
  top: 50%;
  left: 0;
  height: 2px;
  width: 100%;
  margin-top: -1px;
}

#crosshair .dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  background: var(--hud-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--hud-green);
}

/* HUD chrome */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

#hud .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 42%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
  transition: background 0.2s ease;
}

/* Low-HP: red-tinted vignette; pulse class flashes on each heartbeat */
#hud .vignette.low-hp {
  background: radial-gradient(
    ellipse at center,
    transparent 32%,
    rgba(90, 8, 8, 0.42) 78%,
    rgba(40, 0, 0, 0.55) 100%
  );
}

#hud .vignette.low-hp.pulse {
  background: radial-gradient(
    ellipse at center,
    transparent 28%,
    rgba(140, 12, 12, 0.55) 70%,
    rgba(60, 0, 0, 0.7) 100%
  );
}

#health-panel {
  position: absolute;
  left: 28px;
  bottom: 28px;
  min-width: 220px;
  padding: 12px 16px 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

#health-panel .label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hud-dim);
  margin-bottom: 6px;
}

#health-panel .row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

#health-value {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--hud-green);
  text-shadow: 0 0 18px rgba(125, 255, 179, 0.35);
  line-height: 1;
}

#health-value.low {
  color: var(--hud-red);
  text-shadow: 0 0 18px rgba(255, 77, 77, 0.45);
}

#health-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

#health-bar > i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2a8f5a, var(--hud-green));
  transform-origin: left center;
  transition: transform 0.12s ease-out, background 0.2s;
  box-shadow: 0 0 12px rgba(125, 255, 179, 0.4);
}

#health-bar.low > i {
  background: linear-gradient(90deg, #8f2a2a, var(--hud-red));
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.45);
}

#ammo-panel {
  position: absolute;
  right: 28px;
  bottom: 28px;
  min-width: 160px;
  padding: 12px 16px 14px;
  background: var(--panel);
  border: 1px solid rgba(94, 231, 255, 0.22);
  border-radius: 4px;
  text-align: right;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

#ammo-panel .label.sidearm {
  color: #c9a86c;
  letter-spacing: 0.14em;
}

#ammo-panel .label.swapping {
  color: #8a9aaa;
  opacity: 0.75;
}

#ammo-value.swapping {
  opacity: 0.55;
}

#ammo-panel .label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hud-dim);
  margin-bottom: 4px;
}

#ammo-value {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 600;
  color: var(--hud-cyan);
  text-shadow: 0 0 16px rgba(94, 231, 255, 0.35);
  line-height: 1;
}

#ammo-value.empty {
  color: var(--hud-red);
  animation: pulse-empty 0.6s ease-in-out infinite alternate;
}

#ammo-value.reloading {
  color: var(--hud-amber);
  text-shadow: 0 0 16px rgba(255, 200, 87, 0.35);
  animation: none;
}

#ammo-reserve {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--hud-dim);
  margin-top: 4px;
}

/* Empty-primary → panic-swap soft prompt (no auto-swap) */
#sidearm-cue {
  display: none;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c9a86c;
  text-shadow: 0 0 10px rgba(201, 168, 108, 0.45);
}

#sidearm-cue.show {
  display: block;
  animation: sidearm-cue-pulse 0.85s ease-in-out infinite alternate;
}

/* Mid-reload swap-over-reload: quieter than full-dry panic */
#sidearm-cue.show.soft {
  color: #a89878;
  text-shadow: 0 0 6px rgba(168, 152, 120, 0.28);
  animation: sidearm-cue-soft 1.2s ease-in-out infinite alternate;
}

#ammo-panel.suggest-sidearm {
  border-color: rgba(201, 168, 108, 0.45);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(201, 168, 108, 0.18);
}

#ammo-panel.suggest-sidearm-soft {
  border-color: rgba(168, 152, 120, 0.28);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 10px rgba(168, 152, 120, 0.1);
}

@keyframes sidearm-cue-pulse {
  from {
    opacity: 0.55;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@keyframes sidearm-cue-soft {
  from {
    opacity: 0.35;
    transform: translateY(0);
  }
  to {
    opacity: 0.72;
    transform: translateY(0);
  }
}

#reload-status {
  display: none;
  margin-top: 10px;
  text-align: right;
}

#reload-status.show {
  display: block;
}

#reload-status .reload-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hud-amber);
  margin-bottom: 4px;
}

#reload-status .reload-bar {
  display: block;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 87, 0.2);
}

#reload-status .reload-bar > i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #8a6a20, var(--hud-amber));
  transform-origin: left center;
  transform: scaleX(var(--reload-pct, 0));
  box-shadow: 0 0 10px rgba(255, 200, 87, 0.4);
}

#objective-panel {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--panel);
  border: 1px solid rgba(255, 200, 87, 0.25);
  border-radius: 4px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--hud-amber);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  text-align: center;
}

#objective-panel strong {
  color: #fff;
  font-weight: 600;
}

#objective-panel.intermission {
  color: #ffb347;
  border-color: rgba(255, 160, 60, 0.45);
  animation: objective-pulse 0.9s ease-in-out infinite alternate;
}

/* Final assault — hotter panel so wave 3 reads as the climax */
#objective-panel.final-wave {
  color: #ff8a8a;
  border-color: rgba(255, 80, 80, 0.45);
  box-shadow: 0 6px 28px rgba(180, 30, 30, 0.35);
}

#objective-panel.final-wave.intermission {
  color: #ff6b4a;
  border-color: rgba(255, 100, 50, 0.55);
  animation: objective-final-pulse 0.75s ease-in-out infinite alternate;
}

/* Extract hold — cool cyan so LZ objective reads after the red final wave */
#objective-panel.extract {
  color: #7ecbff;
  border-color: rgba(80, 180, 255, 0.5);
  box-shadow: 0 6px 28px rgba(30, 100, 180, 0.35);
  animation: objective-extract-pulse 0.85s ease-in-out infinite alternate;
}

#objective-panel.extract.inside {
  color: #8ef0c0;
  border-color: rgba(80, 220, 160, 0.55);
  animation: objective-extract-hold 0.55s ease-in-out infinite alternate;
}

#objective-panel .extract-bar {
  display: block;
  width: 160px;
  height: 4px;
  margin: 8px auto 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

#objective-panel .extract-bar > i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2a88cc, #66e0ff);
  transform-origin: left center;
  transform: scaleX(var(--extract-pct, 0));
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.45);
}

#objective-panel.extract.inside .extract-bar > i {
  background: linear-gradient(90deg, #2a9966, #66ffaa);
}

@keyframes objective-pulse {
  from {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  }
  to {
    box-shadow: 0 6px 28px rgba(255, 140, 40, 0.35);
  }
}

@keyframes objective-final-pulse {
  from {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  }
  to {
    box-shadow: 0 6px 32px rgba(255, 60, 40, 0.45);
  }
}

@keyframes objective-extract-pulse {
  from {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  }
  to {
    box-shadow: 0 6px 30px rgba(60, 160, 255, 0.4);
  }
}

@keyframes objective-extract-hold {
  from {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  }
  to {
    box-shadow: 0 6px 32px rgba(60, 220, 160, 0.45);
  }
}

#hit-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  opacity: 0;
  pointer-events: none;
  z-index: 22;
  transition: opacity 0.05s;
}

#hit-marker.show {
  opacity: 1;
}

#hit-marker.headshot span {
  background: #ff4455;
  box-shadow: 0 0 6px rgba(255, 60, 70, 0.95);
}

#hit-marker.kill {
  animation: hit-kill-pop 0.18s ease-out;
}

#hit-marker.kill span {
  width: 12px;
  height: 2.5px;
  background: #ffe08a;
  box-shadow: 0 0 8px rgba(255, 200, 80, 0.95);
}

#hit-marker.kill.headshot span {
  background: #ff5566;
  box-shadow: 0 0 10px rgba(255, 50, 70, 1);
}

@keyframes hit-kill-pop {
  0% {
    transform: scale(0.55);
    opacity: 0;
  }
  55% {
    transform: scale(1.35);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#hit-marker span {
  position: absolute;
  width: 10px;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

#hit-marker span:nth-child(1) {
  top: 2px;
  left: 2px;
  transform: rotate(45deg);
}
#hit-marker span:nth-child(2) {
  top: 2px;
  right: 2px;
  transform: rotate(-45deg);
}
#hit-marker span:nth-child(3) {
  bottom: 2px;
  left: 2px;
  transform: rotate(-45deg);
}
#hit-marker span:nth-child(4) {
  bottom: 2px;
  right: 2px;
  transform: rotate(45deg);
}

/* Directional hurt edges via --hurt-left/right/rear/front (0..1, pure helper). */
#damage-flash {
  position: absolute;
  inset: 0;
  --hurt-left: 0;
  --hurt-right: 0;
  --hurt-rear: 0;
  --hurt-front: 0;
  background:
    linear-gradient(
      to right,
      rgba(200, 10, 10, calc(0.82 * var(--hurt-left))) 0%,
      transparent 48%
    ),
    linear-gradient(
      to left,
      rgba(200, 10, 10, calc(0.82 * var(--hurt-right))) 0%,
      transparent 48%
    ),
    linear-gradient(
      to top,
      rgba(180, 8, 8, calc(0.7 * var(--hurt-rear))) 0%,
      transparent 42%
    ),
    linear-gradient(
      to bottom,
      rgba(160, 20, 20, calc(0.45 * var(--hurt-front))) 0%,
      transparent 38%
    ),
    radial-gradient(ellipse at center, transparent 32%, rgba(180, 0, 0, 0.42) 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  transition: opacity 0.15s;
}

#damage-flash.show {
  opacity: 1;
}

/* Overlays */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(6, 12, 18, 0.55) 0%, rgba(2, 4, 8, 0.88) 100%);
  z-index: 40;
  pointer-events: auto;
}

#overlay.hidden {
  display: none;
}

#overlay .card {
  max-width: 480px;
  padding: 36px 40px;
  background: linear-gradient(160deg, rgba(16, 28, 40, 0.95), rgba(8, 12, 18, 0.98));
  border: 1px solid rgba(125, 255, 179, 0.25);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(125, 255, 179, 0.06);
  text-align: center;
}

#overlay h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

#overlay h1.win {
  color: var(--hud-green);
  text-shadow: 0 0 24px rgba(125, 255, 179, 0.4);
}

#overlay h1.lose {
  color: var(--hud-red);
  text-shadow: 0 0 24px rgba(255, 77, 77, 0.4);
}

#overlay p {
  margin: 0 0 20px;
  color: var(--hud-dim);
  line-height: 1.55;
  font-size: 14px;
}

/* End-of-match combat report (won / lost overlay) */
#combat-report.combat-report {
  display: grid;
  gap: 6px;
  margin: 0 0 20px;
  padding: 12px 14px;
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(200, 220, 230, 0.9);
  background: linear-gradient(
    90deg,
    rgba(8, 18, 24, 0.72),
    rgba(12, 28, 36, 0.45)
  );
  border: 1px solid rgba(125, 255, 179, 0.18);
  border-radius: 4px;
}

#combat-report.combat-report[hidden] {
  display: none;
}

#overlay h1.lose ~ #combat-report.combat-report,
#overlay .card:has(h1.lose) #combat-report.combat-report {
  border-color: rgba(255, 100, 100, 0.22);
}

.combat-report-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.combat-report-label {
  color: var(--hud-dim);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.combat-report-value-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.combat-report-value {
  color: var(--hud-green);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Accuracy fill bar (end-of-match report polish) */
.combat-report-bar {
  display: inline-block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: rgba(125, 255, 179, 0.12);
  overflow: hidden;
  vertical-align: middle;
}

.combat-report-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    rgba(125, 255, 179, 0.55),
    rgba(125, 255, 179, 0.95)
  );
  border-radius: 2px;
}

#overlay h1.lose ~ #combat-report .combat-report-value,
#overlay .card:has(h1.lose) .combat-report-value {
  color: #ff8a8a;
}

#overlay h1.lose ~ #combat-report .combat-report-bar,
#overlay .card:has(h1.lose) .combat-report-bar {
  background: rgba(255, 100, 100, 0.14);
}

#overlay h1.lose ~ #combat-report .combat-report-bar-fill,
#overlay .card:has(h1.lose) .combat-report-bar-fill {
  background: linear-gradient(
    90deg,
    rgba(255, 120, 120, 0.55),
    rgba(255, 140, 140, 0.95)
  );
}

#overlay .controls {
  text-align: left;
  font-size: 13px;
  color: rgba(200, 220, 230, 0.75);
  margin: 0 0 24px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.7;
}

#overlay .controls kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  margin: 0 2px;
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  color: #fff;
}

#btn-start,
#btn-restart {
  appearance: none;
  border: 1px solid rgba(125, 255, 179, 0.5);
  background: linear-gradient(180deg, rgba(60, 140, 100, 0.5), rgba(30, 80, 55, 0.7));
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 24px rgba(125, 255, 179, 0.15);
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
}

#btn-start:hover,
#btn-restart:hover {
  transform: translateY(-1px);
  border-color: var(--hud-green);
  box-shadow: 0 0 32px rgba(125, 255, 179, 0.3);
}

#btn-start:active,
#btn-restart:active {
  transform: translateY(0);
}

#file-protocol-banner {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 100;
  background: #0a1018;
  color: #e8f0f4;
  padding: 48px;
  font-family: var(--font);
}

#file-protocol-banner.show {
  display: block;
}

#file-protocol-banner code {
  display: block;
  margin-top: 16px;
  padding: 12px 16px;
  background: #121a24;
  border: 1px solid rgba(125, 255, 179, 0.25);
  border-radius: 4px;
  font-family: var(--mono);
  color: var(--hud-green);
}

@keyframes pulse-empty {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.45;
  }
}

/* Kill feed */
#kill-feed {
  position: absolute;
  top: 72px;
  right: 28px;
  width: 220px;
  font-size: 12px;
  font-family: var(--mono);
  color: rgba(255, 255, 255, 0.85);
  text-align: right;
  z-index: 16;
}

#kill-feed .line {
  margin-bottom: 6px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.45);
  border-left: 2px solid var(--hud-amber);
  animation: feed-in 0.2s ease-out;
}

#kill-feed .line.elim {
  border-left-color: var(--hud-amber);
  color: #fff;
  font-weight: 600;
  animation: feed-kill-punch 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  background: rgba(40, 28, 8, 0.72);
  box-shadow: 0 0 12px rgba(255, 180, 40, 0.18);
}

#kill-feed .line.headshot {
  border-left-color: #ff4455;
  color: #ffd0d4;
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: feed-kill-punch 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  background: rgba(50, 8, 12, 0.78);
  box-shadow: 0 0 14px rgba(255, 50, 70, 0.28);
}

/* World-projected damage floaters (i43 hit confirmation juice) */
.damage-floater {
  position: absolute;
  z-index: 22;
  pointer-events: none;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #f4f7fa;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(0, 0, 0, 0.9),
    0 0 14px rgba(255, 255, 255, 0.25);
  will-change: transform, opacity;
}

.damage-floater.headshot {
  color: #ff7a88;
  font-size: 20px;
  text-shadow:
    0 0 10px rgba(255, 40, 60, 0.55),
    0 0 8px rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(0, 0, 0, 0.9);
}

.damage-floater.kill {
  color: #ffd24a;
  font-size: 22px;
  text-shadow:
    0 0 12px rgba(255, 180, 40, 0.55),
    0 0 8px rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(0, 0, 0, 0.9);
}

.damage-floater.headshot_kill {
  color: #ff5c6a;
  font-size: 24px;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 14px rgba(255, 50, 70, 0.65),
    0 0 18px rgba(255, 180, 40, 0.35),
    0 0 8px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(0, 0, 0, 0.95);
}

/* Multi-kill callout (DOUBLE / TRIPLE / QUAD / SPREE) */
#kill-feed .line.streak {
  border-left-color: #ffd24a;
  color: #fff6c8;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: feed-streak-punch 0.38s cubic-bezier(0.15, 0.95, 0.3, 1);
  background: linear-gradient(
    90deg,
    rgba(70, 45, 0, 0.88),
    rgba(30, 18, 0, 0.72)
  );
  box-shadow: 0 0 18px rgba(255, 190, 40, 0.35);
}

@keyframes feed-streak-punch {
  0% {
    opacity: 0;
    transform: translateX(36px) scale(0.8);
  }
  45% {
    opacity: 1;
    transform: translateX(-6px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes feed-kill-punch {
  0% {
    opacity: 0;
    transform: translateX(28px) scale(0.88);
  }
  55% {
    opacity: 1;
    transform: translateX(-4px) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
