/* ============================================
   QUANTUM ORBITAL EXPLORER — STYLESHEET
   ============================================ */

:root {
  --bg-darkest: #050810;
  --bg-dark: #080d1a;
  --bg-mid: #0d1526;
  --bg-panel: rgba(10, 15, 30, 0.85);
  --bg-card: rgba(15, 22, 45, 0.9);
  --border: rgba(0, 212, 255, 0.15);
  --border-hover: rgba(0, 212, 255, 0.4);

  --accent-cyan: #00d4ff;
  --accent-purple: #7b2fff;
  --accent-orange: #ff6b35;
  --accent-pink: #f953c6;
  --accent-gold: #ffd700;
  --accent-green: #00f5a0;

  --text-primary: #e8f0ff;
  --text-secondary: rgba(232, 240, 255, 0.65);
  --text-muted: rgba(232, 240, 255, 0.35);

  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Orbitron', sans-serif;

  --header-h: 64px;
  --panel-w: 290px;
  --right-panel-w: 250px;

  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.4);
  --glow-purple: 0 0 20px rgba(123, 47, 255, 0.4);
}

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

html, body {
  width: 100%; height: 100%;
  overflow-x: hidden;
  background: var(--bg-darkest);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Background Stars ─────────────────────── */
#bg-particles {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,212,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(123,47,255,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(249,83,198,0.02) 0%, transparent 60%);
}

/* ── Header ───────────────────────────────── */
#main-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(5, 8, 16, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}

.header-logo {
  display: flex; align-items: center; gap: 14px;
}

/* Animated nucleus icon */
.nucleus-icon {
  width: 44px; height: 44px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.nucleus-core {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold), 0 0 24px rgba(255,215,0,0.5);
  animation: pulse-core 2s ease-in-out infinite;
}
@keyframes pulse-core {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
}
.orbit-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid;
  animation: rotate-ring linear infinite;
}
.orbit-ring::after {
  content: '';
  position: absolute; width: 5px; height: 5px;
  border-radius: 50%;
  top: -2.5px; left: 50%; transform: translateX(-50%);
}
.orbit-ring.r1 { width: 22px; height: 22px; border-color: rgba(0,212,255,0.7); animation-duration: 2s; }
.orbit-ring.r1::after { background: var(--accent-cyan); box-shadow: 0 0 6px var(--accent-cyan); }
.orbit-ring.r2 { width: 34px; height: 34px; border-color: rgba(123,47,255,0.6); animation-duration: 3.5s; animation-direction: reverse; transform: rotate(60deg); }
.orbit-ring.r2::after { background: var(--accent-purple); box-shadow: 0 0 6px var(--accent-purple); }
.orbit-ring.r3 { width: 44px; height: 44px; border-color: rgba(249,83,198,0.4); animation-duration: 5s; transform: rotate(120deg); }
.orbit-ring.r3::after { background: var(--accent-pink); box-shadow: 0 0 6px var(--accent-pink); }
@keyframes rotate-ring { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.header-text h1 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-text p { font-size: 11px; color: var(--text-secondary); letter-spacing: 0.5px; margin-top: 1px; }

.header-nav { display: flex; gap: 8px; }
.nav-btn {
  padding: 7px 18px; border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-main); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.nav-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(123,47,255,0.15));
  border-color: var(--accent-cyan); color: var(--accent-cyan);
}

/* ── App Sections ─────────────────────────── */
.app-section {
  display: none;
  padding-top: var(--header-h);
  min-height: 100vh;
}
.app-section.active { display: block; }

/* ── Simulator Layout ─────────────────────── */
.sim-layout {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr var(--right-panel-w);
  height: calc(100vh - var(--header-h));
  gap: 0;
}

/* ── Controls Panel ───────────────────────── */
.controls-panel {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 14px;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; gap: 10px;
}
.controls-panel::-webkit-scrollbar { width: 4px; }
.controls-panel::-webkit-scrollbar-track { background: transparent; }
.controls-panel::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 2px; }

.panel-header {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.panel-header h2 { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.panel-icon { font-size: 18px; }

.control-group {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.2s;
}
.control-group:hover { border-color: rgba(0,212,255,0.25); }

.ctrl-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  display: flex; flex-direction: column; gap: 2px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.qn-hint {
  font-size: 10px; font-weight: 400;
  color: var(--text-muted); text-transform: none;
  letter-spacing: 0;
}

/* QN Badges */
.qn-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  font-size: 13px; font-weight: 700; font-family: var(--font-mono);
  margin-bottom: 4px;
}
.n-badge { background: rgba(0,212,255,0.2); color: var(--accent-cyan); border: 1px solid rgba(0,212,255,0.4); }
.l-badge { background: rgba(123,47,255,0.2); color: var(--accent-purple); border: 1px solid rgba(123,47,255,0.4); }
.ml-badge { background: rgba(255,107,53,0.2); color: var(--accent-orange); border: 1px solid rgba(255,107,53,0.4); }
.ms-badge { background: rgba(249,83,198,0.2); color: var(--accent-pink); border: 1px solid rgba(249,83,198,0.4); }

/* Sliders */
.slider-row { display: flex; align-items: center; gap: 8px; }
.qn-slider {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.1); outline: none; cursor: pointer;
}
.qn-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  cursor: pointer;
}
.slider-val {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--accent-cyan); min-width: 28px; text-align: right;
}
.allowed-info { font-size: 10px; color: var(--text-muted); font-style: italic; }

/* Orbital Type Buttons */
.orbital-type-btns { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.orb-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  font-size: 16px; font-weight: 700; transition: all 0.2s;
}
.orb-type-btn span { font-size: 9px; font-weight: 400; font-family: var(--font-mono); opacity: 0.7; }
.orb-type-btn:hover:not(.disabled) {
  border-color: var(--accent-purple); color: var(--accent-purple);
  background: rgba(123,47,255,0.15);
}
.orb-type-btn.active {
  background: linear-gradient(135deg, rgba(123,47,255,0.3), rgba(0,212,255,0.2));
  border-color: var(--accent-purple); color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(123,47,255,0.3);
}
.orb-type-btn.disabled {
  opacity: 0.35; cursor: not-allowed;
}

/* ml Buttons */
.ml-buttons-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.ml-btn {
  padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.ml-btn:hover { border-color: var(--accent-orange); color: var(--accent-orange); }
.ml-btn.active {
  background: rgba(255,107,53,0.2); border-color: var(--accent-orange);
  color: var(--accent-orange); box-shadow: 0 0 8px rgba(255,107,53,0.3);
}

/* Spin Buttons */
.spin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.spin-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  font-size: 11px; transition: all 0.2s;
}
.spin-arrow { font-size: 18px; line-height: 1; }
.spin-btn.active {
  background: rgba(249,83,198,0.15); border-color: var(--accent-pink);
  color: var(--accent-pink); box-shadow: 0 0 10px rgba(249,83,198,0.3);
}
.spin-btn:hover:not(.active) { border-color: var(--accent-pink); color: var(--accent-pink); }

/* Visualization Style */
.vis-style-btns { display: flex; gap: 5px; }
.vis-btn {
  flex: 1; padding: 6px 4px; border-radius: 6px; font-size: 11px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.vis-btn.active {
  background: rgba(0,212,255,0.15); border-color: var(--accent-cyan); color: var(--accent-cyan);
}
.vis-btn:hover:not(.active) { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* Color Dots */
.color-theme-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.color-dot {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s; outline: none;
}
.color-dot.active { border-color: white; transform: scale(1.2); box-shadow: 0 0 10px rgba(255,255,255,0.3); }
.color-dot:hover:not(.active) { transform: scale(1.1); }

/* Orbital Info Card */
.orbital-info-card {
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(123,47,255,0.08));
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.orb-info-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.orb-info-name {
  font-family: var(--font-display); font-size: 22px; font-weight: 900;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.orb-info-electrons {
  font-size: 10px; color: var(--text-muted);
  background: rgba(255,255,255,0.06); padding: 3px 7px; border-radius: 10px;
}
.orb-info-row {
  display: flex; justify-content: space-between;
  font-size: 12px; padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.orb-info-row:last-of-type { border-bottom: none; }
.orb-info-row span { color: var(--text-muted); }
.orb-info-row strong { color: var(--text-primary); font-family: var(--font-mono); }
.orb-info-desc {
  font-size: 11px; color: var(--text-secondary);
  font-style: italic; margin-top: 4px;
}

/* ── 3D Viewport ──────────────────────────── */
.viewport-wrap {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at center, #060d1f 0%, #020408 100%);
}
#three-canvas { width: 100%; height: 100%; display: block; }

.viewport-hud {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
.hud-orbital-label {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
  background-size: 200%; animation: gradient-shift 4s ease infinite;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none;
}
@keyframes gradient-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hud-controls {
  display: flex; gap: 14px; justify-content: center; margin-top: 4px;
  font-size: 11px; color: var(--text-muted);
}

/* Probability Legend */
.prob-legend {
  position: absolute; bottom: 20px; right: 20px;
  background: rgba(5,8,16,0.8); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  backdrop-filter: blur(10px);
}
.legend-title { font-size: 10px; color: var(--text-muted); text-align: center; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.legend-bar {
  width: 120px; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, rgba(0,0,100,0.3), #00d4ff, #7b2fff, #f953c6, #ffd700);
  margin-bottom: 4px;
}
.legend-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-muted); }

/* Loading Overlay */
.loading-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(5,8,16,0.85); backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
  z-index: 10;
}
.loading-overlay.show { opacity: 1; pointer-events: all; }
.loading-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid rgba(0,212,255,0.15);
  border-top-color: var(--accent-cyan);
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: var(--accent-cyan); font-family: var(--font-mono); }

/* ── Educational Director Engine (DOM layer — class names kept as "annotation-*") ── */
.annotation-layer {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

/* Spotlight scrim — dims everything except a soft halo around the selected feature,
   so attention is drawn to it without flattening the whole scene to one dim wash. */
.annotation-scrim {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background: radial-gradient(
    circle at var(--scrim-x, 50%) var(--scrim-y, 50%),
    transparent 0px, transparent 60px, rgba(2,4,8,0.55) 200px
  );
}
.annotation-scrim.active { opacity: 1; }

.annotation-leader-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.annotation-leader-line {
  stroke: var(--accent-gold);
  stroke-width: 1.5;
  stroke-dasharray: 3,3;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.annotation-leader-line.visible { opacity: 0.6; }

.annotation-marker {
  position: absolute; top: 0; left: 0;
  width: 0; height: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.annotation-marker.visible { opacity: 1; }

.annotation-hit {
  position: absolute; top: -16px; left: -16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
}
.annotation-pulse-ring {
  position: absolute; top: -7px; left: -7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  animation: annotation-pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes annotation-pulse {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.8); opacity: 0; }
}
.annotation-dot {
  position: absolute; top: -3px; left: -3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold), 0 0 16px rgba(255,215,0,0.6);
  transition: box-shadow 0.2s, transform 0.2s;
  pointer-events: none;
}
.annotation-hit:hover ~ .annotation-dot {
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--accent-gold), 0 0 28px rgba(255,215,0,0.85);
}

.annotation-label {
  position: absolute;
  min-width: 150px; max-width: 220px;
  background: rgba(10, 15, 30, 0.88);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 16px rgba(255,215,0,0.08);
  opacity: 0;
  /* hidden state sits slightly below rest — fading in rises up into place;
     removing .visible reverses the same transition, so it fades out smoothly */
  transform: translateY(-50%) translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16,1,0.3,1);
  pointer-events: auto;
  cursor: pointer;
}
.annotation-label.visible {
  opacity: 1;
  transform: translateY(-50%) translateY(0);
}
.annotation-label:hover {
  border-color: rgba(255, 215, 0, 0.6);
}
.annotation-label-title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  margin-bottom: 4px;
}
.annotation-label-desc {
  font-size: 11px; line-height: 1.5;
  color: var(--text-secondary);
}

/* ── Wave Function Panel ──────────────────── */
.wavefunction-panel {
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  padding: 14px;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; gap: 0;
}
.wavefunction-panel::-webkit-scrollbar { width: 4px; }
.wavefunction-panel::-webkit-scrollbar-thumb { background: rgba(123,47,255,0.3); border-radius: 2px; }

.wf-content { display: flex; flex-direction: column; gap: 0; margin-top: 10px; }

.wf-section {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.wf-section h3 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 5px; }
.wf-formula {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.06); padding: 8px; border-radius: 6px;
  border-left: 2px solid var(--accent-cyan);
  word-break: break-word;
}
/* Hoverable wave-function terms — "hovering a term animates the corresponding visual" */
.wf-term {
  cursor: help;
  border-radius: 3px;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
.wf-term[data-term="radial"]:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 8px rgba(0,212,255,0.7);
}
.wf-term[data-term="angular"]:hover {
  color: var(--accent-pink);
  text-shadow: 0 0 8px rgba(249,83,198,0.7);
}
.wf-value {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-primary);
  background: rgba(255,255,255,0.04); padding: 6px 8px; border-radius: 6px;
}
.wf-value-clickable {
  cursor: pointer;
  border: 1px solid rgba(0,212,255,0.35);
  transition: background 0.2s, border-color 0.2s;
}
.wf-value-clickable:hover {
  background: rgba(0,212,255,0.12);
  border-color: var(--accent-cyan);
}

/* Generic "synchronized right-panel highlighting" — any element an active annotation points to */
.annotation-panel-active {
  border-color: var(--accent-gold) !important;
  background: rgba(255,215,0,0.1) !important;
  box-shadow: 0 0 10px rgba(255,215,0,0.25);
}

/* Radial Chart */
.mini-chart-wrap {
  position: relative;
  margin-top: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mini-chart-wrap.wf-term-hover-active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0,212,255,0.35);
}
.mini-chart-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 8px; }
#radial-chart { width: 100%; border-radius: 4px; }
.mini-chart-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-muted); margin-top: 4px; }

/* Generic "synchronized radial chart highlighting" marker — one shared instance, repositioned per annotation */
.annotation-radial-marker {
  position: absolute;
  width: 2px;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, left 0.3s ease;
}
.annotation-radial-marker.visible { opacity: 0.85; }
@keyframes annotation-radial-flash {
  0%   { opacity: 0; width: 2px; box-shadow: 0 0 8px var(--accent-gold); }
  30%  { opacity: 1; width: 4px; box-shadow: 0 0 16px var(--accent-gold), 0 0 28px rgba(255,215,0,0.6); }
  100% { opacity: 0; width: 2px; box-shadow: 0 0 8px var(--accent-gold); }
}
.annotation-radial-marker.flash-once { animation: annotation-radial-flash 700ms ease; }

/* Temporary equation highlight — a brief pulse, not a persistent state */
@keyframes annotation-equation-pulse {
  0%   { box-shadow: 0 0 0 rgba(255,215,0,0); background: rgba(0,212,255,0.06); }
  30%  { box-shadow: 0 0 16px rgba(255,215,0,0.5); background: rgba(255,215,0,0.15); }
  100% { box-shadow: 0 0 0 rgba(255,215,0,0); background: rgba(0,212,255,0.06); }
}
.annotation-equation-flash { animation: annotation-equation-pulse 900ms ease; }

/* ── Quantum Numbers Page ─────────────────── */
.qn-page { padding: 30px 40px; max-width: 1400px; margin: 0 auto; }
.qn-page-header { text-align: center; margin-bottom: 40px; }
.qn-page-header h2 {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.qn-page-header p { font-size: 15px; color: var(--text-secondary); }

.qn-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; margin-bottom: 40px;
}

.qn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.qn-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  border-radius: 16px 16px 0 0;
}
.n-card::before { background: linear-gradient(90deg, var(--accent-cyan), transparent); }
.l-card::before { background: linear-gradient(90deg, var(--accent-purple), transparent); }
.ml-card::before { background: linear-gradient(90deg, var(--accent-orange), transparent); }
.ms-card::before { background: linear-gradient(90deg, var(--accent-pink), transparent); }

.qn-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--glow-cyan); }

.qn-card-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  font-size: 22px; font-weight: 900; font-family: var(--font-mono);
  align-self: flex-start;
}
.n-card .qn-card-badge { background: rgba(0,212,255,0.15); color: var(--accent-cyan); border: 1px solid rgba(0,212,255,0.4); }
.l-card .qn-card-badge { background: rgba(123,47,255,0.15); color: var(--accent-purple); border: 1px solid rgba(123,47,255,0.4); }
.ml-card .qn-card-badge { background: rgba(255,107,53,0.15); color: var(--accent-orange); border: 1px solid rgba(255,107,53,0.4); }
.ms-card .qn-card-badge { background: rgba(249,83,198,0.15); color: var(--accent-pink); border: 1px solid rgba(249,83,198,0.4); }

.qn-card h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.qn-card-range {
  font-family: var(--font-mono); font-size: 12px; padding: 5px 10px;
  background: rgba(255,255,255,0.05); border-radius: 6px; color: var(--text-secondary);
  display: inline-block; align-self: flex-start;
}
.qn-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.qn-card-desc strong { color: var(--text-primary); }
.qn-card-desc em { color: var(--accent-cyan); font-style: normal; }

/* Orbital shape icons */
.orbital-shape-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.shape-icon-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 10px; text-align: center; color: var(--text-secondary);
}

/* Shell Diagram */
.shell-diagram-wrap { display: flex; justify-content: center; }
.shell-diagram-svg { display: flex; justify-content: center; }

/* ml orientations */
.ml-orientations { background: rgba(255,255,255,0.03); border-radius: 8px; padding: 10px; }
.orient-group {}
.orient-label { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.orient-items { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.orient-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; text-align: center; color: var(--text-secondary); }

/* Spin visual */
.spin-visual {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px; background: rgba(255,255,255,0.03); border-radius: 10px;
}
.spin-electron { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.electron-sphere {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #60a0ff, #1020a0);
  box-shadow: 0 0 15px rgba(0,100,255,0.5), inset 0 0 10px rgba(255,255,255,0.1);
  animation: electron-glow 2s ease-in-out infinite alternate;
}
.down-sphere { background: radial-gradient(circle at 35% 35%, #ff60a0, #a01040); box-shadow: 0 0 15px rgba(255,50,100,0.5), inset 0 0 10px rgba(255,255,255,0.1); }
@keyframes electron-glow { from { transform: scale(1); } to { transform: scale(1.08); } }
.spin-arrow-big { font-size: 28px; color: #6090ff; animation: bounce-up 1.5s ease-in-out infinite; }
.down-a { color: #ff6090; animation: bounce-down 1.5s ease-in-out infinite; }
@keyframes bounce-up { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bounce-down { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.spin-label { font-size: 11px; text-align: center; color: var(--text-secondary); }
.spin-separator { font-size: 28px; color: var(--text-muted); font-weight: 300; }

/* Pauli Box */
.pauli-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(249,83,198,0.08); border: 1px solid rgba(249,83,198,0.3);
  border-radius: 8px; padding: 10px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
}
.pauli-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.pauli-box strong { color: var(--accent-pink); }

/* QN Card Facts */
.qn-card-facts { display: flex; flex-direction: column; gap: 6px; }
.fact-item { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-secondary); }
.fact-icon { font-size: 14px; flex-shrink: 0; }

/* ── Summary Table ────────────────────────── */
.qn-summary-table-wrap { margin-top: 20px; }
.qn-summary-table-wrap h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary); }
.table-scroll { overflow-x: auto; }
.qn-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border-radius: 12px; overflow: hidden;
}
.qn-table thead tr { background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(123,47,255,0.15)); }
.qn-table th {
  padding: 12px 16px; text-align: left;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--accent-cyan); border-bottom: 1px solid var(--border);
}
.qn-table td {
  padding: 10px 16px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-family: var(--font-mono);
}
.qn-table tr:hover td { background: rgba(255,255,255,0.03); color: var(--text-primary); }
.row-n1 td { border-left: 3px solid var(--accent-cyan); }
.row-n2 td { border-left: 3px solid var(--accent-purple); }
.row-n3 td { border-left: 3px solid var(--accent-orange); }
.row-n4 td { border-left: 3px solid var(--accent-pink); }

/* ── Reference Page ───────────────────────── */
.ref-page { padding: 30px 40px; max-width: 1400px; margin: 0 auto; }
.orb-chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.orb-chart-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; text-align: center; cursor: pointer; transition: all 0.25s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.orb-chart-card:hover {
  border-color: var(--accent-cyan); transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,212,255,0.2);
}
.orb-chart-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.orb-chart-desc { font-size: 11px; color: var(--text-muted); }
.orb-chart-qn { font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); background: rgba(255,255,255,0.04); padding: 4px 8px; border-radius: 4px; }

.orb-chart-canvas-wrap { width: 120px; height: 120px; }

/* ── Mobile UI Elements ───────────────────── */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.hamburger-bar {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}
.mobile-menu-btn.active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(2, 4, 8, 0.7);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-panel-toggles {
  display: none;
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  justify-content: space-between;
  z-index: 100;
}

.mobile-toggle-btn {
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Feedback Modal ───────────────────────── */
.feedback-nav-btn {
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(123,47,255,0.1)) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
  font-weight: 600;
}
.feedback-nav-btn:hover {
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(123,47,255,0.2)) !important;
  box-shadow: 0 0 10px rgba(0,212,255,0.3);
}

.feedback-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(2, 4, 8, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}
.feedback-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.feedback-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--glow-cyan);
  padding: 24px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.feedback-modal-overlay.active .feedback-modal {
  transform: translateY(0);
}

.feedback-modal::-webkit-scrollbar { width: 6px; }
.feedback-modal::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 3px; }

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 12px;
}
.feedback-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.close-feedback {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.close-feedback:hover { color: var(--accent-pink); }

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  padding: 10px 12px;
  transition: all 0.2s;
  outline: none;
}
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0,212,255,0.2);
  background: rgba(255,255,255,0.07);
}
.form-group select option {
  background: var(--bg-darkest);
  color: var(--text-primary);
}

.star-rating {
  display: flex;
  gap: 8px;
  font-size: 28px;
  color: rgba(255,255,255,0.1);
  cursor: pointer;
  user-select: none;
}
.star-rating .star {
  transition: color 0.2s, transform 0.2s;
}
.star-rating .star:hover {
  transform: scale(1.1);
}
.star-rating .star.hover {
  color: rgba(255,215,0,0.5); /* Gold hover */
}
.star-rating .star.active {
  color: var(--accent-gold); /* Gold active */
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
}
.submit-btn:hover {
  box-shadow: 0 0 15px rgba(0,212,255,0.4);
  transform: translateY(-2px);
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.feedback-status {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}
.feedback-status.success { color: var(--accent-green); }
.feedback-status.error { color: var(--accent-pink); }

/* ── Watermark ────────────────────────────── */
.watermark {
  position: fixed;
  bottom: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.6;
  z-index: 9999;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  transition: opacity 0.3s ease;
}
.watermark:hover {
  opacity: 1;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 1100px) {
  :root { --panel-w: 240px; --right-panel-w: 210px; }
}

@media (max-width: 900px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .header-nav {
    position: fixed;
    top: 0; right: -280px;
    width: 280px; height: 100vh;
    background: rgba(8, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 80px 20px 20px;
    gap: 16px;
    transition: right 0.3s ease;
    z-index: 1000;
  }
  .header-nav.active {
    right: 0;
  }
  
  .sim-layout {
    display: block;
    height: calc(100vh - var(--header-h));
    position: relative;
    overflow: hidden;
  }
  
  .viewport-wrap {
    height: 100%;
    width: 100%;
  }

  .mobile-panel-toggles {
    display: flex;
  }
  
  .viewport-hud {
    top: auto;
    bottom: 80px;
  }
  
  .prob-legend {
    bottom: auto;
    top: 60px;
    right: 16px;
    transform: scale(0.85);
    transform-origin: top right;
  }

  /* Bottom sheet style for panels */
  .controls-panel, .wavefunction-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    height: 70vh;
    max-height: 70vh;
    background: rgba(10, 15, 30, 0.95);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    z-index: 950;
    transition: bottom 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
    padding: 24px 20px;
    padding-bottom: 40px;
  }
  
  .controls-panel.active, .wavefunction-panel.active {
    bottom: 0;
  }
  
  /* Make sure scrolling works smoothly in the bottom sheet */
  .controls-panel {
    border-right: none;
  }
  .wavefunction-panel {
    border-left: none;
  }
}

@media (max-width: 600px) {
  .qn-page, .ref-page {
    padding: 20px 16px;
  }
  .qn-cards-grid {
    grid-template-columns: 1fr;
  }
  .header-text h1 {
    font-size: 13px;
  }
  .nucleus-icon {
    transform: scale(0.8);
  }
  .header-logo {
    gap: 8px;
  }
}

/* ══════════════════════════════════════════════
   GUIDED DISCOVERY MODE ("Teach Me")
   ══════════════════════════════════════════════ */

/* ── Launcher button ─────────────────────────── */
.teach-me-btn {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-main);
  font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
  color: #061018;
  background: linear-gradient(120deg, var(--accent-cyan), var(--accent-purple));
  background-size: 180% 180%;
  border: none; border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 212, 255, 0.35), 0 0 0 1px rgba(255,255,255,0.08) inset;
  animation: teach-me-breathe 4.5s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 6;
}
.teach-me-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5), 0 0 0 1px rgba(255,255,255,0.14) inset;
}
.teach-me-icon { font-size: 15px; line-height: 1; }
@keyframes teach-me-breathe {
  0%, 100% { background-position: 0% 50%; box-shadow: 0 6px 24px rgba(0,212,255,0.30), 0 0 0 1px rgba(255,255,255,0.08) inset; }
  50%      { background-position: 100% 50%; box-shadow: 0 8px 30px rgba(123,47,255,0.45), 0 0 0 1px rgba(255,255,255,0.12) inset; }
}

/* ── Presentation chrome ─────────────────────── */
/* The wrapper is intentionally unpositioned so its two fixed children compete for stacking
   directly in the body context — the backdrop sits below the raised model/readout, the stage
   sits above them. */
.guided-tour-ui { }

.gt-backdrop, .gt-stage {
  opacity: 0; visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.guided-tour-ui.active .gt-backdrop,
.guided-tour-ui.active .gt-stage {
  opacity: 1; visibility: visible;
}
.guided-tour-ui.active .gt-stage { pointer-events: auto; }

.gt-backdrop {
  position: fixed; inset: 0;
  z-index: 900;
  background:
    radial-gradient(ellipse 60% 55% at 44% 46%, rgba(4,8,18,0.30) 0%, rgba(3,5,12,0.80) 55%, rgba(1,2,7,0.94) 100%);
  backdrop-filter: blur(2px);
}

/* In tour mode, lift the 3D model and the wave-function readout above the backdrop, and let
   the surrounding chrome fall dark behind it — museum spotlight, no layout reflow. */
body.guided-tour-active .viewport-wrap { z-index: 950; }
/* Raise the readout above the backdrop only on the desktop layout — on mobile it's an
   off-canvas bottom sheet whose own positioning must stand. Scoped to min-width so this
   never out-specifies the mobile `position: fixed` rule. */
@media (min-width: 901px) {
  body.guided-tour-active .wavefunction-panel {
    position: relative; z-index: 950;
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
  }
}
body.guided-tour-active .wavefunction-panel {
  pointer-events: none; /* readouts still highlight; stray clicks can't fight the tour */
}
body.guided-tour-active #main-header,
body.guided-tour-active .controls-panel,
body.guided-tour-active .prob-legend,
body.guided-tour-active .viewport-hud,
body.guided-tour-active .mobile-panel-toggles,
body.guided-tour-active .teach-me-btn,
body.guided-tour-active .watermark {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.45s ease;
}

/* ── Stage: caption + transport ──────────────── */
.gt-stage {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 20px 22px;
}
@media (min-width: 901px) {
  /* keep the caption inside the viewport column, clear of the raised side panel */
  .gt-stage { left: var(--panel-w); right: var(--right-panel-w); }
}

.gt-caption {
  max-width: 640px; width: 100%;
  text-align: center;
  margin-bottom: 16px;
  padding: 18px 26px;
  background: linear-gradient(180deg, rgba(12,18,36,0.72), rgba(8,12,26,0.82));
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
.gt-caption-in { animation: gt-caption-rise 0.6s cubic-bezier(0.16, 0.9, 0.3, 1); }
@keyframes gt-caption-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gt-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}
.gt-eyebrow .gt-step-index { color: var(--accent-cyan); font-weight: 500; }
.gt-eyebrow .gt-tour-title { color: var(--text-muted); }
.gt-eyebrow .gt-tour-title::before { content: '· '; color: var(--text-muted); }

.gt-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.gt-narration {
  font-size: 14px; line-height: 1.6;
  color: var(--text-secondary);
}

/* ── Transport controls ──────────────────────── */
.gt-transport {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(8,12,26,0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.gt-btn {
  font-family: var(--font-main);
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}
.gt-btn:hover { color: var(--text-primary); background: rgba(0,212,255,0.12); border-color: var(--border-hover); }
.gt-btn:disabled { opacity: 0.35; cursor: default; }
.gt-btn:disabled:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.gt-exit { color: var(--accent-pink); }
.gt-exit:hover { background: rgba(249,83,198,0.14); border-color: rgba(249,83,198,0.4); color: #fff; }
.gt-replay { color: var(--accent-green); }
.gt-replay:hover { background: rgba(0,245,160,0.12); border-color: rgba(0,245,160,0.4); color: #fff; }

/* progress rail */
.gt-progress { display: flex; align-items: center; gap: 7px; padding: 0 6px; }
.gt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.gt-dot.done { background: rgba(0,212,255,0.55); }
.gt-dot.current {
  background: var(--accent-cyan);
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(0,212,255,0.8);
}

/* On the end card, dim Skip/Back and let Replay/Exit lead. */
.guided-tour-ui.gt-complete .gt-next,
.guided-tour-ui.gt-complete .gt-prev { opacity: 0.35; pointer-events: none; }

@media (max-width: 900px) {
  .gt-title { font-size: 20px; }
  .gt-caption { padding: 15px 18px; }
  .gt-transport { flex-wrap: wrap; justify-content: center; }
}
