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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #090c1c;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #e8ecff;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#controls {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(11, 14, 30, 0.72);
  border: 1px solid rgba(130, 180, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  touch-action: auto;
}

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

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

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

.control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #67f5ff;
  border: 2px solid #0d1226;
  box-shadow: 0 0 8px rgba(103, 245, 255, 0.85);
}

.control-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #67f5ff;
  border: 2px solid #0d1226;
  box-shadow: 0 0 8px rgba(103, 245, 255, 0.85);
}

#neon::-webkit-slider-thumb {
  background: #ff4fd8;
  box-shadow: 0 0 8px rgba(255, 79, 216, 0.85);
}

#neon::-moz-range-thumb {
  background: #ff4fd8;
  box-shadow: 0 0 8px rgba(255, 79, 216, 0.85);
}

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

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

  .control-label {
    width: auto;
  }

  .control-row input[type="range"] {
    width: 78px;
  }
}
