@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --color-obsidian: #050811;
  --color-panel: #0b1325;
  --color-panel-border: rgba(56, 189, 248, 0.22);
  --color-cyan: #38bdf8;
  --color-crimson: #ef4444;
  --color-amber: #f59e0b;
  --color-emerald: #10b981;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-display: 'Rajdhani', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--color-obsidian);
  color: #e2e8f0;
  font-family: var(--font-mono);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Custom Scrollbar for Sci-fi HUD */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(11, 19, 37, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.8);
}

/* Mission Control Glass Panels */
.hud-panel {
  background: rgba(11, 19, 37, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-panel-border);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(56, 189, 248, 0.06);
}

.hud-panel-crimson {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(239, 68, 68, 0.1);
}

/* CRT Scanline Effect */
.scanlines {
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.015),
    rgba(0, 255, 0, 0.005),
    rgba(0, 0, 255, 0.015)
  );
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
}

/* Glowing accents */
.glow-cyan {
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.7), 0 0 20px rgba(56, 189, 248, 0.4);
}

.glow-crimson {
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.8), 0 0 20px rgba(239, 68, 68, 0.45);
}

.glow-amber {
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

/* Tool Buttons */
.tool-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tool-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.25), transparent);
  transition: 0.5s;
}

.tool-btn:hover::after {
  left: 100%;
}

.tool-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45), inset 0 0 10px rgba(56, 189, 248, 0.2);
}

.tool-btn.active-crimson {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.5), inset 0 0 12px rgba(239, 68, 68, 0.25);
}

/* Analytics Tab Navigation */
.analytics-tab {
  transition: all 0.15s ease-in-out;
  border-bottom: 2px solid transparent;
}

.analytics-tab.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

/* Radar pulse animation */
@keyframes radar-pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.radar-ping {
  animation: radar-pulse 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #14223d;
  border-radius: 4px;
  height: 5px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 12px #38bdf8;
  border: 2px solid #050811;
  transition: transform 0.1s, box-shadow 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 18px #38bdf8;
}

/* Reticle Cursor overlay */
#targeting-reticle {
  pointer-events: none !important;
  position: fixed !important;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 50;
}

#targeting-reticle * {
  pointer-events: none !important;
}

/* Dialog Modals */
dialog.hud-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 90vw;
  width: 680px;
}

dialog.hud-dialog::backdrop {
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* CRT Blip / Corner Accents */
.corner-tl {
  position: absolute; top: 0; left: 0; width: 8px; height: 8px;
  border-top: 2px solid var(--color-cyan); border-left: 2px solid var(--color-cyan);
}
.corner-tr {
  position: absolute; top: 0; right: 0; width: 8px; height: 8px;
  border-top: 2px solid var(--color-cyan); border-right: 2px solid var(--color-cyan);
}
.corner-bl {
  position: absolute; bottom: 0; left: 0; width: 8px; height: 8px;
  border-bottom: 2px solid var(--color-cyan); border-left: 2px solid var(--color-cyan);
}
.corner-br {
  position: absolute; bottom: 0; right: 0; width: 8px; height: 8px;
  border-bottom: 2px solid var(--color-cyan); border-right: 2px solid var(--color-cyan);
}
