/* ==========================================================================
   ZOMBIE TOWER DEFENSE - RETRO APOCALYPSE UI/UX STYLES
   Resolution Target: 1280x720 (Framed & Responsively Scaled)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&family=VT323&display=swap');

:root {
  --bg-void: #0a0908;
  --panel-bg: #221d18;
  --panel-border: #4d4137;
  --panel-border-dark: #14110e;
  --panel-highlight: #6e5f50;

  --metal-dark: #1b1815;
  --metal-mid: #2b2621;
  --metal-light: #443c34;
  --metal-shine: #7d7063;

  --gold-val: #ffcb05;
  --gold-glow: rgba(255, 203, 5, 0.45);
  --energy-cyan: #00d9ff;
  --energy-glow: rgba(0, 217, 255, 0.45);

  --hp-green: #3cd03c;
  --hp-bg: #1f3d1f;
  --zombie-red: #ff3333;
  --zombie-glow: rgba(255, 51, 51, 0.6);

  --accent-amber: #ff9900;
  --accent-amber-glow: rgba(255, 153, 0, 0.6);

  --font-retro: 'Press Start 2P', monospace;
  --font-mono: 'Share Tech Mono', 'VT323', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-void);
  background-image: 
    radial-gradient(circle at 50% 50%, #1a1612 0%, #080706 100%);
  overflow: hidden;
  font-family: var(--font-retro);
  color: #e8e4dc;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   OUTER CABINET FRAME (Responsive scaling to fit window maintaining 16:9)
   ========================================================================== */
#cabinet-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: 
    radial-gradient(ellipse at center, rgba(30, 25, 20, 0.4) 0%, rgba(5, 5, 4, 0.95) 100%);
}

#cabinet-frame {
  position: relative;
  width: 1280px;
  height: 720px;
  flex-shrink: 0;
  border-radius: 8px;
  background-color: #000;
  box-shadow: 
    0 0 0 8px #1d1915,
    0 0 0 12px #3e362e,
    0 0 0 16px #12100d,
    0 15px 45px rgba(0, 0, 0, 0.95),
    inset 0 0 30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform-origin: center center;
}

/* Industrial Corner Rivets on Frame */
#cabinet-frame::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 2px dashed rgba(100, 85, 70, 0.3);
  pointer-events: none;
  z-index: 999;
  border-radius: 4px;
}

/* Hazard Stripes along Top and Bottom Frame Trim */
.hazard-trim {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    #ffcc00,
    #ffcc00 8px,
    #111111 8px,
    #111111 16px
  );
  z-index: 100;
  opacity: 0.6;
}
.hazard-top { top: 0; }
.hazard-bottom { bottom: 0; }

/* ==========================================================================
   GAME CANVAS
   ========================================================================== */
#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background-color: #3b362f;
  cursor: crosshair;
  z-index: 1;
}

/* ==========================================================================
   CRT SCANLINE & VIGNETTE OVERLAY
   ========================================================================== */
#crtOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  pointer-events: none;
  z-index: 90;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.5) 100%);
  background-size: 100% 4px, 100% 100%;
  transition: opacity 0.25s ease;
}

#crtOverlay.crt-disabled {
  opacity: 0;
}

/* Subtle CRT phosphor screen flicker */
@keyframes crtFlicker {
  0% { opacity: 0.98; }
  50% { opacity: 1.0; }
  100% { opacity: 0.97; }
}

#crtOverlay::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: rgba(18, 16, 16, 0.03);
  opacity: 0;
  z-index: 91;
  pointer-events: none;
  animation: crtFlicker 0.12s infinite;
}

/* ==========================================================================
   UI LAYER (Absolute on top of Canvas)
   ========================================================================== */
#uiLayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

/* Interactive elements inside UI Layer enable pointer events */
.interactive {
  pointer-events: auto;
}

/* ==========================================================================
   TOP-LEFT HUD MATCHING SCREENSHOT
   ========================================================================== */
.hud-box {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 258px;
  padding: 10px 12px;
  background-color: var(--panel-bg);
  border: 3px solid var(--panel-border);
  border-radius: 6px;
  box-shadow: 
    inset 2px 2px 0px var(--panel-highlight),
    inset -2px -2px 0px var(--panel-border-dark),
    0 6px 14px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
  letter-spacing: 0.5px;
  z-index: 20;
}

.hud-line {
  display: flex;
  align-items: center;
  color: #edeae2;
  text-shadow: 1px 1px 0px #000;
  white-space: nowrap;
}

.hud-line .hud-label {
  color: #dfdcd4;
}

.hud-line .hud-value {
  margin-left: 5px;
  font-weight: bold;
}

.hud-resources {
  font-size: 9.5px;
  margin-top: 1px;
}

.gold-val {
  color: var(--gold-val);
  text-shadow: 0 0 6px var(--gold-glow), 1px 1px 0px #000;
  font-weight: bold;
}

.energy-val {
  color: var(--energy-cyan);
  text-shadow: 0 0 6px var(--energy-glow), 1px 1px 0px #000;
  font-weight: bold;
}

/* ==========================================================================
   TOP-RIGHT CONTROLS MATCHING SCREENSHOT
   ========================================================================== */
.top-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.retro-ctrl-btn {
  background: linear-gradient(180deg, #38312a 0%, #201c18 100%);
  border: 2px solid #574c40;
  border-radius: 4px;
  box-shadow: 
    inset 2px 2px 0px #6d5e4f,
    inset -2px -2px 0px #13100d,
    0 4px 8px rgba(0, 0, 0, 0.8);
  color: #f2eee5;
  font-family: var(--font-retro);
  font-size: 11px;
  min-width: 42px;
  height: 40px;
  padding: 0 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 1px 1px 0px #000;
  transition: background 0.1s, transform 0.05s;
}

.retro-ctrl-btn:hover {
  background: linear-gradient(180deg, #483f36 0%, #29241f 100%);
  border-color: #7b6c5b;
}

.retro-ctrl-btn:active, .retro-ctrl-btn.active {
  transform: translateY(2px);
  box-shadow: 
    inset 2px 2px 0px #13100d,
    inset -2px -2px 0px #6d5e4f,
    0 1px 2px rgba(0, 0, 0, 0.8);
  background: #181512;
  color: var(--gold-val);
}

.retro-ctrl-btn .btn-subtext {
  font-size: 8px;
  margin-left: 2px;
  color: var(--gold-val);
}

/* ==========================================================================
   SURVIVOR BASE & LAST STAND OVERCHARGE WIDGET
   ========================================================================== */
.last-stand-widget {
  position: absolute;
  top: 485px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  z-index: 15;
}

.last-stand-title-group {
  text-align: right;
}

.last-stand-title {
  font-size: 10px;
  color: #e5e0d4;
  text-shadow: 1px 1px 2px #000;
  letter-spacing: 0.5px;
}

.survivor-base-title {
  font-size: 11px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4), 1px 1px 2px #000;
  margin-top: 2px;
}

.base-hp-bar-container {
  width: 172px;
  height: 18px;
  background-color: #121511;
  border: 2px solid #33402e;
  border-radius: 3px;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.9), 0 2px 5px rgba(0,0,0,0.7);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.base-hp-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, #5de65d 0%, #20a020 100%);
  box-shadow: inset 0 1px 0px rgba(255,255,255,0.4);
  transition: width 0.3s ease, background 0.3s;
}

.base-hp-text {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  font-size: 7.5px;
  color: #ffffff;
  text-shadow: 1px 1px 1px #000;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Overcharge Manual Trigger Button */
.overcharge-btn {
  background: linear-gradient(180deg, #1c3640 0%, #0d1e25 100%);
  border: 2px solid var(--energy-cyan);
  border-radius: 4px;
  padding: 5px 8px;
  color: #ffffff;
  font-family: var(--font-retro);
  font-size: 8px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.4), inset 0 0 6px rgba(0, 217, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s;
}

.overcharge-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #244b59 0%, #122b35 100%);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.8), inset 0 0 10px rgba(0, 217, 255, 0.5);
  transform: scale(1.02);
}

.overcharge-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.overcharge-btn:disabled {
  opacity: 0.45;
  border-color: #3b525a;
  box-shadow: none;
  cursor: not-allowed;
}

.overcharge-btn .oc-cost {
  color: var(--energy-cyan);
  font-size: 7px;
}

/* ==========================================================================
   BOTTOM RETRO METAL PANEL MATCHING SCREENSHOT
   ========================================================================== */
.bottom-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1280px;
  height: 122px;
  background: linear-gradient(180deg, #322b24 0%, #201c18 40%, #171411 100%);
  border-top: 3px solid #5a4e42;
  box-shadow: 
    inset 0 2px 0px #706253,
    0 -6px 18px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  z-index: 25;
}

/* Tower Selection Cards Container */
.tower-cards-container {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
}

/* Single Tower Card */
.tower-card {
  width: 132px;
  height: 104px;
  background: linear-gradient(180deg, #2a241e 0%, #1b1713 100%);
  border: 2px solid #4a3e33;
  border-radius: 4px;
  box-shadow: 
    inset 1px 1px 0px #5c4e40,
    inset -1px -1px 0px #110e0c,
    0 3px 6px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 5px;
  cursor: pointer;
  position: relative;
  transition: transform 0.08s, border-color 0.15s, box-shadow 0.15s;
}

.tower-card:hover {
  border-color: #8c7660;
  transform: translateY(-2px);
  box-shadow: 
    inset 1px 1px 0px #a48c73,
    0 6px 12px rgba(0, 0, 0, 0.85);
}

.tower-card.selected {
  border-color: var(--accent-amber) !important;
  box-shadow: 
    0 0 12px var(--accent-amber-glow),
    inset 0 0 8px rgba(255, 153, 0, 0.35) !important;
  background: linear-gradient(180deg, #3b2c17 0%, #20180e 100%);
  transform: translateY(-2px);
}

.tower-card.disabled {
  opacity: 0.55;
  filter: grayscale(0.5);
  cursor: not-allowed;
}

.tower-card.disabled:hover {
  transform: none;
  border-color: #4a3e33;
}

/* Card Header (Title) */
.card-header {
  font-size: 7.5px;
  text-align: center;
  color: #dfdbd2;
  text-shadow: 1px 1px 0px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 0;
}

/* Card Body (Icon & Badges) */
.card-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 1px 0;
}

.card-icon-wrapper {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(60, 50, 40, 0.6) 0%, rgba(20, 16, 12, 0.8) 100%);
  border: 1px solid #3f352b;
  border-radius: 3px;
  box-shadow: inset 1px 1px 2px #000;
}

.card-icon-svg {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
}

.card-badges {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}

.badge-sub {
  background-color: #171410;
  border: 1px solid #4a3e33;
  border-radius: 2px;
  color: #c7c0b4;
  font-size: 6.5px;
  padding: 1px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-arrows {
  color: #45dc45;
  font-weight: bold;
}

/* Card Footer (Price & Level) */
.card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 2px;
}

.card-cost {
  font-size: 8px;
  color: var(--gold-val);
  text-shadow: 0 0 5px var(--gold-glow), 1px 1px 0px #000;
  font-weight: bold;
}

.tower-card.disabled .card-cost {
  color: #ff5555;
  text-shadow: none;
}

/* Hotkey Badge in Corner */
.card-hotkey {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 6.5px;
  color: #8b8072;
  font-family: var(--font-mono);
}

/* Progress / Tier Bar at Bottom of Card */
.card-progress-bar {
  width: 100%;
  height: 4px;
  background-color: #120f0c;
  border-radius: 1px;
  overflow: hidden;
  margin-top: 1px;
}

.card-progress-fill {
  height: 100%;
  width: 100%;
  background-color: #4cdb4c;
  box-shadow: 0 0 4px rgba(76, 219, 76, 0.6);
}

/* Card 4 (Flametrost) amber/orange bar */
.fill-orange {
  background-color: #ff8800;
  box-shadow: 0 0 4px rgba(255, 136, 0, 0.6);
}

/* Card 5 (Tesla) cyan bar */
.fill-cyan {
  background-color: #00d9ff;
  box-shadow: 0 0 4px rgba(0, 217, 255, 0.6);
}

/* Card 6 (Mortar) yellow bar */
.fill-yellow {
  background-color: #ffcc00;
  box-shadow: 0 0 4px rgba(255, 204, 0, 0.6);
}

/* ==========================================================================
   MINIMAP RADAR CONTAINER MATCHING SCREENSHOT
   ========================================================================== */
.bottom-right-group {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.minimap-panel {
  width: 160px;
  height: 104px;
  background-color: #12100d;
  border: 3px solid #4a3e33;
  border-radius: 5px;
  box-shadow: 
    inset 2px 2px 0px #5c4e40,
    inset -2px -2px 0px #0b0907,
    0 3px 8px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#minimapCanvas {
  width: 154px;
  height: 98px;
  background-color: #1a1612;
  display: block;
}

/* Radar Sweep Line Overlay */
.radar-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 100, 0) 0%,
    rgba(0, 255, 100, 0.08) 70%,
    rgba(0, 255, 100, 0.25) 100%
  );
  animation: radarSweep 3s linear infinite;
}

@keyframes radarSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Minimap Corner Label */
.minimap-tag {
  position: absolute;
  bottom: 2px;
  left: 4px;
  font-size: 6px;
  color: #6d8a6d;
  font-family: var(--font-mono);
  pointer-events: none;
  text-shadow: 1px 1px 0px #000;
  opacity: 0.85;
}

/* ==========================================================================
   NEXT WAVE RETRO BUTTON MATCHING SCREENSHOT
   ========================================================================== */
.next-wave-btn {
  width: 148px;
  height: 104px;
  background: linear-gradient(180deg, #3d3328 0%, #28211a 50%, #1e1913 100%);
  border: 3px solid #5a4b3c;
  border-radius: 5px;
  box-shadow: 
    inset 2px 2px 0px #796652,
    inset -2px -2px 0px #110e0b,
    0 4px 10px rgba(0, 0, 0, 0.85);
  color: #f7f3ea;
  font-family: var(--font-retro);
  font-size: 11.5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-align: center;
  text-shadow: 2px 2px 0px #000;
  letter-spacing: 0.8px;
  transition: background 0.1s, transform 0.06s;
  position: relative;
}

.next-wave-btn:hover {
  background: linear-gradient(180deg, #4f4234 0%, #342b22 50%, #251f18 100%);
  border-color: #8c745d;
  color: #ffffff;
}

.next-wave-btn:active, .next-wave-btn.pressed {
  transform: translateY(3px);
  box-shadow: 
    inset 2px 2px 0px #110e0b,
    inset -2px -2px 0px #796652,
    0 1px 3px rgba(0, 0, 0, 0.85);
  background: #1c1712;
}

.next-wave-btn.wave-active {
  border-color: #993322;
  box-shadow: 0 0 10px rgba(255, 50, 30, 0.3), inset 0 0 8px rgba(255, 50, 30, 0.2);
}

.wave-subtext {
  font-size: 7.5px;
  color: var(--gold-val);
  text-shadow: 0 0 4px var(--gold-glow), 1px 1px 0px #000;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   HOVER TOOLTIPS FOR TOWER CARDS
   ========================================================================== */
.tower-tooltip {
  position: absolute;
  bottom: 130px;
  left: 20px;
  width: 290px;
  background-color: #1f1a15;
  border: 2px solid #5a4b3c;
  border-radius: 5px;
  padding: 10px 12px;
  box-shadow: 
    inset 1px 1px 0px #796652,
    0 8px 20px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
  font-size: 8px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tower-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-title {
  font-size: 9.5px;
  color: var(--gold-val);
  text-shadow: 1px 1px 0px #000;
  border-bottom: 1px dashed #4a3e33;
  padding-bottom: 3px;
  display: flex;
  justify-content: space-between;
}

.tooltip-stat-row {
  display: flex;
  justify-content: space-between;
  color: #cbc4b6;
  font-family: var(--font-mono);
  font-size: 11px;
}

.tooltip-stat-val {
  color: #ffffff;
  font-weight: bold;
}

.tooltip-desc {
  color: #a89f91;
  font-size: 7.5px;
  line-height: 1.4;
  margin-top: 2px;
}

/* ==========================================================================
   UPGRADE & SELL MODAL (CLICKING EXISTING TOWERS)
   ========================================================================== */
.tower-modal {
  position: absolute;
  top: 180px;
  left: 490px;
  width: 300px;
  background: linear-gradient(180deg, #28211a 0%, #1b1612 100%);
  border: 3px solid #5a4b3c;
  border-radius: 6px;
  box-shadow: 
    inset 2px 2px 0px #796652,
    inset -2px -2px 0px #0e0c0a,
    0 12px 30px rgba(0, 0, 0, 0.95);
  padding: 12px 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 60;
  font-size: 8px;
}

.tower-modal.open {
  display: flex;
  animation: modalPop 0.15s ease-out;
}

@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #4a3e33;
  padding-bottom: 6px;
}

.modal-title {
  font-size: 10px;
  color: #edeae2;
  text-shadow: 1px 1px 0px #000;
}

.modal-level-badge {
  background-color: #171410;
  border: 1px solid var(--gold-val);
  color: var(--gold-val);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 7.5px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #9e9384;
  font-family: var(--font-retro);
  font-size: 9px;
  cursor: pointer;
  padding: 2px 4px;
}
.modal-close-btn:hover {
  color: #ff4444;
}

.modal-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.modal-stat-line {
  display: flex;
  justify-content: space-between;
  color: #b8b0a1;
}

.stat-upgrade-preview {
  color: #4cdb4c;
  font-weight: bold;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.modal-btn {
  flex: 1;
  padding: 8px 4px;
  font-family: var(--font-retro);
  font-size: 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-shadow: 1px 1px 0px #000;
  transition: transform 0.06s;
}

.modal-btn:active {
  transform: translateY(2px);
}

.modal-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-upgrade {
  background: linear-gradient(180deg, #2b552b 0%, #1a381a 100%);
  border: 2px solid #489248;
  color: #ffffff;
  box-shadow: inset 1px 1px 0px #62be62, 0 3px 6px rgba(0,0,0,0.6);
}

.btn-upgrade:hover:not(:disabled) {
  background: linear-gradient(180deg, #376d37 0%, #234c23 100%);
}

.btn-sell {
  background: linear-gradient(180deg, #5c2c26 0%, #3a1a16 100%);
  border: 2px solid #99473d;
  color: #ffffff;
  box-shadow: inset 1px 1px 0px #bf594d, 0 3px 6px rgba(0,0,0,0.6);
}

.btn-sell:hover:not(:disabled) {
  background: linear-gradient(180deg, #743730 0%, #4b221d 100%);
}

/* ==========================================================================
   FLOATING COMBAT TEXT & TOASTS
   ========================================================================== */
.toast-banner {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(25, 20, 16, 0.95);
  border: 2px solid #e6a100;
  border-radius: 4px;
  padding: 6px 16px;
  color: #fff;
  font-size: 9px;
  text-shadow: 1px 1px 0px #000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, top 0.2s;
  z-index: 70;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.toast-banner.show {
  opacity: 1;
  top: 80px;
}

/* Game Over / Victory Modal */
.game-state-modal {
  position: absolute;
  top: 0; left: 0;
  width: 1280px; height: 720px;
  background-color: rgba(10, 8, 7, 0.85);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 80;
}

.game-state-modal.active {
  display: flex;
}

.state-title {
  font-size: 24px;
  text-shadow: 3px 3px 0px #000;
}

.state-title.victory {
  color: var(--gold-val);
  text-shadow: 0 0 15px var(--gold-glow), 3px 3px 0px #000;
}

.state-title.defeat {
  color: var(--zombie-red);
  text-shadow: 0 0 15px var(--zombie-glow), 3px 3px 0px #000;
}

.state-stats {
  font-size: 11px;
  color: #ded9cd;
  line-height: 2;
  text-align: center;
}

.btn-restart {
  background: linear-gradient(180deg, #443729 0%, #271f16 100%);
  border: 2px solid #7d674f;
  color: #ffffff;
  padding: 10px 20px;
  font-family: var(--font-retro);
  font-size: 10px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

.btn-restart:hover {
  background: linear-gradient(180deg, #594836 0%, #362c20 100%);
}
