/* =============================================================================
   oNeura WebGPU Neural Simulation  -  Dark Scientific Theme
   Fonts: Inter (UI chrome), IBM Plex Mono (data), Jacquard 24 (brand only)
   Accent: #5eead4 (teal)
   ============================================================================= */

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

:root {
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-pixel: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --color-bg: #050a0e;
  --color-bg-alt: #080c10;
  --color-surface: #0d1825;
  --color-surface-2: #111d2e;
  --color-surface-3: #162236;
  --color-border: rgba(255,255,255,0.09);
  --color-border-solid: #1a2535;
  --color-divider: rgba(255,255,255,0.05);

  --color-text: #e0e8f0;
  --color-text-muted: #7a8ea8;
  --color-text-faint: #3e5068;

  --teal: #5eead4;
  --teal-dim: rgba(94,234,212,0.15);
  --teal-glow: rgba(94,234,212,0.25);
  --teal-subtle: rgba(94,234,212,0.05);

  /* Keep --green for canvas data colors drawn in JS */
  --green: #00ff88;
  --green-dim: rgba(0,255,136,0.15);
  --green-glow: rgba(0,255,136,0.3);
  --green-subtle: rgba(0,255,136,0.04);

  --color-cyan: #22d3ee;
  --color-blue: #58a6ff;
  --color-purple: #bc8cff;
  --color-yellow: #ffd24d;
  --color-red: #f85149;
  --color-orange: #d29922;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border-solid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-dim); }

/* ---- Header / Nav ---- */
.header {
  flex-shrink: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255,255,255,0.88);
}

.brand-name {
  font-family: 'Jacquard 24', serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.9);
}

@keyframes oneura-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.brand-tag {
  font-size: 10px;
  color: var(--color-text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-link { text-decoration: none; }
.site-link-wordmark {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.back-link {
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-nav-link {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.header-nav-link:hover { color: var(--teal); }

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--teal-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.03em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--teal-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 8px 2px var(--teal-glow); }
}

/* ---- Performance Overlay ---- */
.perf-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 50;
  background: rgba(5,5,5,0.92);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-text-muted);
  line-height: 1.6;
  min-width: 150px;
  max-width: 200px;
  overflow: hidden;
}

.perf-overlay .perf-label {
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.perf-overlay .perf-val {
  color: var(--teal);
  font-weight: 500;
}

/* ---- Main Layout ---- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 3fr 2fr;
  flex: 1;
  min-height: 0;
  gap: 1px;
  background: var(--color-divider);
  overflow: hidden;
}

/* ---- Panel Base ---- */
.panel {
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  min-height: 36px;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title .icon {
  font-size: 14px;
  opacity: 0.7;
}

.panel-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.panel-body canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Panel 1: Neural Network (spans left column, both rows) ---- */
.panel-neural {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* ---- Panel 2: Fly World (top right) ---- */
.panel-fly-world {
  grid-column: 2;
  grid-row: 1;
}

/* ---- Panel 3: Fly POV + Brain Regions (bottom right) ---- */
.panel-bottom-right {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--color-divider);
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.panel-bottom-right > .panel {
  min-height: 0;
  overflow: hidden;
}
.panel-bottom-right > .panel .panel-body {
  overflow-y: auto;
}

/* ---- Controls Bar ---- */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px 10px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ctrl-label {
  font-size: 10px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.ctrl-btn {
  padding: 3px 8px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.ctrl-btn:hover {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: rgba(94,234,212,0.3);
}

.ctrl-btn.active {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: rgba(94,234,212,0.5);
}

.ctrl-btn.drug-active {
  background: rgba(255,82,73,0.15);
  color: var(--color-red);
  border-color: rgba(255,82,73,0.3);
}

.ctrl-btn.drug-ttx.drug-active {
  background: rgba(255,82,73,0.2);
  color: var(--color-red);
}

.ctrl-btn.drug-caffeine.drug-active {
  background: rgba(255,210,77,0.15);
  color: var(--color-yellow);
  border-color: rgba(255,210,77,0.3);
}

.ctrl-btn.drug-gaba.drug-active {
  background: rgba(188,140,255,0.15);
  color: var(--color-purple);
  border-color: rgba(188,140,255,0.3);
}

.ctrl-separator {
  width: 1px;
  height: 20px;
  background: var(--color-border);
  margin: 0 4px;
}

/* ---- Range Input ---- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--color-surface-3);
  border-radius: 2px;
  outline: none;
  width: 80px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  cursor: pointer;
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 4px var(--teal-glow);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  cursor: pointer;
  border: 2px solid var(--color-bg);
}

/* ---- Stats overlay on canvas ---- */
.canvas-stats {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  color: var(--color-text-faint);
  line-height: 1.6;
  pointer-events: none;
}

.canvas-stats .stat-line .val {
  color: var(--teal);
}

/* ---- Brain Region Diagram ---- */
.brain-regions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.brain-region {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.brain-region-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 200ms ease;
}

.brain-region-label {
  font-size: 10px;
  color: var(--color-text-muted);
  flex: 1;
  letter-spacing: 0.3px;
}

.brain-region-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--color-surface-3);
  flex: 2;
  position: relative;
  overflow: hidden;
}

.brain-region-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 2px;
  transition: width 200ms ease;
}

/* ---- WebGPU Fallback ---- */
.webgpu-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  height: 100%;
}

.webgpu-fallback.visible {
  display: flex;
}

.webgpu-fallback h2 {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-yellow);
  margin-bottom: 16px;
}

.webgpu-fallback p {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.webgpu-fallback .browser-list {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-faint);
}

.webgpu-fallback .fallback-btn {
  margin-top: 20px;
  padding: 8px 20px;
  background: var(--teal-dim);
  border: 1px solid rgba(94,234,212,0.4);
  border-radius: var(--radius-md);
  color: var(--teal);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.webgpu-fallback .fallback-btn:hover {
  background: var(--teal-glow);
}

/* ---- Footer ---- */
.site-footer {
  flex-shrink: 0;
  z-index: 100;
  background: rgba(5,5,5,0.95);
  border-top: 1px solid var(--color-border);
  padding: 3px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  font-size: 9px;
}

.footer-left {
  color: var(--color-text-faint);
}

.footer-right a {
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-right a:hover {
  color: var(--teal);
}

/* ---- Fly world canvas stat ---- */
.fly-info {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  color: var(--color-text-faint);
  text-align: right;
  pointer-events: none;
  line-height: 1.5;
}

.fly-info .val {
  color: var(--color-cyan);
}

/* ---- Tooltip ---- */
.tooltip {
  position: absolute;
  background: rgba(10,15,12,0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 10px;
  color: var(--color-text);
  pointer-events: none;
  z-index: 50;
  white-space: nowrap;
  display: none;
}

.tooltip.visible {
  display: block;
}

/* ---- Responsive: Tablet (768px) ---- */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: calc(100vh - 48px - 24px);
  }

  .panel-neural {
    grid-column: 1;
    grid-row: 1;
    min-height: 50vh;
  }

  .panel-fly-world {
    grid-column: 1;
    grid-row: 2;
    min-height: 40vh;
  }

  .panel-bottom-right {
    grid-column: 1;
    grid-row: 3;
    min-height: 200px;
    max-height: none;
  }

  .controls-bar {
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-center {
    display: none;
  }

  .perf-overlay {
    display: none;
  }
}

/* ---- Responsive: Mobile (under 768px) ---- */
@media (max-width: 767px) {
  .main-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: auto;
  }

  .panel-neural {
    grid-column: 1;
    grid-row: 1;
    min-height: 60vw;
    max-height: 50vh;
  }

  .panel-fly-world {
    grid-column: 1;
    grid-row: 2;
    min-height: 60vw;
    max-height: 50vh;
  }

  .panel-bottom-right {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: 1fr 1fr;
    min-height: 150px;
    max-height: none;
  }

  .panel-body canvas {
    display: block;
    width: 100%;
    height: 100%;
  }

  .controls-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 6px 10px;
    scrollbar-width: thin;
  }

  .ctrl-separator {
    flex-shrink: 0;
  }

  .ctrl-group {
    flex-shrink: 0;
  }

  .header-center,
  .header-right {
    display: none;
  }

  .brand-tag {
    display: none;
  }

  .perf-overlay {
    display: none;
  }

  .site-footer {
    font-size: 8px;
    padding: 3px 8px;
  }

  .footer-left {
    display: none;
  }

  .panel-header {
    padding: 6px 8px;
    min-height: 30px;
  }

  .panel-title {
    font-size: 13px;
  }
}

/* ---- Responsive: Very small screens (375px) ---- */
@media (max-width: 400px) {
  .panel-bottom-right {
    grid-template-columns: 1fr;
  }

  .panel-neural {
    min-height: 55vw;
  }

  .panel-fly-world {
    min-height: 55vw;
  }
}

/* ---- Day/Night cycle overlay ---- */
.day-night-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  color: var(--color-text-faint);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.day-night-indicator .dn-icon {
  font-size: 12px;
}

/* ---- Click hint ---- */
.click-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--color-text-faint);
  opacity: 0.6;
  pointer-events: none;
  animation: hint-fade 3s ease-in-out infinite;
}

@keyframes hint-fade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ---- Neural Controls Overlay ---- */
.neural-controls {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(5,5,5,0.88);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 200px;
}

.neural-controls .nc-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.neural-controls .nc-label {
  font-size: 9px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 38px;
  flex-shrink: 0;
}

.neural-controls .nc-value {
  font-size: 9px;
  color: var(--teal);
  min-width: 40px;
  text-align: right;
}

.neural-controls select {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 4px;
  cursor: pointer;
  outline: none;
  flex: 1;
  min-width: 0;
}

.neural-controls select:focus {
  border-color: var(--teal);
}

.neural-controls input[type="range"] {
  width: 60px;
  flex: 1;
  min-width: 0;
}

.neural-controls .nc-speed-btns {
  display: flex;
  gap: 2px;
}

.neural-controls .nc-speed-btn {
  padding: 1px 6px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
  transition: all var(--transition);
}

.neural-controls .nc-speed-btn:hover {
  background: var(--teal-dim);
  color: var(--teal);
}

.neural-controls .nc-speed-btn.active {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: rgba(94,234,212,0.5);
}

/* ---- Fly State Bars ---- */
.fly-state-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(5,5,5,0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 9px;
  color: var(--color-text-faint);
  pointer-events: none;
  min-width: 120px;
}

.fly-state-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fly-state-label {
  min-width: 50px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fly-state-bar {
  flex: 1;
  height: 4px;
  background: var(--color-surface-3);
  border-radius: 2px;
  overflow: hidden;
  min-width: 50px;
}

.fly-state-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 200ms ease, background 200ms ease;
}

.fly-behavior-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ---- Behavior Annotation on Fly World ---- */
.behavior-annotation {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  text-shadow: 0 0 6px var(--teal-glow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 300ms ease;
}

.behavior-annotation.visible {
  opacity: 1;
}

/* ---- Loading state ---- */
.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  z-index: 10;
  transition: opacity 500ms ease;
}

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

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 12px;
  font-size: 11px;
  color: var(--color-text-faint);
  letter-spacing: 0.5px;
}

/* Motor output overlay (replaces fake behavior labels) */
.fly-motor-label {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  color: rgba(94,234,212,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.fly-motor-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.25);
  margin-top: 2px;
}

/* ---- Light Tracking Indicator ---- */
.light-tracking-indicator {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: none;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--color-yellow);
  text-shadow: 0 0 8px rgba(255,210,77,0.5);
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 400ms ease;
  background: rgba(5,5,5,0.7);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,210,77,0.2);
}

.light-tracking-indicator.visible {
  opacity: 1;
}

/* ---- Sparkline ---- */
.sparkline-container {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.sparkline-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.sparkline-canvas {
  width: 80px;
  height: 20px;
  display: block;
}

/* ---- Reset Button ---- */
.reset-btn {
  color: var(--color-yellow) !important;
  border-color: rgba(255,210,77,0.2) !important;
}

.reset-btn:hover {
  background: rgba(255,210,77,0.1) !important;
  color: var(--color-yellow) !important;
  border-color: rgba(255,210,77,0.4) !important;
}

/* ---- Light Drag Hint ---- */
.light-drag-hint {
  position: absolute;
  bottom: 28px;
  right: 8px;
  z-index: 5;
  pointer-events: none;
  font-size: 9px;
  color: var(--color-text-faint);
  opacity: 0.5;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

/* ---- Experiment Tabs ---- */
.experiment-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0 16px;
  background: rgba(5,5,5,0.95);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  z-index: 95;
}

.exp-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 160ms ease;
}

.exp-tab:hover {
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.02);
}

.exp-tab.active[data-tab="arena"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.exp-tab.active[data-tab="ymaze"] {
  color: #4ecdc4;
  border-bottom-color: #4ecdc4;
}

.tab-note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--color-text-faint);
  flex-shrink: 0;
  letter-spacing: 0.5px;
  padding: 4px 0;
  background: rgba(5,5,5,0.9);
  border-bottom: 1px solid var(--color-border);
}

.tab-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.ymaze-iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  display: block;
  background: #0a0a0a;
}
