:root {
  --bg-deep-space: #02040a;
  --bg-space-dark: #060b18;
  --bg-card: rgba(8, 14, 28, 0.72);
  --bg-card-hover: rgba(12, 20, 38, 0.85);
  
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-glow: rgba(56, 189, 248, 0.35);
  
  --text-pure: #ffffff;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-sun: #f59e0b;
  --color-mercury: #cbd5e1;
  --color-venus: #facc15;
  --color-earth: #38bdf8;
  --color-mars: #f87171;
  --color-jupiter: #fb923c;
  --color-saturn: #fde047;
  --color-uranus: #22d3ee;
  --color-neptune: #60a5fa;
  
  --accent-cyan: #00f0ff;
  --accent-gold: #f59e0b;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep-space);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
  background-color: var(--bg-deep-space);
}

/* Fixed 3D Canvas Background */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none; /* Pointer-events toggled when Free Cam is on */
}

#webgl-canvas.interactive-mode {
  pointer-events: auto !important;
  cursor: grab;
  z-index: 40 !important; /* In front of story content so mouse controls work anywhere! */
}

#webgl-canvas.interactive-mode:active {
  cursor: grabbing;
}

/* Conceal story cards completely during free cam mode for unobstructed cosmic exploration */
body.free-cam-active .content-panel {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.free-cam-active .scroll-prompt {
  opacity: 0;
  pointer-events: none;
}

/* Earth POV Night Sky Guide Banner */
.earthpov-guide-banner {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: rgba(6, 12, 26, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 9999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.25);
  color: #e2e8f0;
  font-size: 0.82rem;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.earthpov-guide-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px);
}

.earthpov-guide-banner .guide-icon {
  font-size: 1.15rem;
}

.earthpov-guide-banner .guide-title {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.05em;
}

.earthpov-guide-banner .guide-desc {
  color: #94a3b8;
  font-size: 0.78rem;
}

@media (max-width: 768px) {
  .earthpov-guide-banner {
    bottom: 74px;
    padding: 6px 14px;
    font-size: 0.74rem;
    max-width: 92vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .earthpov-guide-banner .guide-desc {
    display: none;
  }
}

/* Ambient Space Nebula Glows */
.space-nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(150px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  transition: opacity 1.2s ease;
}

.nebula-1 {
  top: -10%;
  right: 10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.15) 50%, transparent 80%);
}

.nebula-2 {
  bottom: 5%;
  left: -5%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, rgba(20, 184, 166, 0.12) 60%, transparent 80%);
}

.nebula-3 {
  top: 40%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
}

/* ---------------- Top Navigation Bar ---------------- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(3, 7, 18, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
}

.nav-back-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan);
  transform: translateX(-2px);
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
}

.nav-brand {
  display: flex;
  flex-direction: column;
}

.system-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  line-height: 1;
}

.brand-title {
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-pure);
  line-height: 1.2;
}

.nav-center {
  display: flex;
  align-items: center;
}

.target-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.indicator-label {
  color: var(--text-muted);
  font-weight: 500;
}

.indicator-value {
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

.header-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.header-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.header-tool-btn.active-highlight {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.2);
}

.header-tool-btn.active-freecam {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.25));
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

/* ---------------- Free Viewpoint Controller HUD ---------------- */
.viewpoint-hud {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 92;
  transition: all 0.35s var(--ease-out-expo);
  pointer-events: auto;
}

.viewpoint-hud.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-14px);
}

.viewpoint-hud-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px;
  background: rgba(8, 14, 28, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.15);
}

.vp-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.vp-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.vp-btn {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.vp-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.vp-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(239, 68, 68, 0.3));
  border-color: rgba(245, 158, 11, 0.7);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.vp-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.14);
}

.vp-select {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
}

.vp-select:focus {
  border-color: var(--accent-cyan);
}

.vp-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.hint-icon {
  font-size: 0.8rem;
}

/* ---------------- Ephemeris / Date Calculation HUD Floating Panel ---------------- */
.ephemeris-hud {
  position: fixed;
  top: 76px;
  right: 24px;
  width: 390px;
  max-height: calc(100vh - 150px);
  background: rgba(6, 11, 24, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  z-index: 95;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(14, 165, 233, 0.12);
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.4s var(--ease-out-expo);
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.ephemeris-hud::-webkit-scrollbar {
  width: 5px;
}
.ephemeris-hud::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.ephemeris-hud.minimized {
  transform: translateX(430px);
  opacity: 0;
  pointer-events: none;
}

.hud-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-title-group {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 16px;
}

.hud-pulse-ring {
  position: absolute;
  left: 0;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.hud-main-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: 0.05em;
}

.hud-sub-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}

.hud-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.hud-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Date control */
.input-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.input-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.tz-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 4px;
  padding: 1px 6px;
}

.tz-switch-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tz-switch-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
}

.date-input-row {
  display: flex;
  gap: 10px;
}

.date-picker {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--text-pure);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease;
}

.date-picker:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.time-picker {
  width: 95px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s ease;
}

.time-picker:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.hud-action-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  color: #38bdf8;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-action-btn:hover {
  background: rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

.preset-label-row {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.preset-buttons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #e2e8f0;
}

/* Playback Section */
.playback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Chronometer Display (Date + Time) */
.sim-chronometer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 16, 32, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.12);
}

.chrono-item {
  display: flex;
  flex-direction: column;
}

.chrono-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 2px;
}

.chrono-date-display {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: 0.04em;
}

.chrono-time-display {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
}

.chrono-divider {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(56, 189, 248, 0.4);
}

.playback-controls {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.sim-btn {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.play-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.25));
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.play-btn.playing {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.25));
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.speed-selector-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.speed-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-right: 4px;
}

.speed-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s ease;
}

.speed-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 700;
}

/* Alignment Section */
.alignment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.alignment-score-badge {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 800;
  color: #38bdf8;
}

.alignment-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.alignment-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #f59e0b);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.alignment-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.radar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(10, 16, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px;
}

#radar-canvas {
  width: 220px;
  height: 220px;
}

.radar-legend {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Alignment Timeline & Events List */
.alignment-timeline-container {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sub-section-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: 0.03em;
}

.scan-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 6px;
  color: #fbbf24;
  font-size: 0.68rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scan-mini-btn:hover {
  background: rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.align-tabs-row {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.align-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.align-tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 700;
}

.alignment-events-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.alignment-events-list::-webkit-scrollbar {
  width: 4px;
}
.alignment-events-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.align-event-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.align-event-card:hover {
  background: rgba(20, 32, 58, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(2px);
}

.align-event-card.active-selected {
  border-color: rgba(245, 158, 11, 0.8);
  background: rgba(35, 27, 18, 0.85);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.event-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.event-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-score-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.score-super {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.score-high {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.score-mid {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.event-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 2px;
  line-height: 1.25;
}

.event-desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Ephemeris Table */
.table-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.small-link-btn {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
}

.table-wrap {
  margin-top: 10px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.table-wrap.collapsed {
  display: none;
}

.ephemeris-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

.ephemeris-table th {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-muted);
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ephemeris-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

/* ---------------- Bottom Quick-Nav Bar ---------------- */
.bottom-planet-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200; /* Always above canvas, cards and overlays */
  pointer-events: auto;
}

.planet-nav-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(10, 16, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.15);
  pointer-events: auto;
}

.p-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transition: all 0.25s ease;
}

.p-nav-btn .p-icon {
  font-size: 1rem;
}

.p-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-pure);
}

.p-nav-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.25));
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--text-pure);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

/* ---------------- Scroll Story Sections ---------------- */
.scroll-container {
  position: relative;
  z-index: 10;
  width: 100%;
  pointer-events: none; /* Let all mouse clicks and drags pass through to canvas! */
}

.story-section {
  min-height: 110vh;
  display: flex;
  align-items: center;
  padding: 80px 8% 100px;
  position: relative;
  pointer-events: none; /* Let clicks pass through outside cards */
}

.story-section:first-child {
  min-height: 100vh;
  padding-top: 120px;
}

.story-section:last-child {
  min-height: 100vh;
  padding-bottom: 140px;
}

.content-panel {
  pointer-events: auto;
  max-width: 540px;
  transition: transform 0.6s var(--ease-out-expo), opacity 0.6s ease;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 36px 38px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(56, 189, 248, 0.08);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  font-weight: 600;
}

.card-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text-pure);
}

.gradient-text-solar {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 35%, #fbbf24 80%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(56, 189, 248, 0.6)) !important;
  display: inline-block;
}

.card-lead {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* Feature Bullets in Hero */
.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.bullet-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.bullet-text {
  font-size: 0.84rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.bullet-text strong {
  color: var(--text-pure);
}

.scroll-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  margin-top: 10px;
}

.scroll-mouse-icon {
  width: 18px;
  height: 28px;
  border: 2px solid var(--accent-cyan);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.mouse-dot {
  width: 4px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: mouse-scroll 1.6s infinite ease;
}

@keyframes mouse-scroll {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* Planet Cards Structure */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.planet-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.solar-sun { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.mercury-badge { background: rgba(203, 213, 225, 0.2); color: #e2e8f0; border: 1px solid rgba(203, 213, 225, 0.4); }
.venus-badge { background: rgba(250, 204, 21, 0.2); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.4); }
.earth-badge { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.mars-badge { background: rgba(248, 113, 113, 0.2); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.4); }
.jupiter-badge { background: rgba(251, 146, 60, 0.2); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.4); }
.saturn-badge { background: rgba(253, 224, 71, 0.2); color: #fde047; border: 1px solid rgba(253, 224, 71, 0.4); }
.uranus-badge { background: rgba(34, 211, 238, 0.2); color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.4); }
.neptune-badge { background: rgba(96, 165, 250, 0.2); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.4); }

.symbol-badge {
  font-size: 1.4rem;
  line-height: 1;
}

.planet-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 12px;
}

.en-name {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 6px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.stat-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.7rem;
  color: #38bdf8;
  margin-top: 2px;
}

/* Topic Box */
.topic-box {
  background: rgba(56, 189, 248, 0.06);
  border-left: 3px solid #38bdf8;
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
}

.topic-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}

.topic-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Finale CTA buttons */
.cta-actions-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.cta-primary-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
  transition: all 0.25s ease;
}

.cta-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.5);
}

.cta-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cta-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tech-spec-box {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tech-spec-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.hud-mobile-handle-bar {
  display: none;
}

/* ==========================================================================
   Comprehensive Responsive Breakpoints (Mobile, Tablet, Desktop)
   ========================================================================== */

/* --- Tablet & Medium Viewports (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .top-nav {
    padding: 0 20px;
  }
  .nav-center {
    display: none;
  }
  .story-section {
    padding: 70px 6% 90px;
  }
  .content-panel {
    max-width: 480px;
  }
  .ephemeris-hud {
    right: 16px;
    width: 360px;
  }
}

/* --- Mobile Landscape & Tablets (max-width: 768px) --- */
@media (max-width: 768px) {
  /* 1. Top Navigation Bar */
  .top-nav {
    height: 56px;
    padding: 0 12px;
  }
  .nav-left {
    gap: 8px;
  }
  .nav-divider {
    display: none;
  }
  .system-badge {
    display: none;
  }
  .brand-title {
    font-size: 0.92rem;
    letter-spacing: 0.03em;
  }
  .nav-back-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
    gap: 4px;
  }
  .nav-right {
    gap: 6px;
  }
  .header-tool-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    gap: 4px;
    border-radius: 8px;
    white-space: nowrap;
  }
  #sound-text {
    display: none !important;
  }
  #cam-text {
    display: none !important;
  }
  
  /* 2. Free Viewpoint Perspective Controller HUD (Flickable & Horizontally Scrollable) */
  .viewpoint-hud {
    top: 60px;
    left: 8px;
    right: 8px;
    transform: none;
    width: auto;
    max-width: calc(100vw - 16px);
    overflow: hidden;
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.25);
    z-index: 92;
  }
  .viewpoint-hud.hidden {
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
  }
  .viewpoint-hud-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    max-width: 100%;
    padding: 6px 12px;
    gap: 8px;
    border-radius: 9999px;
    background: rgba(10, 16, 32, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    user-select: none;
    -webkit-user-select: none;
  }
  .viewpoint-hud-inner::-webkit-scrollbar {
    display: none;
  }
  .vp-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
    gap: 5px;
  }
  .vp-hint {
    display: none;
  }
  .vp-divider {
    display: block;
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    margin: 0 4px;
  }
  .vp-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(245, 158, 11, 0.95);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.05em;
  }
  .vp-btn {
    padding: 5px 9px;
    font-size: 0.70rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 6px;
    touch-action: manipulation;
  }
  .vp-select {
    padding: 4px 8px;
    font-size: 0.70rem;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 150px;
    border-radius: 6px;
  }

  /* 3. Ephemeris Floating Sheet (Mobile Bottom Sheet Mode) */
  .hud-mobile-handle-bar {
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
    margin: 8px auto 2px auto;
  }
  .ephemeris-hud {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 82vh;
    border-radius: 22px 22px 0 0;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-bottom: none;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(14, 165, 233, 0.18);
    transform: translateY(0);
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }
  .ephemeris-hud.minimized {
    transform: translateY(105%);
    opacity: 0;
    pointer-events: none;
  }
  .hud-top-bar {
    padding: 8px 16px 12px;
  }
  .hud-main-title {
    font-size: 0.88rem;
  }
  .hud-sub-badge {
    font-size: 0.58rem;
  }
  .hud-close-btn {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
  }
  .date-input-row {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr auto;
    gap: 6px;
  }
  .date-picker, .time-picker {
    width: 100%;
    font-size: 0.76rem;
    padding: 6px 8px;
  }
  .preset-buttons-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 5px;
  }
  .preset-btn {
    padding: 5px 6px;
    font-size: 0.68rem;
  }
  .sim-chronometer {
    padding: 8px 12px;
  }
  .chrono-date-display, .chrono-time-display {
    font-size: 1.05rem;
  }
  .playback-controls {
    gap: 6px;
  }
  .sim-btn {
    flex: 1;
    padding: 7px 6px;
    font-size: 0.75rem;
    text-align: center;
  }
  .speed-selector-row {
    flex-wrap: wrap;
    gap: 4px;
  }
  .speed-btn {
    padding: 3px 8px;
    font-size: 0.68rem;
  }
  #radar-canvas {
    width: 180px;
    height: 180px;
  }

  /* 4. Bottom Quick-Nav Bar (Clean Horizontal Flick & Scrollable) */
  .bottom-planet-nav {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 16px);
    max-width: 480px;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.2);
  }
  .planet-nav-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    padding: 6px 12px;
    gap: 6px;
    border-radius: 9999px;
    background: rgba(10, 16, 32, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
  }
  .planet-nav-inner::-webkit-scrollbar {
    display: none;
  }
  .p-nav-btn {
    padding: 6px 12px;
    font-size: 0.74rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 36px;
    border-radius: 9999px;
    touch-action: manipulation;
  }
  .p-nav-btn .p-icon {
    font-size: 0.95rem;
  }

  /* 5. Scroll Story Sections & Spacecraft Observation HUD */
  .story-section {
    min-height: 100vh;
    padding: 60px 10px 72px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
  }
  .story-section:first-child {
    min-height: 100vh;
    padding-top: 70px;
    align-items: center;
  }
  .story-section:last-child {
    padding-bottom: 84px;
  }
  .content-panel {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    pointer-events: auto;
    position: relative;
  }

  /* ==========================================================================
     Sci-Fi Holographic HUD Glass Card (4-Corner Targeting Reticles)
     ========================================================================== */
  .glass-card {
    padding: 14px 14px 16px;
    border-radius: 2px;
    /* High-tech transparent HUD background with 4-Corner Reticles & Scanlines */
    background: 
      /* Top-Left Bracket */
      linear-gradient(to right, #00f0ff 14px, transparent 14px) 0 0 / 100% 2px no-repeat,
      linear-gradient(to bottom, #00f0ff 14px, transparent 14px) 0 0 / 2px 100% no-repeat,
      /* Top-Right Bracket */
      linear-gradient(to left, #00f0ff 14px, transparent 14px) 100% 0 / 100% 2px no-repeat,
      linear-gradient(to bottom, #00f0ff 14px, transparent 14px) 100% 0 / 2px 100% no-repeat,
      /* Bottom-Left Bracket */
      linear-gradient(to right, #00f0ff 14px, transparent 14px) 0 100% / 100% 2px no-repeat,
      linear-gradient(to top, #00f0ff 14px, transparent 14px) 0 100% / 2px 100% no-repeat,
      /* Bottom-Right Bracket */
      linear-gradient(to left, #00f0ff 14px, transparent 14px) 100% 100% / 100% 2px no-repeat,
      linear-gradient(to top, #00f0ff 14px, transparent 14px) 100% 100% / 2px 100% no-repeat,
      /* Holographic Scanlines */
      repeating-linear-gradient(0deg, rgba(56, 189, 248, 0.035) 0px, rgba(56, 189, 248, 0.035) 1px, transparent 1px, transparent 4px),
      /* Translucent HUD Tint */
      linear-gradient(180deg, rgba(6, 14, 30, 0.16) 0%, rgba(8, 18, 38, 0.36) 100%);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 
      0 16px 40px rgba(0, 0, 0, 0.7),
      inset 0 0 25px rgba(56, 189, 248, 0.08),
      0 0 14px rgba(14, 165, 233, 0.2);
    position: relative;
  }
  
  .glass-card::before, .glass-card::after {
    display: none !important;
  }

  /* Sci-Fi Telemetry Tag with Pulsing Radar Pip */
  .card-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #38bdf8;
    background: rgba(8, 24, 52, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-left: 3px solid #00f0ff;
    padding: 3px 8px;
    border-radius: 2px;
    margin-bottom: 6px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  }
  .card-tag::before {
    content: '◈';
    color: #00f0ff;
    font-size: 0.68rem;
    animation: hud-blink 1.8s infinite ease-in-out;
  }
  @keyframes hud-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
  }

  /* Planet Header Row (Sci-Fi Badges) */
  .card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    border-bottom: 1px dashed rgba(56, 189, 248, 0.25);
    padding-bottom: 4px;
  }
  .planet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 3px 8px;
    border-radius: 2px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-left: 3px solid #00f0ff;
    background: rgba(8, 24, 52, 0.65);
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  }
  .planet-badge::before {
    content: 'TARGET //';
    font-size: 0.52rem;
    color: rgba(56, 189, 248, 0.75);
    letter-spacing: 0.08em;
  }
  .symbol-badge {
    font-size: 1.15rem;
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.9), 0 0 20px rgba(14, 165, 233, 0.6);
    background: rgba(8, 20, 48, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .card-title, .planet-title {
    font-family: var(--font-display);
    font-size: 1.30rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 6px;
    color: #ffffff;
    text-shadow: 0 1px 3px #000, 0 2px 6px #000, 0 0 12px rgba(56, 189, 248, 0.6);
  }

  /* CRITICAL FIX: Bright, uncrushed gradient text */
  .gradient-text-solar {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 35%, #fbbf24 80%, #f59e0b 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important; /* CRITICAL: removes the black crushed overlay */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(56, 189, 248, 0.65)) !important;
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.03em;
  }

  .en-name {
    font-size: 0.80rem;
    text-shadow: 0 1px 3px #000, 0 0 8px #000;
  }
  .card-lead {
    font-size: 0.77rem;
    line-height: 1.44;
    margin-bottom: 8px;
    color: #f1f5f9;
    text-shadow: 0 1px 2px #000, 0 2px 5px #000, 0 0 10px rgba(0, 0, 0, 0.95);
  }
  
  /* Sci-Fi Telemetry Data Grid */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
  }
  .stat-box {
    position: relative;
    padding: 6px 9px 6px 10px;
    border-radius: 3px;
    background: rgba(6, 16, 36, 0.42);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-left: 3px solid #38bdf8;
    box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.06);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden;
  }
  .stat-box::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    border-top: 1px solid rgba(56, 189, 248, 0.8);
    border-right: 1px solid rgba(56, 189, 248, 0.8);
  }
  .stat-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(147, 197, 253, 0.85);
    text-transform: uppercase;
    text-shadow: 0 1px 2px #000;
    display: block;
    margin-bottom: 1px;
  }
  .stat-value {
    font-family: var(--font-mono);
    font-size: 0.90rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.8), 0 1px 3px #000;
    display: block;
    line-height: 1.2;
  }
  .stat-sub {
    font-size: 0.60rem;
    color: #7dd3fc;
    text-shadow: 0 1px 2px #000;
    display: block;
  }
  
  /* Sci-Fi Topic Box */
  .topic-box {
    position: relative;
    padding: 7px 10px;
    margin-top: 6px;
    border-radius: 3px;
    background: rgba(6, 16, 36, 0.42);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-left: 3px solid #00f0ff;
    box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.06);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .topic-title {
    font-family: var(--font-mono);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #38bdf8;
    text-transform: uppercase;
    margin-bottom: 3px;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.7), 0 1px 2px #000;
  }
  .topic-desc {
    font-size: 0.73rem;
    line-height: 1.40;
    color: #e2e8f0;
    text-shadow: 0 1px 2px #000, 0 2px 4px #000, 0 0 8px rgba(0, 0, 0, 0.95);
  }
  .feature-bullets {
    gap: 6px;
    margin-bottom: 8px;
  }
  .bullet-item {
    padding: 6px 8px;
    gap: 8px;
    border-radius: 3px;
    background: rgba(6, 16, 36, 0.42);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-left: 3px solid #38bdf8;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .bullet-icon {
    font-size: 1.0rem;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
  }
  .bullet-text {
    font-size: 0.73rem;
    line-height: 1.38;
    color: #e2e8f0;
    text-shadow: 0 1px 2px #000, 0 0 6px #000;
  }

  /* Sci-Fi Animated Scroll Prompt */
  .scroll-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.10em;
    color: #38bdf8;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(8, 24, 52, 0.5);
    border: 1px dashed rgba(56, 189, 248, 0.4);
    border-radius: 4px;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  }
  .scroll-mouse-icon {
    display: none; /* Hide awkward mouse shape on mobile */
  }
  .scroll-prompt::before {
    content: '▼ ▼';
    font-size: 0.62rem;
    color: #00f0ff;
    animation: hud-arrow-pulse 1.4s infinite ease-in-out;
  }
  .scroll-prompt::after {
    content: '▼ ▼';
    font-size: 0.62rem;
    color: #00f0ff;
    animation: hud-arrow-pulse 1.4s infinite ease-in-out;
  }
  @keyframes hud-arrow-pulse {
    0%, 100% { opacity: 0.4; transform: translateY(-2px); }
    50% { opacity: 1; transform: translateY(2px); }
  }
  .cta-actions-row {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }
  .cta-primary-btn, .cta-secondary-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.84rem;
  }
}

/* --- Compact & Standard Smartphones (max-width: 640px) --- */
@media (max-width: 640px) {
  .top-nav {
    padding: 0 10px;
    height: 52px;
  }
  .nav-left {
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }
  .nav-back-text {
    display: none !important;
  }
  .nav-back-btn {
    padding: 5px 8px;
    min-height: 34px;
    flex-shrink: 0;
  }
  .nav-brand {
    min-width: 0;
    overflow: hidden;
  }
  .brand-title {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-right {
    gap: 4px;
    flex-shrink: 0;
  }
  .header-tool-btn {
    padding: 6px 8px !important;
    font-size: 0.85rem;
    min-height: 34px;
    min-width: 34px;
    justify-content: center;
    flex-shrink: 0;
  }
  #sound-text {
    display: none !important;
  }
  #cam-text {
    display: none !important;
  }
  #ephemeris-btn-text {
    display: none !important;
  }
  .card-title {
    font-size: 1.45rem;
  }
  .planet-title {
    font-size: 1.4rem;
  }
}

/* --- Small Smartphones (max-width: 480px) --- */
@media (max-width: 480px) {
  .brand-title {
    font-size: 0.8rem;
  }
  .header-tool-btn {
    padding: 5px 7px;
    font-size: 0.8rem;
    min-width: 32px;
  }
  .date-input-row {
    grid-template-columns: 1fr 1fr;
  }
  #btn-today {
    grid-column: span 2;
  }
}

/* --- Extra Small Screens (max-width: 360px) --- */
@media (max-width: 360px) {
  .brand-title {
    font-size: 0.74rem;
  }
  .top-nav {
    padding: 0 6px;
  }
  .date-input-row {
    grid-template-columns: 1fr;
  }
  #btn-today {
    grid-column: span 1;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}


