/* WorldView — Spy Telescope / God's Eye Aesthetic */
/* Dark military-grade globe interface with crosshairs, range rings, HUD overlays */

/* Scope viewport — circular mask over globe */
.scope-viewport {
  position: relative;
  overflow: hidden;
  background: #000;
}
.scope-viewport::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Vignette / circular scope edge */
  background: radial-gradient(circle at center,
    transparent 35%,
    rgba(0,0,0,0.15) 55%,
    rgba(0,0,0,0.4) 70%,
    rgba(0,0,0,0.7) 85%,
    rgba(0,0,0,0.95) 100%
  );
  pointer-events: none;
  z-index: 5;
}

/* Crosshairs overlay */
.scope-crosshairs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.scope-crosshairs::before,
.scope-crosshairs::after {
  content: '';
  position: absolute;
  background: rgba(0, 212, 170, 0.15);
}
.scope-crosshairs::before {
  /* Horizontal line */
  top: 50%;
  left: 10%;
  right: 10%;
  height: 1px;
  transform: translateY(-0.5px);
}
.scope-crosshairs::after {
  /* Vertical line */
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  transform: translateX(-0.5px);
}

/* Range rings */
.scope-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.scope-rings::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  height: 40%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 212, 170, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(0, 212, 170, 0.04),
    0 0 0 120px rgba(0, 212, 170, 0.03),
    0 0 0 180px rgba(0, 212, 170, 0.02);
}

/* Compass markers */
.scope-compass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: rgba(0, 212, 170, 0.25);
  font-weight: 700;
}
.scope-compass .n { position: absolute; top: 8%; left: 50%; transform: translateX(-50%); }
.scope-compass .s { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); }
.scope-compass .e { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); }
.scope-compass .w { position: absolute; left: 8%; top: 50%; transform: translateY(-50%); }

/* View mode filters */
.view-mode-eo { /* Normal electro-optical — no filter */ }

/* FLIR Thermal — orange/yellow hot palette */
.view-mode-flir canvas {
  filter: sepia(0.8) saturate(3) hue-rotate(-10deg) brightness(0.85) contrast(1.4);
}

/* Night Vision — distinctive green tint */
.view-mode-nv canvas {
  filter: sepia(0.15) saturate(1.8) hue-rotate(75deg) brightness(1.3) contrast(1.15);
}

/* CRT — slightly desaturated with scan lines */
.view-mode-crt canvas {
  filter: saturate(0.6) brightness(0.85) contrast(1.2);
}

/* CRT scan lines */
.view-mode-crt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 7;
}

/* Night vision green overlay + noise */
.view-mode-nv::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.06);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 7;
}

/* FLIR thermal tint overlay */
.view-mode-flir::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 140, 0, 0.04);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 7;
}

/* HUD info panels */
.hud-panel {
  position: absolute;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #94a3b8;
  z-index: 10;
  pointer-events: auto;
}

/* Layer toggle panel */
.layer-toggle-panel {
  position: absolute;
  top: 60px;
  left: 10px;
  z-index: 10;
  pointer-events: auto;
}
.layer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background .15s;
  font-size: 10px;
  color: #64748b;
}
.layer-toggle:hover { background: rgba(0, 212, 170, 0.08); color: #e2e8f0; }
.layer-toggle.active { color: #00d4aa; }
.layer-toggle .lt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #374151;
  transition: background .15s;
}
.layer-toggle.active .lt-dot { background: #00d4aa; box-shadow: 0 0 6px rgba(0, 212, 170, 0.5); }

/* View mode selector */
.view-mode-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 3px;
  z-index: 10;
  pointer-events: auto;
}
.view-mode-btn {
  padding: 4px 10px;
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: 4px;
  color: #64748b;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 0.5px;
}
.view-mode-btn:hover { border-color: rgba(0, 212, 170, 0.4); color: #e2e8f0; }
.view-mode-btn.active { background: rgba(0, 212, 170, 0.15); border-color: #00d4aa; color: #00d4aa; }

/* Full-width timeline bar at bottom */
.worldview-timeline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0, 212, 170, 0.15);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #64748b;
  z-index: 10;
  pointer-events: auto;
}
.worldview-timeline input[type="range"] {
  flex: 1;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: #1a2332;
  border-radius: 2px;
  outline: none;
}
.worldview-timeline input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00d4aa;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 212, 170, 0.5);
}

/* Coordinate display */
.coord-display {
  position: absolute;
  bottom: 45px;
  left: 16px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: rgba(0, 212, 170, 0.4);
  z-index: 6;
  pointer-events: none;
}

/* Status indicators in corners */
.hud-corner-tl { position: absolute; top: 10px; left: 10px; }
.hud-corner-tr { position: absolute; top: 10px; right: 10px; }
.hud-corner-bl { position: absolute; bottom: 45px; left: 10px; }
.hud-corner-br { position: absolute; bottom: 45px; right: 10px; }

/* === V52.0 — COMMAND CENTER HUD ENHANCEMENTS === */

/* Glassmorphism HUD panels — frosted glass with animated border */
@keyframes hudBorderFlow{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
.hud-panel-glass {
  position: absolute;
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(0, 212, 170, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #94a3b8;
  z-index: 10;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
}
.hud-panel-glass::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,212,170,.3), rgba(14,165,233,.15), rgba(139,92,246,.15), rgba(0,212,170,.3));
  background-size: 300% 300%;
  animation: hudBorderFlow 8s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .5;
}

/* Status bar — threat-level glow */
.cc-status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #64748b;
  z-index: 100;
  border-top: 1px solid rgba(0, 212, 170, 0.1);
  transition: border-color .5s, box-shadow .5s;
}
.cc-status-bar.level-normal { border-top-color: rgba(34,197,94,.3); box-shadow: 0 -2px 20px rgba(34,197,94,.05); }
.cc-status-bar.level-guarded { border-top-color: rgba(14,165,233,.3); box-shadow: 0 -2px 20px rgba(14,165,233,.08); }
.cc-status-bar.level-elevated { border-top-color: rgba(245,158,11,.4); box-shadow: 0 -2px 25px rgba(245,158,11,.1); }
.cc-status-bar.level-high { border-top-color: rgba(249,115,22,.5); box-shadow: 0 -2px 30px rgba(249,115,22,.12); }
.cc-status-bar.level-critical { border-top-color: rgba(239,68,68,.6); box-shadow: 0 -4px 40px rgba(239,68,68,.15); animation: dangerGlow 2s ease-in-out infinite; }

/* Corner brackets — tactical framing on HUD panels */
.hud-brackets::before,
.hud-brackets::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(0, 212, 170, 0.3);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}
.hud-brackets::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
  border-radius: 3px 0 0 0;
}
.hud-brackets::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 3px 0;
}

/* Command Center body class — fullscreen dark with grid */
body.command-center-active {
  background: #060a10;
  overflow: hidden;
}
body.command-center-active .main {
  background-image:
    linear-gradient(rgba(0,212,170,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Floating intel chip — small status badges in HUD */
.intel-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: rgba(0,212,170,.1);
  border: 1px solid rgba(0,212,170,.2);
  color: #00d4aa;
}
.intel-chip.danger { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.2); color: #ef4444; }
.intel-chip.warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.2); color: #f59e0b; }

/* Temporal event pulse dots */
@keyframes temporalPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scope-viewport::after,
  .view-mode-crt::before,
  .view-mode-nv::before { display: none; }
  .hud-panel-glass::after { animation: none; }
  .cc-status-bar.level-critical { animation: none; }
}
