/* ==========================================================================
   WARDRIVER.ONLINE // ANUBIS DARKWATCH — Tactical Cyber HUD Theme v3.0
   ========================================================================== */

:root {
  /* Core Surfaces */
  --bg-void: #05090e;
  --bg-obsidian: #080f17;
  --bg-panel: rgba(10, 19, 30, 0.84);
  --bg-panel-solid: #0b1521;
  --bg-panel-elevated: rgba(14, 27, 42, 0.92);
  --bg-input: rgba(6, 12, 20, 0.9);
  --bg-hover: rgba(0, 255, 159, 0.08);

  /* Borders */
  --border-subtle: rgba(100, 165, 205, 0.16);
  --border-medium: rgba(0, 255, 159, 0.28);
  --border-strong: rgba(0, 255, 159, 0.6);
  --border-cyan: rgba(0, 229, 255, 0.35);

  /* Neon Tactical Accents */
  --neon-green: #00ff9f;
  --neon-green-dim: rgba(0, 255, 159, 0.14);
  --neon-cyan: #00e5ff;
  --neon-cyan-dim: rgba(0, 229, 255, 0.14);
  --neon-amber: #ffb020;
  --neon-amber-dim: rgba(255, 176, 32, 0.15);
  --neon-crimson: #ff3b6b;
  --neon-crimson-dim: rgba(255, 59, 107, 0.16);
  --neon-violet: #b47cff;
  --neon-violet-dim: rgba(180, 124, 255, 0.16);

  /* High-Contrast Typography */
  --text-primary: #eef6fc;
  --text-secondary: #a8c2d8;
  --text-muted: #7693ab;
  --text-faint: #577188;

  /* Fonts */
  --font-display: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --font-ui: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-panel: 0 12px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --glow-green: 0 0 22px rgba(0, 255, 159, 0.25);
  --glow-cyan: 0 0 22px rgba(0, 229, 255, 0.25);
  --glow-crimson: 0 0 18px rgba(255, 59, 107, 0.25);

  /* Layout */
  --max-width: 1380px;
  --header-h: 64px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 255, 159, 0.09), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(0, 229, 255, 0.06), transparent 55%);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle CRT Scanline Overlay (toggled off in stealth mode) */
body:not(.stealth-mode)::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0) 4px
  );
  opacity: 0.32;
}

#radarBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  transition: opacity 0.35s ease;
}

body.stealth-mode #radarBg {
  opacity: 0.12;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

a:hover {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.45);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(5, 10, 16, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(118, 147, 171, 0.32);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 159, 0.45);
}

/* Shell Wrapper */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Brand Bar */
.brand-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(5, 10, 16, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 10px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-crest {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0, 255, 159, 0.38));
  transition: transform 0.25s ease;
}

.brand-identity:hover .brand-crest {
  transform: scale(1.06);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--neon-green);
  text-shadow: 0 0 12px rgba(0, 255, 159, 0.35);
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  margin-top: 2px;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 255, 159, 0.08);
  border: 1px solid rgba(0, 255, 159, 0.3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.7px;
  color: var(--neon-green);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.fx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(14, 27, 42, 0.75);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.fx-toggle:hover {
  border-color: var(--border-cyan);
  color: var(--neon-cyan);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 21, 33, 0.65);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.social-link:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(0, 255, 159, 0.1);
}

/* Hero Command Banner */
.hero-banner {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(8, 16, 26, 0.65) 0%, rgba(5, 9, 14, 0.2) 100%);
}

.hero-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

.hero-title {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.08;
  color: var(--text-primary);
  text-transform: uppercase;
}

.hero-title .accent {
  color: var(--neon-green);
  text-shadow: 0 0 24px rgba(0, 255, 159, 0.42);
}

/* Subtle Glitch Effect on Hero Title */
body:not(.stealth-mode) .hero-title.glitch {
  animation: titleGlow 5s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 92%, 100% {
    text-shadow: 0 0 18px rgba(0, 255, 159, 0.24);
  }
  94% {
    text-shadow: -2px 0 rgba(255, 59, 107, 0.75), 2px 0 rgba(0, 229, 255, 0.75);
  }
  96% {
    text-shadow: 2px 0 rgba(0, 255, 159, 0.7), -1px 0 rgba(255, 59, 107, 0.6);
  }
}

.hero-subtitle {
  margin-top: 8px;
  max-width: 680px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Telemetry Strip */
.telemetry-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.tele-card {
  position: relative;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tele-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--card-accent, var(--neon-green));
  opacity: 0.85;
}

.tele-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.tele-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tele-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.tele-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Primary Navigation Tabs */
.cmd-nav-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 150;
  background: rgba(6, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.cmd-nav::-webkit-scrollbar {
  display: none;
}

.tab-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.18s ease;
}

.nav-tab svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
}

.nav-tab.active {
  color: var(--neon-green);
  background: rgba(0, 255, 159, 0.1);
  border-color: rgba(0, 255, 159, 0.45);
  box-shadow: inset 0 0 14px rgba(0, 255, 159, 0.08);
}

.nav-tab.active svg {
  opacity: 1;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--neon-cyan);
  font-size: 10px;
  font-weight: 700;
}

.nav-tab.active .tab-badge {
  background: rgba(0, 255, 159, 0.22);
  color: var(--neon-green);
}

.nav-shortcut {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.nav-status-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Main Workspace Area */
.workspace-main {
  flex: 1;
  padding: 24px 0 48px;
}

.tab-panel {
  display: none;
  animation: fadeSlideIn 0.22s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Tactical Panel Card */
.hud-panel {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.hud-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 15, 24, 0.65);
  flex-wrap: wrap;
}

.hud-panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--neon-green);
}

.hud-panel-title svg {
  width: 16px;
  height: 16px;
}

.hud-panel-body {
  padding: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(14, 27, 42, 0.85);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn:hover:not(:disabled) {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(0, 255, 159, 0.22), rgba(0, 229, 255, 0.16));
  border-color: rgba(0, 255, 159, 0.65);
  color: var(--neon-green);
  box-shadow: var(--glow-green);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 255, 159, 0.34), rgba(0, 229, 255, 0.24));
  border-color: var(--neon-green);
  color: #ffffff;
  box-shadow: 0 0 28px rgba(0, 255, 159, 0.38);
}

.btn-cyan {
  background: rgba(0, 229, 255, 0.14);
  border-color: rgba(0, 229, 255, 0.55);
  color: var(--neon-cyan);
}

.btn-cyan:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.25);
  color: #ffffff;
  box-shadow: var(--glow-cyan);
}

.btn-amber {
  background: rgba(255, 176, 32, 0.14);
  border-color: rgba(255, 176, 32, 0.5);
  color: var(--neon-amber);
}

.btn-amber:hover:not(:disabled) {
  background: rgba(255, 176, 32, 0.25);
  color: #ffffff;
}

.btn-danger {
  background: rgba(255, 59, 107, 0.12);
  border-color: rgba(255, 59, 107, 0.45);
  color: var(--neon-crimson);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 59, 107, 0.24);
  color: #ffffff;
  border-color: var(--neon-crimson);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 11px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 9, 14, 0.92);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-meta a {
  color: var(--neon-cyan);
}

.footer-privacy {
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(100, 165, 205, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  background: rgba(8, 17, 28, 0.96);
  border: 1px solid var(--border-medium);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  animation: toastIn 0.22s ease;
}

.toast.toast-warn { border-color: rgba(255, 176, 32, 0.6); }
.toast.toast-error { border-color: rgba(255, 59, 107, 0.65); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive Breakpoints */
@media (max-width: 1140px) {
  .telemetry-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nav-shortcut {
    display: none;
  }
}

@media (max-width: 720px) {
  .container, .brand-bar-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
  .telemetry-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .privacy-pill span.hide-sm {
    display: none;
  }
  .nav-shortcut {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
