*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #141936 0%, #090b18 68%, #05060e 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #e8ecff;
  user-select: none;
  -webkit-user-select: none;
}

#scene-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

#scene-canvas:active {
  cursor: grabbing;
}

.hud {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 13, 28, 0.72);
  border: 1px solid rgba(140, 175, 255, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48), 0 0 18px rgba(0, 220, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  max-width: calc(100vw - 24px);
}

.control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cdd8f6;
  white-space: nowrap;
}

.control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 96px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  cursor: pointer;
}

.control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #48e5ff;
  box-shadow: 0 0 8px rgba(72, 229, 255, 0.75);
  transition: transform 0.12s ease;
}

.control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.control input[type="range"]#neon::-webkit-slider-thumb {
  border-color: #ff47c8;
  box-shadow: 0 0 8px rgba(255, 71, 200, 0.8);
}

.control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #48e5ff;
  box-shadow: 0 0 8px rgba(72, 229, 255, 0.75);
}

.control input[type="range"]#neon::-moz-range-thumb {
  border-color: #ff47c8;
  box-shadow: 0 0 8px rgba(255, 71, 200, 0.8);
}

@media (max-width: 520px) {
  .hud {
    gap: 10px;
    padding: 7px 12px;
  }

  .control {
    font-size: 11px;
    gap: 6px;
  }

  .control input[type="range"] {
    width: 74px;
  }
}
