/* N-Body Cluster Visualization — Lettuce Viz Bundle */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0f;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Stats overlay (live + replay) */
#stats-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  color: #ccc;
  font-size: 12px;
  font-family: monospace;
  line-height: 1.6;
  pointer-events: none;
  z-index: 10;
}

/* Playback controls bar (replay mode only) */
#playback-controls {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  align-items: center;
  gap: 10px;
  z-index: 20;
}

#playback-controls.visible {
  display: flex;
}

#playback-controls button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #ccc;
  font-size: 14px;
  width: 32px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#playback-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

#playback-controls button.active {
  background: rgba(100, 180, 255, 0.25);
  border-color: rgba(100, 180, 255, 0.4);
  color: #aaccff;
}

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

#scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #aaccff;
  cursor: pointer;
}

#scrubber::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #aaccff;
  border: none;
  cursor: pointer;
}

#frame-label {
  font-size: 11px;
  font-family: monospace;
  color: #888;
  min-width: 80px;
  text-align: right;
}

#speed-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #ccc;
  font-size: 11px;
  padding: 2px 4px;
  cursor: pointer;
}

/* Time series chart panel (replay mode only) */
#chart-panel {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 240px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  padding: 10px;
  z-index: 15;
}

#chart-panel.visible {
  display: block;
}

#chart-panel h3 {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  margin-bottom: 6px;
}

.chart-canvas {
  width: 100%;
  height: 60px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.chart-canvas:last-child {
  margin-bottom: 0;
}

.chart-label {
  font-size: 10px;
  font-family: monospace;
  color: #666;
  margin-bottom: 2px;
}
