/* Survive The Apocalypse - Styles */
:root {
  --bg-dark: #0a0c0a;
  --bg-panel: #141814;
  --accent: #c41e3a;
  --accent-dim: #8b1528;
  --accent-glow: rgba(196, 30, 58, 0.4);
  --text: #e0e6dc;
  --text-dim: #7a8572;
  --zombie: #2d4a2d;
  --zombie-glow: rgba(45, 74, 45, 0.5);
  --danger: #9d0208;
  --success: #2d5a2d;
  --wood: #5c4033;
  --blood: #6d0f1a;
}

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

body {
  font-family: 'Share Tech Mono', monospace;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
}

#app {
  width: 100vw;
  height: 100vh;
  position: relative;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1;
}

.screen.active {
  display: flex;
  z-index: 2;
}

.hidden {
  display: none !important;
}

/* ----- Menu (zombie themed) ----- */
#menu {
  padding: 2rem;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: center;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
}

#menu::-webkit-scrollbar {
  width: 12px;
}

#menu::-webkit-scrollbar-track {
  background: rgba(10, 12, 10, 0.8);
  border-radius: 6px;
}

#menu::-webkit-scrollbar-thumb {
  background: rgba(196, 30, 58, 0.5);
  border-radius: 6px;
}

#menu::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 30, 58, 0.7);
}

#menu .menu-content {
  padding-bottom: 3rem;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.menu-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(196, 30, 58, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(45, 74, 45, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #0a0c0a 0%, #0f140f 50%, #0a0e0a 100%);
  pointer-events: none;
}

.menu-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' opacity='0.03'%3E%3Cpath fill='%23c41e3a' d='M40 0L80 40L40 80L0 40Z'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Ornate border / edge vignette */
.menu-decor-edges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 3px solid transparent;
  border-image: linear-gradient(165deg, rgba(196, 30, 58, 0.5) 0%, transparent 25%, transparent 75%, rgba(196, 30, 58, 0.4) 100%) 1;
  box-shadow:
    inset 0 0 120px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(196, 30, 58, 0.15),
    0 0 80px 20px rgba(0, 0, 0, 0.3);
}

/* Side tower silhouettes (decorative) */
.menu-decor-towers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 2vw 8vh;
}

.menu-tower {
  width: clamp(90px, 16vw, 160px);
  height: clamp(160px, 32vh, 260px);
  background: 
    linear-gradient(90deg, rgba(0,0,0,0.4) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.35) 100%),
    linear-gradient(180deg, rgba(30, 35, 30, 0.2) 0%, rgba(18, 22, 18, 0.95) 12%, rgba(12, 15, 12, 0.98) 100%);
  clip-path: polygon(
    /* battlements */
    35% 0%, 40% 0%, 40% 4%, 45% 4%, 45% 0%, 55% 0%, 55% 4%, 60% 4%, 60% 0%, 65% 0%,
    68% 6%, 72% 6%, 75% 12%, 78% 12%, 82% 18%, 85% 18%, 88% 24%, 92% 24%, 95% 28%, 100% 28%, 100% 100%, 0% 100%, 0% 28%,
    5% 28%, 8% 24%, 12% 24%, 15% 18%, 18% 18%, 22% 12%, 25% 12%, 28% 6%, 32% 6%, 35% 0%
  );
  box-shadow:
    inset -12px 0 28px rgba(0, 0, 0, 0.65),
    inset 10px 0 16px rgba(196, 30, 58, 0.08),
    0 0 0 1px rgba(196, 30, 58, 0.18);
}

.menu-tower::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 115%;
  height: 14%;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(40, 30, 25, 0.9) 20%, rgba(35, 25, 20, 0.95) 50%, rgba(40, 30, 25, 0.9) 80%, transparent 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 6px,
      rgba(196, 30, 58, 0.12) 6px,
      rgba(196, 30, 58, 0.12) 8px
    );
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
  border-top: 1px solid rgba(196, 30, 58, 0.2);
}

.menu-tower::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translateX(-50%);
  width: 8%;
  height: 18%;
  background: rgba(10, 8, 6, 0.85);
  border-radius: 1px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.8);
}

.menu-tower-right {
  transform: scaleX(-1);
}

/* Corner ornaments */
.menu-frame {
  position: absolute;
  inset: 12px;
  pointer-events: none;
}

.menu-corner {
  position: absolute;
  width: 52px;
  height: 52px;
  border-color: rgba(196, 30, 58, 0.5);
  border-style: solid;
  border-width: 0;
}

.menu-corner-tl {
  top: 0;
  left: 0;
  border-top-width: 3px;
  border-left-width: 3px;
}
.menu-corner-tl::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(196, 30, 58, 0.45);
  border-left: 2px solid rgba(196, 30, 58, 0.45);
}
.menu-corner-tl::after {
  content: '⚔';
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 12px;
  color: rgba(196, 30, 58, 0.45);
  opacity: 0.9;
}

.menu-corner-tr {
  top: 0;
  right: 0;
  border-top-width: 3px;
  border-right-width: 3px;
}
.menu-corner-tr::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(196, 30, 58, 0.45);
  border-right: 2px solid rgba(196, 30, 58, 0.45);
  border-left: none;
}

.menu-corner-bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 3px;
  border-left-width: 3px;
}
.menu-corner-bl::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  border-bottom: 2px solid rgba(196, 30, 58, 0.45);
  border-left: 2px solid rgba(196, 30, 58, 0.45);
}

.menu-corner-br {
  bottom: 0;
  right: 0;
  border-bottom-width: 3px;
  border-right-width: 3px;
}
.menu-corner-br::before {
  content: '';
  position: absolute;
  bottom: 8px;
  right: 8px;
  left: auto;
  width: 18px;
  height: 18px;
  border-bottom: 2px solid rgba(196, 30, 58, 0.45);
  border-right: 2px solid rgba(196, 30, 58, 0.45);
  border-left: none;
}

/* Chain / barbed-wire style dividers */
.menu-chain {
  position: absolute;
  left: 80px;
  right: 80px;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 6px,
    rgba(196, 30, 58, 0.25) 6px,
    rgba(196, 30, 58, 0.25) 8px
  );
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.menu-chain-top {
  top: 18px;
}

.menu-chain-bottom {
  bottom: 18px;
}

/* Title divider */
.menu-title-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.menu-divider-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.6), transparent);
  box-shadow: 0 0 8px rgba(196, 30, 58, 0.3);
}

.menu-divider-icon {
  font-size: 1.2rem;
  opacity: 0.8;
  filter: drop-shadow(0 0 4px rgba(196, 30, 58, 0.4));
  animation: menu-icon-pulse 2s ease-in-out infinite;
}

@keyframes menu-icon-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Skulls (floating decorative) */
.menu-skulls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.menu-skull {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.2;
  filter: drop-shadow(0 0 6px rgba(196, 30, 58, 0.3));
  animation: menu-float 6s ease-in-out infinite;
}

.menu-skull-1 { top: 12%; left: 8%; animation-delay: 0s; }
.menu-skull-2 { top: 22%; right: 10%; animation-delay: -1.2s; }
.menu-skull-3 { bottom: 35%; left: 12%; animation-delay: -2.5s; }
.menu-skull-4 { bottom: 18%; right: 15%; animation-delay: -0.8s; }
.menu-skull-5 { top: 45%; left: 5%; animation-delay: -3s; }

@keyframes menu-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

/* Vines (side decoration) */
.menu-vines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.menu-vine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(45, 74, 45, 0.15) 20%,
    rgba(45, 74, 45, 0.25) 50%,
    rgba(45, 74, 45, 0.15) 80%,
    transparent 100%);
  border-radius: 0 8px 8px 0;
  box-shadow: inset -2px 0 10px rgba(0,0,0,0.3);
}

.menu-vine-l {
  left: 0;
  border-left: 2px solid rgba(45, 74, 45, 0.4);
}

.menu-vine-r {
  right: 0;
  left: auto;
  background: linear-gradient(180deg, transparent 0%, rgba(45, 74, 45, 0.15) 20%, rgba(45, 74, 45, 0.25) 50%, rgba(45, 74, 45, 0.15) 80%, transparent 100%);
  border-radius: 8px 0 0 8px;
  border-left: none;
  border-right: 2px solid rgba(45, 74, 45, 0.4);
}

/* Blood drips */
.menu-drips {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 0;
}

.menu-drip {
  position: absolute;
  width: 4px;
  height: 30px;
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.5), transparent);
  border-radius: 0 0 2px 2px;
  animation: menu-drip-fall 4s ease-in infinite;
}

.menu-drip-1 { left: 15%; animation-delay: 0s; height: 25px; }
.menu-drip-2 { left: 35%; animation-delay: -0.8s; height: 35px; }
.menu-drip-3 { left: 55%; animation-delay: -1.6s; height: 28px; }
.menu-drip-4 { right: 20%; left: auto; animation-delay: -2.2s; height: 32px; }

@keyframes menu-drip-fall {
  0% { opacity: 0.3; transform: translateY(-10px) scaleY(0.5); }
  50% { opacity: 0.7; transform: translateY(20px) scaleY(1); }
  100% { opacity: 0.2; transform: translateY(50px) scaleY(0.8); }
}

/* Cobwebs (corners) */
.menu-cobwebs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.menu-cobweb {
  position: absolute;
  width: 80px;
  height: 80px;
  background: radial-gradient(ellipse 50% 50% at 30% 30%,
    transparent 0%,
    transparent 40%,
    rgba(180, 180, 180, 0.08) 70%,
    rgba(200, 200, 200, 0.05) 100%);
  opacity: 0.6;
}

.menu-cobweb-tl {
  top: 8px;
  left: 8px;
  border-top: 1px solid rgba(180, 180, 180, 0.15);
  border-left: 1px solid rgba(180, 180, 180, 0.15);
  border-radius: 0 0 60% 0;
}

.menu-cobweb-tr {
  top: 8px;
  right: 8px;
  left: auto;
  border-top: 1px solid rgba(180, 180, 180, 0.15);
  border-right: 1px solid rgba(180, 180, 180, 0.15);
  border-radius: 0 0 0 60%;
}

/* Floating particles */
.menu-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.menu-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(196, 30, 58, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(196, 30, 58, 0.5);
  animation: menu-particle-float 8s linear infinite;
}

.menu-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.menu-particle:nth-child(2) { left: 25%; top: 70%; animation-delay: -2s; }
.menu-particle:nth-child(3) { left: 60%; top: 30%; animation-delay: -4s; }
.menu-particle:nth-child(4) { left: 80%; top: 60%; animation-delay: -1s; }
.menu-particle:nth-child(5) { left: 45%; top: 85%; animation-delay: -5s; }

@keyframes menu-particle-float {
  0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  25% { transform: translate(10px, -30px) scale(1.2); opacity: 0.6; }
  50% { transform: translate(-5px, -50px) scale(0.9); opacity: 0.4; }
  75% { transform: translate(15px, -80px) scale(1.1); opacity: 0.2; }
  100% { transform: translate(0, -100px) scale(1); opacity: 0; }
}

.menu-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Decorative title container – centered and ornate */
.title-wrap {
  position: relative;
  text-align: center;
  margin: 0 auto 0.5rem;
  padding: 1.25rem 1rem 1.5rem;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  min-width: 0;
}

.title-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 420px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.4), rgba(196, 30, 58, 0.6), rgba(196, 30, 58, 0.4), transparent);
  box-shadow: 0 0 12px rgba(196, 30, 58, 0.3);
}

.title-line-top {
  top: 0;
}

.title-line-bottom {
  bottom: 0;
}

.title-ornament {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(196, 30, 58, 0.55);
  border-style: solid;
  border-width: 0;
}

.title-ornament-tl {
  top: 4px;
  left: 8px;
  border-top-width: 2px;
  border-left-width: 2px;
}

.title-ornament-tr {
  top: 4px;
  right: 8px;
  left: auto;
  border-top-width: 2px;
  border-right-width: 2px;
}

.title-ornament-bl {
  bottom: 4px;
  left: 8px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.title-ornament-br {
  bottom: 4px;
  right: 8px;
  left: auto;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(1.35rem, 4vw, 2.6rem);
  letter-spacing: 0.1em;
  margin: 0;
  line-height: 1.25;
  position: relative;
  display: block;
  text-align: center;
  background: linear-gradient(180deg, #e85a6a 0%, #c41e3a 35%, #a01830 70%, #8b1528 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
  filter: drop-shadow(0 0 18px rgba(196, 30, 58, 0.5)) drop-shadow(0 0 35px rgba(196, 30, 58, 0.25));
  text-shadow: none;
  animation: menu-title-glow 3s ease-in-out infinite;
  word-break: keep-all;
}

.title-underline {
  display: block;
  margin: 0.5rem auto 0;
  width: 70%;
  max-width: 340px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(196, 30, 58, 0.3) 15%, rgba(196, 30, 58, 0.8) 50%, rgba(196, 30, 58, 0.3) 85%, transparent 100%);
  box-shadow: 0 0 14px rgba(196, 30, 58, 0.4), 0 0 28px rgba(196, 30, 58, 0.2);
  border-radius: 2px;
}

@keyframes menu-title-glow {
  0%, 100% {
    filter: drop-shadow(0 0 18px rgba(196, 30, 58, 0.5)) drop-shadow(0 0 35px rgba(196, 30, 58, 0.25));
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(196, 30, 58, 0.65)) drop-shadow(0 0 50px rgba(196, 30, 58, 0.35));
  }
}

.high-score-value {
  padding: 0.2em 0.5em;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.2), rgba(196, 30, 58, 0.05));
  border: 1px solid rgba(196, 30, 58, 0.4);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(196, 30, 58, 0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

.tagline {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.menu-story {
  max-width: 520px;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(196, 30, 58, 0.3);
  border-left-width: 4px;
  border-left-color: rgba(196, 30, 58, 0.5);
  background: 
    linear-gradient(135deg, rgba(20, 24, 20, 0.85) 0%, rgba(15, 18, 15, 0.9) 100%);
  border-radius: 2px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.25), 0 0 20px rgba(0,0,0,0.2);
}

.backstory {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.menu-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
}

.menu-buttons-center {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.menu-high-score-left {
  margin-top: -8px;
  margin-left: 0;
  margin-right: auto;
  align-self: center;
}

.menu-buttons-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  min-width: 260px;
}

.menu-buttons-column .menu-btn {
  width: 100%;
  box-sizing: border-box;
}

.menu-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1.25rem 2rem;
  min-width: 260px;
  min-height: 88px;
  background: var(--bg-panel);
  border: 2px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  position: relative;
}

.menu-btn:hover,
.menu-btn:focus {
  background: var(--accent);
  color: #0a0c0a;
  box-shadow: 0 0 20px var(--accent-glow), inset 0 0 0 1px rgba(0,0,0,0.2);
  outline: none;
}

.menu-btn:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.menu-btn-primary {
  border-color: var(--accent);
  color: #e88a96;
}

.menu-btn-primary:hover,
.menu-btn-primary:focus {
  background: var(--accent);
  color: #0a0c0a;
  box-shadow: 0 0 24px var(--accent-glow);
}

.menu-btn-label {
  display: block;
  font-size: 1.1rem;
}

.menu-btn-desc {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.85;
  max-width: 220px;
}

.menu-btn-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.menu-tutorials {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 520px;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.menu-tutorials::-webkit-scrollbar {
  width: 8px;
}

.menu-tutorials::-webkit-scrollbar-track {
  background: rgba(10, 12, 10, 0.6);
  border-radius: 4px;
}

.menu-tutorials::-webkit-scrollbar-thumb {
  background: rgba(196, 30, 58, 0.5);
  border-radius: 4px;
}

.menu-tutorials::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 30, 58, 0.7);
}

.how-to-play {
  margin-top: 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.how-to-play summary {
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
}

.how-to-play summary::-webkit-details-marker {
  display: none;
}

.how-to-play summary::before {
  content: '▶ ';
  font-size: 0.7rem;
}

.how-to-play[open] summary::before {
  content: '▼ ';
}

.how-to-content {
  padding: 0.75rem 0;
  max-width: 100%;
  line-height: 1.5;
}

.how-to-content p {
  margin-bottom: 0.5rem;
}

.high-score {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  white-space: nowrap;
}

.high-score strong {
  color: var(--accent);
  margin-left: 0.5rem;
}

/* ----- Info screen ----- */
#info-screen {
  background: var(--bg-dark);
}

.info-content {
  max-width: 520px;
  padding: 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--accent-dim);
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

#info-screen h2 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent);
  margin-bottom: 1rem;
}

.info-panel p {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  color: var(--text);
}

#info-screen .menu-btn {
  margin-top: 1.5rem;
}

/* ----- Game screen ----- */
#game-screen {
  padding: 0;
  align-items: stretch;
  justify-content: center;
  background: #0a0a0c;
}

#game-canvas {
  display: block;
  background: #111;
  margin: auto;
  border: 2px solid var(--accent-dim);
  box-shadow: 0 0 60px rgba(232, 93, 4, 0.15);
}

#hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

#hud-top {
  display: flex;
  justify-content: space-between;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

#hud-bottom {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

#hud-player1, #hud-player2 {
  background: rgba(22, 22, 26, 0.9);
  padding: 8px 12px;
  border: 1px solid var(--accent-dim);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-bar {
  width: 80px;
  height: 10px;
  background: #333;
  border: 1px solid #555;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  background: var(--success);
  width: 100%;
  transition: width 0.2s;
}

.health-fill.low {
  background: var(--danger);
}

#game-over-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#game-over-overlay:not(.hidden) {
  display: flex;
  pointer-events: auto;
}

.overlay-box {
  background: var(--bg-panel);
  border: 2px solid var(--accent);
  padding: 2rem;
  text-align: center;
  max-width: 400px;
}

.overlay-box h2 {
  font-family: 'Orbitron', sans-serif;
  color: var(--danger);
  margin-bottom: 1rem;
}

.overlay-box p {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.overlay-box .menu-btn {
  margin-top: 1.5rem;
  pointer-events: auto;
}
