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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050000;
  font-family: 'Courier New', monospace;
  color: #e0e0e0;
}

#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ── Start Overlay ─────────────────────────────────────── */

#start-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050000;
  transition: opacity 0.4s ease;
}

#start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#start-btn {
  font-family: 'Courier New', monospace;
  font-size: 2.5rem;
  font-weight: bold;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  color: #ff0000;
  background: none;
  border: 2px solid #ff0000;
  padding: 24px 64px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.15);
}

#start-btn:hover {
  background: #ff0000;
  color: #050000;
  box-shadow: 0 0 60px rgba(255, 0, 0, 0.4);
  text-shadow: none;
}

/* ── Controls Panel ────────────────────────────────────── */

#controls-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 8;
  width: 32px;
  height: 32px;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff0000;
  background: rgba(5, 0, 0, 0.7);
  border: 1px solid rgba(255, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#controls-toggle:hover {
  background: rgba(255, 0, 0, 0.2);
}

#controls-panel {
  position: fixed;
  top: 52px;
  right: 12px;
  z-index: 8;
  width: 220px;
  background: rgba(5, 0, 0, 0.85);
  border: 1px solid rgba(255, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  user-select: none;
}

#controls-panel input[type="range"] {
  touch-action: none;
}

#controls-panel.open {
  display: flex;
}

.ctrl-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctrl-label {
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.2em;
  color: #cc0000;
  border-bottom: 1px solid rgba(255, 0, 0, 0.15);
  padding-bottom: 4px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-row span {
  font-size: 0.65rem;
  color: #e0e0e0;
  min-width: 55px;
  letter-spacing: 0.05em;
}

.slider-val {
  font-size: 0.6rem;
  color: #cc0000;
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: rgba(255, 0, 0, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff0000;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 0, 0, 0.4);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff0000;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 0, 0, 0.4);
}

/* ── Transport Bar ─────────────────────────────────────── */

#transport {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(5, 0, 0, 0.85);
  border-top: 1px solid rgba(255, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#transport.visible {
  opacity: 1;
  transform: translateY(0);
}

#play-btn {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.15em;
  color: #ff0000;
  background: none;
  border: 1px solid #ff0000;
  padding: 6px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#play-btn:hover {
  background: #ff0000;
  color: #050000;
}

#seek-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 0, 0, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff0000;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

#seek-bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff0000;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

#time-display {
  font-size: 0.8rem;
  color: #cc0000;
  letter-spacing: 0.1em;
  white-space: nowrap;
  min-width: 90px;
  text-align: right;
}
