/* ============================================================
   TSA AIRPORT SECURITY — styles.css
   happystoner5420 Games
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg-deep:      #0a0c10;
  --bg-panel:     #10151e;
  --bg-card:      #161d2a;
  --bg-input:     #0d1117;
  --border:       #1e2d45;
  --border-glow:  #2a4a7f;
  --accent-blue:  #1e6fff;
  --accent-cyan:  #00d4ff;
  --accent-amber: #ffb300;
  --accent-red:   #ff3333;
  --accent-green: #00e676;
  --text-primary: #e8eaf0;
  --text-secondary:#8a9ab5;
  --text-dim:     #4a5a72;
  --hud-h:        56px;
  --panel-q-w:    200px;
  --panel-d-w:    300px;
  --font-display: 'Oswald', sans-serif;
  --font-body:    'Rajdhani', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  overflow: hidden;
  user-select: none;
}

/* ── SCREENS ─────────────────────────────────────────────── */
.screen { display: none; width: 100%; height: 100vh; position: absolute; top: 0; left: 0; }
.screen.active { display: flex; flex-direction: column; }

/* ── MAIN MENU ───────────────────────────────────────────── */
#screen-menu.active { display: block; }

.menu-bg {
  width: 100%; height: 100%;
  background: url('tsa.jpg') center/cover no-repeat;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}

.menu-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(5,8,15,0.92) 0%, rgba(10,20,40,0.85) 50%, rgba(5,8,15,0.95) 100%);
}

.menu-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
  padding: 40px;
}

.game-logo { text-align: center; }

.logo-badge {
  font-size: 64px; line-height: 1;
  filter: drop-shadow(0 0 20px rgba(30,111,255,0.8));
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(30,111,255,0.8)); }
  50%       { filter: drop-shadow(0 0 40px rgba(0,212,255,1)); }
}

.game-title {
  font-family: var(--font-display);
  font-size: 64px; font-weight: 700;
  letter-spacing: 6px; line-height: 1.05;
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(30,111,255,0.6);
  margin: 12px 0 0;
}

.game-title span {
  color: var(--accent-cyan);
  text-shadow: 0 0 30px rgba(0,212,255,0.9);
}

.game-subtitle {
  font-family: var(--font-body);
  font-size: 16px; letter-spacing: 3px;
  color: var(--accent-amber);
  margin-top: 8px; text-transform: uppercase;
}

.main-nav {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 320px;
}

.menu-btn {
  width: 100%; padding: 14px 24px;
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  border: 2px solid var(--border-glow);
  background: rgba(16,21,30,0.85);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s ease;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  position: relative; overflow: hidden;
}

.menu-btn::before {
  content: '';
  position: absolute; left: -100%; top: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(30,111,255,0.15), transparent);
  transition: left 0.3s ease;
}

.menu-btn:hover::before { left: 100%; }

.menu-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0,212,255,0.3), inset 0 0 20px rgba(0,212,255,0.05);
  transform: translateX(4px);
}

.menu-btn.primary {
  background: linear-gradient(135deg, rgba(30,111,255,0.3), rgba(0,212,255,0.15));
  border-color: var(--accent-blue);
  color: var(--accent-cyan);
}

.menu-btn.primary:hover {
  background: linear-gradient(135deg, rgba(30,111,255,0.5), rgba(0,212,255,0.3));
  box-shadow: 0 0 30px rgba(30,111,255,0.5);
}

.menu-btn.danger { border-color: #3a1a1a; color: #cc4444; }
.menu-btn.danger:hover { border-color: var(--accent-red); color: var(--accent-red); box-shadow: 0 0 20px rgba(255,51,51,0.3); }

.menu-btn.small { padding: 8px 16px; font-size: 13px; width: auto; min-width: 180px; }

.menu-footer {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-dim); letter-spacing: 1px;
}

/* ── INFO SCREENS (How To Play / Credits) ────────────────── */
#screen-howtoplay.active,
#screen-credits.active { display: flex; align-items: center; justify-content: center; background: var(--bg-deep); }

.info-screen {
  max-width: 800px; width: 90%; max-height: 85vh;
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 60px rgba(30,111,255,0.2);
  padding: 40px 40px 80px 40px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 24px;
}

.info-screen h2 {
  font-family: var(--font-display); font-size: 32px;
  color: var(--accent-cyan); letter-spacing: 4px;
  border-bottom: 1px solid var(--border); padding-bottom: 16px;
}

.info-screen > .menu-btn {
  margin-top: 16px;
  flex-shrink: 0;
}

.how-to-content, .credits-content {
  display: flex; flex-direction: column; gap: 20px;
}

.htp-section { background: var(--bg-card); padding: 16px 20px; border-left: 3px solid var(--accent-blue); }
.htp-section h3 { font-family: var(--font-display); font-size: 16px; color: var(--accent-amber); letter-spacing: 2px; margin-bottom: 8px; }
.htp-section p, .htp-section li { color: var(--text-secondary); line-height: 1.6; font-size: 14px; }
.htp-section ul { padding-left: 20px; }
.htp-section li { margin-bottom: 6px; }
.htp-section strong { color: var(--text-primary); }
.htp-section em { color: var(--accent-red); }
.htp-section.warning-box { border-left-color: var(--accent-amber); background: rgba(255,179,0,0.05); }

.credits-block { text-align: center; padding: 16px; border-bottom: 1px solid var(--border); }
.credits-block h3 { font-family: var(--font-display); font-size: 13px; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 8px; }
.credits-block p { color: var(--text-primary); line-height: 1.8; }
.credits-block .small { font-size: 12px; color: var(--text-dim); }
.big-credit .credit-logo { font-family: var(--font-display); font-size: 36px; color: var(--accent-cyan); letter-spacing: 2px; }
.big-credit .credit-tag { color: var(--accent-amber); font-size: 13px; letter-spacing: 2px; margin-top: 4px; }
.credits-block.warning-box { border: 1px solid rgba(255,179,0,0.3); background: rgba(255,179,0,0.05); border-radius: 4px; }
.credits-block.warning-box p { font-size: 13px; color: var(--text-secondary); font-style: italic; }

/* ── GAME HUD ────────────────────────────────────────────── */
#screen-game.active { display: flex; flex-direction: column; }

#game-hud {
  height: var(--hud-h); min-height: var(--hud-h);
  background: linear-gradient(180deg, #08111e, #0d1827);
  border-bottom: 1px solid var(--border-glow);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  z-index: 10; position: relative;
}

.hud-left, .hud-right { display: flex; align-items: center; gap: 20px; }
.hud-center { text-align: center; }

.hud-title {
  font-family: var(--font-display); font-size: 16px;
  letter-spacing: 4px; color: var(--accent-cyan);
}

.hud-item { display: flex; flex-direction: column; align-items: center; }
.hud-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: 2px; }
.hud-value { font-family: var(--font-display); font-size: 20px; color: var(--text-primary); font-weight: 600; }
.hud-value.score-val { color: var(--accent-green); }
.hud-value.incident-val { color: var(--accent-amber); }

.hud-alert {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-amber); letter-spacing: 1px;
  animation: blink 0.6s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hud-btn {
  padding: 6px 14px;
  font-family: var(--font-display); font-size: 12px; letter-spacing: 2px;
  border: 1px solid var(--border); background: rgba(255,51,51,0.1);
  color: #cc4444; cursor: pointer; transition: all 0.15s;
}
.hud-btn:hover { background: rgba(255,51,51,0.25); border-color: var(--accent-red); color: var(--accent-red); }

/* ── GAME MAIN LAYOUT ────────────────────────────────────── */
#game-main {
  flex: 1; display: flex;
  overflow: hidden;
  gap: 0;
}

/* ── QUEUE PANEL ─────────────────────────────────────────── */
#panel-queue {
  width: var(--panel-q-w); min-width: var(--panel-q-w);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 10px 14px;
  font-family: var(--font-display); font-size: 12px; letter-spacing: 3px;
  color: var(--text-dim); text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}

#queue-list {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}

.queue-item {
  padding: 10px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-glow);
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.queue-item:hover { border-left-color: var(--accent-cyan); background: rgba(30,111,255,0.08); }
.queue-item.active-pax { border-left-color: var(--accent-amber); }
.queue-item .q-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.queue-item .q-name { font-size: 13px; font-weight: 600; }
.queue-item .q-flags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 2px; }
.queue-item .q-flag { font-size: 11px; }

/* ── CHECKPOINT PANEL ────────────────────────────────────── */
#panel-checkpoint {
  flex: 1; position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
}

#checkpoint-bg {
  position: absolute; inset: 0; z-index: 0;
}
#airport-bg {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.3) saturate(0.6);
}
#checkpoint-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,16,0.5) 0%, rgba(10,12,16,0.2) 40%, rgba(10,12,16,0.7) 100%);
}

#npc-area {
  flex: 1; position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.npc-placeholder {
  text-align: center; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.placeholder-icon { font-size: 64px; opacity: 0.3; }
.npc-placeholder p { font-size: 14px; letter-spacing: 2px; }

#npc-active {
  width: 100%; display: flex; gap: 16px; align-items: flex-start;
  max-height: calc(100vh - var(--hud-h) - 80px);
}

/* Portrait */
#npc-portrait-zone { flex: 0 0 220px; display: flex; flex-direction: column; gap: 12px; }

#npc-portrait-frame {
  width: 220px; height: 260px; position: relative;
  border: 2px solid var(--border-glow);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(30,111,255,0.3);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

#npc-face {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}

#npc-portrait-frame.no-img {
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}

#npc-name-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
  padding: 20px 10px 8px;
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 1px;
}

#npc-status-badges {
  position: absolute; top: 8px; right: 8px;
  display: flex; flex-direction: column; gap: 4px;
}

.status-badge {
  padding: 3px 8px; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; font-family: var(--font-mono);
  border: 1px solid;
}
.badge-drunk { background: rgba(255,100,0,0.8); border-color: #ff6400; color: #fff; }
.badge-high  { background: rgba(100,200,0,0.8); border-color: #64c800; color: #000; }
.badge-armed { background: rgba(255,0,0,0.9);   border-color: #ff0000; color: #fff; }
.badge-suspicious { background: rgba(255,180,0,0.8); border-color: #ffb400; color: #000; }

/* Vibe meters */
#npc-vibes { display: flex; flex-direction: column; gap: 8px; }
.vibe-meter { display: flex; flex-direction: column; gap: 3px; }
.vibe-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }
.vibe-bar { height: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.vibe-fill { height: 100%; transition: width 0.6s ease; }
.vibe-fill.green  { background: linear-gradient(90deg, #00c853, #00e676); box-shadow: 0 0 8px rgba(0,230,118,0.5); }
.vibe-fill.yellow { background: linear-gradient(90deg, #f9a825, #ffb300); box-shadow: 0 0 8px rgba(255,179,0,0.5); }
.vibe-fill.red    { background: linear-gradient(90deg, #c62828, #ff3333); box-shadow: 0 0 8px rgba(255,51,51,0.5); }

/* Luggage Panel */
#luggage-panel {
  flex: 0 0 220px;
  background: rgba(13,17,23,0.85);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  max-height: 340px;
}

#luggage-display { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; }
#luggage-unscanned { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.luggage-icon { font-size: 48px; }

.action-btn {
  padding: 10px 20px;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 2px;
  cursor: pointer; border: 1px solid; transition: all 0.15s;
  background: transparent;
}
.scan-btn { border-color: var(--accent-blue); color: var(--accent-cyan); }
.scan-btn:hover { background: rgba(30,111,255,0.2); box-shadow: 0 0 20px rgba(30,111,255,0.4); }

#luggage-results { width: 100%; }

.luggage-item {
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.luggage-item.danger { color: var(--accent-red); background: rgba(255,51,51,0.08); }
.luggage-item.warn   { color: var(--accent-amber); }
.luggage-item.ok     { color: var(--text-secondary); }
.luggage-item-icon { font-size: 18px; }

.luggage-verdict {
  padding: 8px 12px; font-family: var(--font-mono); font-size: 11px;
  text-align: center; letter-spacing: 1px;
}
.luggage-verdict.clear { color: var(--accent-green); }
.luggage-verdict.flag  { color: var(--accent-red); }

/* Decision Buttons */
#decision-panel {
  position: relative; z-index: 3;
  display: flex; gap: 0; height: 68px;
  border-top: 1px solid var(--border);
}

.decision-btn {
  flex: 1; border: none; border-right: 1px solid var(--border);
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  letter-spacing: 3px; cursor: pointer;
  transition: all 0.18s ease; position: relative; overflow: hidden;
}
.decision-btn:last-child { border-right: none; }

.decision-btn.allow  { background: rgba(0,180,0,0.15);  color: var(--accent-green); }
.decision-btn.detain { background: rgba(255,179,0,0.1); color: var(--accent-amber); }
.decision-btn.deny   { background: rgba(255,51,51,0.12); color: var(--accent-red); }

.decision-btn.allow:hover  { background: rgba(0,200,0,0.3);  box-shadow: inset 0 0 40px rgba(0,230,118,0.2); }
.decision-btn.detain:hover { background: rgba(255,179,0,0.25); box-shadow: inset 0 0 40px rgba(255,179,0,0.2); }
.decision-btn.deny:hover   { background: rgba(255,51,51,0.3);  box-shadow: inset 0 0 40px rgba(255,51,51,0.2); }

/* ── DIALOG PANEL ────────────────────────────────────────── */
#panel-dialog {
  width: var(--panel-d-w); min-width: var(--panel-d-w);
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

#dialog-log {
  flex: 1; overflow-y: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  scroll-behavior: smooth;
}

.dialog-entry {
  padding: 8px 10px; font-size: 13px; line-height: 1.5;
  border-left: 2px solid;
  background: var(--bg-card);
}
.dialog-entry.player { border-left-color: var(--accent-blue); color: var(--accent-cyan); }
.dialog-entry.npc    { border-left-color: var(--accent-amber); color: var(--text-primary); }
.dialog-entry.system { border-left-color: var(--text-dim); color: var(--text-dim); font-style: italic; font-size: 12px; }
.dialog-entry .speaker { font-family: var(--font-mono); font-size: 10px; margin-bottom: 3px; opacity: 0.7; }

.dialog-typing {
  padding: 8px 10px; font-size: 13px;
  border-left: 2px solid var(--accent-amber);
  background: var(--bg-card); color: var(--text-dim);
}
.typing-dots span {
  animation: typing-dot 1.2s ease-in-out infinite;
  display: inline-block;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot { 0%,80%,100%{opacity:0;transform:translateY(0)} 40%{opacity:1;transform:translateY(-4px)} }

#dialog-input-area {
  display: flex; border-top: 1px solid var(--border); gap: 0;
}

#dialog-input {
  flex: 1; padding: 10px 12px;
  background: var(--bg-input); border: none; outline: none;
  color: var(--text-primary); font-family: var(--font-body); font-size: 13px;
}
#dialog-input::placeholder { color: var(--text-dim); }

#dialog-send {
  padding: 10px 16px;
  background: var(--accent-blue); border: none; color: #fff;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 2px;
  cursor: pointer; transition: background 0.15s;
}
#dialog-send:hover { background: #2a7fff; }

#quick-questions {
  padding: 8px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 4px;
}
.qq-label { width: 100%; font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); letter-spacing: 1px; margin-bottom: 2px; }
.qq-btn {
  padding: 4px 8px; font-size: 11px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.12s;
  font-family: var(--font-body);
}
.qq-btn:hover { border-color: var(--accent-blue); color: var(--accent-cyan); }

/* ── OVERLAYS ────────────────────────────────────────────── */
#consequence-overlay,
#shift-end-overlay,
#gameover-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5,8,15,0.88);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}

#consequence-box,
#shift-end-box,
#gameover-box {
  max-width: 560px; width: 90%;
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  padding: 40px; text-align: center;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 0 80px rgba(30,111,255,0.2);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

#consequence-icon, #shift-end-icon, #gameover-icon { font-size: 56px; }

#consequence-title, #shift-end-title, #gameover-title {
  font-family: var(--font-display); font-size: 28px; letter-spacing: 4px;
  color: var(--accent-cyan);
}

#consequence-text, #gameover-text {
  color: var(--text-secondary); line-height: 1.6; font-size: 15px;
}

#consequence-score, #gameover-score {
  font-family: var(--font-mono); font-size: 20px; color: var(--accent-amber);
}

#shift-end-stats {
  display: flex; flex-direction: column; gap: 10px; text-align: left;
}
.stat-row {
  display: flex; justify-content: space-between;
  padding: 8px 16px; background: var(--bg-card);
  border-left: 3px solid var(--border-glow);
  font-family: var(--font-mono); font-size: 14px;
}
.stat-row .stat-label { color: var(--text-secondary); }
.stat-row .stat-val   { color: var(--accent-cyan); }

#shift-end-btns { display: flex; gap: 12px; justify-content: center; }
#shift-end-btns .menu-btn { width: auto; min-width: 160px; }

/* ── UTILITY ─────────────────────────────────────────────── */
.hidden { display: none !important; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

@keyframes slide-in-right {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.slide-in { animation: slide-in-right 0.3s ease forwards; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}
.shake { animation: shake 0.4s ease; }
