:root {
  --space-dark: #0a0e17;
  --space-blue: #1a2a4a;
  --space-light: #3a5a8a;
  --highlight: #4fc3f7;

  --highlight-logo: #002fff;
  --rover-red: #f44336;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
}

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

body {
  margin: 0;
  font-family: 'Orbitron', 'Space Mono', monospace;
  background-color: var(--space-dark);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--space-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 1s ease-out;
}

.loading-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.loading-logo img {
  width: 200px;
  height: auto;
  margin-bottom: 1px;
  /* filter: drop-shadow(0 0 10px var(--highlight-logo)); */
}

.loading-logo h1 {
  font-size: 1.8rem;
  margin-top: 10px;
  color: var(--highlight-);
  /* text-shadow: 0 0 10px rgba(79, 195, 247, 0.5); */
  letter-spacing: 2px;
}

.progress-container {
  width: 300px;
  height: 20px;
  background-color: var(--space-blue);
  border-radius: 10px;
  margin: 30px auto;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--space-light), var(--highlight));
  transition: width 0.3s ease;
  border-radius: 10px;
}

.progress-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
}

.loading-tip {
  margin-top: 30px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: 'Space Mono', monospace;
}

/* Star Background Animation */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}

.stars::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="0.5" fill="white"/></svg>') repeat;
  animation: twinkle 10s infinite;
}

.stars.small::before {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><circle cx="25" cy="25" r="0.3" fill="white"/></svg>') repeat;
  animation: twinkle 8s infinite 2s;
}

.stars.tiny::before {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="0.2" fill="white"/></svg>') repeat;
  animation: twinkle 6s infinite 4s;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Main 3D Container */
#container3D {
  position: absolute;
  width: 100%;
  height: 100vh;
}

/* Telemetry Panel */
.telemetry-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background-color: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--space-light);
  border-radius: 8px;
  padding: 15px;
  width: 250px;
  z-index: 10;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 15px rgba(26, 42, 74, 0.5);
}

.telemetry-header {
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--space-light);
}

.telemetry-header h2 {
  font-size: 1rem;
  color: var(--highlight);
  letter-spacing: 1px;
}

.telemetry-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.telemetry-item {
  display: flex;
  justify-content: space-between;
}

.telemetry-item .label {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.telemetry-item .value {
  font-family: 'Space Mono', monospace;
  color: white;
  font-size: 0.9rem;
}

/* Controls Panel */
.controls-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--space-light);
  border-radius: 8px;
  padding: 15px;
  width: 200px;
  z-index: 10;
  backdrop-filter: blur(5px);
}

.controls-panel h3 {
  font-size: 1rem;
  color: var(--highlight);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.control-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.control-item .key {
  background-color: var(--space-blue);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: 'Space Mono', monospace;
}

.control-item .action {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Minimap */
#minimap {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 200px;
  height: 200px;
  border: 2px solid var(--space-light);
  border-radius: 8px;
  overflow: hidden;
  z-index: 10;
  background-color: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 15px rgba(26, 42, 74, 0.5);

  /* position: absolute;
  top: 0;
  left: 0; */
}

.minimap-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  z-index: 11;
  pointer-events: none;
}

.minimap-overlay h3 {
  font-size: 0.8rem;
  color: var(--highlight);
  margin-bottom: 5px;
}

.compass {
  width: 30px;
  height: 30px;
  border: 1px solid var(--space-light);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  background-color: rgba(10, 14, 23, 0.5);
}

.compass-arrow {
  color: var(--highlight);
  font-size: 1rem;
  transform: rotate(0deg);
  transition: transform 0.1s ease;
}

/* Dat.GUI Customization */
.dg.ac {
  z-index: 1000 !important;
}

.dg .c input[type=text] {
  color: var(--text-primary) !important;
}

.dg .cr.number input[type=text] {
  color: var(--text-primary) !important;
}

.dg .c .slider {
  background: var(--space-blue) !important;
}

.dg .c .slider-fg {
  background: var(--highlight) !important;
}

.dg .cr.function .property-name {
  color: var(--highlight) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .telemetry-panel, .controls-panel {
    width: 180px;
    font-size: 0.8rem;
  }
  
  #minimap {
    width: 150px;
    height: 150px;
  }
}


/* Add this to your existing CSS */
.waypoint-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  pointer-events: none;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  background-color: rgba(10, 14, 23, 0.7);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid currentColor;
  transform: translateX(-50%);
}

.hotspot-tooltip {
  position: absolute;
  background-color: rgba(10, 14, 23, 0.9);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 1000;
  border: 1px solid var(--highlight);
  transform: translate(10px, 10px);
}

/* Update the minimap styles for better visibility */
/* #minimap canvas {
  position: absolute;
  top: 0;
  left: 0;
} */

.minimap-overlay h3 {
  background-color: rgba(10, 14, 23, 0.7);
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
}