/* LV Studio - Adobe Photoshop CC Workstation Design System */
:root {
  /* Adobe Dark Neutral Workspace Palette */
  --bg-app: #1e1e1e;
  --bg-header: #282828;
  --bg-sidebar: #252525;
  --bg-panel: #2b2b2b;
  --bg-card: #2f2f2f;
  --bg-card-hover: #363636;
  --bg-input: #1a1a1a;
  --bg-input-hover: #222222;

  --border-color: #383838;
  --border-subtle: #2d2d2d;
  --border-highlight: #484848;
  --border-focus: #1473e6;

  /* Adobe Spectrum Workstation Accents */
  --primary: #1473e6;
  --primary-hover: #0d66d0;
  --primary-active: #095aba;

  --accent-cyan: #1473e6;
  --accent-blue: #1473e6;
  --accent-emerald: #2bb673;
  --accent-amber: #e58c23;
  --accent-pink: #d93874;
  --accent-red: #d7373f;

  /* Neutral Text Hierarchy */
  --text-main: #f0f0f0;
  --text-muted: #b0b0b0;
  --text-dim: #757575;

  /* Timeline Colors (Premiere Pro / Photoshop Video) */
  --timeline-bg: #1e1e1e;
  --timeline-toolbar-bg: #252525;
  --timeline-header-bg: #282828;
  --timeline-track-bg: #222222;
  --timeline-track-alt: #262626;
  --timeline-grid: #2f2f2f;
  --timeline-playhead: #e02e2e;

  /* Workstation Sharp Radii */
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 5px;
  --radius-full: 9999px;

  /* Clean Workstation Fonts */
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;

  /* Neutral Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.7);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Custom Workstation Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

/* App Header */
.app-header {
  height: 44px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 100;
  flex-shrink: 0;
}

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

.logo-badge {
  width: 26px;
  height: 26px;
  background: #001e36;
  border: 1px solid #1473e6;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #31a8ff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.05em;
  font-family: var(--font-main);
}

.brand-text h1 {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #e0e0e0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Aspect Ratio Controls */
.aspect-selector {
  display: flex;
  background: var(--bg-input);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  gap: 2px;
}

.aspect-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.aspect-btn:hover {
  color: var(--text-main);
}

.aspect-btn.active {
  background: #383838;
  color: #ffffff;
  font-weight: 600;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: var(--font-main);
}

.btn-secondary {
  background: #383838;
  color: var(--text-main);
  border-color: #4a4a4a;
}

.btn-secondary:hover {
  background: #444444;
  border-color: #555555;
}

.btn-secondary.active {
  background: #1473e6;
  color: #ffffff;
  border-color: #1473e6;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-accent {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-accent:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-sm {
  padding: 3px 7px;
  font-size: 0.75rem;
  border-radius: var(--radius-xs);
}

.btn-danger {
  background: rgba(215, 55, 63, 0.2);
  color: #ff6b72;
  border-color: rgba(215, 55, 63, 0.4);
}
.btn-danger:hover {
  background: #d7373f;
  color: #fff;
}

/* Main Studio Layout */
.studio-container {
  display: grid;
  grid-template-columns: 360px 1fr 300px;
  grid-template-rows: 1fr;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left Sidebar */
.left-panel {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: #202020;
  height: 38px;
}

.panel-tab {
  flex: 1;
  padding: 6px 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #8c8c8c;
  background: #202020;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.15s;
}

.panel-tab svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.panel-tab:hover {
  color: #e0e0e0;
  background: #252525;
}

.panel-tab.active {
  color: #ffffff;
  border-bottom-color: var(--primary);
  background: var(--bg-sidebar);
  font-weight: 600;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  background: var(--bg-sidebar);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Cards & Sections */
.card-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9c9c9c;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title svg {
  color: var(--text-muted);
}

/* Upload Dropzone */
.dropzone {
  border: 1px dashed #484848;
  background: #202020;
  border-radius: var(--radius-sm);
  padding: 1.15rem 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: #262626;
}

.dropzone-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #282828;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.dropzone-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.dropzone-subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Audio Track Info Card */
.audio-status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.audio-status-icon {
  width: 32px;
  height: 32px;
  background: #282828;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.audio-status-meta {
  flex: 1;
  min-width: 0;
}

.audio-track-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.audio-track-duration {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid #3d3d3d;
  border-radius: var(--radius-xs);
  color: var(--text-main);
  padding: 5px 8px;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-textarea {
  resize: vertical;
  min-height: 75px;
  line-height: 1.4;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.form-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-slider {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}

input[type="color"].form-input {
  padding: 1px 2px;
  height: 28px;
  cursor: pointer;
  background: var(--bg-input);
  border: 1px solid #3d3d3d;
  border-radius: var(--radius-xs);
  width: 100%;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 1px;
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.color-picker-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.color-picker-cell span {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Preset Grid */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.preset-chip {
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  color: #cccccc;
}

.preset-chip:hover {
  border-color: #555555;
  background: #252525;
}

.preset-chip.active {
  border-color: var(--primary);
  background: #1e334a;
  color: #ffffff;
}

.preset-color-dots {
  display: flex;
  gap: 4px;
}

.color-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* Lyrics List in Tab 2 */
.lyrics-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.lyric-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s;
  cursor: pointer;
  position: relative;
}

.lyric-item:hover {
  border-color: #4a4a4a;
}

.lyric-item.active {
  border-color: var(--primary);
  background: #1b2e44;
}

.lyric-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.lyric-timestamps {
  font-family: var(--font-mono);
  color: #3b99fc;
}

.lyric-item-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  padding: 2px 4px;
  border-radius: 2px;
}

.lyric-item-text:focus {
  background: #262626;
  box-shadow: 0 0 0 1px var(--primary);
}

.lyric-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

/* Center Canvas Stage */
.center-panel {
  display: flex;
  flex-direction: column;
  background: #141414;
  overflow: hidden;
  position: relative;
}

.canvas-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1.5rem;
  overflow: hidden;
  background: #171717;
}

.canvas-wrapper {
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  border: 1px solid #333333;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#videoCanvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Canvas Aspect Ratio Sizes */
.canvas-wrapper.ratio-16-9 {
  aspect-ratio: 16 / 9;
  width: min(85%, 880px);
  max-height: 85%;
}

.canvas-wrapper.ratio-9-16 {
  aspect-ratio: 9 / 16;
  height: min(85%, 640px);
  max-width: 85%;
}

.canvas-wrapper.ratio-1-1 {
  aspect-ratio: 1 / 1;
  height: min(80%, 560px);
  max-width: 80%;
}

/* Viewport HUD Overlays */
.hud-overlay {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.hud-pill {
  pointer-events: auto;
  background: #252525;
  border: 1px solid #3d3d3d;
  border-radius: var(--radius-xs);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

/* Center Player Controls Bar */
.player-controls-bar {
  height: 44px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 20;
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #999999;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.ctrl-btn:hover {
  color: #fff;
  background: #383838;
}

.play-pause-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #fff;
}

.play-pause-btn:hover {
  background: var(--primary-hover);
}

.timecode-display {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  background: var(--bg-input);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  display: flex;
  gap: 4px;
}

.timecode-total {
  color: var(--text-dim);
}

.extra-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  width: 75px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Right Inspector Panel */
.right-panel {
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0.85rem;
  gap: 1rem;
}

/* Image Assets List */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.asset-thumb-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background: #000;
  transition: all 0.15s;
}

.asset-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-thumb-card:hover {
  border-color: #555555;
}

.asset-thumb-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.asset-thumb-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0, 0, 0, 0.75);
  color: #ff6b72;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* Bottom Multi-Track Studio Timeline */
.bottom-timeline {
  height: 220px;
  background: var(--timeline-bg);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  position: relative;
}

.timeline-toolbar {
  height: 34px;
  background: var(--timeline-toolbar-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.timeline-tools-left, .timeline-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-view-wrapper {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.track-headers-column {
  width: 130px;
  background: var(--timeline-header-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.track-header-cell {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.73rem;
  font-weight: 500;
  color: #a0a0a0;
  gap: 6px;
  border-bottom: 1px solid #303030;
}

.track-header-cell.ruler-header {
  height: 28px;
  background: #222222;
  color: var(--text-dim);
}

.timeline-tracks-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  background: var(--timeline-bg);
  cursor: crosshair;
}

.timeline-tracks-scroll.shift-held,
.timeline-tracks-scroll.shift-held * {
  cursor: grab !important;
}

.timeline-tracks-scroll.is-panning,
.timeline-tracks-scroll.is-panning * {
  cursor: grabbing !important;
  user-select: none !important;
}

.timeline-tracks-inner {
  position: relative;
  min-width: 100%;
  height: 100%;
}

/* Time Ruler */
.time-ruler-canvas {
  height: 28px;
  display: block;
  border-bottom: 1px solid #303030;
  background: #222222;
}

/* Timeline Track Lanes */
.track-lane {
  height: 50px;
  position: relative;
  cursor: pointer;
  border-bottom: 1px solid #2a2a2a;
  background: repeating-linear-gradient(
    90deg,
    #1e1e1e,
    #1e1e1e 49px,
    #242424 49px,
    #242424 50px
  );
}

/* Draggable Cue Blocks (Premiere / Photoshop Style) */
.timeline-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: #1b436e;
  border: 1px solid #326fa8;
  border-radius: var(--radius-xs);
  color: #ffffff;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 3px 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  transition: border-color 0.15s, background-color 0.15s;
}

.timeline-block:hover {
  background: #225387;
  border-color: #4388cc;
}

.timeline-block.active {
  background: #2965a6;
  border-color: #5aa4ed;
  box-shadow: 0 0 0 1px #5aa4ed;
}

.block-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.block-quick-delete {
  background: #1c1c1c;
  color: #d0d0d0;
  border: 1px solid #404040;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  margin-right: 2px;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
  z-index: 20;
}

.timeline-block:hover .block-quick-delete,
.timeline-block.active .block-quick-delete {
  opacity: 1;
}

.block-quick-delete:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #ffffff;
}

.timeline-block.image-block {
  background: #6e441b;
  border-color: #ad6f32;
}

.timeline-block.image-block:hover {
  background: #875422;
  border-color: #c9813a;
}

.timeline-block.image-block.active {
  background: #9e6027;
  border-color: #e09048;
  box-shadow: 0 0 0 1px #e09048;
}

/* Resize Handles on Blocks */
.block-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: ew-resize;
  background: transparent;
  transition: background 0.15s;
}

.block-handle:hover {
  background: rgba(255, 255, 255, 0.4);
}

.handle-left {
  left: 0;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

.handle-right {
  right: 0;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

/* Waveform Canvas Lane */
.waveform-canvas {
  width: 100%;
  height: 50px;
  display: block;
}

/* Interactive Timeline Playhead */
.timeline-playhead-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--timeline-playhead);
  pointer-events: none;
  z-index: 100;
}

.playhead-handle {
  position: absolute;
  top: 0;
  left: -5px;
  width: 12px;
  height: 16px;
  background: var(--timeline-playhead);
  clip-path: polygon(0% 0%, 100% 0%, 100% 65%, 50% 100%, 0% 65%);
}

/* Export Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.modal-dialog {
  background: var(--bg-panel);
  border: 1px solid #444444;
  border-radius: var(--radius-md);
  width: 500px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.2s ease;
}

@keyframes modalPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  background: #242424;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0f0f0;
}

.modal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-panel);
}

.modal-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-color);
  background: #222222;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  height: 10px;
  background: #141414;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid #333333;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.12s linear;
  position: relative;
  border-radius: var(--radius-xs);
}

.progress-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmerMove 1.6s infinite linear;
  background-size: 200% 100%;
}

@keyframes shimmerMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.export-progress-card {
  margin: 10px 0;
  padding: 12px;
  background: #202020;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
}

/* Live Video Preview in Modal */
.export-video-preview {
  width: 100%;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  background: #000;
  display: none;
}
