/* ==========================================================================
   PROTOCOL 48: URBAN SHADOW // SOMBRA URBANA
   PS5-Grade Cyber-Noir UI, VFX, Detective Corkboard & Difficulty Engine
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,400;0,600;0,700;1,400&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Outfit:wght@300;400;600;700;900&family=Caveat:wght@600;700&display=swap');

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(13, 17, 23, 0.92);
  --bg-card-hover: rgba(22, 27, 34, 0.98);
  --border-cyan: rgba(0, 240, 255, 0.35);
  --border-glow: rgba(0, 240, 255, 0.7);
  --neon-cyan: #00f0ff;
  --neon-red: #ff3366;
  --neon-green: #00ff66;
  --neon-amber: #ffb000;
  --neon-purple: #bd00ff;
  --yarn-red: #e6194b;
  --yarn-glow: rgba(255, 51, 102, 0.75);
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #484f58;
  --font-display: 'Chakra Petch', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'Outfit', sans-serif;
  --font-hand: 'Caveat', cursive;
}

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

.hidden {
  display: none !important;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  user-select: none;
}

/* Background Rain Canvas */
#rain-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
}

/* CRT Scanlines Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
}

/* Screen Vignette */
.vignette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 998;
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.9);
}

/* Screen Shake & Glitch Effect */
.screen-shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0) scale(1.01); filter: hue-rotate(90deg); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); filter: contrast(150%); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

.chromatic-flash {
  animation: chromFlash 0.35s ease-out;
}

@keyframes chromFlash {
  0% { box-shadow: inset 0 0 100px var(--neon-red); }
  100% { box-shadow: inset 0 0 0px transparent; }
}

/* Main Container */
.game-viewport {
  position: relative;
  z-index: 10;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 20px;
}

/* -------------------------------------------------------------
   TOP TACTICAL HUD BAR
   ------------------------------------------------------------- */
.tactical-hud {
  background: rgba(10, 14, 20, 0.95);
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  margin-bottom: 12px;
}

.hud-title-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-badge {
  background: var(--neon-cyan);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 1px;
}

.hud-difficulty-btn {
  background: rgba(0, 255, 102, 0.15);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-difficulty-btn:hover {
  background: var(--neon-green);
  color: #000;
  box-shadow: 0 0 12px var(--neon-green);
}

.hud-difficulty-btn.mode-advanced {
  background: rgba(255, 51, 102, 0.2);
  border-color: var(--neon-red);
  color: var(--neon-red);
}

.hud-difficulty-btn.mode-advanced:hover {
  background: var(--neon-red);
  color: #fff;
  box-shadow: 0 0 12px var(--neon-red);
}

.hud-case-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.hud-time-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 51, 102, 0.4);
}

.hud-time-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

.hud-clock {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--neon-red);
  text-shadow: 0 0 12px rgba(255, 51, 102, 0.8);
  letter-spacing: 2px;
}

.hud-clock.urgent {
  animation: clockPulse 1s infinite alternate;
}

@keyframes clockPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.05); filter: brightness(1.5) drop-shadow(0 0 15px var(--neon-red)); }
}

.hud-controls-zone {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-btn {
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid var(--border-cyan);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.hud-btn.btn-briefing-replay {
  background: rgba(255, 176, 0, 0.2);
  border-color: var(--neon-amber);
  color: var(--neon-amber);
}

.hud-btn.btn-briefing-replay:hover {
  background: var(--neon-amber);
  color: #000;
  box-shadow: 0 0 15px rgba(255, 176, 0, 0.6);
}

/* -------------------------------------------------------------
   OBJECTIVE STRIP & GUIDED BEACONS
   ------------------------------------------------------------- */
.objective-strip {
  background: rgba(13, 17, 23, 0.8);
  border-left: 3px solid var(--neon-amber);
  padding: 10px 16px;
  border-radius: 0 6px 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: border-color 0.3s ease;
}

.objective-strip.guided-active {
  border-left: 3px solid var(--neon-green);
  background: rgba(0, 255, 102, 0.08);
}

.objective-text {
  color: #fff;
  font-family: var(--font-body);
}

.objective-tag {
  color: var(--neon-amber);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 8px;
}

.objective-strip.guided-active .objective-tag {
  color: var(--neon-green);
}

/* Visual Beacon Pulse for Tab Buttons */
.tab-btn.tab-beacon-glow {
  position: relative;
  border-color: var(--neon-green) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.5) !important;
  animation: beaconPulse 1.2s infinite alternate ease-in-out;
}

.tab-btn.tab-beacon-glow::after {
  content: "● LEAD / PISTA";
  position: absolute;
  top: -10px;
  right: 6px;
  background: var(--neon-green);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 0 10px var(--neon-green);
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
}

@keyframes beaconPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 4px var(--neon-green)); }
  100% { transform: scale(1.03); filter: drop-shadow(0 0 16px var(--neon-green)); }
}

/* -------------------------------------------------------------
   NAVIGATION TABS
   ------------------------------------------------------------- */
.nav-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-top: 14px;
  padding-bottom: 6px;
  padding-left: 2px;
  padding-right: 2px;
}

.tab-btn {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: #fff;
  border-color: var(--border-cyan);
  background: rgba(22, 27, 34, 0.95);
}

.tab-btn.active {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}

.tab-panel {
  animation: fadeInPanel 0.3s ease-out;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------
   TAB 1: DETECTIVE CORKBOARD & RED STRINGS SYSTEM
   ------------------------------------------------------------- */
.board-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-toolbar {
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.board-instruction-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.board-links-pill {
  background: rgba(230, 25, 75, 0.2);
  border: 1px solid var(--yarn-red);
  color: #ff6688;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 20px;
}

.corkboard-stage {
  position: relative;
  width: 100%;
  height: 720px;
  background: 
    radial-gradient(circle at center, rgba(35, 25, 20, 0.85) 0%, rgba(12, 10, 14, 0.98) 100%),
    repeating-linear-gradient(45deg, rgba(40, 30, 25, 0.15), rgba(40, 30, 25, 0.15) 2px, transparent 2px, transparent 8px),
    #181210;
  border: 3px solid #3d2f25;
  border-radius: 12px;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9), 0 12px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  touch-action: none;
}

#yarn-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.red-yarn-path {
  stroke: var(--yarn-red);
  stroke-width: 3.5;
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 6px var(--yarn-glow));
  transition: d 0.05s linear;
}

.active-yarn-drawing {
  stroke: #ff99aa;
  stroke-dasharray: 6 4;
  stroke-width: 2.5;
}

.board-pin-card {
  position: absolute;
  width: 160px;
  background: #f8f6f0;
  color: #1a1a1a;
  border-radius: 4px;
  padding: 10px 10px 12px 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: grab;
  z-index: 10;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  user-select: none;
}

.board-pin-card:active {
  cursor: grabbing;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.4);
  z-index: 30;
}

.cork-pushpin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff6688 0%, #b30026 65%, #660015 100%);
  border: 2px solid #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  z-index: 25;
  transition: transform 0.2s ease;
}

.cork-pushpin:hover {
  transform: translateX(-50%) scale(1.3);
  box-shadow: 0 0 12px #ff3366;
}

.cork-pushpin.active-pin {
  animation: pinPulse 0.8s infinite alternate;
  background: radial-gradient(circle at 35% 35%, #00ffff 0%, #0088cc 100%);
}

@keyframes pinPulse {
  0% { transform: translateX(-50%) scale(1.2); }
  100% { transform: translateX(-50%) scale(1.45); box-shadow: 0 0 18px var(--neon-cyan); }
}

.board-pin-thumb {
  width: 100%;
  height: 105px;
  overflow: hidden;
  background: #000;
  border-radius: 2px;
  margin-bottom: 6px;
}

.board-pin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.board-pin-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
  margin-bottom: 2px;
}

.board-pin-subtitle {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: #8b0000;
  line-height: 1.1;
}

.link-verified-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 255, 102, 0.9);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 4px;
  box-shadow: 0 0 20px var(--neon-green);
  z-index: 50;
  pointer-events: none;
  animation: bannerPop 0.3s ease-out;
}

@keyframes bannerPop {
  0% { transform: translateX(-50%) scale(0.7); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* -------------------------------------------------------------
   TAB 2: DOSSIER VICTIMS SHOWCASE
   ------------------------------------------------------------- */
.victims-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.victim-profile-card {
  background: rgba(10, 14, 20, 0.92);
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.victim-card-header {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.victim-card-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.victim-profile-card:hover .victim-card-header img {
  transform: scale(1.05);
}

.victim-badge-stamp {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 3px;
}

.stamp-deceased {
  background: rgba(255, 51, 102, 0.9);
  color: #fff;
  border: 1px solid var(--neon-red);
}

.stamp-missing {
  background: rgba(255, 176, 0, 0.9);
  color: #000;
  border: 1px solid var(--neon-amber);
}

.victim-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.victim-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
}

.victim-role-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-cyan);
}

.victim-bio-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.evidence-section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--neon-cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.evidence-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.evidence-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.3);
}

.evidence-card-thumb {
  height: 160px;
  position: relative;
  overflow: hidden;
  background: #000;
}

.evidence-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.evidence-card:hover .evidence-card-thumb img {
  transform: scale(1.08);
}

.evidence-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
}

.evidence-info {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.evidence-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.evidence-desc-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -------------------------------------------------------------
   TAB 3: INTERROGATION SUITE
   ------------------------------------------------------------- */
.interrogation-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  min-height: 560px;
}

.suspect-roster {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suspect-tab-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suspect-tab-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-cyan);
}

.suspect-tab-card.active {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.25);
}

.suspect-tab-card.broken {
  border-color: var(--neon-green);
}

.suspect-avatar-mini {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.suspect-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suspect-mini-info h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
}

.suspect-mini-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.suspect-status-tag {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(255, 51, 102, 0.2);
  color: var(--neon-red);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

.suspect-tab-card.broken .suspect-status-tag {
  background: rgba(0, 255, 102, 0.2);
  color: var(--neon-green);
  border-color: rgba(0, 255, 102, 0.4);
}

.interrogation-stage {
  background: rgba(10, 14, 20, 0.95);
  border: 1px solid var(--border-cyan);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.stage-top {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.suspect-portrait-large {
  width: 240px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
  position: relative;
  flex-shrink: 0;
}

.suspect-portrait-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialogue-container {
  flex: 1 1 260px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.statement-box {
  background: rgba(22, 27, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 14px 18px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.statement-box:hover {
  border-color: var(--border-cyan);
  background: rgba(30, 38, 48, 0.98);
}

.statement-box.selected {
  border-color: var(--neon-amber);
  background: rgba(255, 176, 0, 0.15);
  box-shadow: 0 0 18px rgba(255, 176, 0, 0.35);
}

.statement-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  margin-bottom: 4px;
}

.statement-text {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: #fff;
  line-height: 1.5;
}

.press-response-box {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0, 240, 255, 0.1);
  border-left: 3px solid var(--neon-cyan);
  font-size: 0.88rem;
  color: #d1f2ff;
  font-style: italic;
}

.action-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

.action-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
}

.btn-press {
  background: rgba(255, 176, 0, 0.2);
  color: var(--neon-amber);
  border: 1px solid var(--neon-amber);
}

.btn-press:hover {
  background: var(--neon-amber);
  color: #000;
  box-shadow: 0 0 20px rgba(255, 176, 0, 0.6);
}

.btn-confront {
  background: rgba(255, 51, 102, 0.25);
  color: var(--neon-red);
  border: 1px solid var(--neon-red);
}

.btn-confront:hover {
  background: var(--neon-red);
  color: #fff;
  box-shadow: 0 0 25px rgba(255, 51, 102, 0.8);
}

.btn-confront:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(80%);
}

/* -------------------------------------------------------------
   TAB 4: FORENSIC DISPATCH & MINIGAMES
   ------------------------------------------------------------- */
.forensics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.terminal-card {
  background: rgba(10, 14, 20, 0.95);
  border: 1px solid var(--border-cyan);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.terminal-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--neon-cyan);
}

.cctv-viewer {
  position: relative;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  height: 240px;
  border: 1px solid #333;
}

.cctv-viewer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(120%) brightness(90%);
}

.cctv-timecode {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
}

.timeline-scrubber-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scrubber-slider {
  width: 100%;
  accent-color: var(--neon-cyan);
  cursor: pointer;
  height: 8px;
}

.triangulation-canvas-box {
  position: relative;
  background: #04080e;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 6px;
  height: 240px;
}

#triangulation-canvas {
  width: 100%;
  height: 100%;
}

.dial-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dial-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
}

.dial-item label {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* -------------------------------------------------------------
   TAB 5: POLICE RADIO CLIMAX CONFRONTATION
   ------------------------------------------------------------- */
.radio-climax-box {
  background: radial-gradient(circle at center, #1b0c16 0%, #0b070f 100%);
  border: 1px solid var(--neon-red);
  box-shadow: 0 0 35px rgba(255, 51, 102, 0.35);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.radio-requirements-box {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 176, 0, 0.4);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.radio-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.radio-checklist-item.completed {
  color: var(--neon-green);
}

.radio-checklist-icon {
  font-weight: 700;
  font-size: 1.1rem;
}

.radio-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 6px;
  border: 1px solid rgba(255, 51, 102, 0.3);
  padding: 0 20px;
}

.wave-bar {
  width: 4px;
  height: 20%;
  background: var(--neon-red);
  border-radius: 2px;
  animation: wavePulse 0.8s infinite ease-in-out alternate;
}

@keyframes wavePulse {
  0% { height: 10%; opacity: 0.3; }
  100% { height: 90%; opacity: 1; filter: drop-shadow(0 0 6px var(--neon-red)); }
}

/* -------------------------------------------------------------
   CINEMATIC CASE BRIEFING MODAL (100% FULL PHOTO VISIBILITY FIX)
   ------------------------------------------------------------- */
.briefing-modal-content {
  background: #090d14;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.5);
  border-radius: 12px;
  max-width: 880px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.briefing-slide-viewport {
  position: relative;
  height: 380px;
  background: #04060a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.briefing-slide-viewport img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(0,0,0,0.85);
  filter: contrast(110%);
}

.briefing-text-card {
  background: rgba(13, 17, 23, 0.98);
  border-top: 1px solid var(--border-cyan);
  padding: 20px 28px;
}

.briefing-slide-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.briefing-slide-body {
  font-size: 0.95rem;
  color: #d1d9e0;
  line-height: 1.55;
  max-width: 800px;
}

.briefing-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(10, 14, 20, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.briefing-dots-zone {
  display: flex;
  gap: 8px;
}

.briefing-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.briefing-dot.active {
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
}

/* -------------------------------------------------------------
   DIFFICULTY SELECTION MODAL (REGULAR VS AVANZADO)
   ------------------------------------------------------------- */
.difficulty-modal-content {
  background: #090d14;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.5);
  border-radius: 12px;
  max-width: 780px;
  width: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diff-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.diff-card {
  background: rgba(13, 17, 23, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s ease;
}

.diff-card-regular {
  border-color: rgba(0, 255, 102, 0.4);
}

.diff-card-regular:hover, .diff-card-regular.selected {
  border-color: var(--neon-green);
  background: rgba(0, 255, 102, 0.12);
  box-shadow: 0 0 30px rgba(0, 255, 102, 0.4);
  transform: translateY(-3px);
}

.diff-card-advanced {
  border-color: rgba(255, 51, 102, 0.4);
}

.diff-card-advanced:hover, .diff-card-advanced.selected {
  border-color: var(--neon-red);
  background: rgba(255, 51, 102, 0.12);
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.4);
  transform: translateY(-3px);
}

.diff-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.diff-icon {
  font-size: 1.8rem;
}

.diff-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.diff-card-regular .diff-title {
  color: var(--neon-green);
}

.diff-card-advanced .diff-title {
  color: var(--neon-red);
}

.diff-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* -------------------------------------------------------------
   MODALS (EVIDENCE INSPECT, EVIDENCE SELECTOR, CERTIFICATE)
   ------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #0d1117;
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.4);
  border-radius: 10px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.uv-active-mode {
  filter: hue-rotate(240deg) saturate(200%) brightness(120%) !important;
}

/* Certificate */
.certificate-box {
  background: #090d14;
  border: 3px double var(--neon-amber);
  padding: 28px;
  text-align: center;
  border-radius: 8px;
}

.cert-stamp {
  display: inline-block;
  border: 2px solid var(--neon-green);
  color: var(--neon-green);
  padding: 6px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 3px;
  transform: rotate(-4deg);
  margin-bottom: 20px;
}

/* -------------------------------------------------------------
   TOAST NOTIFICATIONS (non-blocking replacement for alert())
   ------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  background: rgba(13, 17, 23, 0.97);
  border: 1px solid var(--border-cyan);
  border-left: 4px solid var(--neon-cyan);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.4;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast-error {
  border-left-color: var(--neon-red);
}

.toast.toast-success {
  border-left-color: var(--neon-green);
}

/* Climax Reveal Flash (Ruiz confrontation transcript panel) */
.ruiz-reveal-flash {
  animation: ruizRevealFlash 0.5s ease-out;
}

@keyframes ruizRevealFlash {
  0% { background: rgba(255, 51, 102, 0.35); }
  100% { background: transparent; }
}

/* -------------------------------------------------------------
   ACCESSIBILITY: KEYBOARD FOCUS STATES
   ------------------------------------------------------------- */
.tab-btn:focus-visible,
.hud-btn:focus-visible,
.action-btn:focus-visible,
.evidence-card:focus-visible,
.suspect-tab-card:focus-visible,
.diff-card:focus-visible,
.statement-box:focus-visible,
.modal-close-btn:focus-visible,
.briefing-dot:focus-visible,
.board-pin-card:focus-visible,
.cork-pushpin:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* Certificate reunion photo (Fase 7) */
.cert-reunion-photo {
  width: 100%;
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--border-cyan);
}

.cert-reunion-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
  .diff-options-grid {
    grid-template-columns: 1fr;
  }
  .interrogation-layout {
    grid-template-columns: 1fr;
  }
  .stage-top {
    flex-direction: column;
    align-items: center;
  }
  .suspect-portrait-large {
    width: 100%;
    max-width: 240px;
    height: 240px;
  }
  .tactical-hud {
    flex-direction: column;
    align-items: stretch;
  }
  .hud-controls-zone {
    justify-content: space-between;
  }
  .corkboard-stage {
    height: 600px;
  }
  .board-pin-card {
    width: 130px;
  }
}
