/* ============================================================
   MAKER STUDIO — PRO VIDEO EDITOR — STYLES v3
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

/* ─── DARK THEME (default) ─── */
:root {
  --bg-base:       #080910;
  --bg-panel:      #0f1117;
  --bg-panel-2:    #151820;
  --bg-track:      #0c0e14;
  --bg-hover:      #1c2030;
  --accent:        #7c6ff7;
  --accent-light:  #a78bfa;
  --accent-2:      #ff6b6b;
  --accent-green:  #43d98e;
  --accent-yellow: #f5c842;
  --border:        #1a1e2a;
  --border-light:  #252b3a;
  --text-primary:  #e4e6f0;
  --text-secondary:#6e7a99;
  --text-muted:    #3a4260;
  --clip-video:    #3d4fd4;
  --clip-audio:    #2db07a;
  --clip-text:     #c45ef0;
  --clip-music:    #e67a2a;
  --radius:        6px;
  --radius-lg:     12px;
  --font:          'Inter', sans-serif;
  --font-display:  'Space Grotesk', sans-serif;
  --shadow:        0 8px 32px rgba(0,0,0,0.6);
  --shadow-sm:     0 2px 10px rgba(0,0,0,0.35);
  --glow-accent:   0 0 20px rgba(124,111,247,0.2);
  --header-height: 52px;
  --tl-height:     192px;
}

/* ─── LIGHT THEME ─── */
.light {
  --bg-base:       #eef0f7;
  --bg-panel:      #ffffff;
  --bg-panel-2:    #f4f5fb;
  --bg-track:      #e6e8f2;
  --bg-hover:      #e8eaf5;
  --accent:        #6153e8;
  --accent-light:  #7c6ff7;
  --accent-2:      #e84b4b;
  --accent-green:  #25b87a;
  --accent-yellow: #d4a800;
  --border:        #d5d8e8;
  --border-light:  #c2c6d8;
  --text-primary:  #181b2c;
  --text-secondary:#525a78;
  --text-muted:    #9499b5;
  --clip-video:    #4a5ce6;
  --clip-audio:    #1e9960;
  --clip-text:     #a33dcf;
  --clip-music:    #c65e10;
  --shadow:        0 8px 32px rgba(0,0,0,0.14);
  --shadow-sm:     0 2px 10px rgba(0,0,0,0.08);
  --glow-accent:   0 0 20px rgba(97,83,232,0.12);
}

html, body {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.25s, color 0.25s;
}

/* ─── SCROLLBARS ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--border-light) var(--bg-base); }

/* ─── FORM GLOBALS ─── */
select { outline: none; appearance: none; }
input:focus, select:focus, textarea:focus {
  outline: 1.5px solid var(--accent);
  outline-offset: 1px;
}
button { font-family: var(--font); }

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: var(--header-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  flex-shrink: 0;
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  user-select: none;
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(124,111,247,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.logo-icon:hover { transform: scale(1.06); box-shadow: 0 4px 18px rgba(124,111,247,0.6); }
.logo-accent { color: var(--accent); }
.header-actions { display: flex; gap: 6px; align-items: center; }

.btn-theme {
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s;
  line-height: 1;
}
.btn-theme:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: scale(1.05); }

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 500;
  border: none; cursor: pointer;
  transition: all 0.16s;
  font-family: var(--font);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.btn:active::after { background: rgba(255,255,255,0.08); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124,111,247,0.35);
}
.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 18px rgba(124,111,247,0.5);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-panel-2);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-sm { padding: 4px 10px; font-size: 11px; }

.btn-record {
  background: linear-gradient(135deg, #c93232 0%, #ff6b6b 100%);
  color: #fff;
  width: 100%;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(201,50,50,0.35);
}
.btn-record:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(201,50,50,0.5); }
.btn-record.recording { animation: pulse-record 1.2s ease-in-out infinite; }

.btn-capture-mode {
  background: linear-gradient(135deg, #a033cc 0%, #c45ef0 100%);
  color: white;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 2px 10px rgba(196,94,240,0.35);
}
.btn-capture-mode:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 18px rgba(196,94,240,0.5);
  transform: translateY(-1px);
}
.btn-capture-mode.active { animation: pulse-record 1s infinite; }

.tl-btn {
  background: var(--bg-panel-2);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font);
  font-weight: 500;
  transition: all 0.15s;
}
.tl-btn:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
.tl-danger { color: var(--accent-2); border-color: rgba(232,75,75,0.25); }
.tl-danger:hover { background: rgba(255,107,107,0.1); border-color: var(--accent-2); color: var(--accent-2); }

@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,50,50,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(201,50,50,0); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════════ */
.app-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ══════════════════════════════════════════════════
   PANELS
══════════════════════════════════════════════════ */
.panel {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  transition: background 0.25s;
}
.panel-left  { width: 286px; flex-shrink: 0; }
.panel-center { flex: 1; display: flex; flex-direction: column; border-right: none; min-width: 0; }
.panel-right {
  width: 196px; flex-shrink: 0;
  border-left: 1px solid var(--border);
  border-right: none;
  overflow-y: auto;
  padding: 12px;
}

/* ══════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════ */
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-panel);
  padding: 0 4px;
  gap: 1px;
}
.tab {
  flex: 1; padding: 11px 4px;
  background: transparent; border: none;
  color: var(--text-muted);
  cursor: pointer; font-size: 11px; font-weight: 600;
  font-family: var(--font);
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; flex-direction: column; flex: 1; overflow-y: auto; padding: 12px; gap: 8px; }
.tab-content.active { display: flex; }

/* ══════════════════════════════════════════════════
   DROP ZONE
══════════════════════════════════════════════════ */
.drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg-panel-2);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(124,111,247,0.06);
  box-shadow: inset 0 0 0 1px rgba(124,111,247,0.15);
}
.drop-zone-sm { padding: 10px 12px; }
.drop-zone-inner { display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; }
.drop-icon { font-size: 22px; line-height: 1; }
.drop-zone p { font-size: 11px; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════
   MEDIA GRID
══════════════════════════════════════════════════ */
.media-grid-wrapper {
  margin-top: 2px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  min-height: 0;
}
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.media-thumb-wrap { display: flex; flex-direction: column; gap: 3px; }
.media-thumb-wrap .thumb-order {
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.media-thumb-wrap .thumb-order span {
  font-size: 10px; color: var(--text-muted);
  background: var(--bg-panel-2);
  border-radius: 10px; padding: 1px 6px;
  font-weight: 600;
  border: 1px solid var(--border);
  min-width: 20px; text-align: center;
}
.media-thumb-wrap .order-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 10px; padding: 0 2px; line-height: 1;
}
.media-thumb-wrap .order-btn:hover { color: var(--accent); }

.media-thumb {
  aspect-ratio: 4/3;
  background: var(--bg-panel-2);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: grab;
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.media-thumb.drag-over-reorder { border-color: var(--accent); opacity: 0.65; }
.media-thumb:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(124,111,247,0.25);
}
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  font-size: 9px; padding: 8px 4px 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: rgba(255,255,255,0.92);
}
.media-thumb .thumb-type {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,0.75);
  border-radius: 3px; padding: 1px 4px;
  font-size: 9px; color: rgba(255,255,255,0.75); font-weight: 700;
}
.media-thumb .thumb-add {
  position: absolute; top: 3px; left: 3px;
  background: var(--accent); color: white;
  border: none; border-radius: 4px;
  width: 20px; height: 20px;
  cursor: pointer; font-size: 14px; line-height: 20px; text-align: center;
  display: none;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.media-thumb:hover .thumb-add { display: block; }

/* ── Drag-drop FX: badge on thumb showing applied effect ── */
.thumb-fx-badge {
  position: absolute; top: 3px; left: 3px;
  background: rgba(124,111,247,0.85);
  color: #fff; font-size: 8px; font-weight: 700;
  border-radius: 3px; padding: 1px 4px;
  pointer-events: none; display: none;
  max-width: calc(100% - 6px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Flash confirmation when effect is dropped ── */
.fx-drop-flash {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,111,247,0.55);
  color: #fff; font-size: 11px; font-weight: 700;
  border-radius: var(--radius);
  pointer-events: none;
  animation: fxFlash 1.2s ease forwards;
  z-index: 5;
}
@keyframes fxFlash {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── fx-item draggable hint ── */
.fx-drag-hint {
  background: rgba(124,111,247,0.12);
  border: 1px dashed rgba(124,111,247,0.4);
  border-radius: 5px;
  color: var(--accent-light);
  font-size: 10px; font-weight: 500;
  padding: 5px 8px; margin-bottom: 8px;
  text-align: center;
}
.fx-item[data-filter]:hover,
.fx-item[data-fx]:hover {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════
   SECTION TITLE
══════════════════════════════════════════════════ */
.section-title {
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin: 8px 0 4px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ══════════════════════════════════════════════════
   VOICE RECORDER
══════════════════════════════════════════════════ */
.voice-recorder {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-panel-2); border-radius: var(--radius-lg); padding: 12px;
  border: 1px solid var(--border);
}
.record-dot {
  width: 8px; height: 8px; background: #fff; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.btn-record.recording .record-dot { animation: blink 0.7s infinite; }
.record-timer {
  font-family: monospace; font-size: 22px; text-align: center;
  color: var(--accent-2); font-weight: 700; letter-spacing: 0.08em;
}
.waveform-container {
  background: var(--bg-track); border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════
   TTS
══════════════════════════════════════════════════ */
.tts-section {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-panel-2); border-radius: var(--radius-lg); padding: 12px;
  border: 1px solid var(--border);
}
.tts-section textarea {
  background: var(--bg-base); border: 1px solid var(--border-light);
  color: var(--text-primary); border-radius: var(--radius);
  padding: 6px 8px; font-size: 11px; font-family: var(--font); resize: none;
  transition: border-color 0.15s;
}
.tts-section textarea:focus { border-color: var(--accent); }
.tts-controls { display: flex; gap: 8px; align-items: center; }
.tts-controls input[type=range] { flex: 1; accent-color: var(--accent); }
.tts-controls label { font-size: 10px; color: var(--text-secondary); white-space: nowrap; }

/* ══════════════════════════════════════════════════
   AUDIO TRACKS LIST
══════════════════════════════════════════════════ */
.audio-tracks-list { display: flex; flex-direction: column; gap: 4px; }
.audio-track-item {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-panel-2); border-radius: var(--radius);
  padding: 6px 8px;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.audio-track-item:hover { border-color: var(--border-light); }
.audio-track-item .at-icon { font-size: 14px; flex-shrink: 0; }
.audio-track-item .at-name { flex: 1; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-track-item .at-add {
  background: var(--accent); color: white; border: none;
  border-radius: 4px; padding: 2px 7px; font-size: 10px; cursor: pointer;
  font-weight: 600; transition: filter 0.15s;
}
.audio-track-item .at-add:hover { filter: brightness(1.15); }
.audio-track-item .at-remove {
  background: none; border: none; color: var(--accent-2);
  cursor: pointer; font-size: 14px; transition: transform 0.15s;
}
.audio-track-item .at-remove:hover { transform: scale(1.2); }

/* ══════════════════════════════════════════════════
   TEXT EDITOR PANEL
══════════════════════════════════════════════════ */
.text-editor-panel { display: flex; flex-direction: column; gap: 6px; }
.text-editor-panel label {
  font-size: 10px; color: var(--text-secondary);
  margin-top: 4px; font-weight: 600; letter-spacing: 0.03em;
}
.text-editor-panel input[type=text],
.text-editor-panel select,
.text-editor-panel input[type=number] {
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-primary); border-radius: var(--radius);
  padding: 5px 8px; font-size: 12px; font-family: var(--font); width: 100%;
  transition: border-color 0.15s;
}
.text-editor-panel input:focus, .text-editor-panel select:focus { border-color: var(--accent); }
.text-editor-panel input[type=range] { width: 100%; accent-color: var(--accent); }
.text-editor-panel input[type=color] {
  width: 42px; height: 32px; padding: 2px; border-radius: var(--radius);
  border: 1px solid var(--border-light); background: none; cursor: pointer;
}
.bg-options, .align-btns { display: flex; gap: 5px; }
.bg-btn, .align-btn {
  flex: 1; padding: 5px 4px;
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-secondary); border-radius: var(--radius);
  cursor: pointer; font-size: 10px; font-family: var(--font);
  transition: all 0.15s;
}
.bg-btn.active, .align-btn.active {
  background: var(--accent); color: white; border-color: var(--accent);
  box-shadow: 0 0 8px rgba(124,111,247,0.3);
}
.bg-btn:hover:not(.active), .align-btn:hover:not(.active) {
  background: var(--bg-hover); color: var(--text-primary);
}

/* Font select + preview */
.font-select-wrap { display: flex; flex-direction: column; gap: 5px; }
.font-preview {
  background: var(--bg-track); border: 1px dashed var(--border-light);
  border-radius: var(--radius); padding: 6px 10px; min-height: 34px;
  font-size: 18px; color: var(--text-primary); text-align: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: font-family 0.2s;
}

/* Size row */
.size-row { display: flex; align-items: center; gap: 8px; }
.size-row input[type="range"] { flex: 1; }
.size-num-input {
  width: 52px; background: var(--bg-panel-2);
  border: 1px solid var(--border-light); border-radius: var(--radius);
  color: var(--text-primary); font-size: 11px; padding: 3px 5px;
  text-align: center; font-family: var(--font);
}

/* prop-badge */
.prop-badge {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700; border-radius: 4px;
  padding: 1px 5px; vertical-align: middle; margin-left: 4px;
}

/* Style buttons */
.text-style-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.style-btn {
  flex: 1; min-width: 44px; height: 32px;
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: 13px; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.style-btn:hover { background: var(--bg-hover); }
.style-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 10px rgba(124,111,247,0.3); }

/* 3×3 position grid */
.position-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  background: var(--bg-track); padding: 6px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.pos-btn {
  aspect-ratio: 1; background: var(--bg-panel-2);
  border: 1px solid var(--border-light); border-radius: var(--radius);
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.pos-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.pos-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 10px rgba(124,111,247,0.4); }

/* ══════════════════════════════════════════════════
   FX LIST
══════════════════════════════════════════════════ */
.fx-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; margin-bottom: 8px; }
.fx-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; padding: 6px; border-radius: var(--radius);
  transition: all 0.15s;
  border: 1px solid transparent;
}
.fx-item:hover { background: var(--bg-hover); border-color: var(--border-light); }
.fx-item span { font-size: 9px; color: var(--text-secondary); text-align: center; font-weight: 500; }
.fx-preview {
  width: 50px; height: 32px; border-radius: 4px;
  background: linear-gradient(135deg, #1c2030, #2a3050);
  overflow: hidden; position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
/* Transition previews */
.fade-preview { background: linear-gradient(to right, #111 0%, #7c6ff7 50%, #111 100%); opacity: 0.7; }
.slide-preview { background: linear-gradient(to right, #7c6ff7 50%, #111318 50%); }
.zoom-preview { background: radial-gradient(circle, #7c6ff7 25%, #111 75%); }
.wipe-preview { background: linear-gradient(to bottom, #7c6ff7 50%, #111 50%); }
.flip-preview { background: linear-gradient(to right, #111 0%, #a78bfa 50%, #111 100%); transform: scaleX(-1); }
.blur-preview { filter: blur(2.5px); background: linear-gradient(135deg, #7c6ff7, #c45ef0); }
/* Filter previews */
.filter-none { background: linear-gradient(135deg, #e6c97e, #7ec4e6); }
.filter-gray { filter: grayscale(1); background: linear-gradient(135deg, #e6c97e, #7ec4e6); }
.filter-sepia { filter: sepia(1); background: linear-gradient(135deg, #e6c97e, #7ec4e6); }
.filter-vivid { filter: saturate(3); background: linear-gradient(135deg, #e6c97e, #7ec4e6); }
.filter-vintage { filter: sepia(0.4) saturate(1.5) brightness(0.9); background: linear-gradient(135deg, #e6c97e, #7ec4e6); }
.filter-cool { filter: hue-rotate(20deg) saturate(1.5); background: linear-gradient(135deg, #7ec4e6, #7c6ff7); }
.filter-warm { background: linear-gradient(135deg, #ff9a44, #fc6076); }
.filter-fade-film { background: linear-gradient(135deg, #d4c5a9, #9eada5); filter: contrast(0.85); }
.filter-teal-orange { background: linear-gradient(135deg, #f7971e, #2b9e9e); }
.filter-noir { background: linear-gradient(135deg, #111, #555); filter: contrast(1.4); }
.filter-golden { background: linear-gradient(135deg, #f7c36d, #e8842c); }
.filter-matte { background: linear-gradient(135deg, #8e9eab, #eef2f3); filter: contrast(0.88); }

/* Adjustments */
.adjustments { display: flex; flex-direction: column; gap: 4px; }
.adjustments label {
  font-size: 10px; color: var(--text-secondary);
  display: flex; justify-content: space-between;
  font-weight: 500;
}
.adjustments input[type=range] { width: 100%; accent-color: var(--accent); }

/* ══════════════════════════════════════════════════
   CINEMA FX
══════════════════════════════════════════════════ */
.cinema-fx-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
  margin-bottom: 8px;
}
.cinema-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; background: var(--bg-panel-2);
  border: 1px solid var(--border-light); border-radius: var(--radius);
  color: var(--text-secondary); font-size: 9px; font-family: var(--font); font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  letter-spacing: 0.02em;
}
.cinema-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.cinema-btn.active {
  background: rgba(124,111,247,0.14); border-color: var(--accent);
  color: var(--accent); box-shadow: 0 0 14px rgba(124,111,247,0.2);
}
.cfx-icon {
  width: 36px; height: 22px; border-radius: 4px;
  background: var(--bg-track);
}
.vignette-icon { background: radial-gradient(ellipse at center, #555 0%, #111 100%); }
.grain-icon { background: #333; filter: contrast(1.5) brightness(0.7); }
.bars-icon { background: linear-gradient(to bottom, #000 20%, #6655cc 20%, #6655cc 80%, #000 80%); }
.glow-icon { background: radial-gradient(ellipse at center, rgba(200,180,255,0.9) 0%, rgba(80,60,160,0.5) 60%, transparent 100%); }
.sharpen-icon { background: linear-gradient(135deg, #2a2a2a 25%, #555 50%, #2a2a2a 75%); filter: contrast(2); }
.kb-icon { background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%); box-shadow: inset 2px 2px 6px rgba(255,255,255,0.08); }

.cfx-slider-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-top: 1px solid var(--border);
}
.cfx-slider-row label {
  min-width: 80px; font-size: 10px; color: var(--text-secondary);
  white-space: nowrap; font-weight: 600;
}
.cfx-slider-row input[type="range"] { flex: 1; accent-color: var(--accent); }

/* ══════════════════════════════════════════════════
   TEMPLATES
══════════════════════════════════════════════════ */
.tpl-panel { display: flex; flex-direction: column; gap: 14px; }
.tpl-search-row { margin-bottom: 0; }
.tpl-search-input {
  width: 100%; background: var(--bg-panel-2);
  border: 1px solid var(--border-light); color: var(--text-primary);
  border-radius: var(--radius); padding: 6px 10px;
  font-size: 12px; font-family: var(--font);
  transition: border-color 0.15s;
}
.tpl-search-input:focus { border-color: var(--accent); }

.tpl-category { display: flex; flex-direction: column; gap: 8px; }
.tpl-cat-title {
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 0 6px;
  border-bottom: 1px solid var(--border);
}
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }

.tpl-card {
  display: flex; flex-direction: column;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
}
.tpl-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(124,111,247,0.15);
  transform: translateY(-1px);
}
.tpl-card-name {
  font-size: 10px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 2px; line-height: 1.3;
}
.tpl-card-desc {
  font-size: 9px; color: var(--text-muted);
  margin-bottom: 6px; line-height: 1.4; flex: 1;
}

/* Template thumbnails */
.tpl-thumb {
  width: 100%; height: 56px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px; overflow: hidden; position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}
.tpl-thumb-label {
  font-size: 11px; font-weight: 900; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  letter-spacing: 0.08em; font-family: var(--font-display);
  position: relative; z-index: 1;
}
.tpl-thumb-yt-intro {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 60%, #3a2f7a 100%);
  box-shadow: inset 0 0 20px rgba(124,111,247,0.15);
}
.tpl-thumb-yt-title { background: linear-gradient(135deg, #1a1a2e, #4a3f9e); }
.tpl-thumb-yt-end {
  background: linear-gradient(135deg, #0d0d1a, #7a2fa0);
  box-shadow: inset 0 0 20px rgba(196,94,240,0.2);
}
.tpl-thumb-promo { background: linear-gradient(135deg, #1a0533, #6b0f7a, #ff6b6b); }
.tpl-thumb-soldes { background: linear-gradient(135deg, #1a0000, #8b0000, #ff2222); }
.tpl-thumb-reel { background: linear-gradient(135deg, #0a0a0a, #3a2a7a, #7c6ff7); }
.tpl-thumb-corp { background: linear-gradient(135deg, #111827, #1e2a3a, #374151); }
.tpl-thumb-stats { background: linear-gradient(135deg, #0f172a, #0a4a30, #43d98e); }
.tpl-thumb-quote { background: linear-gradient(135deg, #1e1b2e, #3a3010, #f5c842); }
.tpl-thumb-cine { background: linear-gradient(135deg, #000, #111, #1a1a1a); border: 1px solid #333; }
.tpl-thumb-sub { background: linear-gradient(135deg, #000, #0a0a0a, #111); border: 1px solid #222; }
.tpl-thumb-credits { background: linear-gradient(to bottom, #000 0%, #111 50%, #000 100%); }

/* ══════════════════════════════════════════════════
   PREVIEW CENTER
══════════════════════════════════════════════════ */
.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  gap: 10px;
  overflow: hidden;
  background: var(--bg-base);
  min-height: 0;
  background-image: radial-gradient(ellipse at center, rgba(124,111,247,0.04) 0%, transparent 70%);
}
.canvas-wrapper {
  position: relative;
  box-shadow: 0 0 0 1px var(--border), 0 0 60px rgba(124,111,247,0.1), var(--shadow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 1;
  max-width: 100%;
  max-height: calc(100% - 60px);
  transition: box-shadow 0.3s;
}
.canvas-wrapper:hover {
  box-shadow: 0 0 0 1px var(--border-light), 0 0 80px rgba(124,111,247,0.15), var(--shadow);
}
#main-canvas {
  display: block;
  background: #000;
  max-width: 100%;
  max-height: 100%;
}
.canvas-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.canvas-loading {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-primary);
  border-radius: var(--radius-lg);
}
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ══════════════════════════════════════════════════
   PLAYBACK BAR
══════════════════════════════════════════════════ */
.playback-bar {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 5px 12px;
  width: 100%;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.pb-btn {
  background: none; border: none; color: var(--text-primary);
  cursor: pointer; font-size: 15px; padding: 3px 5px;
  border-radius: 5px; transition: background 0.15s, transform 0.1s;
  line-height: 1;
}
.pb-btn:hover { background: var(--bg-hover); }
.pb-btn:active { transform: scale(0.92); }
.pb-play {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(124,111,247,0.4);
  transition: all 0.15s;
}
.pb-play:hover { filter: brightness(1.15); box-shadow: 0 4px 16px rgba(124,111,247,0.55); transform: scale(1.05); }
.pb-time {
  font-size: 11px; font-family: monospace; color: var(--text-secondary);
  background: var(--bg-panel-2); padding: 3px 8px; border-radius: 5px;
  border: 1px solid var(--border);
}
.pb-sep { margin: 0 2px; opacity: 0.5; }
.pb-spacer { flex: 1; }
.pb-zoom {
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-primary); border-radius: var(--radius);
  padding: 3px 6px; font-size: 11px; font-family: var(--font);
  cursor: pointer;
}
.pb-volume { display: flex; align-items: center; gap: 6px; }
.pb-volume input { width: 65px; accent-color: var(--accent); }

/* ══════════════════════════════════════════════════
   PROPERTIES PANEL
══════════════════════════════════════════════════ */
.properties-panel {
  background: var(--bg-panel); border-top: 1px solid var(--border);
  padding: 8px 14px; flex-shrink: 0; min-height: 76px;
}
.prop-title {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em;
}
.prop-empty { font-size: 11px; color: var(--text-muted); }
.prop-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.prop-row label { font-size: 10px; color: var(--text-secondary); min-width: 70px; font-weight: 500; }
.prop-row input[type=range], .prop-row input[type=number], .prop-row select {
  flex: 1;
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-primary); border-radius: var(--radius);
  padding: 3px 6px; font-size: 11px; font-family: var(--font);
}
.prop-row input[type=range] { padding: 0; accent-color: var(--accent); }
.prop-val { font-size: 10px; color: var(--text-secondary); min-width: 36px; text-align: right; }

/* ══════════════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════════════ */
.panel-right .section-title { margin: 12px 0 5px; }
.panel-right .section-title:first-child { margin-top: 0; }
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.format-btn {
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-muted); border-radius: var(--radius);
  padding: 6px 4px; font-size: 10px; cursor: pointer;
  transition: all 0.15s; font-weight: 600; font-family: var(--font);
  text-align: center;
}
.format-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.format-btn.active {
  background: rgba(124,111,247,0.14);
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 8px rgba(124,111,247,0.15);
}
.panel-right select, .panel-right input[type=number] {
  width: 100%; background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-primary); border-radius: var(--radius);
  padding: 5px 8px; font-size: 11px; font-family: var(--font); margin-bottom: 4px;
}
.color-full {
  width: 100%; height: 34px; padding: 2px;
  border-radius: var(--radius); border: 1px solid var(--border-light);
  background: none; cursor: pointer;
}
.input-full { width: 100%; }
.export-info { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }

/* ══════════════════════════════════════════════════
   WATERMARK PANEL
══════════════════════════════════════════════════ */
.watermark-panel-box {
  background: linear-gradient(135deg, rgba(124,111,247,0.07), rgba(167,139,250,0.03));
  border: 1px solid rgba(124,111,247,0.2);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: flex; flex-direction: column; gap: 7px;
  margin-top: 4px;
}
.watermark-panel-box .wm-header {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; color: var(--accent);
  margin-bottom: 2px;
}
.watermark-panel-box .wm-icon {
  width: 24px; height: 24px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
#watermark-preview-wrap { margin-top: 2px; }
#watermark-preview {
  width: 100%; border-radius: 5px;
  border: 1px solid var(--border-light);
  background: repeating-conic-gradient(rgba(128,128,128,0.1) 0% 25%, transparent 0% 50%) 0 0 / 12px 12px;
}
.wm-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-panel-2); border-radius: var(--radius); padding: 6px 10px;
  border: 1px solid var(--border);
}
.wm-toggle-row label { font-size: 11px; font-weight: 500; color: var(--text-primary); cursor: pointer; }
.wm-switch { position: relative; width: 34px; height: 18px; flex-shrink: 0; }
.wm-switch input { opacity: 0; width: 0; height: 0; }
.wm-slider {
  position: absolute; inset: 0; background: var(--border-light);
  border-radius: 18px; cursor: pointer; transition: background 0.2s;
}
.wm-slider::before {
  content: ''; position: absolute;
  width: 12px; height: 12px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.wm-switch input:checked + .wm-slider { background: var(--accent); }
.wm-switch input:checked + .wm-slider::before { transform: translateX(16px); }
.wm-row { display: flex; flex-direction: column; gap: 3px; }
.wm-row label {
  font-size: 10px; color: var(--text-secondary); font-weight: 500;
  display: flex; justify-content: space-between;
}
.wm-row select, .wm-row input[type=range] { width: 100%; }
.wm-row select {
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-primary); border-radius: var(--radius);
  padding: 4px 6px; font-size: 11px; font-family: var(--font);
}
.wm-row input[type=range] { accent-color: var(--accent); }

/* ══════════════════════════════════════════════════
   COLLAPSIBLE DETAILS
══════════════════════════════════════════════════ */
.media-section-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-panel-2);
  transition: border-color 0.15s;
}
.media-section-details:hover { border-color: var(--border-light); }
.media-section-summary {
  padding: 9px 12px;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  transition: color 0.15s, background 0.15s;
}
.media-section-summary:hover { color: var(--text-primary); background: var(--bg-hover); }
.media-section-summary::-webkit-details-marker { display: none; }
.media-section-summary::before {
  content: "▶";
  font-size: 8px;
  transition: transform 0.2s;
  display: inline-block;
  color: var(--text-muted);
}
.media-section-details[open] .media-section-summary::before { transform: rotate(90deg); }
.media-section-details > *:not(summary) { padding: 8px 12px 12px; }

/* Workflow guide highlight */
.workflow-guide {
  background: linear-gradient(135deg, rgba(124,111,247,0.08), rgba(124,111,247,0.03)) !important;
  border-color: rgba(124,111,247,0.2) !important;
}
.wg-steps { display: flex; flex-direction: column; gap: 0; }
.wg-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0;
}
.wg-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-hover); border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s;
}
.wg-step-label { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.wg-step-desc { font-size: 10px; color: var(--text-secondary); margin-top: 1px; line-height: 1.4; }
.wg-arrow { text-align: center; color: var(--text-muted); font-size: 11px; padding: 2px 0 2px 10px; }
.wg-step.active .wg-step-num {
  background: var(--accent-green); border-color: var(--accent-green);
  color: #fff; animation: pulse-step 1.5s infinite;
}
@keyframes pulse-step {
  0%, 100% { box-shadow: 0 0 0 0 rgba(67,217,142,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(67,217,142,0); }
}

/* ══════════════════════════════════════════════════
   SCREENSHOT PANEL
══════════════════════════════════════════════════ */
.screenshot-panel { display: flex; flex-direction: column; gap: 6px; }
.screenshot-preview-wrap {
  background: var(--bg-panel-2); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border-light);
}
.screenshot-preview-wrap img { width: 100%; display: block; max-height: 120px; object-fit: cover; }
.ss-actions { display: flex; gap: 6px; padding: 6px; }

/* ══════════════════════════════════════════════════
   TIMELINE
══════════════════════════════════════════════════ */
.timeline-section {
  height: var(--tl-height);
  min-height: var(--tl-height);
  max-height: var(--tl-height);
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0;
}
.timeline-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: var(--bg-panel-2);
}
.timeline-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.timeline-tools { display: flex; gap: 5px; align-items: center; }
.tl-zoom-label {
  font-size: 11px; color: var(--text-secondary); min-width: 30px; text-align: center;
  font-family: monospace; font-weight: 700;
}
.timeline-body { display: flex; flex: 1; overflow: hidden; }
.track-labels {
  width: 88px; flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  padding-top: 22px;
  background: var(--bg-panel-2);
}
.track-label {
  height: 40px; display: flex; align-items: center;
  padding: 0 10px; gap: 6px;
  font-size: 10px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.track-label-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.timeline-scroll {
  flex: 1; overflow-x: auto; overflow-y: hidden; position: relative;
}
.timeline-inner { position: relative; min-width: 100%; height: 100%; }

/* Ruler */
.tl-ruler {
  height: 22px; background: var(--bg-panel-2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: flex-end; padding-bottom: 2px;
}
.ruler-tick {
  position: absolute; bottom: 0;
  font-size: 8px; color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 3px; padding-bottom: 2px;
  line-height: 1; user-select: none;
}
.ruler-tick.major { border-left-color: var(--border-light); color: var(--text-secondary); font-weight: 600; }

/* Playhead */
.tl-playhead {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: var(--accent-2);
  z-index: 20; cursor: ew-resize;
  box-shadow: 0 0 8px rgba(255,107,107,0.6);
}
.tl-playhead::before {
  content: '▾';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  color: var(--accent-2); font-size: 12px; line-height: 1;
  text-shadow: 0 0 6px rgba(255,107,107,0.8);
}

/* Tracks */
.tl-track {
  height: 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: visible;
  transition: background 0.15s;
}
.tl-track.drag-over { background: rgba(124,111,247,0.06); }
/* Alternating subtle row backgrounds */
#track-video   { background: rgba(61,79,212,0.03); }
#track-overlay { background: rgba(196,94,240,0.03); }
#track-audio   { background: rgba(45,176,122,0.03); }
#track-music   { background: rgba(230,122,42,0.03); }

/* ══════════════════════════════════════════════════
   CLIPS
══════════════════════════════════════════════════ */
.tl-clip {
  position: absolute;
  top: 4px; height: 32px;
  border-radius: 5px;
  cursor: pointer;
  display: flex; align-items: center;
  padding: 0 6px;
  overflow: hidden;
  user-select: none;
  font-size: 10px; font-weight: 600;
  transition: filter 0.12s, box-shadow 0.12s;
  border: 1px solid rgba(255,255,255,0.1);
}
.tl-clip:hover { filter: brightness(1.18); }
.tl-clip.selected {
  box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent);
}
.clip-video {
  background: linear-gradient(135deg, #2e3db0 0%, #5c6de0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.clip-audio {
  background: linear-gradient(135deg, #156b45 0%, #2db07a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.clip-text {
  background: linear-gradient(135deg, #7a2aa0 0%, #c45ef0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.clip-music {
  background: linear-gradient(135deg, #9a4a15 0%, #e67a2a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.tl-clip .clip-label {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: rgba(255,255,255,0.95); font-size: 10px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.tl-clip .clip-thumb {
  width: 24px; height: 24px; object-fit: cover;
  border-radius: 3px; margin-right: 5px; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.clip-resize-right {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 6px; cursor: ew-resize;
  background: rgba(255,255,255,0.2);
  border-radius: 0 5px 5px 0;
  transition: background 0.15s;
}
.tl-clip:hover .clip-resize-right { background: rgba(255,255,255,0.35); }

/* ══════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5,6,12,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 480px; max-width: 95vw;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 15px; font-weight: 700; font-family: var(--font-display); }
.modal-close {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; font-size: 16px; padding: 5px 8px; border-radius: var(--radius);
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--accent-2); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* Export modal */
.export-progress-wrap { display: flex; flex-direction: column; gap: 10px; }
.export-status { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.progress-bar {
  background: var(--bg-track); border-radius: 999px; height: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  width: 0%; transition: width 0.4s ease; border-radius: 999px;
}
.export-log {
  font-size: 10px; color: var(--text-muted); max-height: 80px; overflow-y: auto;
  font-family: monospace; background: var(--bg-track); border-radius: var(--radius);
  padding: 7px 10px; border: 1px solid var(--border); line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   PRESENTATION MODAL PRO
══════════════════════════════════════════════════ */
.modal-present-pro {
  width: 830px; max-width: 97vw;
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-present-pro .modal-body { padding: 16px; flex: 1; overflow-y: auto; position: relative; }
.present-modal-title { display: flex; align-items: center; gap: 12px; }
.present-modal-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #a033cc, #c45ef0);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(196,94,240,0.4);
}
.present-modal-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.present-layout-pro { display: flex; gap: 16px; min-height: 0; }
.present-left { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.present-controls-pro {
  width: 285px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; max-height: 500px;
}
.present-preview-wrap {
  background: #000; border-radius: var(--radius-lg);
  min-height: 220px; max-height: 300px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-light); flex: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.present-preview-wrap video { width: 100%; height: 100%; object-fit: contain; display: block; }
.present-no-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 12px;
}
.present-no-screen.hidden { display: none; }
.present-rec-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(180,0,0,0.92); border-radius: 5px;
  padding: 3px 10px; font-size: 11px; font-weight: 700;
  color: #fff; display: flex; align-items: center; gap: 5px;
  letter-spacing: 0.08em; backdrop-filter: blur(4px);
}
.present-rec-dot {
  width: 8px; height: 8px; background: #fff; border-radius: 50%;
  animation: blink 0.8s infinite; flex-shrink: 0;
}
.present-timer-overlay {
  position: absolute; bottom: 10px; right: 12px;
  background: rgba(0,0,0,0.7); border-radius: 7px;
  padding: 4px 10px; backdrop-filter: blur(6px);
}
.present-timer-big {
  font-family: monospace; font-size: 22px; font-weight: 700;
  color: #fff; letter-spacing: 0.05em;
}
.present-dur-bar-wrap { display: flex; flex-direction: column; gap: 4px; }
.present-dur-bar-track {
  height: 5px; background: var(--bg-track); border-radius: 3px; overflow: hidden;
  border: 1px solid var(--border);
}
.present-dur-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow), var(--accent-2));
  border-radius: 3px; transition: width 0.5s linear;
}
.present-dur-bar-label {
  display: flex; justify-content: space-between; font-size: 9px;
  color: var(--text-muted); font-family: monospace;
}

/* Step cards */
.present-step-card {
  display: flex; gap: 10px;
  background: var(--bg-panel-2); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 10px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.present-step-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124,111,247,0.1);
}
.present-step-card.done { border-color: var(--accent-green); }
.present-step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-hover); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  transition: all 0.2s;
}
.present-step-card.active .present-step-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.present-step-card.done .present-step-num { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }
.present-step-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.present-step-title {
  font-size: 10px; font-weight: 700; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.present-step-status { font-size: 10px; color: var(--text-muted); line-height: 1.4; word-break: break-word; }
.present-step-status.ok { color: var(--accent-green); }
.present-btn-full { width: 100%; justify-content: center; }

.present-vu-wrap {
  background: var(--bg-track); border-radius: 5px; overflow: hidden; padding: 4px;
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--border);
}
.present-vu-bars { display: flex; gap: 3px; height: 12px; align-items: flex-end; padding: 0 4px; }
.vu-bar {
  flex: 1; height: 4px; background: var(--border-light); border-radius: 2px;
  transition: height 0.08s, background 0.08s;
}
.present-dur-preset {
  flex: 1; padding: 4px 0; font-size: 10px; font-weight: 700;
  background: var(--bg-hover); border: 1px solid var(--border-light);
  color: var(--text-secondary); border-radius: 4px; cursor: pointer;
  transition: all 0.12s; font-family: var(--font);
}
.present-dur-preset:hover { background: rgba(124,111,247,0.15); border-color: var(--accent); color: var(--accent); }
.present-dur-preset.active { background: rgba(124,111,247,0.2); border-color: var(--accent); color: var(--accent); }
.present-step-record { background: rgba(232,75,75,0.03); border-color: rgba(232,75,75,0.18); }
.present-record-btns { display: flex; gap: 8px; }
.present-btn-start { flex: 1; justify-content: center; }
.present-btn-stop { flex-shrink: 0; }

/* Result card */
.present-result-card {
  background: rgba(67,217,142,0.05); border-radius: var(--radius-lg);
  border: 1px solid rgba(67,217,142,0.25); padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.present-result-header { display: flex; align-items: center; gap: 10px; }
.present-result-icon { font-size: 22px; flex-shrink: 0; }
.present-result-title { font-size: 12px; font-weight: 700; color: var(--accent-green); }
.present-result-meta { font-size: 10px; color: var(--text-muted); }
.present-result-card video { width: 100%; border-radius: var(--radius); max-height: 130px; background: #000; }
.present-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Countdown overlay */
.present-countdown-overlay {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(8,9,16,0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}
.present-countdown-number {
  font-family: var(--font-display); font-size: 96px; font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 80px rgba(124,111,247,0.7);
  animation: countdown-pulse 0.9s ease-out infinite;
  line-height: 1;
}
.present-countdown-label { font-size: 14px; color: var(--text-secondary); letter-spacing: 0.06em; }
@keyframes countdown-pulse {
  0% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.4; }
}

.present-select, .present-input {
  background: var(--bg-panel-2); border: 1px solid var(--border-light);
  color: var(--text-primary); border-radius: var(--radius);
  padding: 5px 8px; font-size: 11px; font-family: var(--font); width: 100%;
}

/* ══════════════════════════════════════════════════
   CANVAS OVERLAY TEXT
══════════════════════════════════════════════════ */
.overlay-text-el {
  position: absolute;
  pointer-events: none;
  color: white;
  font-weight: bold;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.9);
  transition: opacity 0.3s;
}
