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

:root {
  --bg-obsidian: #070b14;
  --bg-panel: rgba(13, 21, 39, 0.78);
  --bg-panel-solid: #0d1527;
  --border-tactical: rgba(56, 189, 248, 0.22);
  --border-tactical-hover: rgba(56, 189, 248, 0.55);
  --accent-cyan: #38bdf8;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --text-primary: #f1f5f9;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow: hidden;
  user-select: none;
}

h1, h2, h3, .font-heading {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Glassmorphic Tactical Panels */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-tactical);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.55), inset 0 0 12px 0 rgba(56, 189, 248, 0.05);
}

.glass-panel-hover:hover {
  border-color: var(--border-tactical-hover);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.65), 0 0 16px 0 rgba(56, 189, 248, 0.15);
}

/* Corner bracket accents for sci-fi look */
.sci-fi-corners {
  position: relative;
}
.sci-fi-corners::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent-cyan);
  border-left: 2px solid var(--accent-cyan);
  pointer-events: none;
}
.sci-fi-corners::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--accent-cyan);
  border-right: 2px solid var(--accent-cyan);
  pointer-events: none;
}

/* Tactical Pulse Dot */
@keyframes tacticalPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.pulse-indicator {
  animation: tacticalPulse 2.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes sunPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.sun-pulse {
  animation: sunPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Custom Tactical Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: #1e293b;
  height: 6px;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6px;
  background-color: var(--accent-cyan);
  height: 18px;
  width: 18px;
  border-radius: 50%;
  border: 2px solid #070b14;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 14px rgba(56, 189, 248, 1);
}

input[type="range"]::-moz-range-track {
  background: #1e293b;
  height: 6px;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

input[type="range"]::-moz-range-thumb {
  background-color: var(--accent-cyan);
  height: 18px;
  width: 18px;
  border-radius: 50%;
  border: 2px solid #070b14;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(7, 11, 20, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* 3D Planet Tag Labels (CSS2D-style or HTML overlays) */
.planet-tag {
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 11px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Scanline Overlay (ultra-subtle) */
.scanlines {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0) 50%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0.25)
  );
  background-size: 100% 4px;
  pointer-events: none;
}

/* Reticle / Radar Grid Background for telemetry card */
.telemetry-grid {
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Smooth fade transitions */
.fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Dock item active glowing border */
.dock-item.active {
  border-color: var(--accent-cyan);
  background-color: rgba(56, 189, 248, 0.18);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* Tooltip */
.hud-tooltip {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}
.has-tooltip:hover .hud-tooltip {
  visibility: visible;
  opacity: 1;
}
