/* ==========================================================================
   PYTHON CONCURRENCY LAB - DESIGN SYSTEM & VISUAL SIMULATOR STYLES
   Aesthetic: Dark Developer-Tool / Sci-Fi Operating System Visualizer
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-deep: #070a12;
  --bg-base: #0b1120;
  --bg-surface: #111a2e;
  --bg-card: #182238;
  --bg-card-hover: #1f2c48;
  --border-subtle: #23314d;
  --border-active: #3b82f6;

  /* Concept Accents */
  --color-cpu: #f97316;          /* Orange - CPU computation */
  --color-cpu-glow: rgba(249, 115, 22, 0.35);
  --color-io: #06b6d4;           /* Cyan - I/O & Network */
  --color-io-glow: rgba(6, 182, 212, 0.35);
  --color-async: #a855f7;        /* Purple - Async & Coroutines */
  --color-async-glow: rgba(168, 85, 247, 0.35);
  --color-done: #10b981;         /* Green - Complete / Ready */
  --color-done-glow: rgba(16, 185, 129, 0.35);
  --color-blocked: #ef4444;      /* Red - Blocked / Error */
  --color-blocked-glow: rgba(239, 68, 68, 0.35);
  --color-waiting: #f59e0b;      /* Yellow/Amber - Waiting */
  --color-waiting-glow: rgba(245, 158, 11, 0.35);
  --color-gil: #fbbf24;          /* Gold - GIL Key */
  --color-gil-glow: rgba(251, 191, 36, 0.45);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;

  /* Typography & Layout */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-dim);
}

/* ==========================================================================
   TOP HEADER & NAVIGATION
   ========================================================================== */
.header-bar {
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #06b6d4, #a855f7);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #38bdf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Gamification XP Bar */
.user-stats-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.level-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gil);
}

.xp-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}

.xp-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.xp-track {
  width: 100%;
  height: 6px;
  background: var(--bg-deep);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-io), var(--color-async));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  width: 25%;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* X-Ray Complexity Slider */
.xray-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
}

.xray-label {
  color: var(--color-text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.xray-slider {
  accent-color: var(--color-async);
  width: 70px;
  cursor: pointer;
}

.btn-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--color-text);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-header:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.btn-header.primary {
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

.btn-header.primary:hover {
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.6);
}

/* ==========================================================================
   MODULES TAB BAR (Persistent Navigation)
   ========================================================================== */
.modules-tab-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  overflow-x: auto;
  white-space: nowrap;
}

.module-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  text-decoration: none;
}

.module-tab:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.module-tab.active {
  background: var(--bg-card);
  color: #fff;
  border-color: var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.module-tab.active::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-async);
  margin-left: 2px;
}

.tab-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
}

/* ==========================================================================
   MAIN WORKSPACE - 3-ZONE LAYOUT
   ========================================================================== */
.workspace-container {
  display: grid;
  grid-template-columns: 360px 1fr 340px;
  grid-template-rows: minmax(520px, 1fr) auto;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 105px);
}

/* LEFT PANEL: Code & Mechanics */
.panel-code-controls {
  background: var(--bg-base);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.015);
}

.panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-viewer-container {
  background: #060913;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.code-line {
  padding: 2px 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  transition: background 0.15s ease;
  user-select: text;
}

.line-num {
  color: var(--color-text-dim);
  font-size: 0.72rem;
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.line-code {
  color: #cbd5e1;
  white-space: pre;
}

.code-line.active {
  background: rgba(168, 85, 247, 0.15);
  border-left: 3px solid var(--color-async);
  padding-left: 13px;
}

.code-line.active .line-code {
  color: #fff;
  font-weight: 600;
}

/* Syntax Highlighting */
.kw { color: #f472b6; font-weight: 600; }    /* async, def, await, return */
.fn { color: #38bdf8; }                      /* gather, create_task */
.var { color: #e2e8f0; }
.num { color: #fbbf24; }
.str { color: #34d399; }
.cm { color: #64748b; font-style: italic; }

/* Code-to-Visual Causality Arrow */
.causality-box {
  background: rgba(168, 85, 247, 0.08);
  border: 1px dashed rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  margin: 12px 16px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.causality-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.causality-step.highlight {
  color: #fff;
  font-weight: 600;
}

.causality-icon {
  font-size: 0.85rem;
}

/* Simulation Knobs / Controls */
.controls-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
}

.control-value {
  color: var(--color-io);
  font-family: var(--font-mono);
}

.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-toggle {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--color-text-muted);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-toggle.active {
  background: var(--border-active);
  color: #fff;
  border-color: var(--border-active);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.btn-action-main {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-action-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-action-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   CENTER PANEL: PYTHON CITY VISUAL SIMULATION CANVAS
   ========================================================================== */
.panel-visual-canvas {
  background: radial-gradient(circle at 50% 40%, #0d1527 0%, #070a12 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.canvas-toolbar {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 17, 32, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.sim-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-done);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sim-status-pill.running {
  background: rgba(56, 189, 248, 0.12);
  color: var(--color-io);
  border-color: rgba(56, 189, 248, 0.3);
}

.sim-status-pill.blocked {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-blocked);
  border-color: rgba(239, 68, 68, 0.4);
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.6); }
}

.sim-meta-tags {
  display: flex;
  gap: 8px;
}

.meta-tag {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.meta-tag b {
  color: #fff;
}

/* Simulation Stage (SVG + HTML Interactive Elements) */
.simulation-stage {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sim-svg-viewport {
  width: 100%;
  height: 100%;
  max-width: 900px;
  max-height: 520px;
  overflow: visible;
}

/* ==========================================================================
   RIGHT PANEL: STATE INSPECTOR & MEMORY PALACE
   ========================================================================== */
.panel-state-inspector {
  background: var(--bg-base);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.inspector-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* State Badge Card */
.state-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.state-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.state-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
}

.state-label {
  color: var(--color-text-muted);
}

.state-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
}

.badge-ready { background: rgba(16, 185, 129, 0.15); color: var(--color-done); }
.badge-running { background: rgba(56, 189, 248, 0.15); color: var(--color-io); }
.badge-waiting { background: rgba(245, 158, 11, 0.15); color: var(--color-waiting); }
.badge-blocked { background: rgba(239, 68, 68, 0.2); color: var(--color-blocked); }
.badge-cpu { background: rgba(249, 115, 22, 0.15); color: var(--color-cpu); }

/* Metaphor Card */
.metaphor-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--color-gil);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.metaphor-title {
  color: var(--color-gil);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.metaphor-quote {
  font-style: italic;
  color: #e2e8f0;
}

/* Teaching Simplification Banner */
.simplification-note {
  font-size: 0.7rem;
  color: var(--color-text-dim);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.simplification-note b {
  color: var(--color-text-muted);
}

/* ==========================================================================
   BOTTOM PANEL: TIMELINE DEBUGGER
   ========================================================================== */
.timeline-debugger-panel {
  grid-column: 1 / -1;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 160px;
  user-select: none;
}

.timeline-toolbar {
  padding: 6px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-base);
  font-size: 0.75rem;
}

.timeline-playback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-timeline {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--color-text);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
}

.btn-timeline:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
}

.btn-timeline.active {
  background: var(--border-active);
  color: #fff;
}

.speed-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--color-text);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
}

.timeline-time-display {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-io);
}

.timeline-tracks-container {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.timeline-track-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 12px;
  height: 20px;
}

.track-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-lane {
  position: relative;
  width: 100%;
  height: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.track-span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  transition: width 0.15s ease, left 0.15s ease;
}

.span-cpu { background: var(--color-cpu); }
.span-io { background: var(--color-io); }
.span-wait { background: var(--color-waiting); }
.span-async { background: var(--color-async); }
.span-block { background: var(--color-blocked); }

/* Playhead Scrubber */
.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 6px #fff;
  pointer-events: none;
  z-index: 20;
  transition: left 0.08s linear;
}

/* ==========================================================================
   MODAL / POPUP OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.modal-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   WRONG MENTAL MODEL BANNER / ALERT
   ========================================================================== */
.wrong-model-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left: 4px solid var(--color-blocked);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 16px;
}

.wrong-model-head {
  color: var(--color-blocked);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wrong-model-text {
  font-size: 0.76rem;
  color: #fca5a5;
  line-height: 1.4;
}

.wrong-model-fix {
  font-size: 0.76rem;
  color: var(--color-done);
  font-weight: 600;
  margin-top: 2px;
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ========================================================================== */
@media (max-width: 1200px) {
  .workspace-container {
    grid-template-columns: 320px 1fr;
    grid-template-rows: 1fr 280px auto;
  }
  .panel-state-inspector {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    max-height: 250px;
  }
}

@media (max-width: 768px) {
  .workspace-container {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }
  .panel-code-controls, .panel-visual-canvas, .panel-state-inspector {
    width: 100%;
    min-height: 380px;
  }
  .timeline-debugger-panel {
    height: 180px;
  }
  .header-bar {
    flex-wrap: wrap;
  }
}
