/* ============================================================
   AIRPORT SECURITY — styles.css
   Happystoner5420 Games
   ============================================================ */
:root {
  --bg: #0a0e14;
  --panel: rgba(13, 20, 30, 0.82);
  --panel-2: rgba(20, 30, 44, 0.9);
  --line: rgba(120, 170, 220, 0.22);
  --line-bright: rgba(140, 200, 255, 0.5);
  --txt: #dce8f4;
  --txt-dim: #8fa3b8;
  --accent: #2fa8ff;
  --accent-2: #5ec8ff;
  --good: #37d67a;
  --warn: #ffb020;
  --danger: #ff4d4d;
  --glow: 0 0 18px rgba(47, 168, 255, 0.35);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--txt);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#game-wrap { position: fixed; inset: 0; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; }

.hidden { display: none !important; }

/* ---------------- Buttons ---------------- */
.btn {
  font-family: inherit;
  background: linear-gradient(180deg, rgba(47,168,255,0.16), rgba(47,168,255,0.06));
  border: 1px solid var(--line);
  color: var(--txt);
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: 1.5px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  text-transform: uppercase;
}
.btn:hover { border-color: var(--line-bright); background: linear-gradient(180deg, rgba(47,168,255,0.3), rgba(47,168,255,0.12)); box-shadow: var(--glow); }
.btn:active { transform: translateY(1px); }
.btn.danger { border-color: rgba(255,77,77,0.5); background: linear-gradient(180deg, rgba(255,77,77,0.18), rgba(255,77,77,0.06)); }
.btn.danger:hover { background: linear-gradient(180deg, rgba(255,77,77,0.34), rgba(255,77,77,0.12)); box-shadow: 0 0 18px rgba(255,77,77,0.3); }
.btn.good { border-color: rgba(55,214,122,0.5); background: linear-gradient(180deg, rgba(55,214,122,0.18), rgba(55,214,122,0.06)); }
.btn.good:hover { background: linear-gradient(180deg, rgba(55,214,122,0.34), rgba(55,214,122,0.12)); box-shadow: 0 0 18px rgba(55,214,122,0.3); }
.btn.x { padding: 2px 9px; font-size: 15px; line-height: 1.2; }
.btn.toggle { min-width: 64px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------- Menu screens ---------------- */
.screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 40;
  background: radial-gradient(ellipse at 50% 40%, rgba(8,12,18,0.25) 0%, rgba(6,9,14,0.82) 100%);
}
.screen.sub { background: radial-gradient(ellipse at 50% 30%, rgba(10,16,26,0.92) 0%, rgba(5,8,12,0.97) 100%); overflow-y: auto; }

.menu-vignette {
  position: absolute; inset: 0;
  box-shadow: inset 0 0 260px rgba(0,0,0,0.85);
  pointer-events: none;
}

.menu-content { text-align: center; z-index: 2; max-width: 640px; width: 90%; }
.menu-kicker {
  letter-spacing: 6px; font-size: 12px; color: var(--accent-2);
  text-shadow: 0 0 14px rgba(94,200,255,0.8);
  margin-bottom: 10px;
}
.menu-title h1 {
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 900;
  letter-spacing: 6px;
  background: linear-gradient(180deg, #ffffff 20%, #9fd4ff 60%, #2fa8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(47,168,255,0.35);
  line-height: 1.02;
}
.menu-title h1 span { display: block; font-size: 0.72em; letter-spacing: 14px; }
.menu-sub { color: var(--txt-dim); letter-spacing: 3px; font-size: 13px; margin-top: 12px; text-transform: uppercase; }

.menu-buttons { display: flex; flex-direction: column; gap: 12px; margin: 40px auto 26px; width: min(320px, 84%); }
.btn.menu-btn { padding: 14px; font-size: 15px; font-weight: 700; letter-spacing: 3px; border-radius: 8px; }
.btn.primary {
  background: linear-gradient(180deg, rgba(47,168,255,0.45), rgba(47,168,255,0.18));
  border-color: rgba(94,200,255,0.7);
  box-shadow: 0 0 26px rgba(47,168,255,0.4);
}
.btn.primary:hover { box-shadow: 0 0 40px rgba(47,168,255,0.7); }
.menu-footer { color: #5c7189; font-size: 11px; letter-spacing: 2px; }

/* ---------------- Sub screens (howto/options/credits) ---------------- */
.sub-content { z-index: 2; max-width: 900px; width: 92%; padding: 40px 0; text-align: center; }
.sub-content h2 {
  font-size: 34px; letter-spacing: 8px; margin-bottom: 26px;
  background: linear-gradient(180deg, #fff, #7cc4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub-content.narrow { max-width: 560px; }
.center-credits .btn { margin-top: 30px; }

.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 30px; text-align: left; }
.howto-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.howto-card h3 { color: var(--accent-2); letter-spacing: 2px; font-size: 14px; margin-bottom: 10px; }
.howto-card ul { list-style: none; }
.howto-card li { font-size: 13px; color: var(--txt-dim); line-height: 1.55; margin-bottom: 8px; }
.howto-card li b { color: var(--txt); }

.opt-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 18px; margin-bottom: 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; letter-spacing: 1px;
}
.opt-row input[type="range"] { width: 200px; accent-color: var(--accent); }
.opt-row select {
  background: #101a28; color: var(--txt); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 6px; font-family: inherit; letter-spacing: 1px;
}
.sub-content .btn { margin: 6px 4px; }

.credit-title { font-size: 30px; font-weight: 800; letter-spacing: 6px; margin: 10px 0 24px;
  background: linear-gradient(180deg,#fff,#9fd4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.credit-line { color: var(--txt-dim); letter-spacing: 3px; text-transform: uppercase; font-size: 12px; }
.credit-name { font-size: 22px; color: var(--accent-2); letter-spacing: 2px; margin: 8px 0 26px; }
.credit-thanks { color: var(--txt-dim); font-size: 13px; letter-spacing: 1px; }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
#hud .btn { pointer-events: auto; }

#topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(6,10,16,0.85), rgba(6,10,16,0.35) 70%, transparent);
}
.top-btn { font-size: 11px; padding: 6px 12px; }
#top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.stat { font-size: 12px; letter-spacing: 1px; color: var(--txt-dim); text-align: right; line-height: 1.25; }
.stat span { display: block; color: var(--txt); font-weight: 700; font-size: 15px; }
.stat.good span { color: var(--good); }
.stat.bad span { color: var(--warn); }

#ticker {
  flex: 1; min-width: 0; overflow: hidden; height: 28px;
  background: rgba(10,16,26,0.7); border: 1px solid var(--line);
  border-radius: 6px; display: flex; align-items: center; padding: 0 12px;
}
#ticker-text {
  white-space: nowrap; font-size: 13px; color: var(--accent-2);
  letter-spacing: 0.5px; text-shadow: 0 0 8px rgba(47,168,255,0.6);
}

#alert-count {
  background: var(--danger); color: #fff; border-radius: 9px;
  font-size: 10px; padding: 1px 6px; margin-left: 4px; vertical-align: middle;
}

#left-rail { position: absolute; left: 12px; top: 64px; width: 250px; pointer-events: auto; }
#eventlog { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; backdrop-filter: blur(6px); overflow: hidden; }
.rail-title { padding: 8px 12px; font-size: 11px; letter-spacing: 2px; color: var(--accent-2); border-bottom: 1px solid var(--line); }
#eventlog-list { list-style: none; max-height: 220px; overflow-y: auto; padding: 6px 0; }
#eventlog-list li {
  font-size: 12px; color: var(--txt-dim); padding: 3px 12px; line-height: 1.4;
  border-left: 2px solid transparent;
}
#eventlog-list li.warn { color: var(--warn); border-left-color: var(--warn); }
#eventlog-list li.danger { color: var(--danger); border-left-color: var(--danger); }
#eventlog-list li.good { color: var(--good); border-left-color: var(--good); }
#eventlog-list li small { color: #5c7189; margin-right: 6px; }

#minimap-wrap {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px;
  pointer-events: auto;
}
#minimap { display: block; border-radius: 4px; }

#hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(8,12,18,0.8); border: 1px solid var(--line);
  padding: 7px 18px; border-radius: 20px; font-size: 12px; color: var(--txt-dim);
  letter-spacing: 0.5px; transition: opacity 0.4s;
}

/* ---------------- Panels ---------------- */
.panel {
  position: absolute; z-index: 30;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  pointer-events: auto;
  max-width: 92vw;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; letter-spacing: 2px; color: var(--accent-2);
}
.panel-body { padding: 14px; }

#panel-passenger { top: 56px; right: 16px; width: 300px; max-height: calc(100vh - 72px); overflow-y: auto; }
#pp-name { font-size: 19px; font-weight: 700; margin: 6px 0 2px; letter-spacing: 0.5px; }
.pp-tags { display: flex; gap: 6px; margin-bottom: 10px; }
.pp-tags span {
  font-size: 10px; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px;
  background: rgba(47,168,255,0.15); border: 1px solid var(--line); color: var(--accent-2);
}
.pp-tags span.bad { background: rgba(255,77,77,0.15); border-color: rgba(255,77,77,0.4); color: var(--danger); }
.pp-tags span.good { background: rgba(55,214,122,0.15); border-color: rgba(55,214,122,0.4); color: var(--good); }
#pp-portrait { display: block; margin: 0 auto; border-radius: 8px; background: radial-gradient(circle at 50% 30%, #1c2b3d, #0d141f); border: 1px solid var(--line); }
.pp-rows { margin: 8px 0; }
.pp-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; border-bottom: 1px solid rgba(120,170,220,0.08); }
.pp-row span { color: var(--txt-dim); letter-spacing: 1px; }
.pp-row b { color: var(--txt); font-weight: 600; text-align: right; }
#pp-response {
  font-size: 12px; color: var(--accent-2); background: rgba(47,168,255,0.08);
  border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0;
  min-height: 34px; line-height: 1.45;
}
.pp-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.pp-actions.center { justify-content: center; }
.btn.act { flex: 1 1 42%; font-size: 11px; padding: 8px 6px; letter-spacing: 1px; }

#panel-xray { top: 56px; left: 50%; transform: translateX(-50%); width: 372px; max-height: calc(100vh - 72px); overflow-y: auto; }
#xray-canvas { display: block; margin: 0 auto 10px; border-radius: 6px; background: #0a1210; border: 1px solid #1d3a2f; }
.xray-caption { font-size: 10px; letter-spacing: 2px; color: var(--txt-dim); text-align: center; margin: 4px 0 6px; }
#xray-gallery {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-bottom: 9px;
  max-height: 128px; overflow-y: auto; padding: 2px;
}
.itcard {
  position: relative; width: 92px; border-radius: 8px; overflow: hidden;
  background: #151b27; border: 1px solid var(--line); cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.itcard:hover { transform: translateY(-2px); border-color: #8ec6ff; box-shadow: 0 4px 14px rgba(47,168,255,0.35); }
.itcard svg { display: block; width: 100%; height: 74px; }
.itcard .itlabel {
  display: block; font-size: 9px; letter-spacing: 0.5px; padding: 3px 4px;
  color: var(--txt); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-top: 1px solid rgba(120,170,220,0.12); background: rgba(0,0,0,0.25);
}
.itcard.contra { border-color: rgba(255,77,77,0.7); box-shadow: 0 0 10px rgba(255,77,77,0.35); }
.itcard.contra .itlabel { color: #ffb3b3; background: rgba(150,20,20,0.35); }
#xray-items { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 8px; }
.xray-item {
  font-size: 11px; letter-spacing: 0.5px; padding: 4px 10px; border-radius: 12px;
  background: rgba(94,200,255,0.1); border: 1px solid var(--line); color: #bfe9ff;
}
.xray-item.contra { background: rgba(255,77,77,0.14); border-color: rgba(255,77,77,0.45); color: #ffb3b3; }
#xray-response { font-size: 12px; color: var(--accent-2); text-align: center; min-height: 18px; margin-bottom: 8px; }

#panel-alert { top: 56px; left: 50%; transform: translateX(-50%); width: min(560px, 92vw); max-height: calc(100vh - 72px); overflow-y: auto; }
.alert-inner { text-align: center; padding: 18px 24px; }
#alert-title {
  font-size: 22px; font-weight: 900; letter-spacing: 4px; color: var(--danger);
  text-shadow: 0 0 18px rgba(255,77,77,0.8); margin-bottom: 8px;
  animation: pulse 0.9s infinite alternate;
}
#alert-text { color: var(--txt); font-size: 14px; margin-bottom: 14px; line-height: 1.5; }
@keyframes pulse { from { opacity: 0.75; } to { opacity: 1; } }

/* persistent ACTIVE SHOOTER banner — pulses red at the top of the screen
   while a gunman/knife attacker is loose */
#shooter-banner {
  position: fixed;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  background: rgba(92, 8, 8, 0.94);
  border: 2px solid rgba(255, 64, 64, 0.9);
  border-radius: 8px;
  padding: 8px 24px;
  color: #ffd9d9;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 0 14px rgba(255, 64, 64, 0.9);
  animation: pulse 0.55s infinite alternate;
  box-shadow: 0 6px 28px rgba(255, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
  max-width: 94vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
#shooter-banner .shooter-zone { color: #ff9b9b; font-weight: 600; }

.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,7,11,0.72);
}
.modal-box {
  background: var(--panel-2); border: 1px solid var(--line-bright); border-radius: 14px;
  padding: 26px 30px; max-width: 420px; width: 90%; text-align: center;
  box-shadow: 0 14px 60px rgba(0,0,0,0.7);
}
.modal-box #confirm-title { font-size: 18px; letter-spacing: 3px; color: var(--accent-2); margin-bottom: 10px; }
.modal-box #confirm-text, .modal-box #exit-msg { color: var(--txt-dim); font-size: 13px; line-height: 1.6; margin-bottom: 18px; }

/* ---------------- Prison van transfer progress ---------------- */
#transfer-card {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  width: 320px;
  background: rgba(10,15,22,0.92);
  border: 1px solid rgba(94,200,255,0.4);
  border-radius: 10px;
  padding: 10px 14px;
  z-index: 26;
  color: var(--txt);
  font-size: 11px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  pointer-events: none;
}
#transfer-title {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: var(--accent-2);
  margin-bottom: 3px;
}
#transfer-name { color: #bfe9ff; font-weight: bold; }
#transfer-bar {
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0 5px;
}
#transfer-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
  border-radius: 3px;
}
#transfer-stage { color: #9fb4c8; }

/* ---------------- Suspect notifications ---------------- */
#notify-stack {
  position: absolute;
  top: 64px; right: 324px;
  width: 300px;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: auto;
  z-index: 25;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.notify-card {
  position: relative;
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(12,19,29,0.94);
  border: 1px solid var(--line-bright);
  border-left: 3px solid var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  animation: notifyIn 0.28s ease-out;
  transition: transform 0.12s ease;
}
.notify-card:hover { transform: translateX(-3px); border-color: #bfe9ff; }
@keyframes notifyIn { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
.notify-card.leaving { animation: notifyOut 0.3s ease-in forwards; }
@keyframes notifyOut { to { opacity: 0; transform: translateX(48px); } }
.notify-ico {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 50%;
  background: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 19px; color: #fff;
  box-shadow: 0 0 14px rgba(255,77,77,0.6);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.notify-card.sev1 { border-left-color: var(--warn); }
.notify-card.sev1 .notify-ico { background: var(--warn); box-shadow: 0 0 14px rgba(255,176,32,0.55); }
.notify-card.sev0 { border-left-color: var(--accent); }
.notify-card.sev0 .notify-ico { background: var(--accent); box-shadow: 0 0 14px rgba(47,168,255,0.5); }
.notify-body { min-width: 0; }
.notify-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--txt);
  text-transform: uppercase;
}
.notify-sub { font-size: 11px; color: var(--txt-dim); letter-spacing: 0.4px; margin-top: 2px; line-height: 1.4; }
.notify-sub b { color: var(--accent-2); }
.notify-timer {
  position: absolute; bottom: 0; left: 0; height: 2px;
  background: linear-gradient(90deg, var(--danger), rgba(255,77,77,0.2));
  animation: notifyTimer 9s linear forwards;
}
.notify-card.sev1 .notify-timer { background: linear-gradient(90deg, var(--warn), rgba(255,176,32,0.2)); }
.notify-card.sev0 .notify-timer { background: linear-gradient(90deg, var(--accent), rgba(47,168,255,0.2)); }
@keyframes notifyTimer { from { width: 100%; } to { width: 0%; } }

@media (max-width: 1100px) {
  #notify-stack { right: 16px; width: 260px; }
}

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(120,170,220,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,170,220,0.5); }
