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

body {
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

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

#canvas.fixed-size {
  width: auto;
  height: auto;
}

#controls {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

body:hover #controls,
#controls:focus-within {
  opacity: 1;
}

#controls button {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#controls button:hover {
  background: rgba(255,255,255,0.15);
}

#controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

#controls input[type="range"] {
  width: 80px;
  accent-color: #fff;
}

#controls select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

#controls select option {
  background: #222;
  color: #fff;
}
