html,
body {
  margin: 0;
  padding: 0;
  border: none;
  background: #000;
  /* or your scene background color */
  overflow: hidden;
  /* optional: prevents scrollbars */
  height: 100%;
  width: 100%;
}

canvas {
  display: block;
  /* removes inline-block whitespace border */
}

#legend {
  position: fixed;
  top: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  color: white;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 240px;
  line-height: 1.4;
  z-index: 1000;
  user-select: none;
  pointer-events: none; /* ✨ so camera rotation isn’t blocked */
  transition: opacity 0.3s ease;
}

#legend.hidden {
  opacity: 0;
  pointer-events: none;
}

#legend h4 {
  margin: 0 0 6px 0;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 4px;
}

#loading-overlay {
  position: fixed;
  inset: 0;
  background: black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #444;
  border-top: 5px solid #00FFF0;
  /* your indigo/turquoise theme */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

#loading-text {
  color: white;
  font-size: 18px;
  opacity: 0.9;
}

#VRButton {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 1002;
}

.lil-gui {
  z-index: 1001 !important;
  pointer-events: auto !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}