/* ═══════════════════════════════════════════════════════════════
   MAKRON STUDIO — VIDEO EDITOR
   Cyberpunk Professional. Neon Pink / Deep Black.
═══════════════════════════════════════════════════════════════ */

/* ── CUSTOM PROPERTIES ── */
:root {
  --bg:           #0a0a0a;
  --surface:      #0f0f0f;
  --surface-2:    #141414;
  --surface-3:    #1a1a1a;
  --border:       #222222;
  --border-2:     #2a2a2a;
  --primary:      #ff0a45;
  --primary-dim:  rgba(255, 10, 69, 0.15);
  --primary-glow: rgba(255, 10, 69, 0.35);
  --text:         #ffffff;
  --text-muted:   #666666;
  --text-dim:     #444444;
  --blue:         #3b8eff;
  --green:        #00e676;
  --yellow:       #ffcc00;
  --radius:       4px;
  --radius-lg:    8px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --header-h:     44px;
  --sidebar-w:    44px;
  --panel-w:      220px;
  --inspector-w:  256px;
  --timeline-h:   224px;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; -webkit-font-smoothing: antialiased; }

body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  user-select: none;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ── UTILITY ── */
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-size: 11px; }

/* ══════════════════════════════════════════════════════════════
   WELCOME MODAL
══════════════════════════════════════════════════════════════ */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.welcome-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 80px rgba(0,0,0,0.8), 0 0 40px rgba(255,10,69,0.06);
  overflow: hidden;
}

.welcome-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: white;
  letter-spacing: -1px;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.welcome-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }

.early-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--primary-dim);
  border: 1px solid rgba(255,10,69,0.3);
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.welcome-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.agree-label {
  display: flex;
  gap: 12px;
  cursor: pointer;
}

.agree-label input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid var(--border-2);
  border-radius: 3px;
  background: var(--surface-3);
  cursor: pointer;
  margin-top: 2px;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.agree-label input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.agree-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: 2px solid white;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

.agree-text { color: var(--text-muted); font-size: 11.5px; line-height: 1.55; }

.welcome-attribution { font-size: 11px; color: var(--text-dim); padding-top: 12px; border-top: 1px solid var(--border); }
.welcome-attribution a { color: var(--primary); text-decoration: none; }
.welcome-attribution a:hover { text-decoration: underline; }

.welcome-footer {
  padding: 16px 28px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════
   MODAL / DIALOG BASE
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.export-modal, .settings-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  overflow: hidden;
}

.settings-modal { max-width: 420px; }

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

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.modal-title svg { color: var(--primary); }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--text); background: var(--surface-3); }

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.export-group { display: flex; flex-direction: column; gap: 8px; }
.export-label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.format-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.format-btn:hover { border-color: var(--border-2); }
.format-btn.active { border-color: var(--primary); background: var(--primary-dim); }
.format-name { font-weight: 600; font-size: 13px; color: var(--text); }
.format-desc { font-size: 10px; color: var(--text-muted); line-height: 1.3; }

.resolution-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.res-pill {
  padding: 5px 12px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.res-pill:hover { color: var(--text); border-color: var(--border-2); }
.res-pill.active { color: var(--primary); border-color: var(--primary); background: var(--primary-dim); }

.quality-header { display: flex; align-items: center; justify-content: space-between; }
.quality-value { font-family: var(--font-mono); font-size: 11px; color: var(--primary); }
.quality-range {
  width: 100%;
  appearance: none;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.quality-range::-webkit-slider-thumb {
  appearance: none;
  width: 14px; height: 14px;
  background: var(--text);
  border: 2px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
}
.quality-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); margin-top: 2px; }

.export-estimate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.estimate-label { font-size: 11px; color: var(--text-muted); }
.estimate-value { font-family: var(--font-mono); font-size: 12px; color: var(--text); }

/* Shortcut list */
.shortcut-list { display: flex; flex-direction: column; gap: 4px; }
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
}
.shortcut-row:last-child { border: none; }
kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  padding: 2px 6px;
}

/* Text input */
.text-input {
  width: 100%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s;
}
.text-input:focus { border-color: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  width: 100%;
  justify-content: center;
}
.btn-primary:hover:not(:disabled) { background: #e0082f; }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-3); }

/* ══════════════════════════════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════════════════════════════ */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── GLOBAL HEADER ── */
.global-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 100;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.header-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; }

.logo { display: flex; align-items: center; gap: 8px; }
.logo-mark-sm {
  width: 22px; height: 22px;
  background: var(--primary);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark-sm span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: white;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.header-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.undo-redo { display: flex; gap: 2px; }

.project-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  border-bottom: 1px solid transparent;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: text;
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
  transition: border-color 0.15s;
}
.project-name:hover { border-color: var(--text-muted); }
.project-name:focus { border-color: var(--primary); }

.save-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--green);
  opacity: 0.8;
}
.save-indicator.unsaved { color: var(--yellow); }
.save-indicator svg { flex-shrink: 0; }

.btn-export {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.2px;
}
.btn-export:hover { background: #e0082f; }

.avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--surface-3);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s;
  margin-left: 2px;
}
.avatar-btn:hover { background: var(--border); color: var(--text); }

/* ── WORKSPACE ── */
.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* ── UTILITY SIDEBAR (icon strip) ── */
.utility-sidebar {
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  gap: 2px;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.sidebar-icon:hover { color: var(--text); background: var(--surface-3); }
.sidebar-icon.active { color: var(--primary); background: var(--primary-dim); border-color: rgba(255,10,69,0.4); }

.sidebar-spacer { flex: 1; }

/* ── CONTEXTUAL PANEL ── */
.contextual-panel {
  width: var(--panel-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.panel-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.panel-action {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.panel-action:hover { color: var(--text); border-color: var(--border-2); }

.panel-actions-row { display: flex; gap: 2px; }
.panel-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.panel-icon-btn:hover { color: var(--text); background: var(--surface-3); }

/* Assets */
.assets-drop-zone {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  position: relative;
}

.drop-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  color: var(--text-dim);
  font-size: 11px;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  transition: border-color 0.15s, color 0.15s;
}
.drop-placeholder:hover { border-color: var(--primary); color: var(--text-muted); }
.drop-placeholder svg { opacity: 0.4; }

.assets-drop-zone.drag-over .drop-placeholder,
.assets-drop-zone.drag-over { border-color: var(--primary) !important; background: var(--primary-dim); }

.asset-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.asset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius);
  cursor: grab;
  transition: background 0.12s;
  border: 1px solid transparent;
  group: true;
}
.asset-item:hover { background: var(--surface-3); border-color: var(--border); }
.asset-item:active { cursor: grabbing; }

.asset-icon {
  width: 30px; height: 22px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.asset-icon.type-video { color: var(--blue); background: rgba(59,142,255,0.1); }
.asset-icon.type-audio { color: var(--green); background: rgba(0,230,118,0.1); }
.asset-icon.type-image { color: #c084fc; background: rgba(192,132,252,0.1); }

.asset-thumb { width: 30px; height: 22px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }

.asset-info { flex: 1; min-width: 0; }
.asset-name { font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-meta { font-size: 10px; color: var(--text-dim); margin-top: 1px; }

.asset-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: 3px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.asset-item:hover .asset-delete { opacity: 1; }
.asset-delete:hover { color: var(--primary); background: var(--primary-dim); }

.asset-stats {
  padding: 6px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* History */
.history-list { list-style: none; padding: 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius);
  font-size: 11.5px;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s;
}
.history-item:hover { background: var(--surface-3); }
.history-item.current { color: var(--text); border-color: var(--primary-dim); background: rgba(255,10,69,0.05); }
.history-item.future { opacity: 0.4; }
.history-time { margin-left: auto; font-size: 10px; color: var(--text-dim); flex-shrink: 0; }
.history-empty { font-size: 11px; color: var(--text-dim); padding: 12px 8px; text-align: center; }

/* Effects */
.effects-categories { padding: 8px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.effect-category { border-radius: var(--radius); overflow: hidden; }

.effect-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--surface-3);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.12s;
  border: 1px solid var(--border);
}
.effect-cat-header:hover { background: var(--border); }

.cat-chevron { transition: transform 0.2s; color: var(--text-muted); }
.effect-cat-header.open .cat-chevron { transform: rotate(180deg); }

.effect-items {
  list-style: none;
  padding: 4px 0;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.2s;
}
.effect-items.collapsed { max-height: 0; }

.effect-item {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
  transition: color 0.12s, background 0.12s;
}
.effect-item:hover { color: var(--text); background: var(--surface-3); }

/* ── PREVIEW AREA ── */
.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-width: 0;
  overflow: hidden;
}

.preview-toolbar {
  height: 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  flex-shrink: 0;
}

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

.tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.tool-btn:hover { color: var(--text); background: var(--surface-3); }
.tool-btn.active { color: var(--primary); background: var(--primary-dim); }

.canvas-info { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); margin-left: 8px; }
.zoom-display { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); padding: 0 6px; min-width: 42px; text-align: center; }

.preview-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,10,69,0.04) 0%, transparent 60%),
    var(--bg);
  overflow: hidden;
  position: relative;
}

.canvas-wrapper {
  position: relative;
  background: #000;
  box-shadow: 0 0 0 1px var(--border), 0 20px 60px rgba(0,0,0,0.6);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.canvas-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Grid overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  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: 10% 10%;
}

/* Safe zone overlay */
.safezone-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.safezone-outer {
  position: absolute;
  inset: 5%;
  border: 1px dashed rgba(255, 204, 0, 0.35);
}
.safezone-inner {
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(255, 59, 59, 0.25);
}

/* No media placeholder */
.no-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  background: #111;
}
.no-media-placeholder p { font-size: 13px; color: var(--text-muted); }
.no-media-placeholder span { font-size: 11px; }

/* ── INSPECTOR SIDEBAR ── */
.inspector-sidebar {
  width: var(--inspector-w);
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.inspector-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.inspector-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.inspector-section { padding: 10px 12px; border-bottom: 1px solid var(--border); }

.clip-info-card {
  background: var(--primary-dim);
  border: 1px solid rgba(255,10,69,0.25);
  border-radius: var(--radius);
  padding: 9px 10px;
  margin-bottom: 4px;
}
.clip-info-name { font-size: 12px; font-weight: 500; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-info-meta { display: flex; justify-content: space-between; margin-top: 3px; font-size: 10px; color: var(--text-muted); }

.inspector-group {
  border-bottom: 1px solid var(--border);
}
.inspector-group:last-child { border-bottom: none; }

.inspector-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  list-style: none;
  user-select: none;
  position: relative;
  transition: color 0.12s;
}
.inspector-group-header:hover { color: var(--text); }
.inspector-group-header svg { flex-shrink: 0; }
.inspector-group-header::after {
  content: '▶';
  font-size: 8px;
  margin-left: auto;
  color: var(--text-dim);
  transition: transform 0.2s;
}
details[open] .inspector-group-header::after { transform: rotate(90deg); }

.reset-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  margin-left: 4px;
}
.reset-btn:hover { color: var(--primary); background: var(--primary-dim); }

.inspector-group-body { padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 10px; }

.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.prop-label { font-size: 11px; color: var(--text-muted); }
.prop-value { font-size: 11px; color: var(--text); }

.slider-row { display: flex; flex-direction: column; gap: 4px; }
.slider-info { display: flex; justify-content: space-between; }
.slider-label { font-size: 11px; color: var(--text-muted); }
.slider-val { font-family: var(--font-mono); font-size: 10px; color: var(--text); min-width: 32px; text-align: right; }

.prop-slider {
  width: 100%;
  appearance: none;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.prop-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px; height: 12px;
  background: white;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
}
.prop-slider:hover::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--primary-dim); }

/* Track inspector */
.track-inspector-list { display: flex; flex-direction: column; gap: 4px; }
.track-inspector-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.track-inspector-name { font-size: 11px; color: var(--text); }
.track-inspector-meta { font-size: 10px; color: var(--text-muted); }
.track-empty-msg { font-size: 11px; color: var(--text-dim); text-align: center; padding: 8px 0; }

/* ══════════════════════════════════════════════════════════════
   TIMELINE DOCK
══════════════════════════════════════════════════════════════ */
.timeline-dock {
  height: var(--timeline-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: height 0.2s;
}
.timeline-dock.collapsed { height: 40px; }

/* Timeline Controls Bar */
.timeline-controls {
  height: 40px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 4px;
  flex-shrink: 0;
}

.tc-left, .tc-right, .tc-center { display: flex; align-items: center; gap: 4px; }
.tc-left { flex: 0 0 auto; }
.tc-right { flex: 0 0 auto; margin-left: auto; }
.tc-center { flex: 1; justify-content: center; }

.tc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 6px;
  height: 26px;
  min-width: 26px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.tc-btn:hover { color: var(--text); background: var(--surface-3); }
.tc-btn.active { color: var(--primary); background: var(--primary-dim); }

.tc-play {
  background: var(--primary);
  color: white;
  width: 30px;
  border-radius: var(--radius);
}
.tc-play:hover { background: #e0082f; color: white; }

.add-video-track { color: var(--blue); }
.add-video-track:hover { background: rgba(59,142,255,0.1); color: var(--blue); }
.add-audio-track { color: var(--green); }
.add-audio-track:hover { background: rgba(0,230,118,0.1); color: var(--green); }

.tc-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }

.timecode-display {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 8px;
  letter-spacing: 0.5px;
}
.timecode-sep { font-size: 11px; color: var(--text-dim); }
.timecode-duration { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

.timeline-zoom-slider {
  width: 80px;
  appearance: none;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.timeline-zoom-slider::-webkit-slider-thumb {
  appearance: none;
  width: 10px; height: 10px;
  background: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
}

/* Timeline Track Area */
.timeline-track-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.timeline-header-row {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.track-label-corner {
  width: 96px;
  min-width: 96px;
  height: 24px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ruler-container {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}
.ruler-container::-webkit-scrollbar { display: none; }

.ruler {
  height: 24px;
  background: var(--surface-2);
  position: relative;
  cursor: pointer;
  min-width: 100%;
}

/* Timeline Playhead on ruler */
.ruler-playhead {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--primary);
  z-index: 10;
  pointer-events: none;
}
.ruler-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--primary);
}

.ruler-tick {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ruler-tick-major { height: 12px; width: 1px; background: rgba(255,255,255,0.2); }
.ruler-tick-minor { height: 6px; width: 1px; background: rgba(255,255,255,0.08); }
.ruler-tick-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); margin-top: 1px; white-space: nowrap; }

/* Tracks container */
.tracks-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}

.no-tracks-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  color: var(--text-dim);
}

/* Track row */
.track-row {
  display: flex;
  height: 56px;
  border-bottom: 1px solid var(--border);
}

.track-header {
  width: 96px;
  min-width: 96px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 6px;
  gap: 3px;
  flex-shrink: 0;
}

.track-header-top {
  display: flex;
  align-items: center;
  gap: 3px;
}

.track-label {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.track-label.video { color: var(--blue); }
.track-label.audio { color: var(--green); }

.track-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: none;
  border: none;
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  transition: all 0.12s;
}
.track-btn:hover { color: var(--text); background: var(--border); }
.track-btn.solo.active { color: var(--yellow); }
.track-btn.mute.active { color: var(--primary); }
.track-btn.lock.active { color: var(--yellow); }

.track-volume-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.track-vol-slider {
  flex: 1;
  appearance: none;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
}
.track-vol-slider::-webkit-slider-thumb {
  appearance: none;
  width: 8px; height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
}
.track-vol-label { font-size: 9px; color: var(--text-dim); font-family: var(--font-mono); width: 20px; text-align: right; }

/* Track lane */
.track-lane {
  flex: 1;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  cursor: default;
  min-width: 0;
}
.track-lane.drag-over { background: rgba(255,10,69,0.05); }

/* Track lane grid lines */
.lane-grid-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

/* Playhead in lane */
.lane-playhead {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--primary);
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Timeline clips */
.clip {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.12s;
  display: flex;
  align-items: center;
}
.clip:hover { filter: brightness(1.15); }
.clip.selected { border-color: white !important; box-shadow: 0 0 0 2px rgba(255,255,255,0.3) !important; }
.clip.dragging { opacity: 0.7; }

.clip-label {
  position: absolute;
  inset: 0;
  padding: 0 6px;
  display: flex;
  align-items: center;
  z-index: 2;
}
.clip-name {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Waveform bars inside audio clips */
.clip-waveform {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 4px 2px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 1;
}
.waveform-bar {
  flex: 1;
  min-width: 1px;
  max-width: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 1px;
  margin: 0 0.5px;
}

/* Clip resize handles */
.clip-resize-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 6px;
  cursor: ew-resize;
  z-index: 5;
}
.clip-resize-handle:hover { background: rgba(255,255,255,0.15); }
.clip-resize-left { left: 0; }
.clip-resize-right { right: 0; }

/* Clip hover duration tooltip */
.clip-duration-tip {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition: opacity 0.15s;
}
.clip:hover .clip-duration-tip { opacity: 1; }

/* Drop-onto-lane indicator */
.lane-drop-indicator {
  position: absolute;
  inset: 2px;
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  pointer-events: none;
  display: none;
}
.track-lane.drag-over .lane-drop-indicator { display: block; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.asset-item { animation: fadeIn 0.2s ease both; }
.history-item { animation: fadeIn 0.15s ease both; }
.track-row { animation: fadeIn 0.2s ease both; }

/* Primary glow pulse for playhead */
@keyframes playhead-glow {
  0%, 100% { box-shadow: 0 0 6px var(--primary-glow); }
  50%       { box-shadow: 0 0 14px var(--primary-glow); }
}
.is-playing .lane-playhead { animation: playhead-glow 1.5s ease infinite; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE (narrow viewports)
══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .inspector-sidebar { display: none; }
  :root { --inspector-w: 0px; }
}
@media (max-width: 800px) {
  .contextual-panel { display: none; }
  :root { --panel-w: 0px; }
  .logo-text { display: none; }
  .header-center { justify-content: flex-end; }
}
