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

body {
  background: #0a0a0f;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scene {
  width: 100%;
  height: 100%;
  display: block;
}

#ui {
  position: fixed;
  bottom: max(40px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

#title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: fixed;
  top: max(24px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 500;
  min-width: 36px;
  text-align: center;
  user-select: none;
}

#slider-wrap {
  position: relative;
  width: 200px;
  height: 44px;
  display: flex;
  align-items: center;
}

.track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

#slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

#slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  cursor: grab;
  transition: transform 0.15s ease;
}

#slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
}

#slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  cursor: grab;
  border: none;
}

#slider::-moz-range-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  border: none;
}

#slider:focus { outline: none; }

#hint {
  position: fixed;
  bottom: max(120px, calc(env(safe-area-inset-bottom) + 100px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  letter-spacing: 1px;
  user-select: none;
  animation: fadeHint 4s ease forwards;
  white-space: nowrap;
}

@keyframes fadeHint {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; }
}
