/* ============================================================
   EB AFTER EFFECTS STUDIO SIMULATOR (#live-panel)
   ============================================================ */

.live-demo-section {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 110, 20, 0.14), transparent 50rem),
    radial-gradient(circle at 85% 60%, rgba(56, 189, 248, 0.06), transparent 35rem),
    linear-gradient(180deg, #090b0f 0%, #06080b 100%);
}

.live-demo-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
}

/* Header for the demo */
.demo-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.demo-heading .section-title {
  max-width: 680px;
  margin-top: 12px;
}

.demo-heading-copy {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

/* ============================================================
   AE STUDIO WORKSPACE FRAME
   ============================================================ */
.demo-scroll {
  position: relative;
  z-index: 2;
}

.ae-studio-window {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: #0d1017;
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 60px rgba(255, 110, 20, 0.08);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Title bar of the AE window */
.ae-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #090c11;
  border-bottom: 1px solid #1a202c;
  font-family: var(--mono);
  font-size: 11px;
  color: #64748b;
  user-select: none;
}

.ae-window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ae-window-controls span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.ae-close { background: #ef4444; opacity: 0.85; }
.ae-minimize { background: #f59e0b; opacity: 0.85; }
.ae-zoom { background: #10b981; opacity: 0.85; }

.ae-titlebar-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-weight: 500;
}

.ae-titlebar-name strong {
  color: #f1f5f9;
}

.ae-titlebar-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ae-timecode {
  color: var(--orange-soft);
  font-weight: 600;
  background: rgba(255, 110, 20, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 110, 20, 0.2);
}

.ae-fps {
  color: #4ade80;
}

/* Main Split: Left EB Panel + Right AE Comp Viewport */
.ae-studio-grid {
  display: grid;
  grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
  background: #0d1017;
  min-height: 680px;
}

/* ============================================================
   LEFT COLUMN: THE EB PANEL (CEP PANEL)
   ============================================================ */
.eb-panel-col {
  background: #11141c;
  border-right: 1px solid #1e2533;
  display: flex;
  flex-direction: column;
}

/* Top bar: Logo + Command bar + Quick Icons */
.eb-header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #0d1016;
  border-bottom: 1px solid #1e2533;
}

.eb-panel-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eb-logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 110, 20, 0.25), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 110, 20, 0.4);
  display: grid;
  place-items: center;
  box-shadow: 0 0 16px rgba(255, 110, 20, 0.18);
}

.eb-logo-badge img { width: 20px; height: 20px; }

.eb-version-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 110, 20, 0.12);
  color: var(--orange);
  border: 1px solid rgba(255, 110, 20, 0.25);
}

/* Search bar */
.eb-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.eb-search-box input {
  width: 100%;
  height: 34px;
  padding: 0 48px 0 32px;
  background: #161b24;
  border: 1px solid #252e3d;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 12px;
  font-family: var(--body);
  outline: none;
  transition: all 0.15s ease;
}

.eb-search-box input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 110, 20, 0.15);
  background: #191f2b;
}

.eb-search-box input::placeholder { color: #64748b; }

.eb-search-icon {
  position: absolute;
  left: 10px;
  color: #64748b;
  pointer-events: none;
  font-size: 12px;
}

.eb-search-shortcut {
  position: absolute;
  right: 8px;
  font-family: var(--mono);
  font-size: 9px;
  color: #64748b;
  background: #202735;
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
  border: 1px solid #2e3748;
}

.eb-quick-actions {
  display: flex;
  gap: 4px;
}

.eb-icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #161b24;
  border: 1px solid #252e3d;
  border-radius: 7px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-icon-btn:hover {
  background: #1f2735;
  color: #f1f5f9;
  border-color: #3b465a;
}

.eb-icon-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* ============================================================
   PINNED TOOLS ZONE (ANCHOR · ALIGN · CREATE · EDIT)
   ============================================================ */
.eb-pinned-tools {
  padding: 12px;
  background: #0f121a;
  border-bottom: 1px solid #1e2533;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eb-tool-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.eb-tool-section-label span.badge {
  font-weight: 600;
  color: var(--orange-soft);
  text-transform: none;
  letter-spacing: normal;
}

/* Two-column row for Anchor & Align */
.eb-tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.eb-tool-card {
  background: #141822;
  border: 1px solid #202735;
  border-radius: 10px;
  padding: 10px;
}

/* 3x3 Anchor Matrix */
.anchor-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.anchor-grid-3x3 {
  width: 72px;
  height: 72px;
  background: #0a0d13;
  border: 1px solid #232c3d;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 5px;
  flex-shrink: 0;
}

.anchor-dot {
  background: #18202d;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: all 0.15s ease;
}

.anchor-dot span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.15s ease;
}

.anchor-dot:hover {
  background: #283449;
}

.anchor-dot:hover span {
  background: #f1f5f9;
}

.anchor-dot.active {
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 110, 20, 0.4);
}

.anchor-dot.active span {
  background: #fff;
  transform: scale(1.3);
}

.anchor-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.anchor-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #cbd5e1;
}

.ui-switch {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #252e3d;
  position: relative;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}

.ui-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ui-switch.on {
  background: var(--orange);
}

.ui-switch.on::after {
  transform: translateX(12px);
  background: #fff;
}

.center-comp-btn {
  width: 100%;
  height: 24px;
  background: rgba(255, 110, 20, 0.08);
  border: 1px solid rgba(255, 110, 20, 0.25);
  border-radius: 6px;
  color: var(--orange-soft);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.center-comp-btn:hover {
  background: var(--orange);
  color: #0c0602;
  border-color: var(--orange);
}

/* Align Matrix */
.align-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.align-grid-3x3 {
  width: 72px;
  height: 72px;
  background: #0a0d13;
  border: 1px solid #232c3d;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 5px;
  flex-shrink: 0;
}

.align-dot {
  background: #18202d;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: all 0.15s ease;
}

.align-dot svg { width: 10px; height: 10px; fill: #64748b; }

.align-dot:hover { background: #283449; }
.align-dot:hover svg { fill: #f1f5f9; }

.align-dot.active {
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 110, 20, 0.4);
}
.align-dot.active svg { fill: #fff; }

.align-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.align-axis-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.align-axis-btn {
  height: 24px;
  background: #1b2230;
  border: 1px solid #2a3547;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.align-axis-btn:hover {
  background: #263145;
  color: #fff;
  border-color: #3e4e6c;
}

/* 1-Click Layer Creation */
.create-layers-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.layer-creator-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  background: #141822;
  border: 1px solid #202735;
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.layer-creator-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.layer-creator-btn span.name { font-size: 9.5px; font-weight: 600; }
.layer-creator-btn span.key {
  font-family: var(--mono);
  font-size: 8px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.layer-creator-btn:hover {
  background: #1e2636;
  border-color: rgba(255, 110, 20, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.layer-creator-btn:active {
  transform: translateY(0);
  background: var(--orange);
  color: #0d0703;
}

/* Timeline Trim Row */
.edit-timeline-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.trim-btn {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #12151f;
  border: 1px solid #202735;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.trim-btn:hover {
  background: #1a202d;
  color: #f1f5f9;
  border-color: #313d52;
}

.trim-btn span.shortcut {
  font-family: var(--mono);
  font-size: 8.5px;
  color: #64748b;
}

/* ============================================================
   FEATURE TABS STRIP
   ============================================================ */
.eb-feature-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 8px 12px;
  background: #0d1017;
  border-bottom: 1px solid #1e2533;
}

.eb-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-tab-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.eb-tab-btn span { font-size: 10px; font-weight: 600; }

.eb-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.eb-tab-btn.active {
  background: linear-gradient(135deg, #ff7b25 0%, #ea580c 100%);
  color: #0c0602;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.eb-tab-btn.active svg { stroke: #0c0602; }

/* ============================================================
   TAB CONTENT WORKBENCH
   ============================================================ */
.eb-tab-content {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.eb-tab-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: paneFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.eb-tab-pane.active {
  display: flex;
}

@keyframes paneFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pane-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pane-title-wrap h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.pane-title-wrap p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 11px;
}

.pane-action-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--orange);
  border: none;
  color: #0d0703;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
  transition: all 0.15s ease;
}

.pane-action-btn:hover {
  background: #ff893b;
  transform: translateY(-1px);
}

/* Graph Tab Content */
.graph-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.segmented-control {
  display: flex;
  background: #090c12;
  padding: 3px;
  border-radius: 7px;
  border: 1px solid #1f2735;
}

.segmented-btn {
  padding: 4px 12px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented-btn.active {
  background: #1e2637;
  color: #fff;
}

.graph-readout-pill {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--orange-soft);
  background: rgba(255, 110, 20, 0.1);
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 110, 20, 0.25);
}

.graph-stage-box {
  height: 160px;
  background: #080a0f;
  border: 1px solid #1e2636;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.graph-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20% 25%;
  opacity: 0.6;
}

.graph-svg {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: visible;
}

.graph-curve-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(255, 110, 20, 0.6));
  transition: d 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.graph-handle-line {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.graph-handle-dot {
  fill: #fff;
  stroke: var(--orange);
  stroke-width: 2.5;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.graph-presets-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.curve-preset-chip {
  padding: 6px 12px;
  background: #141923;
  border: 1px solid #222c3d;
  border-radius: 7px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.curve-preset-chip:hover {
  background: #1c2333;
  color: #fff;
}

.curve-preset-chip.active {
  background: rgba(255, 110, 20, 0.15);
  border-color: var(--orange);
  color: var(--orange-soft);
}

/* Text Tab Content */
.text-input-field {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: #0a0d13;
  border: 1px solid #222b3b;
  border-radius: 8px;
  color: #fff;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: all 0.15s ease;
}

.text-input-field:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 110, 20, 0.15);
}

.text-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.text-preset-card {
  height: 64px;
  background: #121620;
  border: 1px solid #202837;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.text-preset-card span.sample {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.text-preset-card span.tag {
  font-size: 8px;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 2px;
}

.text-preset-card:hover {
  background: #19202c;
  border-color: #313d52;
  transform: translateY(-1px);
}

.text-preset-card.active {
  background: #1c202a;
  border-color: var(--orange);
  box-shadow: 0 0 16px rgba(255, 110, 20, 0.2);
}

.text-preset-card.active span.sample {
  color: var(--orange-soft);
}

/* Captions Tab Content */
.captions-styles-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.caption-style-card {
  padding: 10px;
  background: #121620;
  border: 1px solid #202837;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.caption-style-card strong {
  display: block;
  font-size: 11.5px;
  color: #f1f5f9;
}

.caption-style-card span {
  display: block;
  font-size: 9.5px;
  color: #64748b;
  margin-top: 2px;
}

.caption-style-card:hover {
  background: #19202c;
}

.caption-style-card.active {
  border-color: var(--orange);
  background: rgba(255, 110, 20, 0.1);
}

.caption-style-card.active strong {
  color: var(--orange-soft);
}

/* Motion & Transition Cards */
.motion-cards-grid, .transition-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.motion-select-card, .transition-select-card {
  padding: 12px;
  background: #121620;
  border: 1px solid #202837;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.motion-mini-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #1a2230;
  display: grid;
  place-items: center;
  color: var(--orange);
  font-weight: 800;
  font-size: 11px;
}

.motion-select-card strong, .transition-select-card strong {
  font-size: 12px;
  color: #f1f5f9;
  display: block;
}

.motion-select-card span, .transition-select-card span {
  font-size: 9px;
  color: #64748b;
}

.motion-select-card:hover, .transition-select-card:hover {
  background: #19202c;
  border-color: #313d52;
}

.motion-select-card.active, .transition-select-card.active {
  border-color: var(--orange);
  background: rgba(255, 110, 20, 0.1);
}

/* Map Tab Content */
.map-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.map-input-group label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.map-input-group input {
  width: 100%;
  height: 32px;
  background: #0a0d13;
  border: 1px solid #202735;
  border-radius: 6px;
  padding: 0 10px;
  color: #f1f5f9;
  font-size: 11px;
}

.travel-modes-strip {
  display: flex;
  gap: 6px;
}

.mode-btn {
  flex: 1;
  height: 28px;
  border-radius: 6px;
  background: #141923;
  border: 1px solid #202837;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover { background: #1b2230; color: #fff; }
.mode-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #0c0602;
}

/* ============================================================
   RIGHT COLUMN: LIVE COMPOSITION VIEWPORT ("COMP 1")
   ============================================================ */
.ae-viewport-col {
  display: flex;
  flex-direction: column;
  background: #0a0c10;
  position: relative;
}

.viewport-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #0d1017;
  border-bottom: 1px solid #1a202c;
  font-family: var(--mono);
  font-size: 11px;
  color: #64748b;
}

.viewport-tabs {
  display: flex;
  gap: 8px;
}

.viewport-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f1f5f9;
  font-weight: 600;
}

.viewport-tab::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.viewport-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.viewport-badge {
  background: #161b24;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #232a38;
  color: #94a3b8;
}

/* The 16:9 Live Canvas */
.comp-canvas-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, #111622 0%, #080a0e 100%);
  position: relative;
  overflow: hidden;
}

.comp-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 680px;
  background: #000;
  border-radius: 12px;
  border: 1px solid #202735;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Safe title guides */
.safe-guides {
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.safe-guides::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(255, 255, 255, 0.04);
}

.center-crosshair {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.center-crosshair::before, .center-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 110, 20, 0.6);
}

.center-crosshair::before { left: 6px; top: 0; width: 2px; height: 14px; }
.center-crosshair::after { top: 6px; left: 0; height: 2px; width: 14px; }

/* DYNAMIC COMP PREVIEW CONTENT STAGES */
.preview-stage {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.preview-stage.active {
  display: flex;
}

/* Graph Motion Preview: Ball bouncing with exact easing */
.graph-preview-box {
  width: 80%;
  height: 60%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.motion-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.motion-keyframe-marker {
  width: 12px;
  height: 12px;
  background: var(--orange);
  transform: rotate(45deg);
  position: absolute;
  top: calc(50% - 6px);
  box-shadow: 0 0 10px rgba(255, 110, 20, 0.5);
}

.marker-start { left: 0; }
.marker-end { right: 0; }

.motion-preview-ball {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8c3b, #ea580c);
  display: grid;
  place-items: center;
  color: #0c0602;
  font-weight: 800;
  font-family: var(--display);
  font-size: 13px;
  box-shadow: 0 0 25px rgba(255, 110, 20, 0.6);
  position: absolute;
  top: calc(50% - 22px);
  left: 0;
  animation: graphMotionLoop 2s cubic-bezier(0.25, 0.1, 0.25, 1) infinite alternate;
}

@keyframes graphMotionLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(min(680px, 80vw) * 0.8 - 44px)); }
}

/* Text Animation Preview */
.text-preview-display {
  text-align: center;
  padding: 20px;
}

.text-preview-display h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
  line-height: 1.1;
}

.text-preview-display em {
  font-style: normal;
  color: var(--orange);
}

/* Animations for Text Presets */
.anim-pop h2 { animation: textPopAnim 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.anim-slide h2 { animation: textSlideAnim 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.anim-blur h2 { animation: textBlurAnim 1.4s ease-in-out infinite; }
.anim-bounce h2 { animation: textBounceAnim 1.4s cubic-bezier(0.28, 0.84, 0.42, 1) infinite; }
.anim-flip h2 { animation: textFlipAnim 1.6s ease infinite; }
.anim-glitch h2 { animation: textGlitchAnim 1.4s steps(2) infinite; }

@keyframes textPopAnim {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes textSlideAnim {
  0% { transform: translateX(-80px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes textBlurAnim {
  0% { filter: blur(20px); letter-spacing: 0.2em; opacity: 0; }
  100% { filter: blur(0); letter-spacing: -0.04em; opacity: 1; }
}

@keyframes textBounceAnim {
  0% { transform: translateY(-70px); opacity: 0; }
  50% { transform: translateY(15px); }
  75% { transform: translateY(-8px); }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes textFlipAnim {
  0% { transform: perspective(400px) rotateX(90deg); opacity: 0; }
  100% { transform: perspective(400px) rotateX(0deg); opacity: 1; }
}

@keyframes textGlitchAnim {
  0%, 100% { transform: translate(0); filter: none; }
  20% { transform: translate(-4px, 2px); filter: drop-shadow(2px 0 cyan); }
  40% { transform: translate(4px, -2px); filter: drop-shadow(-2px 0 red); }
  60% { transform: translate(-2px, -2px); filter: drop-shadow(2px 0 yellow); }
  80% { transform: translate(2px, 2px); filter: none; }
}

/* Captions Preview */
.captions-preview-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(circle at center, rgba(30, 41, 59, 0.5) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.caption-karaoke-text {
  font-family: var(--display);
  font-size: clamp(20px, 3.5vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 16px #000;
  display: flex;
  gap: 12px;
}

.karaoke-word {
  transition: all 0.2s ease;
  opacity: 0.4;
}

.karaoke-word.active {
  opacity: 1;
  color: var(--orange);
  transform: scale(1.15);
  text-shadow: 0 0 20px rgba(255, 110, 20, 0.8);
}

.audio-waveform-bar {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  background: rgba(15, 23, 42, 0.7);
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.wave-bar {
  flex: 1;
  background: var(--orange);
  border-radius: 2px;
  opacity: 0.4;
  animation: waveBounce 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(even) { animation-duration: 0.8s; }
.wave-bar:nth-child(3n) { animation-duration: 1.5s; }

@keyframes waveBounce {
  0% { height: 20%; opacity: 0.3; }
  100% { height: 90%; opacity: 0.9; }
}

.playhead-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  animation: playheadScrub 4s linear infinite;
}

@keyframes playheadScrub {
  0% { left: 16px; }
  100% { left: calc(100% - 16px); }
}

/* Map Animation Preview */
.map-preview-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #08101e;
}

.map-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.map-landmass {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  fill: #0f1c30;
  stroke: #253956;
  stroke-width: 1.2;
}

.map-route-curve {
  fill: none;
  stroke: var(--orange);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 8 8;
  filter: drop-shadow(0 0 12px rgba(255, 110, 20, 0.8));
  animation: mapRouteDash 1s linear infinite;
}

@keyframes mapRouteDash {
  to { stroke-dashoffset: -32; }
}

.map-city-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.city-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--orange);
  box-shadow: 0 0 14px var(--orange);
}

.city-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(8, 16, 30, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.map-tokyo { left: 22%; top: 62%; }
.map-london { right: 24%; top: 32%; }

.map-transport-icon {
  position: absolute;
  color: var(--orange);
  font-size: 24px;
  transform: rotate(24deg);
  filter: drop-shadow(0 0 8px rgba(255, 110, 20, 0.8));
  animation: transportFly 4s ease-in-out infinite alternate;
}

@keyframes transportFly {
  0% { left: 24%; top: 58%; }
  100% { left: 74%; top: 34%; }
}

/* Comp Layers Bar underneath screen */
.comp-layers-footer {
  padding: 10px 18px;
  background: #0a0d13;
  border-top: 1px solid #1a202c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.layers-chips-stack {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.comp-layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #121722;
  border: 1px solid #20293a;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.comp-layer-chip.active {
  border-color: var(--orange);
  color: #fff;
  background: rgba(255, 110, 20, 0.12);
}

.comp-layer-chip span.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.playback-transport-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--orange);
  border: none;
  color: #0c0602;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 11px;
}

/* Toast notification */
.demo-toast {
  position: absolute;
  right: 20px;
  bottom: 60px;
  padding: 10px 16px;
  background: #151922;
  border: 1px solid rgba(255, 110, 20, 0.4);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.demo-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.demo-footnote {
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  margin-top: 20px;
}

/* ============================================================
   RESPONSIVE DESIGN FOR STUDIO WORKSPACE
   ============================================================ */
@media (max-width: 1080px) {
  .ae-studio-grid {
    grid-template-columns: 1fr;
  }

  .eb-panel-col {
    border-right: none;
    border-bottom: 1px solid #1e2533;
  }
}

@media (max-width: 760px) {
  .demo-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .eb-header-bar {
    grid-template-columns: auto 1fr;
  }

  .eb-quick-actions {
    display: none;
  }

  .eb-tools-row {
    grid-template-columns: 1fr;
  }

  .create-layers-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .eb-feature-tabs {
    overflow-x: auto;
    display: flex;
  }

  .eb-tab-btn {
    flex: 0 0 72px;
  }

  .comp-screen {
    max-width: 100%;
  }
}

/* ============================================================
   LIVE PANEL EMBED — the real EB panel in an <iframe> (v6)
   Replaces the old hand-built simulator markup.
   ============================================================ */
/* The panel goes two-column at 520px+ (Anchor | Align side by side, Create and
   Edit full-width below) — the layout for a wide dock. We show that here rather
   than the narrow single-column dock: 720px gives two even ~339px columns with
   no dead gutter. On phones the frame shrinks back under 520 and it re-stacks. */
.eb-live-frame {
  max-width: 720px;
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: #0d1017;
  box-shadow:
    0 40px 120px -16px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 140px 24px rgba(249, 115, 22, 0.14);
  overflow: hidden;
}
.eb-live-embed {
  position: relative;
  width: 100%;
  height: 780px;
  background: #292929;
}
.eb-live-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 640px) {
  .eb-live-embed { height: 76vh; min-height: 520px; }
}

/* heading stripped back to just the chip (v9) */
.demo-heading--minimal {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
