/* ==========================================================
   XYZEN CLOUD - SYSTEM STATUS PAGE STYLESHEET
   Votion Cloud Inspired Deep Space Theme with Three.js WebGL,
   Relativistic Accretion Disk, Violet Glow, and Glassmorphism
   ========================================================== */

:root {
  --bg-deep: #08080c; /* Votion Black 900 */
  --panel-bg: rgba(12, 14, 25, 0.65);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(139, 92, 246, 0.4);
  
  --color-primary: #a78bfa;
  --color-primary-glow: rgba(139, 92, 246, 0.45);
  --color-secondary: #818cf8;
  --color-accent: #c084fc;
  --votion-violet: #8b5cf6;
  --votion-orange: #ff7b00;
  
  --status-op: #10b981;
  --status-op-glow: rgba(16, 185, 129, 0.4);
  --status-deg: #f59e0b;
  --status-deg-glow: rgba(245, 158, 11, 0.4);
  --status-down: #ef4444;
  --status-down-glow: rgba(239, 68, 68, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Votion Cloud 3D WebGL Canvas */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Votion Cloud Ambient Radial Vignette */
.votion-gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.05) 0%, rgba(8, 8, 12, 0.1) 45%, rgba(8, 8, 12, 0.55) 100%);
}

/* Milky Way Cosmic Dust Gradient Band */
.milkyway-dust-glow {
  position: fixed;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse 70% 28% at 50% 45%, rgba(168, 85, 247, 0.12) 0%, rgba(56, 189, 248, 0.07) 35%, rgba(217, 70, 239, 0.04) 55%, transparent 75%);
  transform: rotate(-32deg);
  mix-blend-mode: screen;
}

/* Votion Atmospheric Violet Glow Spots */
.votion-glow-orb-1 {
  position: fixed;
  left: -10vw;
  top: 5%;
  width: 65vw;
  height: 80vh;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 9999px;
  filter: blur(180px);
  pointer-events: none;
  z-index: 2;
}

.votion-glow-orb-2 {
  position: fixed;
  right: -10vw;
  bottom: 5%;
  width: 55vw;
  height: 70vh;
  background: rgba(139, 92, 246, 0.06);
  border-radius: 9999px;
  filter: blur(180px);
  pointer-events: none;
  z-index: 2;
}

/* Main Content Container */
.status-container {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Header & Branding */
.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 0.5rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 18px;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
  animation: floatOrb 6s ease-in-out infinite;
  overflow: hidden;
  padding: 4px;
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 70%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.brand-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Quick Action Buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
}

.btn-panel {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.35);
}

.btn-panel:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3) 0%, rgba(99, 102, 241, 0.3) 100%);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.btn-icon {
  width: 17px;
  height: 17px;
  color: #38bdf8;
}

.external-icon {
  width: 13px;
  height: 13px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.action-btn:hover .external-icon {
  opacity: 1;
}

/* Glassmorphism Cards */
.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Main Banner Card */
.banner-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.8) 60%, rgba(56, 189, 248, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pulsing-orb {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-inner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--status-op);
  box-shadow: 0 0 12px var(--status-op);
}

.orb-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--status-op);
  animation: ripple 2s infinite ease-out;
}

@keyframes ripple {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.status-heading {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.status-subtext {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Uptime Section */
.uptime-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.uptime-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.uptime-title-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.icon-cube {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
}

.icon-cube svg {
  width: 20px;
  height: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.card-description {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.uptime-percentage-box {
  text-align: right;
}

.percentage-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--status-op);
  text-shadow: 0 0 20px var(--status-op-glow);
  line-height: 1;
}

.percentage-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.35rem;
}

/* Segmented 90-Day Uptime Bar */
.uptime-bar-wrapper {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
}

.uptime-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

.timeline-center {
  color: var(--status-op);
  font-weight: 500;
}

.segmented-bar {
  display: flex;
  gap: 3.5px;
  height: 38px;
  align-items: center;
  width: 100%;
}

.bar-segment {
  flex: 1;
  height: 100%;
  border-radius: 3.5px;
  background-color: var(--status-op);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
  position: relative;
}

.bar-segment:hover {
  transform: scaleY(1.22);
  filter: brightness(1.35);
  z-index: 2;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.bar-segment.status-operational {
  background: #10b981;
}

.bar-segment.status-degraded {
  background: #f59e0b;
}

.bar-segment.status-outage {
  background: #ef4444;
}

.uptime-legend {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.status-op { background: var(--status-op); box-shadow: 0 0 6px var(--status-op); }
.legend-dot.status-deg { background: var(--status-deg); box-shadow: 0 0 6px var(--status-deg); }
.legend-dot.status-down { background: var(--status-down); box-shadow: 0 0 6px var(--status-down); }

/* Core Services Section */
.services-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.services-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.85rem;
}

.services-count {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--status-op);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.service-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  transition: all 0.2s ease;
}

.service-row:hover {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(56, 189, 248, 0.2);
}

.service-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.service-name-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--status-op);
  box-shadow: 0 0 8px var(--status-op);
}

.service-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.node-state-pill {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.status-pill-op {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill-maint {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-pill-down {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.node-down-card {
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.06) !important;
}

.dot-pulsing-down {
  animation: dangerPulse 1.4s infinite alternate ease-in-out;
}

@keyframes dangerPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 6px #ef4444; }
  100% { transform: scale(1.25); box-shadow: 0 0 16px #ef4444; }
}

.empty-nodes-notice {
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.service-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.service-metrics {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.service-uptime-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
}

/* Service Mini Segmented Bar */
.service-mini-bar {
  display: flex;
  gap: 2px;
  height: 14px;
  width: 100%;
}

.service-mini-bar .bar-segment {
  height: 100%;
  border-radius: 2px;
}

/* Floating Tooltip */
.status-tooltip {
  position: absolute;
  z-index: 1000;
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(12px);
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  font-size: 0.78rem;
  transform: translate(-50%, -120%);
  white-space: nowrap;
}

.tooltip-date {
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.tooltip-status {
  font-weight: 600;
  color: var(--status-op);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tooltip-detail {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Footer */
.status-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.refresh-btn.spinning .refresh-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.refresh-icon {
  width: 15px;
  height: 15px;
}

.last-checked-text {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.last-checked-text strong {
  color: var(--text-muted);
}

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

.refresh-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.countdown-svg {
  width: 22px;
  height: 22px;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3.5;
}

.circle-fill {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1s linear;
}

.timer-seconds {
  font-family: var(--font-mono);
  color: #38bdf8;
  font-weight: 600;
}

.timer-text {
  color: var(--text-dim);
}

.footer-right strong {
  color: var(--text-main);
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .status-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .banner-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .banner-right {
    width: 100%;
    justify-content: space-between;
  }
  .status-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .status-container {
    padding: 1.5rem 1rem 3rem 1rem;
  }
  .action-btn {
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
  }
  .uptime-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .uptime-percentage-box {
    text-align: left;
  }
  .service-row-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .service-metrics {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================
   COMPACT RESPONSIVE PLANET SELECTOR WIDGET
   Tailored for PC, Tablet & Mobile Screens
   ========================================================== */

/* 1. Mobile Trigger Button (Hidden on Desktop) */
.mobile-planet-trigger {
  display: none;
}

/* 2. Desktop Planet Selector Dock */
.planet-selector {
  position: fixed;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 116px;
  background: rgba(10, 12, 24, 0.84);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 20px rgba(139, 92, 246, 0.18);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 6px 5px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px 6px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.selector-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.selector-pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 8px #c084fc;
  animation: ripple 2s infinite ease-out;
}

.selector-title {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c4b5fd;
  text-transform: uppercase;
}

.selector-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.selector-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.planet-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.planet-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.planet-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateX(-2px);
}

.planet-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(56, 189, 248, 0.18) 100%);
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.planet-preview {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

/* Planet Preview Dots */
.dot-wormhole {
  background: conic-gradient(from 0deg, #00f7ff, #ec4899, #8b5cf6, #fbbf24, #10b981, #00f7ff);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
  animation: spinWormhole 3s linear infinite;
}

@keyframes spinWormhole {
  100% { transform: rotate(360deg); }
}

.dot-mercury { background: radial-gradient(circle at 35% 35%, #cbd5e1, #475569); box-shadow: 0 0 6px rgba(148, 163, 184, 0.4); }
.dot-venus { background: radial-gradient(circle at 35% 35%, #fef08a, #b45309); box-shadow: 0 0 6px rgba(253, 224, 71, 0.4); }
.dot-earth { background: radial-gradient(circle at 35% 35%, #38bdf8, #0369a1); box-shadow: 0 0 7px rgba(56, 189, 248, 0.5); }
.dot-mars { background: radial-gradient(circle at 35% 35%, #f87171, #991b1b); box-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }
.dot-jupiter { background: radial-gradient(circle at 35% 35%, #fed7aa, #c2410c); box-shadow: 0 0 6px rgba(254, 215, 170, 0.4); }
.dot-saturn { background: radial-gradient(circle at 35% 35%, #fef08a, #a16207); box-shadow: 0 0 6px rgba(254, 240, 138, 0.4); }
.dot-uranus { background: radial-gradient(circle at 35% 35%, #a5f3fc, #0891b2); box-shadow: 0 0 6px rgba(165, 243, 252, 0.4); }
.dot-neptune { background: radial-gradient(circle at 35% 35%, #60a5fa, #1e3a8a); box-shadow: 0 0 6px rgba(96, 165, 250, 0.4); }

.planet-name {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
}

/* ==========================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (<= 850px)
   Features floating quick-access trigger and touch modal
   ========================================================== */
@media (max-width: 850px) {
  /* 1. Floating Trigger Button */
  .mobile-planet-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    right: 16px;
    z-index: 9999;
    background: rgba(12, 16, 36, 0.88);
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 999px;
    padding: 8px 14px 8px 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75), 0 0 16px rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-planet-trigger:active {
    transform: scale(0.96);
  }

  .mobile-planet-trigger.open {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(56, 189, 248, 0.35);
  }

  .mobile-trigger-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #f1f5f9;
  }

  .trigger-prefix {
    color: #a78bfa;
    font-weight: 500;
    font-size: 0.72rem;
  }

  .active-planet-name {
    color: #f8fafc;
    font-weight: 700;
  }

  .trigger-chevron {
    width: 14px;
    height: 14px;
    stroke: #c4b5fd;
    transition: transform 0.22s ease;
    margin-left: 2px;
  }

  .mobile-planet-trigger.open .trigger-chevron {
    transform: rotate(180deg);
  }

  /* 2. Responsive Modal Card for Mobile */
  .planet-selector {
    position: fixed;
    top: auto;
    left: auto;
    bottom: max(68px, calc(env(safe-area-inset-bottom, 16px) + 54px));
    right: 16px;
    transform: translateY(14px) scale(0.94);
    opacity: 0;
    pointer-events: none;
    width: min(290px, calc(100vw - 32px));
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: rgba(10, 13, 28, 0.96);
    border: 1px solid rgba(139, 92, 246, 0.38);
    border-radius: 18px;
    padding: 10px 10px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(139, 92, 246, 0.25);
    z-index: 9998;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .planet-selector.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .selector-close-btn {
    display: flex;
  }

  .selector-head {
    padding-bottom: 7px;
    margin-bottom: 8px;
  }

  .selector-title {
    display: block !important;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #c4b5fd;
  }

  /* 2-Column Touch Grid for Planets */
  .planet-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
  }

  .planet-btn[data-target="wormhole"] {
    grid-column: span 2;
    justify-content: center;
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
  }

  .planet-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    width: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  .planet-btn:active {
    background: rgba(139, 92, 246, 0.22);
    transform: none;
  }

  .planet-btn.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35) 0%, rgba(56, 189, 248, 0.22) 100%);
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
  }

  .planet-name {
    font-size: 0.75rem;
    font-weight: 600;
  }

  /* Ensure bottom padding in status container so nothing gets covered */
  .status-container {
    padding-bottom: 5.5rem;
  }
}
