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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #161d3a 0%, #090d1f 60%, #050712 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e6ecf8;
  user-select: none;
  -webkit-user-select: none;
}

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

#scene:active {
  cursor: grabbing;
}

.controls {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(8, 12, 28, 0.62);
  border: 1px solid rgba(180, 210, 255, 0.16);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(230, 238, 255, 0.88);
  cursor: pointer;
}

.control-label {
  min-width: 34px;
}

.control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 86px;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.control input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.control input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

#neon::-webkit-slider-thumb {
  background: #ff44d6;
  box-shadow: 0 0 8px rgba(255, 68, 214, 0.75);
}

#neon::-moz-range-thumb {
  background: #ff44d6;
  box-shadow: 0 0 8px rgba(255, 68, 214, 0.75);
}

#rain::-webkit-slider-thumb {
  background: #28e8ff;
  box-shadow: 0 0 8px rgba(40, 232, 255, 0.75);
}

#rain::-moz-range-thumb {
  background: #28e8ff;
  box-shadow: 0 0 8px rgba(40, 232, 255, 0.75);
}

@media (max-width: 560px) {
  .controls {
    left: 50%;
    transform: translateX(-50%);
    bottom: max(12px, env(safe-area-inset-bottom));
    gap: 12px;
    padding: 7px 12px;
  }

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

@media (max-height: 440px) {
  .controls {
    padding: 6px 11px;
    gap: 10px;
  }
}
