/* ==========================================================================
   UAP World Monitor - Stylesheet
   ========================================================================== */

:root {
  /* Core Unified Dark Navy / Black Backgrounds (Map & Left Panel Reference) */
  --bg-main: #050a12;                  /* Central Map area, Topbar, Secondary bar, Bottom footer */
  --bg-panel: #070c12;                 /* Left Incident panel, Right Gallery Media panel */
  --bg-panel-header: #09111a;          /* Panel headers and stat bars */
  --bg-panel-dark: #050a10;            /* Search box, control wrappers */
  --bg-card: #08101a;                  /* Carousel items & cards */
  --bg-panel-hover: rgba(0, 229, 255, 0.06);   /* Hover state highlight */
  --bg-panel-active: rgba(0, 229, 255, 0.10);  /* Active / selected card highlight */

  /* Unified Cyan & Subtle Borders */
  --border-subtle: #1c2e3d;            /* Panel perimeter, topbar/secondary/footer borders */
  --border-divider: #0f1d2a;           /* Inner list item separators */
  --border-cyan: rgba(0, 229, 255, 0.32);       /* Subtle cyan HUD corners, title flanks */
  --border-cyan-active: rgba(0, 229, 255, 0.75);/* Hover/active cyan edge */
  --border-cyan-bright: #00e5ff;        /* Primary cyan border & active highlights */

  /* Unified Cyan, Muted & Body Typography */
  --text-primary: #ffffff;
  --text-body: #d2dee6;
  --text-cyan: #00e5ff;                /* Primary tactical cyan */
  --text-cyan-dim: #a4d4e8;            /* Secondary cyan text */
  --text-muted: #6a8c9e;               /* Muted blue/slate text tone */
  --text-dim: #4a6c80;                 /* Low contrast hints / placeholders */

  /* Preserved Tactical Accents */
  --accent-orange: #ff6b1a;            /* Unchanged orange headings, controls, badges */
  --accent-orange-hover: #ff8c42;
  --accent-green: #00ff88;             /* Status online indicator */
}

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

body {
  background: var(--bg-main);
  color: var(--text-body);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   NAVIGATION LEVEL 1: MAIN HEADER BAR
   ========================================================================== */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  height: 48px;
  min-height: 48px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-main);
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.brand-radar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(255, 107, 26, 0.5));
}

.brand-name {
  font-family: 'Orbitron', sans-serif;
  color: var(--text-cyan);
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.brand-status {
  font-family: 'Rajdhani', sans-serif;
  color: var(--text-cyan);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-left: 2px;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}

.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  user-select: none;
}

.title-flank {
  width: 50px;
  height: 1px;
  background: var(--border-cyan);
  position: relative;
}

.title-flank.flank-left::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--border-cyan);
}

.title-flank.flank-right::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--border-cyan);
}

.topbar-page-title {
  position: relative;
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent-orange);
  margin: 0;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 107, 26, 0.45);
  white-space: nowrap;
  animation: hudTitleFlicker 6s infinite ease-in-out;
}

/* Cyber HUD Glitch Layer 1: Cyan RGB Split & Upper Scanline Slices */
.topbar-page-title::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #00e5ff;
  text-shadow: -1.2px 0 #00e5ff, 0 0 8px rgba(0, 229, 255, 0.6);
  pointer-events: none;
  opacity: 0;
  animation: hudGlitchTop 4.2s infinite linear alternate-reverse;
}

/* Cyber HUD Glitch Layer 2: Neon Red/Magenta RGB Split & Lower Scanline Slices */
.topbar-page-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #ff2266;
  text-shadow: 1.2px 0 #ff2266, 0 0 8px rgba(255, 34, 102, 0.6);
  pointer-events: none;
  opacity: 0;
  animation: hudGlitchBottom 3.6s infinite linear alternate-reverse;
}

/* Subtle HUD Base Text Telemetry Flicker */
@keyframes hudTitleFlicker {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 107, 26, 0.45);
  }
  24% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 107, 26, 0.45);
  }
  25% {
    opacity: 0.93;
    text-shadow: 0 0 8px rgba(255, 107, 26, 0.35);
  }
  26% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 107, 26, 0.45);
  }
  58% {
    opacity: 0.88;
    text-shadow: 0 0 16px rgba(255, 107, 26, 0.65), -0.5px 0 rgba(0, 229, 255, 0.3);
  }
  59% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 107, 26, 0.45);
  }
  72% {
    opacity: 0.86;
    text-shadow: 0 0 16px rgba(255, 107, 26, 0.7), 0.8px 0 rgba(255, 34, 102, 0.4);
  }
  73.5% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 107, 26, 0.45);
  }
  91% {
    opacity: 0.94;
  }
  92% {
    opacity: 1;
  }
}

/* Cyan Glitch Slices: continuous subtle hum + periodic sharp scanline bursts */
@keyframes hudGlitchTop {
  0% {
    opacity: 0;
    transform: translate(0, 0);
    clip-path: inset(40% 0 50% 0);
  }
  15% {
    opacity: 0.25;
    transform: translate(-0.6px, 0);
    clip-path: inset(15% 0 75% 0);
  }
  17% {
    opacity: 0;
    transform: translate(0, 0);
  }
  38% {
    opacity: 0.35;
    transform: translate(-0.8px, 0);
    clip-path: inset(60% 0 25% 0);
  }
  40% {
    opacity: 0;
    transform: translate(0, 0);
  }
  68% {
    opacity: 0;
    transform: translate(0, 0);
  }
  /* Strong Glitch Burst 1 */
  69% {
    opacity: 0.85;
    transform: translate(-1.6px, -0.4px) skewX(-1.2deg);
    clip-path: inset(18% 0 52% 0);
  }
  70% {
    opacity: 0.95;
    transform: translate(1.8px, 0.4px) skewX(1deg);
    clip-path: inset(48% 0 22% 0);
  }
  71% {
    opacity: 0.8;
    transform: translate(-1.2px, 0);
    clip-path: inset(72% 0 8% 0);
  }
  72% {
    opacity: 0.92;
    transform: translate(1px, -0.4px);
    clip-path: inset(6% 0 82% 0);
  }
  73% {
    opacity: 0;
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
  }
  86% {
    opacity: 0;
    transform: translate(0, 0);
  }
  /* Strong Glitch Burst 2 */
  87% {
    opacity: 0.8;
    transform: translate(-1.8px, 0.4px);
    clip-path: inset(32% 0 38% 0);
  }
  88% {
    opacity: 0.9;
    transform: translate(1.4px, -0.4px);
    clip-path: inset(58% 0 16% 0);
  }
  89% {
    opacity: 0.65;
    transform: translate(-0.5px, 0);
    clip-path: inset(10% 0 76% 0);
  }
  90% {
    opacity: 0;
    transform: translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

/* Magenta Glitch Slices: offset rhythm with opposing jitter & displacement */
@keyframes hudGlitchBottom {
  0% {
    opacity: 0;
    transform: translate(0, 0);
    clip-path: inset(25% 0 65% 0);
  }
  22% {
    opacity: 0.3;
    transform: translate(0.7px, 0);
    clip-path: inset(70% 0 15% 0);
  }
  24% {
    opacity: 0;
    transform: translate(0, 0);
  }
  50% {
    opacity: 0;
    transform: translate(0, 0);
  }
  /* Strong Glitch Burst A */
  51% {
    opacity: 0.85;
    transform: translate(1.6px, 0.4px) skewX(1.2deg);
    clip-path: inset(52% 0 24% 0);
  }
  52% {
    opacity: 0.92;
    transform: translate(-1.8px, -0.4px) skewX(-1deg);
    clip-path: inset(22% 0 58% 0);
  }
  53% {
    opacity: 0.78;
    transform: translate(1.2px, 0);
    clip-path: inset(78% 0 6% 0);
  }
  54% {
    opacity: 0.9;
    transform: translate(-1px, 0.4px);
    clip-path: inset(12% 0 72% 0);
  }
  55% {
    opacity: 0;
    transform: translate(0, 0);
  }
  78% {
    opacity: 0;
    transform: translate(0, 0);
  }
  /* Strong Glitch Burst B */
  79% {
    opacity: 0.8;
    transform: translate(1.8px, -0.4px);
    clip-path: inset(28% 0 42% 0);
  }
  80% {
    opacity: 0.88;
    transform: translate(-1.4px, 0.4px);
    clip-path: inset(68% 0 12% 0);
  }
  81% {
    opacity: 0.65;
    transform: translate(0.6px, 0);
    clip-path: inset(14% 0 66% 0);
  }
  82% {
    opacity: 0;
    transform: translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.sys-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sys-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.8s infinite;
}

.sys-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-cyan);
  letter-spacing: 1.2px;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}

.topbar-vsep {
  color: var(--border-subtle);
  font-size: 14px;
  user-select: none;
}

.topbar-clock {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-cyan);
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
  white-space: nowrap;
}

/* ==========================================================================
   NAVIGATION LEVEL 2: THIN SECONDARY STATUS & TELEMETRY BAR
   ========================================================================== */
.secondary-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  height: 30px;
  min-height: 30px;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-subtle);
  font-family: 'Rajdhani', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  flex-shrink: 0;
  position: relative;
  z-index: 19;
}

.sec-cluster {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sec-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-cyan);
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}

.sec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.5));
}

.sec-divider {
  color: var(--border-subtle);
  font-size: 11px;
  user-select: none;
}

#count-display {
  color: var(--text-cyan);
  font-weight: 700;
  letter-spacing: 1px;
}

.sec-online {
  color: var(--accent-green);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-orange);
  animation: pulse 1.4s infinite;
}

.dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.left-panel {
  width: 275px;
  min-width: 275px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  color: var(--accent-orange);
  letter-spacing: 2px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel-header);
  flex-shrink: 0;
}

.search-box {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-panel-dark);
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  background: #0a1420;
  border: 1px solid #1e3a50;
  color: #a8dcf0;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.search-box input:focus {
  border-color: rgba(255, 107, 26, 0.55);
  box-shadow: 0 0 8px rgba(255, 107, 26, 0.25);
}

.incident-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #1e3a50 var(--bg-panel-dark);
  padding: 2px 4px;
}

.incident-item {
  padding: 11px 14px 11px 12px;
  border-bottom: 1px solid var(--border-divider);
  border-left: 2px solid transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  will-change: transform;
}

/* Hover State (Temporary HUD highlight & isolated zoom on mouse over) */
.incident-item:hover {
  background: var(--bg-panel-hover);
  border-left: 2px solid var(--border-cyan-active);
  border-bottom-color: rgba(0, 229, 255, 0.22);
  border-radius: 4px;
  box-shadow: inset 0 0 14px rgba(0, 229, 255, 0.04),
              0 4px 16px rgba(0, 0, 0, 0.65),
              0 0 10px rgba(0, 229, 255, 0.12);
  transform: scale(1.022);
  z-index: 10;
}

.incident-item:hover .inc-name {
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}

.incident-item:hover .inc-meta span:first-child {
  color: var(--text-cyan-dim);
}

.incident-item:hover .inc-desc {
  color: #b8d2de;
}

/* Persistent Selected / Active State (Applied on click) */
.incident-item.active,
.incident-item.selected {
  background: var(--bg-panel-active);
  border-left: 2px solid var(--border-cyan-bright);
  border-bottom-color: rgba(0, 229, 255, 0.28);
  border-radius: 4px;
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.08),
              0 3px 12px rgba(0, 0, 0, 0.5),
              0 0 12px rgba(0, 229, 255, 0.14);
  z-index: 5;
}

.incident-item.active .inc-name,
.incident-item.selected .inc-name {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.55);
}

.incident-item.active .inc-meta span:first-child,
.incident-item.selected .inc-meta span:first-child {
  color: #bce4f6;
}

.incident-item.active .inc-desc,
.incident-item.selected .inc-desc {
  color: #d2e6f0;
}

/* Hovering on an already selected item maintains clean feedback and zooms */
.incident-item.active:hover,
.incident-item.selected:hover {
  background: rgba(0, 229, 255, 0.13);
  box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.1),
              0 5px 18px rgba(0, 0, 0, 0.75),
              0 0 14px rgba(0, 229, 255, 0.2);
  transform: scale(1.025);
  z-index: 12;
}

.inc-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: #fca855;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.25;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.inc-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  transition: color 0.2s ease;
}

.inc-desc {
  font-size: 11px;
  color: #8daab6;
  margin-top: 4px;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.stat-bar {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg-panel-header);
}

.stat-bar span {
  color: var(--accent-orange);
}

.map-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg-main);
}

#world-map {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#world-map:active {
  cursor: grabbing;
}

/* The SVG ocean outline clips this sweep to the projected world map. */
.map-radar-sweep {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.map-radar-sweep::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(64, 174, 205, 0.055), transparent 75px);
  border-bottom: 1px solid rgba(104, 211, 235, 0.3);
  box-shadow: 0 3px 10px rgba(45, 165, 200, 0.09);
  animation: map-radar-sweep 12s linear infinite;
}

@keyframes map-radar-sweep {
  /* Seven seconds of travel, then five seconds hidden before repeating. */
  0% { transform: translateY(-100%); opacity: 0; }
  3% { opacity: 1; }
  54% { opacity: 1; }
  58.333333% { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .map-radar-sweep { display: none; }
}

.ocean {
  fill: #040d18;
}

.country {
  fill: #0d1e2c;
  stroke: #1e3d50;
  stroke-width: 0.6;
  transition: fill 0.2s;
}

.country:hover {
  fill: #142840;
}

.country-borders {
  fill: none;
  stroke: #1e3d50;
  stroke-width: 0.4;
  opacity: 0.8;
}

.graticule {
  fill: none;
  stroke: #0d2030;
  stroke-width: 0.3;
  opacity: 0.6;
}

.inc-marker {
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.2s;
}

.inc-marker circle.marker-hit {
  pointer-events: all;
}

.inc-marker circle:not(.marker-hit) {
  pointer-events: none;
}

.inc-marker:hover circle.marker-outer {
  stroke-width: 1.8px;
  filter: drop-shadow(0 0 4px currentColor);
}

/* ==========================================================================
   RIGHT GALLERY PANEL & VERTICAL COVERFLOW CAROUSEL
   ========================================================================== */
.right-gallery-panel {
  width: 250px;
  min-width: 250px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.right-gallery-panel .corner {
  border-color: var(--border-cyan);
  width: 12px;
  height: 12px;
}

.right-gallery-panel .corner-tl {
  top: 6px;
  left: 6px;
  border-width: 1.5px 0 0 1.5px;
}

.right-gallery-panel .corner-tr {
  top: 6px;
  right: 6px;
  border-width: 1.5px 1.5px 0 0;
}

.right-gallery-panel .corner-bl {
  bottom: 6px;
  left: 6px;
  border-width: 0 0 1.5px 1.5px;
}

.right-gallery-panel .corner-br {
  bottom: 6px;
  right: 6px;
  border-width: 0 1.5px 1.5px 0;
}

.right-gallery-panel .panel-header {
  padding: 12px 16px 4px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: 1.8px;
  text-shadow: 0 0 8px rgba(255, 107, 26, 0.4);
}

#gallery-count {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-cyan);
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

/* Carousel Viewport & Track */
.carousel-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.carousel-track {
  position: absolute;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  top: 0;
  left: 0;
  right: 0;
}

/* Carousel Cards */
.carousel-item {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
  background: var(--bg-card);
}

/* Center Highlighted Card */
.carousel-item.big-card {
  width: 205px;
  height: 135px;
  opacity: 1.0;
  border: 1.5px solid var(--border-cyan-bright);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.3), inset 0 0 8px rgba(0, 229, 255, 0.15);
  filter: brightness(1.0);
  z-index: 10;
  display: block;
  transform: scale(1);
  transform-origin: center center;
}

.carousel-item.big-card:hover {
  transform: scale(1.025);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4), inset 0 0 10px rgba(0, 229, 255, 0.2);
}

/* 1-step neighbor cards */
.carousel-item.medium-card {
  width: 120px;
  height: 70px;
  opacity: 0.45;
  border: 1px solid rgba(0, 229, 255, 0.22);
  filter: brightness(0.55);
  z-index: 5;
  display: block;
}

.carousel-item.medium-card:hover {
  opacity: 0.75;
  border-color: var(--border-cyan-bright);
  filter: brightness(0.85);
}

/* 2-step neighbor cards */
.carousel-item.small-card {
  width: 98px;
  height: 54px;
  opacity: 0.25;
  border: 1px solid rgba(0, 229, 255, 0.12);
  filter: brightness(0.4);
  z-index: 3;
  display: block;
}

/* 3-step neighbor cards */
.carousel-item.faint-card {
  width: 78px;
  height: 42px;
  opacity: 0.12;
  border: 1px solid rgba(0, 229, 255, 0.06);
  filter: brightness(0.25);
  z-index: 1;
  display: block;
}

/* Hidden outside 7-card window */
.carousel-item.hidden-card {
  display: none !important;
}

.carousel-item-side-bar {
  position: absolute;
  right: 0;
  top: 10%;
  bottom: 10%;
  width: 3.5px;
  background: var(--text-cyan);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 0 8px var(--text-cyan), 0 0 12px rgba(0, 229, 255, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.carousel-item.big-card .carousel-item-side-bar {
  opacity: 1;
}

.carousel-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card Badge Overlay (Only visible on active card) */
.carousel-item-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(7, 12, 18, 0.96) 0%, rgba(7, 12, 18, 0.6) 65%, transparent 100%);
  padding: 8px 10px 6px;
  transition: opacity 0.3s;
  pointer-events: none;
}

.carousel-item:not(.big-card) .carousel-item-badge {
  opacity: 0;
}

.carousel-item.big-card .carousel-item-badge {
  opacity: 1;
}

.carousel-badge-title {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 107, 26, 0.4);
}

.carousel-badge-meta {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.carousel-badge-meta .badge-loc {
  color: var(--text-cyan);
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

.carousel-badge-meta .badge-status {
  color: var(--accent-orange);
  text-shadow: 0 0 6px rgba(255, 107, 26, 0.4);
}

/* Gallery Footer */
.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-cyan);
  user-select: none;
  z-index: 5;
}

.gallery-counter {
  color: var(--text-cyan);
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

.gallery-arrow-btn {
  background: transparent;
  border: none;
  color: var(--text-cyan);
  cursor: pointer;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  transition: transform 0.2s, filter 0.2s;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.gallery-arrow-btn:hover {
  transform: scale(1.25);
  filter: drop-shadow(0 0 6px var(--text-cyan));
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.08) 2px, rgba(0, 0, 0, 0.08) 4px);
  pointer-events: none;
  z-index: 10;
}

.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #ff6b1a66;
  border-style: solid;
  pointer-events: none;
  z-index: 6;
}

.corner-tl { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.corner-tr { top: 4px; right: 4px; border-width: 1px 1px 0 0; }
.corner-bl { bottom: 4px; left: 4px; border-width: 0 0 1px 1px; }
.corner-br { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }

.crosshair-x {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 26, 0.12), transparent);
  z-index: 4;
  pointer-events: none;
}

.crosshair-y {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 107, 26, 0.12), transparent);
  z-index: 4;
  pointer-events: none;
}

.coords {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  z-index: 8;
  background: rgba(5, 10, 18, 0.92);
  padding: 4px 12px;
  letter-spacing: 1px;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
}

.map-tooltip {
  position: absolute;
  background: rgba(6, 12, 20, 0.96);
  border: 1px solid #ff6b1a88;
  padding: 9px 11px;
  font-size: 11px;
  color: #d0a060;
  z-index: 25;
  display: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
  width: 230px;
  backdrop-filter: blur(6px);
  border-radius: 4px;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.map-tooltip.pinned {
  pointer-events: auto;
}

.map-tooltip-img {
  width: 100%;
  height: 115px;
  object-fit: cover;
  border: 1px solid #1a3040;
  margin-bottom: 7px;
  display: block;
  border-radius: 2px;
}

.btn-see-more {
  margin-top: 8px;
  width: 100%;
  background: var(--accent-orange);
  color: #06090e;
  border: none;
  padding: 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.2s;
}

.btn-see-more:hover {
  background: var(--accent-orange-hover);
}

.detail-img {
  width: 100%;
  height: 135px;
  object-fit: cover;
  border: 1px solid #1a3040;
  margin-bottom: 12px;
  display: block;
  border-radius: 2px;
}

.legend {
  position: absolute;
  bottom: 32px;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  z-index: 8;
  background: rgba(5, 10, 18, 0.92);
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.legend-item:last-child { margin-bottom: 0; }

.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ==========================================================================
   MINIMAL SYSTEM FOOTER
   ========================================================================== */
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: 25px;
  min-height: 25px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-main);
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  flex-shrink: 0;
  user-select: none;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.4));
}

.footer-icon svg {
  stroke: var(--text-cyan);
}

.footer-title,
.footer-motto {
  color: var(--text-muted);
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.2);
}

.footer-line-dots,
.footer-dots-line {
  color: var(--border-subtle);
  letter-spacing: 2px;
  font-size: 9px;
}

.zoom-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 15;
}

.zoom-btn {
  width: 28px;
  height: 28px;
  background: rgba(7, 14, 22, 0.92);
  border: 1px solid var(--border-subtle);
  color: #e8520a;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.zoom-btn:hover {
  background: #1a0a05;
  border-color: #e8520a88;
}

.zoom-btn:active {
  background: #2a1005;
}

.zoom-reset {
  font-size: 9px;
  letter-spacing: 1px;
  height: 20px;
  color: var(--text-muted);
  margin-top: 4px;
}

.zoom-level {
  position: absolute;
  top: 10px;
  left: 46px;
  font-size: 10px;
  color: var(--text-muted);
  z-index: 15;
  letter-spacing: 1px;
  background: rgba(5, 10, 18, 0.92);
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
}

#loading-overlay {
  position: absolute;
  inset: 0;
  background: #050810;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.4s ease;
}

#loading-overlay .ld-text {
  font-size: 12px;
  color: #e8520a;
  letter-spacing: 3px;
}

#loading-overlay .ld-sub {
  font-size: 10px;
  color: #2a5040;
}

/* ==========================================================================
   MAP HUD ACTIONS (TIMELINE & CONNECT LINE - ICON ONLY ORANGE TILES)
   ========================================================================== */
.map-actions-hud {
  position: absolute;
  bottom: 30px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 20;
}

.map-hud-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(7, 12, 18, 0.94);
  border: 1px solid rgba(255, 107, 26, 0.32);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  color: #ff6b1a;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.map-hud-btn svg {
  display: block;
  width: 15px;
  height: 15px;
  stroke: #ff6b1a;
  transition: transform 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

/* Inactive Hover State */
.map-hud-btn:hover {
  background: rgba(255, 107, 26, 0.1);
  border-color: rgba(255, 107, 26, 0.7);
  color: #ff8c42;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 12px rgba(255, 107, 26, 0.4);
  transform: scale(1.06);
}

.map-hud-btn:hover svg {
  stroke: #ff8c42;
  filter: drop-shadow(0 0 4px rgba(255, 107, 26, 0.6));
}

/* Active State */
.map-hud-btn.active {
  background: rgba(255, 107, 26, 0.18);
  border: 1.5px solid #ff6b1a;
  color: #ff6b1a;
  box-shadow: 0 0 14px rgba(255, 107, 26, 0.75), inset 0 0 8px rgba(255, 107, 26, 0.35);
}

.map-hud-btn.active svg {
  stroke: #ff6b1a;
  filter: drop-shadow(0 0 5px rgba(255, 107, 26, 0.8));
}

.map-hud-btn.active:hover {
  box-shadow: 0 0 18px rgba(255, 107, 26, 0.9), inset 0 0 10px rgba(255, 107, 26, 0.45);
  transform: scale(1.06);
}

/* ==========================================================================
   CONNECTION LINES LAYER (CL RADAR TRANSMISSION PATHS)
   ========================================================================== */
.connection-lines-layer {
  pointer-events: none;
}

.connection-lines-layer path {
  fill: none;
  stroke: #4dd0e1;
  stroke-width: 1.2px;
  stroke-opacity: 0.65;
  stroke-dasharray: 2.5 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: clFadeIn 0.3s ease-out forwards;
}

@keyframes clFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


.timeline-popup {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 150;
  align-items: center;
  justify-content: center;
  background: rgba(3, 7, 14, 0.85);
  backdrop-filter: blur(8px);
}

.timeline-popup.open {
  display: flex;
}

.timeline-box {
  background: #060e18;
  border: 1px solid #14354a;
  border-radius: 6px;
  width: min(840px, 94vw);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 180, 255, 0.08);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  user-select: none;
}

.timeline-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  flex-shrink: 0;
}

.timeline-box-title {
  font-size: 13px;
  font-weight: 600;
  color: #00e5ff;
  letter-spacing: 2px;
  font-family: 'Inter', system-ui, sans-serif;
}

.timeline-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.timeline-close:hover {
  color: #ffffff;
  transform: scale(1.1);
}

/* Top Controls Bar */
.timeline-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 6px 24px;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline-ctrl-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-ctrl-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.timeline-select-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 21, 33, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 4px;
  padding: 5px 12px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.timeline-select-pill:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 30, 48, 0.9);
}

.timeline-cal-icon {
  color: #38bdf8;
  flex-shrink: 0;
}

.timeline-chevron {
  color: #64748b;
  flex-shrink: 0;
}

/* Chart Canvas Area */
.timeline-chart-area {
  padding: 6px 20px 8px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.timeline-svg-wrap {
  width: 100%;
  height: 250px;
  position: relative;
}

.timeline-svg-wrap svg {
  display: block;
  overflow: visible;
}

/* Floating Tooltip */
.timeline-chart-tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  background: rgba(7, 15, 25, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  padding: 6px 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  font-family: 'Inter', system-ui, sans-serif;
  z-index: 50;
  white-space: nowrap;
}

.timeline-chart-tooltip .tt-date {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.timeline-chart-tooltip .tt-row {
  font-size: 10px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-chart-tooltip .tt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5500;
  display: inline-block;
  box-shadow: 0 0 6px rgba(255, 85, 0, 0.8);
}

/* Single Legend Row */
.timeline-legend-row {
  padding: 6px 10px 8px 46px;
  display: flex;
  align-items: center;
}

.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-legend-marker {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 24px;
  justify-content: center;
}

.timeline-legend-marker .legend-line {
  height: 2px;
  width: 7px;
  background: #ff5500;
  display: inline-block;
}

.timeline-legend-marker .legend-circle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid #ff5500;
  background: #ffffff;
  display: inline-block;
}

.timeline-legend-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
}

/* Bottom Stats Row (5 Columns with vertical separators) */
.timeline-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 18px;
  flex-shrink: 0;
  background: rgba(3, 8, 14, 0.4);
}

.timeline-stat-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-stat-col:last-child {
  border-right: none;
}

.timeline-stat-title {
  font-size: 10px;
  color: #5a7a8c;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.timeline-stat-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  font-family: 'Inter', system-ui, sans-serif;
}

.timeline-stat-num.stat-num-orange {
  color: #ff5500;
}

.timeline-stat-num.stat-num-cyan {
  color: #cbd5e1;
}

.timeline-stat-num.stat-num-brightcyan {
  color: #00e5ff;
}

.timeline-stat-num.stat-num-red {
  color: #ff3344;
}

/* Upper Middle Orange SEE MORE Button */
.upper-see-more-btn {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100 !important;
  background: #ff6b1a;
  color: #06090e;
  border: none;
  padding: 10px 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 107, 26, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  animation: upperBtnGlow 2s infinite alternate;
}

@keyframes upperBtnGlow {
  0% { box-shadow: 0 0 12px rgba(255, 107, 26, 0.4); }
  100% { box-shadow: 0 0 25px rgba(255, 107, 26, 0.75); }
}

.upper-see-more-btn:hover {
  background: #ff8542;
  transform: translateX(-50%) scale(1.04);
}

/* Tactical FBI-style Incident Detail Modal (Matching Reference Image) */
.incident-modal {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 16, 0.88);
  backdrop-filter: blur(8px);
}

.incident-modal.open { display: flex; }

.modal-box {
  background: #060b12;
  border: 1px solid #1c364a;
  width: min(920px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 6px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(58, 223, 255, 0.15);
  position: relative;
  color: #c0d8e8;
  font-family: 'Inter', sans-serif;
}

.modal-close-tactical {
  background: #0d1e2c;
  border: 1px solid #1e3a50;
  color: #3adfff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
}

.modal-close-tactical:hover {
  background: #1c1008;
  border-color: #ff6b1a;
  color: #ff6b1a;
}

.modal-header-tactical {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1c364a;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.modal-title-tactical {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #3adfff;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.modal-body-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .modal-body-grid {
    grid-template-columns: 1fr;
  }
}

.modal-desc-tactical {
  font-size: 12px;
  line-height: 1.6;
  color: #a0c4d8;
  margin-bottom: 18px;
  font-family: 'Inter', sans-serif;
}

.btn-download-image {
  background: transparent;
  border: 1px solid #1e3d54;
  color: #3adfff;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 3px;
  margin-bottom: 22px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-download-image:hover {
  background: #0e2438;
  border-color: #3adfff;
  box-shadow: 0 0 12px rgba(58, 223, 255, 0.35);
  color: #ffffff;
}

.meta-table-tactical {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
}

.meta-row-tactical {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #122434;
  padding-bottom: 5px;
}

.meta-label-tactical {
  color: #5a889e;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.meta-val-tactical {
  color: #a8dcf0;
  text-align: right;
}

.modal-img-container {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 1px solid #1c364a;
  border-radius: 4px;
  overflow: hidden;
  background: #040810;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.modal-img-tactical {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   Mobile Warning Screen (Past Mobile Restricted Interface)
   ========================================================================== */
.mobile-warning {
  display: none;
}

@media (max-width: 800px) {
  /* Dim background interface */
  .topbar,
  .secondary-bar,
  .main,
  .bottombar {
    opacity: 0.38;
    filter: blur(0.8px) brightness(0.65);
    pointer-events: none !important;
    user-select: none !important;
  }

  .incident-modal,
  .timeline-popup {
    display: none !important;
  }

  body {
    background: #04070c;
    overflow: hidden !important;
    height: 100vh;
    width: 100vw;
  }

  /* Fullscreen mobile restriction overlay */
  .mobile-warning {
    display: flex !important;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(6, 10, 16, 0.74) 0%, rgba(2, 4, 8, 0.90) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 999999;
    cursor: pointer;
    user-select: none;
  }

  /* Screen Warning Perimeter Flash */
  .mobile-flash-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 35%, rgba(255, 42, 95, 0.32) 100%);
    opacity: 0;
    z-index: 25;
  }

  .mobile-flash-overlay.flash-active {
    animation: mobileFlashFade 0.35s ease-out forwards;
  }

  @keyframes mobileFlashFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
  }

  /* Shockwave Pulse Ring Effect (Emanates from card perimeter) */
  .mobile-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(350px, 88vw);
    height: 180px;
    margin-left: max(-175px, -44vw);
    margin-top: -90px;
    border-radius: 6px;
    border: 2px solid #ff2a5f;
    box-shadow: 
      0 0 30px rgba(255, 42, 95, 0.95),
      0 0 60px rgba(255, 42, 95, 0.55),
      inset 0 0 20px rgba(255, 42, 95, 0.4);
    pointer-events: none;
    opacity: 0;
    z-index: 45;
    transform: rotate(-6.5deg) scale(0.98);
  }

  .mobile-pulse-ring.pulse-active {
    animation: mobilePulseRingExpand 0.55s cubic-bezier(0.1, 0.8, 0.25, 1) forwards;
  }

  @keyframes mobilePulseRingExpand {
    0% {
      opacity: 1;
      transform: rotate(-6.5deg) scale(0.98);
    }
    100% {
      opacity: 0;
      transform: rotate(-6.5deg) scale(1.42);
    }
  }

  /* Hazard Caution Tape Strips */
  .tape-strip {
    position: absolute;
    width: 320vw;
    left: -110vw;
    height: 42px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: repeating-linear-gradient(
      -60deg,
      #f5b800 0px,
      #f5b800 10px,
      #12151b 10px,
      #12151b 20px
    );
    box-shadow: 
      0 12px 35px rgba(0, 0, 0, 0.95),
      0 4px 12px rgba(0, 0, 0, 0.8),
      inset 0 1px 2px rgba(255, 255, 255, 0.25),
      inset 0 -1px 2px rgba(0, 0, 0, 0.6);
    pointer-events: none;
  }

  .tape-diagonal-1 {
    top: 41%;
    transform: rotate(-17deg);
    z-index: 10;
  }

  .tape-diagonal-2 {
    top: 57%;
    transform: rotate(16deg);
    z-index: 15;
  }

  .tape-diagonal-top {
    top: 34%;
    transform: rotate(-6deg);
    z-index: 5;
    opacity: 0.95;
  }

  .tape-diagonal-bottom {
    top: 73%;
    transform: rotate(10deg);
    z-index: 6;
    opacity: 0.95;
  }

  .tape-track {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-around;
  }

  .tape-track span {
    font-family: 'Orbitron', 'Rajdhani', monospace, sans-serif;
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 4.5px;
    color: #0b0e14;
    -webkit-text-stroke: 0.6px rgba(245, 184, 0, 0.85);
    text-shadow: 0 0 1px #f5b800;
    white-space: nowrap;
    text-transform: uppercase;
    padding: 0 20px;
  }

  /* Center Restricted Card */
  .mobile-warning .restricted-card {
    position: relative;
    z-index: 50;
    background: 
      repeating-linear-gradient(
        -45deg,
        rgba(245, 184, 0, 0.05) 0px,
        rgba(245, 184, 0, 0.05) 12px,
        transparent 12px,
        transparent 24px
      ),
      #090c12;
    border: 1.5px solid #ff2a5f;
    box-shadow: 
      0 0 25px rgba(255, 42, 95, 0.65),
      0 0 50px rgba(255, 42, 95, 0.3),
      inset 0 0 20px rgba(255, 42, 95, 0.18),
      0 20px 45px rgba(0, 0, 0, 0.95);
    padding: 22px 28px 20px;
    width: min(340px, 86vw);
    transform: rotate(-6.5deg);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }

  .mobile-warning .card-inner-border {
    position: relative;
    border: 1px dashed rgba(255, 42, 95, 0.45);
    padding: 18px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  /* Restricted circular glowing badge */
  .mobile-warning .restricted-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ff2a5f;
    box-shadow: 
      0 0 16px #ff2a5f,
      0 0 28px rgba(255, 42, 95, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
  }

  .mobile-warning .restricted-bar {
    width: 16px;
    height: 4px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 0 4px #ffffff;
  }

  .mobile-warning .restricted-heading {
    font-family: 'Orbitron', monospace;
    font-size: clamp(16px, 5vw, 20px);
    font-weight: 800;
    letter-spacing: 3.5px;
    color: #ff2a5f;
    text-shadow: 
      0 0 10px rgba(255, 42, 95, 0.95),
      0 0 24px rgba(255, 42, 95, 0.55);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-warning .restricted-sub {
    font-family: 'Share Tech Mono', 'Rajdhani', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #ff7597;
    opacity: 0.85;
    text-shadow: 0 0 6px rgba(255, 117, 151, 0.5);
    text-transform: uppercase;
    transition: all 0.25s ease;
  }

  /* Denied Shake Animation on tap */
  .mobile-warning .restricted-card.denied-shake {
    animation: authShakeMobile 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: #ff3b6c;
  }

  .mobile-warning .restricted-card.denied-shake .restricted-heading {
    animation: headingGlitchMobile 0.5s ease both;
  }

  .mobile-warning .restricted-card.denied-shake .restricted-icon {
    animation: iconGlitchMobile 0.5s ease both;
  }

  @keyframes authShakeMobile {
    0% {
      transform: rotate(-6.5deg) scale(1);
      box-shadow: 
        0 0 25px rgba(255, 42, 95, 0.65),
        0 0 50px rgba(255, 42, 95, 0.3),
        inset 0 0 20px rgba(255, 42, 95, 0.18),
        0 20px 45px rgba(0, 0, 0, 0.95);
    }
    12% {
      transform: translate3d(-10px, 2px, 0) rotate(-9deg) scale(1.03);
      box-shadow: 
        0 0 45px rgba(255, 42, 95, 1),
        0 0 85px rgba(255, 42, 95, 0.75),
        inset 0 0 30px rgba(255, 42, 95, 0.45),
        0 20px 45px rgba(0, 0, 0, 0.95);
    }
    26% {
      transform: translate3d(9px, -2px, 0) rotate(-4.2deg) scale(1.02);
      box-shadow: 
        0 0 40px rgba(255, 42, 95, 0.95),
        0 0 75px rgba(255, 42, 95, 0.65),
        inset 0 0 25px rgba(255, 42, 95, 0.35),
        0 20px 45px rgba(0, 0, 0, 0.95);
    }
    40% {
      transform: translate3d(-8px, 1px, 0) rotate(-8.2deg) scale(1.01);
    }
    54% {
      transform: translate3d(6px, -1px, 0) rotate(-5.2deg) scale(1.01);
    }
    68% {
      transform: translate3d(-4px, 1px, 0) rotate(-7.2deg) scale(1);
    }
    82% {
      transform: translate3d(2px, 0, 0) rotate(-6.2deg) scale(1);
    }
    100% {
      transform: translate3d(0, 0, 0) rotate(-6.5deg) scale(1);
      box-shadow: 
        0 0 25px rgba(255, 42, 95, 0.65),
        0 0 50px rgba(255, 42, 95, 0.3),
        inset 0 0 20px rgba(255, 42, 95, 0.18),
        0 20px 45px rgba(0, 0, 0, 0.95);
    }
  }

  @keyframes headingGlitchMobile {
    0% {
      text-shadow: 0 0 10px rgba(255, 42, 95, 0.95), 0 0 24px rgba(255, 42, 95, 0.55);
    }
    15% {
      text-shadow: -3px 0 #00ffff, 3px 0 #ff0055, 0 0 20px #ff2a5f;
      transform: skewX(-2.5deg);
    }
    30% {
      text-shadow: 3px 0 #00ffff, -3px 0 #ff0055, 0 0 18px #ff2a5f;
      transform: skewX(2deg);
    }
    50% {
      text-shadow: -1.5px 0 #00ffff, 1.5px 0 #ff0055, 0 0 14px #ff2a5f;
      transform: skewX(0);
    }
    100% {
      text-shadow: 0 0 10px rgba(255, 42, 95, 0.95), 0 0 24px rgba(255, 42, 95, 0.55);
    }
  }

  @keyframes iconGlitchMobile {
    0%, 100% {
      background: #ff2a5f;
      box-shadow: 0 0 16px #ff2a5f, 0 0 28px rgba(255, 42, 95, 0.8);
      transform: scale(1);
    }
    20%, 40% {
      background: #ffffff;
      box-shadow: 0 0 25px #ffffff, 0 0 50px #ff2a5f;
      transform: scale(1.16);
    }
  }
}

@media (max-width: 500px) {
  .tape-strip {
    height: 38px;
    width: 360vw;
    left: -130vw;
  }

  .tape-diagonal-top {
    top: 24%;
    transform: rotate(-10deg);
  }

  .tape-diagonal-1 {
    top: 41%;
    transform: rotate(-21deg);
  }

  .tape-diagonal-2 {
    top: 58%;
    transform: rotate(20deg);
  }

  .tape-diagonal-bottom {
    top: 76%;
    transform: rotate(11deg);
  }

  .mobile-warning .restricted-card {
    padding: 20px 20px 18px;
  }
}
