/* NSSDC Cosmic Explorer - Modern Dark Space Observatory Theme */

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0d1527;
  --bg-card: rgba(16, 26, 48, 0.75);
  --bg-card-hover: rgba(23, 38, 70, 0.85);
  --border-color: rgba(64, 120, 220, 0.22);
  --border-focus: rgba(0, 210, 255, 0.6);
  --text-primary: #e6f1ff;
  --text-secondary: #8ba2c7;
  --text-muted: #53698c;
  --accent-cyan: #00d2ff;
  --accent-blue: #3a86ff;
  --accent-purple: #8338ec;
  --accent-orange: #ff9f1c;
  --accent-gold: #ffd166;
  --accent-red: #ff3366;
  --accent-green: #06d6a0;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 210, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(131, 56, 236, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(58, 134, 255, 0.03) 0%, transparent 60%);
}

/* Header & Navigation */
.header-glass {
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-badge {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(58, 134, 255, 0.25));
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.nav-tab-btn {
  transition: all 0.25s ease;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
}

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

.nav-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.08);
}

/* Glassmorphic Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 12px 40px rgba(0, 210, 255, 0.08);
}

/* Canvas & Visualization Containers */
.canvas-container {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #03060a;
  border: 1px solid rgba(64, 120, 220, 0.2);
}

/* 3D Fleet HUD Overlay */
.hud-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  pointer-events: auto;
}

.hud-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
}

/* Badge Tags */
.badge-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-solar {
  background: rgba(255, 159, 28, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 159, 28, 0.35);
}

.badge-astro {
  background: rgba(131, 56, 236, 0.15);
  color: #b388ff;
  border: 1px solid rgba(131, 56, 236, 0.35);
}

.badge-planetary {
  background: rgba(255, 51, 102, 0.15);
  color: #ff6b8b;
  border: 1px solid rgba(255, 51, 102, 0.35);
}

.badge-geo {
  background: rgba(6, 214, 160, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(6, 214, 160, 0.35);
}

/* Buttons */
.btn-action {
  background: linear-gradient(135deg, #0088cc, #0055aa);
  color: white;
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-action:hover {
  background: linear-gradient(135deg, #00aaff, #0077cc);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-outline.active {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Custom Sliders */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1b283d;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 12, 20, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(64, 120, 220, 0.4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Glow effects */
.glow-cyan {
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
}

.glow-orange {
  box-shadow: 0 0 20px rgba(255, 159, 28, 0.25);
}

.glow-purple {
  box-shadow: 0 0 20px rgba(131, 56, 236, 0.25);
}

/* Code block styling */
pre, code {
  font-family: var(--font-mono);
}

.code-snippet {
  background: #060911;
  border: 1px solid rgba(64, 120, 220, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: #a5d6ff;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* Radar Canvas styles */
#radargramCanvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Tooltip & Popover */
.stat-box {
  background: rgba(13, 21, 39, 0.7);
  border: 1px solid rgba(64, 120, 220, 0.25);
  border-radius: 8px;
  padding: 10px;
}
