/* =========================================================
   CRAZY PRANKS — HappyStoner5420 Games
   styles.css — Photo-real dark-humor AAA UI
   ========================================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #0a0a0e;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #f0e8d0;
  user-select: none;
}

/* --- Screen System --- */
.screen { position: fixed; inset: 0; display: none; z-index: 10; }
.screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* =========================================================
   MAIN MENU
   ========================================================= */
#main-menu {
  background:
    radial-gradient(ellipse 120% 80% at 50% 110%, #1a0a00 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 20% 0%, #0d1a00 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 10%, #1a0012 0%, transparent 50%),
    linear-gradient(175deg, #060811 0%, #0e0f14 40%, #120a02 100%);
  /* position:fixed; inset:0 come from .screen — just need overflow hidden */
  overflow: hidden;
}
#main-menu::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(255,100,0,0.015) 60px, rgba(255,100,0,0.015) 61px);
  pointer-events: none;
}

.menu-bg-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,80,0,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.menu-bg-overlay.dim { background: rgba(0,0,0,0.55); }

/* Animated smoke/particle layer */
.menu-smoke {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.menu-smoke::before, .menu-smoke::after {
  content: '';
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,120,20,0.06) 0%, transparent 70%);
  animation: smokeDrift 12s ease-in-out infinite alternate;
}
.menu-smoke::before { width: 600px; height: 600px; left: -100px; top: 30%; }
.menu-smoke::after { width: 400px; height: 400px; right: -80px; top: 10%; animation-delay: -5s; }

@keyframes smokeDrift {
  0%   { transform: translateY(0) scale(1); opacity: 0.4; }
  100% { transform: translateY(-40px) scale(1.1); opacity: 0.7; }
}

/* Scanline overlay for photo-real film effect */
#main-menu::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0px, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 3px);
  pointer-events: none; z-index: 1;
}

/* Centered content wrapper — sits above the absolute bg layers */
.menu-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  /* padding so content never clips on small screens */
  padding: 40px 20px;
}

/* Title */
.menu-title-wrap {
  text-align: center; margin-bottom: 48px;
}
.menu-title-glow {
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff8e0;
  text-shadow:
    0 0 20px #ff6600,
    0 0 60px #ff3300,
    0 0 120px #cc1100,
    0 2px 4px rgba(0,0,0,0.9),
    0 4px 16px rgba(0,0,0,0.7);
  line-height: 1.0;
  animation: titlePulse 3s ease-in-out infinite alternate;
}
@keyframes titlePulse {
  0%   { text-shadow: 0 0 20px #ff6600, 0 0 60px #ff3300, 0 0 120px #cc1100, 0 2px 4px rgba(0,0,0,0.9); }
  100% { text-shadow: 0 0 30px #ffaa00, 0 0 90px #ff6600, 0 0 160px #ff2200, 0 2px 4px rgba(0,0,0,0.9); }
}
.menu-subtitle {
  margin-top: 10px; font-size: 16px; color: #c8b480;
  letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.85;
}
.menu-studio {
  margin-top: 8px; font-size: 13px; color: #8fbe40;
  letter-spacing: 0.2em; font-style: italic; opacity: 0.7;
}

/* Menu Buttons */
.menu-buttons { display: flex; flex-direction: column; gap: 14px; width: 320px; }
.menu-btn {
  width: 100%; padding: 15px 24px;
  font-size: 17px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; border-radius: 4px;
  cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1e1a10 0%, #2e2516 60%, #1a1206 100%);
  color: #f0d890;
  border: 1px solid rgba(255,180,40,0.25);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  box-shadow:
    inset 0 1px 0 rgba(255,200,80,0.1),
    0 4px 16px rgba(0,0,0,0.5),
    0 1px 0 rgba(0,0,0,0.8);
  transition: transform 0.1s, box-shadow 0.15s, background 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
/* SVG icon in menu buttons */
.btn-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  vertical-align: middle;
}
/* SVG icon in panel titles */
.title-icon {
  width: 28px; height: 28px; vertical-align: middle;
  margin-right: 10px; display: inline-block;
}
/* SVG icon in phone apps */
.app-icon {
  width: 32px; height: 32px; display: block;
  margin: 0 auto 4px;
}
.menu-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,200,60,0.08) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.4s;
}
.menu-btn:hover::before { transform: translateX(100%); }
.menu-btn:hover {
  border-color: rgba(255,180,40,0.6);
  background: linear-gradient(135deg, #2a2415 0%, #3d3220 60%, #24180a 100%);
  box-shadow: 0 0 20px rgba(255,140,0,0.3), 0 4px 16px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}
.menu-btn:active { transform: translateY(1px); }
.menu-btn.primary {
  background: linear-gradient(135deg, #3a1a00 0%, #7a3500 50%, #4a2000 100%);
  color: #ffe090;
  border-color: rgba(255,120,20,0.5);
  font-size: 19px;
  box-shadow: 0 0 30px rgba(255,80,0,0.2), 0 4px 20px rgba(0,0,0,0.6);
}
.menu-btn.primary:hover {
  background: linear-gradient(135deg, #4a2200 0%, #9a4400 50%, #5a2a00 100%);
  box-shadow: 0 0 40px rgba(255,100,0,0.4), 0 4px 20px rgba(0,0,0,0.6);
}
.menu-btn.danger {
  background: linear-gradient(135deg, #1a0808 0%, #350f0f 50%, #1a0808 100%);
  color: #ff8080;
  border-color: rgba(220,50,50,0.3);
}
.menu-btn.danger:hover {
  border-color: rgba(255,80,80,0.6);
  box-shadow: 0 0 20px rgba(255,0,0,0.25), 0 4px 16px rgba(0,0,0,0.5);
}
.menu-version {
  margin-top: 28px;
  font-size: 11px; color: rgba(255,255,255,0.2); letter-spacing: 0.1em;
  text-align: center;
}

/* =========================================================
   PANEL BOXES (HTP / Credits)
   ========================================================= */
.panel-box {
  position: relative; z-index: 2;
  background: linear-gradient(160deg, #111014 0%, #0d0c10 100%);
  border: 1px solid rgba(255,160,40,0.2);
  border-radius: 8px;
  padding: 36px 44px;
  max-width: 680px; width: 92vw;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 0 60px rgba(255,80,0,0.1), 0 20px 60px rgba(0,0,0,0.7);
}
.panel-box::-webkit-scrollbar { width: 6px; }
.panel-box::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 3px; }
.panel-box::-webkit-scrollbar-thumb { background: rgba(255,140,40,0.3); border-radius: 3px; }
.panel-title {
  font-size: 28px; font-weight: 900; letter-spacing: 0.1em;
  color: #ffe090; text-align: center; margin-bottom: 28px;
  text-shadow: 0 0 20px rgba(255,140,40,0.4);
}

/* How to play */
.control-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.ctrl-row { display: flex; align-items: center; gap: 16px; padding: 8px 12px; background: rgba(255,255,255,0.03); border-radius: 4px; border-left: 3px solid rgba(255,120,20,0.4); }
.key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 80px; padding: 4px 10px;
  background: linear-gradient(145deg, #2a2520, #1a1510);
  border: 1px solid rgba(255,180,60,0.3);
  border-radius: 4px; font-size: 12px; font-weight: 700;
  color: #f0c060; letter-spacing: 0.05em; font-family: 'Courier New', monospace;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,200,80,0.1);
}
.how-section { margin-bottom: 18px; }
.how-section h3 { color: #ff9040; font-size: 15px; margin-bottom: 6px; letter-spacing: 0.05em; }
.how-section p { font-size: 14px; color: #c8b890; line-height: 1.7; }

/* Credits */
.credits-studio { font-size: 32px; font-weight: 900; color: #8fbe40; text-align: center; text-shadow: 0 0 20px rgba(100,200,0,0.4); }
.credits-tagline { text-align: center; color: #a89060; font-style: italic; font-size: 14px; margin: 8px 0 28px; }
.credits-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.credit-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: rgba(255,255,255,0.03); border-radius: 4px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.credit-role { color: #a08060; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.credit-name { color: #f0c060; font-weight: 700; font-size: 14px; }
.credits-disclaimer { background: rgba(255,80,0,0.08); border: 1px solid rgba(255,80,0,0.2); border-radius: 4px; padding: 12px 16px; font-size: 13px; color: #ff8060; text-align: center; margin-bottom: 20px; }

/* =========================================================
   GAME CANVAS
   ========================================================= */
#game-screen { background: #000; }
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }

/* =========================================================
   HUD
   ========================================================= */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
#hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 20px; gap: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
  pointer-events: none;
}
.hud-label {
  display: block; font-size: 9px; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
#wanted-display { display: flex; flex-direction: column; }
#stars-row { display: flex; gap: 3px; }
.star-icon {
  width: 20px; height: 20px; font-size: 16px; line-height: 20px; text-align: center;
  filter: grayscale(1) brightness(0.3); transition: filter 0.3s;
}
.star-icon.active { filter: drop-shadow(0 0 6px #ffcc00); }

#chaos-display { display: flex; flex-direction: column; align-items: center; flex: 1; max-width: 280px; }
#chaos-bar-wrap {
  width: 100%; height: 10px; border-radius: 5px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden; margin-bottom: 4px;
}
#chaos-bar {
  height: 100%; width: 0%; border-radius: 5px;
  background: linear-gradient(90deg, #ff6600, #ff0000);
  box-shadow: 0 0 10px rgba(255,80,0,0.6);
  transition: width 0.3s ease;
}
#chaos-val { font-size: 11px; color: #ff9040; font-weight: 700; }

#prank-display { display: flex; flex-direction: column; align-items: flex-end; }
#prank-count { font-size: 28px; font-weight: 900; color: #ffe060; text-shadow: 0 0 10px rgba(255,200,0,0.5); }

/* Bottom HUD */
#hud-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 20px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}
#hotbar { display: flex; gap: 6px; pointer-events: all; }
.hotbar-slot {
  width: 56px; height: 56px; border-radius: 6px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
/* Canvas-rendered icon image inside hotbar slot */
.hotbar-slot .slot-icon {
  width: 36px; height: 36px;
  image-rendering: auto;
  display: block;
}
/* Placeholder letter if icon not yet rendered */
.slot-icon-ph {
  font-size: 16px; font-weight: 900; color: #ff8800;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.hotbar-slot:hover { border-color: rgba(255,160,40,0.5); box-shadow: 0 0 12px rgba(255,100,0,0.3); }
.hotbar-slot.active { border-color: #ffc040; box-shadow: 0 0 16px rgba(255,160,0,0.5); }
.hotbar-slot .slot-num {
  position: absolute; bottom: 2px; right: 4px;
  font-size: 9px; color: rgba(255,255,255,0.35); font-weight: 700;
}
.hotbar-slot .slot-label {
  font-size: 9px; color: rgba(255,255,255,0.4); text-align: center;
  position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
}

/* Mini Map */
#mini-map-wrap {
  position: relative; pointer-events: all;
}
#mini-map {
  width: 140px; height: 140px; border-radius: 50%;
  border: 2px solid rgba(255,160,40,0.3);
  box-shadow: 0 0 20px rgba(0,0,0,0.6), inset 0 0 20px rgba(0,0,0,0.4);
  background: #0a1a0a;
}
.mm-label {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font-size: 9px; letter-spacing: 0.2em; color: rgba(255,255,255,0.3);
}

/* Selected Prank Display */
#selected-prank-display {
  pointer-events: all;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding-bottom: 4px;
}
#selected-prank-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.6);
  border: 2px solid rgba(255,160,40,0.55);
  border-radius: 10px;
  padding: 8px 14px 6px;
  box-shadow: 0 0 22px rgba(255,120,0,0.3), inset 0 1px 0 rgba(255,200,80,0.08);
  min-width: 110px;
}
#selected-prank-icon {
  width: 48px; height: 48px;
  display: block;
  image-rendering: auto;
}
#selected-prank-name {
  font-size: 11px; font-weight: 800;
  color: #ffe080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  max-width: 100px;
  line-height: 1.2;
}

/* Notifications */
#notification-area {
  position: absolute; top: 80px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; z-index: 30;
}
.notif {
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,160,40,0.3);
  border-left: 3px solid #ff8020;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 13px; color: #f0d890;
  max-width: 280px;
  backdrop-filter: blur(4px);
  animation: notifIn 0.3s ease, notifOut 0.4s ease 2.6s forwards;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.notif.chaos { border-left-color: #ff3300; }
.notif.cop { border-left-color: #4488ff; }
.notif.good { border-left-color: #44cc44; }
@keyframes notifIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes notifOut { from { opacity: 1; } to { opacity: 0; transform: translateX(20px); } }

/* Reaction pop */
#reaction-pop {
  position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%);
  font-size: 28px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(255,180,0,0.5);
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
  text-align: center; line-height: 1.3;
}
#reaction-pop.show { opacity: 1; animation: reactionPop 2.5s ease forwards; }
@keyframes reactionPop {
  0%  { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
  100%{ transform: translate(-50%, -70%) scale(0.9); opacity: 0; }
}

/* =========================================================
   PAUSE MENU
   ========================================================= */
#pause-menu {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
}
#pause-menu.hidden { display: none; }
.pause-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); }
.pause-box {
  position: relative; z-index: 51;
  background: linear-gradient(160deg, #111014, #0d0c10);
  border: 1px solid rgba(255,160,40,0.25);
  border-radius: 8px; padding: 36px 48px;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  min-width: 280px;
}
.pause-title { font-size: 28px; font-weight: 900; color: #ffe090; margin-bottom: 8px; letter-spacing: 0.1em; }

/* =========================================================
   PHONE UI
   ========================================================= */
#phone-ui {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  pointer-events: all;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
}
#phone-ui.hidden { display: none; }
.phone-frame {
  width: 280px;
  background: linear-gradient(175deg, #1a1a20 0%, #0e0e14 100%);
  border: 2px solid rgba(80,80,120,0.5);
  border-radius: 28px;
  padding: 16px 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07), 0 0 40px rgba(60,60,255,0.1);
  position: relative;
}
.phone-frame::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 5px; background: rgba(255,255,255,0.1); border-radius: 3px;
}
.phone-screen {
  background: #0a0c14; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(60,60,120,0.4);
}
.phone-header {
  background: linear-gradient(90deg, #1a1a30, #12121e);
  padding: 12px 16px; font-size: 14px; font-weight: 700; color: #8888ff;
  border-bottom: 1px solid rgba(80,80,120,0.3);
  letter-spacing: 0.08em;
}
.phone-apps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(80,80,120,0.2);
}
.phone-app {
  background: #0e0e1a; padding: 12px 8px 10px;
  font-size: 11px; color: #c0c0f0;
  cursor: pointer; text-align: center;
  transition: background 0.15s, color 0.15s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 72px;
  line-height: 1.3;
}
.phone-app:hover { background: #1a1a2e; color: #fff; }
.phone-app:hover .app-icon { filter: brightness(1.3); }
#phone-output {
  min-height: 60px; padding: 12px 16px;
  font-size: 12px; color: #80f080;
  line-height: 1.6;
  font-family: 'Courier New', monospace;
}
.phone-close-btn {
  display: block; width: 100%; margin-top: 10px;
  background: rgba(255,60,60,0.15); border: 1px solid rgba(255,60,60,0.3);
  border-radius: 12px; padding: 10px;
  color: #ff8080; font-size: 13px; font-weight: 700;
  cursor: pointer; letter-spacing: 0.08em;
  transition: background 0.15s;
}
.phone-close-btn:hover { background: rgba(255,60,60,0.25); }

/* =========================================================
   PRANK WHEEL
   ========================================================= */
#prank-wheel {
  position: absolute; inset: 0; z-index: 35;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  pointer-events: all;
}
#prank-wheel.hidden { display: none; }
.wheel-center {
  width: 360px; height: 360px; position: relative;
}
.wheel-title {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5); text-align: center;
  pointer-events: none;
}
.wheel-item {
  position: absolute; width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e1a10, #2e2516);
  border: 2px solid rgba(255,160,40,0.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.wheel-item:hover {
  transform: scale(1.2);
  border-color: rgba(255,160,40,0.7);
  box-shadow: 0 0 20px rgba(255,120,0,0.4);
}
.wheel-item span { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 2px; text-align: center; line-height: 1.2; }

/* =========================================================
   INTERACTION PROMPT
   ========================================================= */
#interact-prompt {
  position: absolute; bottom: 180px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.7); border: 1px solid rgba(255,160,40,0.4);
  border-radius: 6px; padding: 8px 18px;
  font-size: 13px; color: #f0d890; letter-spacing: 0.05em;
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
#interact-prompt.visible { opacity: 1; }

/* =========================================================
   CHAOS LEVEL FLASH
   ========================================================= */
.chaos-flash {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 60;
  animation: chaosFlash 0.5s ease forwards;
}
@keyframes chaosFlash {
  0%  { background: rgba(255,0,0,0.25); }
  100%{ background: transparent; }
}

/* =========================================================
   SIREN FLASH — shown when cop car is in pursuit
   ========================================================= */
@keyframes sirenFlash {
  0%,100% { background: rgba(0,0,255,0.05); }
  50%      { background: rgba(255,0,0,0.05); }
}
.siren-flash {
  position: absolute; inset: 0; pointer-events: none; z-index: 58;
  animation: sirenFlash 0.5s linear infinite;
}

/* =========================================================
   CHAOS LEVEL BANNER — center-screen announcement
   ========================================================= */
#chaos-banner {
  position: absolute; top: 22%; left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  background: linear-gradient(135deg, rgba(20,0,0,0.92), rgba(60,10,0,0.9));
  border: 2px solid rgba(255,80,0,0.5);
  border-radius: 8px; padding: 14px 36px;
  font-size: 22px; font-weight: 900;
  color: #ff8040; letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255,80,0,0.8);
  pointer-events: none; opacity: 0;
  transition: none;
  z-index: 55;
}
#chaos-banner.show {
  animation: chaosBanner 2.8s ease forwards;
}
@keyframes chaosBanner {
  0%  { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
  12% { opacity: 1; transform: translate(-50%,-50%) scale(1.06); }
  20% { opacity: 1; transform: translate(-50%,-50%) scale(1.0); }
  75% { opacity: 1; transform: translate(-50%,-50%) scale(1.0); }
  100%{ opacity: 0; transform: translate(-50%,-70%) scale(0.95); }
}

/* =========================================================
   UTILITY
   ========================================================= */
.hidden { display: none !important; }
button { cursor: pointer; }
