/* ==========================================================================
   THE CLASSIFIED DOSSIER - PRANK COUNTDOWN THEME
   ========================================================================== */

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #12161f;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-border: rgba(255, 45, 85, 0.25);
  --accent-red: #ff2a5f;
  --accent-red-glow: rgba(255, 42, 95, 0.45);
  --accent-amber: #ffaa00;
  --accent-amber-glow: rgba(255, 170, 0, 0.35);
  --accent-cyan: #00f0ff;
  --text-main: #f0f4f8;
  --text-muted: #8892a0;
  --text-alert: #ff476f;
  --font-mono: 'SF Mono', 'Courier New', Courier, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* CRT Scanline & Grain Overlay */
.scanlines {
  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% 4px, 6px 100%;
  opacity: 0.7;
}

/* Background Glowing Grid */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(255, 42, 95, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(255, 170, 0, 0.08) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Top Urgent Warning Marquee */
.alert-banner {
  background: repeating-linear-gradient(
    45deg,
    #b3002d,
    #b3002d 15px,
    #800020 15px,
    #800020 30px
  );
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(255, 42, 95, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

.alert-marquee {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: pulse-red 2s infinite ease-in-out;
}

.badge-blinking {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #00ff66;
  box-shadow: 0 0 10px #00ff66;
  animation: blink 1s infinite alternate;
}

/* Top Navigation Bar */
.top-nav {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dossier-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-amber);
  border: 1px dashed var(--accent-amber);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
}

.btn-icon:hover {
  background: rgba(255, 42, 95, 0.2);
  border-color: var(--accent-red);
  transform: translateY(-1px);
}

/* Main Container */
.main-wrapper {
  position: relative;
  z-index: 5;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 20px 80px;
}

/* Header & Subject Intro */
.dossier-header {
  text-align: center;
  margin-bottom: 30px;
}

.stamp {
  display: inline-block;
  color: var(--accent-red);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 4px;
  border: 3px solid var(--accent-red);
  padding: 6px 18px;
  text-transform: uppercase;
  transform: rotate(-3deg);
  margin-bottom: 15px;
  box-shadow: 0 0 20px var(--accent-red-glow);
  animation: jitter 4s infinite;
}

.main-title {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 40%, #ff6b8b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subject-highlight {
  color: var(--accent-red);
  -webkit-text-fill-color: var(--accent-red);
  text-shadow: 0 0 20px var(--accent-red-glow);
}

.dossier-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Profile Dossier Card */
.target-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 30px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}

@media (max-width: 768px) {
  .target-card {
    flex-direction: column;
    text-align: center;
  }
}

.target-avatar-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--accent-red);
  box-shadow: 0 0 20px var(--accent-red-glow);
  background: #000;
}

.target-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(120%) grayscale(40%);
}

.censor-bar {
  position: absolute;
  top: 38%;
  left: -10%;
  width: 120%;
  background: #ff2a5f;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 900;
  text-align: center;
  padding: 3px 0;
  letter-spacing: 2px;
  transform: rotate(-5deg);
  box-shadow: 0 0 10px #000;
}

.target-details {
  flex-grow: 1;
}

.target-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.meta-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--accent-amber);
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  letter-spacing: 1px;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

/* ==========================================================================
   COUNTDOWN TIMER DISPLAY
   ========================================================================== */
.countdown-section {
  background: var(--bg-card);
  border: 1px solid rgba(255, 42, 95, 0.4);
  border-radius: var(--radius);
  padding: 32px 20px;
  margin-bottom: 30px;
  box-shadow: 0 0 35px rgba(255, 42, 95, 0.15);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-amber), var(--accent-red));
  animation: glow-bar 3s infinite linear;
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-amber);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}

.timer-card {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 18px 8px;
  position: relative;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.timer-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
}

.timer-number {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.timer-number.accent {
  color: var(--accent-red);
  text-shadow: 0 0 18px var(--accent-red-glow);
}

.timer-unit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
}

/* Progress Bar */
.progress-container {
  max-width: 820px;
  margin: 24px auto 0;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  width: 72%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-red));
  box-shadow: 0 0 10px var(--accent-red);
  transition: width 0.3s ease;
}

/* ==========================================================================
   INTERACTIVE TROLL ACTIONS
   ========================================================================== */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 35px;
}

.btn-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-action span.action-sub {
  font-size: 0.72rem;
  font-weight: normal;
  color: var(--text-muted);
}

.btn-mercy {
  background: linear-gradient(135deg, rgba(255, 42, 95, 0.2), rgba(255, 0, 80, 0.05));
  border-color: var(--accent-red);
}

.btn-mercy:hover {
  background: linear-gradient(135deg, rgba(255, 42, 95, 0.35), rgba(255, 0, 80, 0.15));
  box-shadow: 0 0 25px var(--accent-red-glow);
  transform: scale(1.02);
}

.btn-override {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 170, 0, 0.05));
  border-color: var(--accent-amber);
}

.btn-override:hover {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.3), rgba(255, 170, 0, 0.1));
  box-shadow: 0 0 25px var(--accent-amber-glow);
  transform: scale(1.02);
}

.btn-peek {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 240, 255, 0.05));
  border-color: var(--accent-cyan);
}

.btn-peek:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(0, 240, 255, 0.1));
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.35);
  transform: scale(1.02);
}

/* ==========================================================================
   EVIDENCE VAULT (LEAKED FILES LIST)
   ========================================================================== */
.vault-section {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 30px;
}

.vault-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.vault-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vault-badge {
  background: rgba(255, 42, 95, 0.2);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: rgba(255, 42, 95, 0.5);
  background: rgba(255, 42, 95, 0.05);
}

.file-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.file-icon {
  font-size: 1.4rem;
}

.file-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.file-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-status-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.status-ready {
  background: rgba(255, 42, 95, 0.2);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

.status-processing {
  background: rgba(255, 170, 0, 0.2);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
}

/* Live Activity Terminal Feed */
.terminal-card {
  background: #05070a;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #00ffaa;
  margin-top: 25px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}

.terminal-header {
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.terminal-logs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 100px;
  overflow-y: hidden;
}

.log-entry {
  animation: fadeIn 0.4s ease;
}

/* ==========================================================================
   THE REVEAL MODAL / HERO (When timer hits 0)
   ========================================================================== */
.reveal-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.reveal-modal.active {
  display: flex;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-content {
  background: #111522;
  border: 2px solid #ff0055;
  box-shadow: 0 0 50px rgba(255, 0, 85, 0.6);
  border-radius: 20px;
  max-width: 650px;
  width: 100%;
  padding: 35px 25px;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.reveal-badge {
  font-family: var(--font-mono);
  background: #ff0055;
  color: #fff;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 30px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.reveal-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}

.reveal-media-box {
  width: 100%;
  max-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  margin: 18px 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.reveal-media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reveal-message {
  font-size: 1.15rem;
  color: #e2e8f0;
  line-height: 1.6;
  margin-bottom: 25px;
}

.reveal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ff0055, #ff5500);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(255, 0, 85, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 0, 85, 0.6);
}

/* ==========================================================================
   CONFIGURATOR MODAL (ADMIN WIZARD)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1500;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  padding: 28px;
  position: relative;
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

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

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-amber);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.form-input, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-red);
}

.time-presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-mono);
}

.btn-preset:hover {
  background: rgba(255, 42, 95, 0.2);
  border-color: var(--accent-red);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #111;
  color: #00ffaa;
  border: 1px solid #00ffaa;
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  z-index: 3000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 20px rgba(0, 255, 170, 0.3);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Screen Shake Effect for Penalties */
.shake-screen {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Animations */
@keyframes blink {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

@keyframes pulse-red {
  0%, 100% { background-color: #800020; }
  50% { background-color: #b3002d; }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

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

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

@keyframes glow-bar {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}


/* ==========================================================================
   EVIDENCE PHOTO GALLERY SECTION (VISIBLE WITHOUT CLICK)
   ========================================================================== */
.gallery-section {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.gallery-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-red), transparent);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.gallery-title {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 820px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Featured Main Exhibit Card */
.exhibit-card-main {
  background: rgba(5, 8, 14, 0.85);
  border: 2px solid rgba(255, 42, 95, 0.45);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.exhibit-card-main:hover {
  border-color: var(--accent-red);
  box-shadow: 0 0 30px var(--accent-red-glow);
  transform: translateY(-2px);
}

.exhibit-image-wrapper {
  position: relative;
  width: 100%;
  min-height: 380px;
  max-height: 520px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.exhibit-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.exhibit-image-wrapper:hover img {
  transform: scale(1.02);
}

.exhibit-stamp-tape {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.exhibit-corner-id {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.exhibit-details {
  padding: 18px 20px;
}

.exhibit-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.exhibit-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.exhibit-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 14px;
}

.exhibit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Secondary Queue Exhibits */
.exhibit-queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.exhibit-card-queued {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.exhibit-card-queued:hover {
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.04);
}

.queued-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #080c14;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.queued-info {
  flex-grow: 1;
}

.queued-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.queued-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-amber);
}


/* ==========================================================================
   MOBILE RESPONSIVE OPTIMIZATIONS (Smartphones & Tablets)
   ========================================================================== */

@media (max-width: 768px) {
  /* Prevent any horizontal overflow */
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  /* Optimize scanlines for mobile GPU smoothness */
  .scanlines {
    opacity: 0.35;
    background-size: 100% 3px, 4px 100%;
  }

  /* Top Navigation */
  .top-nav {
    padding: 12px 14px;
    gap: 8px;
  }

  .dossier-id {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .nav-controls {
    gap: 6px;
  }

  .btn-icon {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
  }

  /* Main Container */
  .main-wrapper {
    padding: 8px 12px 60px;
  }

  /* Target Profile Card */
  .target-card {
    padding: 18px 14px;
    gap: 16px;
  }

  .target-avatar-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }

  .target-meta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    text-align: left;
    margin-top: 12px;
  }

  .meta-item {
    padding: 6px 10px;
  }

  .meta-label {
    font-size: 0.65rem;
  }

  .meta-value {
    font-size: 0.8rem;
  }

  /* Gallery Grid */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .exhibit-image-wrapper {
    min-height: unset;
    height: 330px;
    max-height: 350px;
  }

  .exhibit-queue {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  /* Top Alert Banner */
  .alert-banner {
    padding: 7px 10px;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }

  .alert-banner > div:last-child {
    display: none; /* Hide redundant secondary tag on tiny screens */
  }

  .alert-marquee {
    gap: 6px;
    font-size: 0.7rem;
  }

  /* Header Typography */
  .dossier-header {
    margin-bottom: 20px;
  }

  .stamp {
    font-size: 0.82rem;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-width: 2px;
    margin-bottom: 10px;
  }

  .main-title {
    font-size: 1.65rem;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    line-height: 1.2;
  }

  .dossier-subtitle {
    font-size: 0.82rem;
    line-height: 1.45;
    padding: 0 4px;
  }

  /* Target Meta Grid single column on extra narrow phones */
  .target-meta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  /* High-Impact Mobile Countdown Timer */
  .countdown-section {
    padding: 18px 10px;
    margin-bottom: 22px;
    border-radius: 10px;
  }

  .countdown-label {
    font-size: 0.74rem;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .timer-card {
    padding: 10px 2px;
    border-radius: 8px;
  }

  .timer-number {
    font-size: 1.55rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }

  .timer-unit {
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    margin-top: 3px;
  }

  /* Milliseconds row spanning full width */
  .timer-card.ms-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 7px 12px;
    margin-top: 4px;
    background: rgba(255, 170, 0, 0.08);
    border: 1px dashed rgba(255, 170, 0, 0.4);
  }

  .timer-card.ms-card .timer-number {
    font-size: 1.4rem !important;
  }

  .timer-card.ms-card .timer-unit {
    margin-top: 0;
    font-size: 0.68rem;
    color: var(--accent-amber);
    letter-spacing: 1px;
  }

  .progress-container {
    margin-top: 14px;
  }

  .progress-info {
    font-size: 0.68rem;
  }

  /* Action Buttons */
  .actions-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 22px;
  }

  .btn-action {
    padding: 12px 16px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    min-height: 48px;
    font-size: 0.88rem;
  }

  .btn-action:active {
    transform: scale(0.97);
  }

  .btn-action span.action-sub {
    font-size: 0.68rem;
    text-align: right;
  }

  /* Evidence Gallery */
  .gallery-section {
    padding: 16px 12px;
    margin-bottom: 22px;
    border-radius: 10px;
  }

  .gallery-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .gallery-title {
    font-size: 0.92rem;
  }

  .exhibit-card-main {
    border-radius: 10px;
  }

  .exhibit-image-wrapper {
    height: 290px;
    max-height: 310px;
  }

  .exhibit-stamp-tape {
    font-size: 0.62rem;
    padding: 3px 8px;
    top: 10px;
    right: 10px;
    letter-spacing: 1px;
  }

  .exhibit-corner-id {
    font-size: 0.62rem;
    padding: 3px 8px;
    bottom: 10px;
    left: 10px;
  }

  .exhibit-details {
    padding: 12px 10px;
  }

  .exhibit-title {
    font-size: 0.95rem;
  }

  .exhibit-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    margin-bottom: 10px;
  }

  .exhibit-actions {
    display: flex;
    gap: 8px;
  }

  .exhibit-actions .btn-icon {
    flex: 1;
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.75rem;
  }

  .exhibit-card-queued {
    padding: 10px;
    gap: 10px;
    border-radius: 8px;
  }

  .queued-thumb {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }

  .queued-title {
    font-size: 0.82rem;
  }

  .queued-status {
    font-size: 0.68rem;
  }

  /* Evidence Vault */
  .vault-section {
    padding: 16px 12px;
    border-radius: 10px;
  }

  .vault-title {
    font-size: 0.92rem;
  }

  .file-item {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .file-left {
    width: 100%;
    gap: 10px;
  }

  .file-name {
    font-size: 0.82rem;
  }

  .file-desc {
    font-size: 0.72rem;
  }

  .file-item > div:last-child {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .terminal-card {
    padding: 12px 10px;
    font-size: 0.7rem;
    margin-top: 18px;
  }

  .terminal-header {
    font-size: 0.65rem;
  }

  /* Modals */
  .modal-overlay {
    padding: 12px;
  }

  .modal-card {
    padding: 18px 14px;
    border-radius: 14px;
    max-height: 90dvh;
  }

  .modal-header h3 {
    font-size: 0.95rem !important;
  }

  #modal-peek img#modal-peek-img {
    max-height: 48dvh !important;
  }

  #sneak-peek-caption {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    margin-bottom: 14px !important;
  }

  .reveal-content {
    padding: 22px 14px;
    border-radius: 16px;
    max-height: 90dvh;
  }

  .reveal-title {
    font-size: 1.6rem;
  }

  .reveal-media-box {
    max-height: 200px;
  }

  .reveal-message {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .reveal-actions {
    flex-direction: column;
    width: 100%;
  }

  .reveal-actions button {
    width: 100%;
  }
}
