:root {
  --bg: #07080f;
  --bg-gradient-1: #0a0b1a;
  --bg-gradient-2: #050610;
  --fg: #e8eef8;
  --fg-dim: #8b93a7;
  --accent: #00d4e4;
  --accent-2: #ec4899;
  --panel: rgba(14, 18, 32, 0.78);
  --panel-border: rgba(0, 212, 228, 0.25);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, "SF Pro Display", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at center, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

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

#scene canvas {
  display: block;
}

#labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.node-label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  min-width: 140px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
  will-change: transform;
}

.node-label.active {
  border-color: var(--node-color, var(--accent));
  box-shadow: 0 0 24px var(--node-color, var(--accent)), 0 0 60px rgba(0, 212, 228, 0.15);
}

.node-label .icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}

.node-label .title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--fg);
}

.node-label .subtitle {
  font-size: 10px;
  color: var(--fg-dim);
  margin-top: 2px;
  font-family: var(--mono);
  letter-spacing: -0.2px;
}

/* Header */
#title {
  position: fixed;
  top: 24px;
  left: 32px;
  z-index: 10;
}

#title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

#title .accent {
  color: var(--fg-dim);
  font-weight: 400;
}

#title .sub {
  margin: 4px 0 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: -0.2px;
}

/* Info panel */
#info-panel {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 24px;
  backdrop-filter: blur(16px);
  max-width: 640px;
  text-align: center;
  z-index: 10;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 15px;
  line-height: 1.4;
  color: var(--fg);
}

/* Dots progress */
#dots {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s, transform 0.3s;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--accent);
}

.dot.past {
  background: rgba(0, 212, 228, 0.4);
}

/* Controls */
#controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

#controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel);
  color: var(--fg);
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

#controls button:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  background: rgba(0, 212, 228, 0.08);
}

#controls button:active {
  transform: scale(0.95);
}

#controls #btn-play {
  width: 52px;
  height: 52px;
  font-size: 16px;
  background: var(--accent);
  color: #03131a;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(0, 212, 228, 0.3);
}

#controls #btn-play:hover {
  background: #1ee6f4;
}

#hint {
  margin-left: 16px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 720px) {
  #title { top: 12px; left: 16px; }
  #title h1 { font-size: 16px; }
  #title .sub { font-size: 10px; }
  #info-panel { max-width: 92vw; padding: 12px 16px; bottom: 110px; }
  .step-desc { font-size: 13px; }
  .node-label { min-width: 110px; padding: 6px 8px; }
  .node-label .title { font-size: 11px; }
  .node-label .subtitle { font-size: 9px; }
  #hint { display: none; }
}
