canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: none;
}

/* Reduced motion notice */
#reduced-motion-notice {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.5);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: 14px;
  text-align: center;
  line-height: 2;
  z-index: 100;
}

/* HUD */
.hud {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(5, 5, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  z-index: 200;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.hud.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Panel trigger zone */
#panel-trigger {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  z-index: 50;
}

/* Control panel */
.panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px 12px 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 100;
  cursor: default;
}
.panel.visible {
  transform: translateY(0);
}

.panel-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 16px 24px 8px;
  flex-wrap: wrap;
}

.panel-footer {
  text-align: center;
  padding: 2px 0 10px;
}

.remix-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 300;
  color: rgba(255,255,255,0.2);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.remix-link:hover {
  color: rgba(255,255,255,0.4);
}

/* Control group */
.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}

.control-label {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Sliders */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(160, 140, 220, 0.9);
  box-shadow: 0 0 8px rgba(160, 140, 220, 0.5);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 14px rgba(160, 140, 220, 0.8);
}
.slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(160, 140, 220, 0.9);
  box-shadow: 0 0 8px rgba(160, 140, 220, 0.5);
  border: none;
  cursor: pointer;
}
.slider:focus-visible {
  outline: 2px solid rgba(160, 140, 220, 0.7);
  outline-offset: 4px;
}

/* Buttons */
.seg-btn, .pill-btn, .icon-btn {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  padding: 7px 10px;
  border-radius: 50%;
}
.seg-btn:hover, .pill-btn:hover, .icon-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}
.pill-btn.active {
  background: rgba(160, 140, 220, 0.2);
  border-color: rgba(160, 140, 220, 0.4);
  color: rgba(200, 180, 255, 0.9);
}
.seg-btn:focus-visible, .pill-btn:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid rgba(160, 140, 220, 0.7);
  outline-offset: 2px;
}

/* Color pickers */
.palette-pickers {
  display: flex;
  gap: 6px;
  transition: opacity 0.2s;
}
.palette-pickers.hidden {
  display: none;
}
.color-pick {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.color-pick::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick::-webkit-color-swatch { border: none; border-radius: 50%; }

/* Mode controls */
.mode-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Audio indicator */
.audio-indicator {
  display: inline-block;
  width: 0;
  height: 8px;
  background: rgba(160, 140, 220, 0.7);
  border-radius: 2px;
  vertical-align: middle;
  transition: width 0.1s;
  margin-left: 4px;
}

/* Pause overlay */
.pause-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5, 5, 15, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px;
  z-index: 200;
  transition: opacity 0.3s ease;
}
.pause-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 700px) {
  .panel-inner {
    gap: 14px;
    padding: 12px 12px 6px;
  }
  .slider {
    width: 70px;
  }
  .control-group {
    min-width: 60px;
  }
  .control-label {
    font-size: 10px;
  }
}