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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #090b1d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #e9eeff;
  -webkit-user-select: none;
  user-select: none;
}

#scene {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  touch-action: none;
  cursor: grab;
}

#scene:active {
  cursor: grabbing;
}

.hud {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 13px;
  background: rgba(10, 13, 30, 0.62);
  border: 1px solid rgba(110, 175, 255, 0.22);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 236, 255, 0.88);
  cursor: pointer;
}

.control-label {
  width: 38px;
  font-weight: 600;
  flex-shrink: 0;
}

.control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 112px;
  height: 4px;
  border-radius: 999px;
  background: rgba(160, 185, 240, 0.24);
  outline: none;
  cursor: pointer;
}

#neon::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff44c8;
  border: 2px solid #ffe4f8;
  box-shadow: 0 0 8px rgba(255, 68, 200, 0.85);
}

#neon::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff44c8;
  border: 2px solid #ffe4f8;
  box-shadow: 0 0 8px rgba(255, 68, 200, 0.85);
}

#rain::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3be8ff;
  border: 2px solid #e4fcff;
  box-shadow: 0 0 8px rgba(59, 232, 255, 0.85);
}

#rain::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3be8ff;
  border: 2px solid #e4fcff;
  box-shadow: 0 0 8px rgba(59, 232, 255, 0.85);
}

@media (max-width: 520px) {
  .hud {
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 14px;
    padding: 8px 12px;
  }

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

  .control-label {
    width: auto;
  }

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