/* ── NOVA AI Video Editor — Styles ── */

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

:root {
  --bg-base:       #0A0A0A;
  --bg-surface:    #111111;
  --bg-elevated:   #181818;
  --bg-hover:      #1F1F1F;
  --bg-active:     #252525;
  --border:        #222222;
  --border-bright: #2E2E2E;

  --orange:        #FF6B2B;
  --orange-dim:    #CC5522;
  --orange-glow:   rgba(255,107,43,0.18);
  --orange-glow2:  rgba(255,107,43,0.08);
  --cyan:          #00D4FF;
  --cyan-dim:      #0099BB;
  --cyan-glow:     rgba(0,212,255,0.15);
  --green:         #B8FF6B;
  --peach:         #FFB088;

  --text-primary:  #F0EDE8;
  --text-secondary:#888888;
  --text-muted:    #444444;

  --track-video:   #FF6B2B;
  --track-text:    #00D4FF;
  --track-audio:   #B8FF6B;
  --track-music:   #9B6BFF;

  --font-display:  'Clash Display', sans-serif;
  --font-body:     'Outfit', sans-serif;
  --font-mono:     'Space Mono', monospace;

  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;

  --topbar-h:      52px;
  --left-panel-w:  260px;
  --right-panel-w: 260px;
  --timeline-h:    220px;
  --track-h:       36px;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ── TOPBAR ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.topbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon { display: flex; align-items: center; }
.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.logo-tag {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-glow2);
  border: 1px solid var(--orange-dim);
  padding: 2px 6px;
  border-radius: 3px;
}

.topbar__nav {
  display: flex;
  gap: 2px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}
.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.nav-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-btn.active { color: var(--text-primary); background: var(--bg-elevated); }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.project-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: text;
  transition: all 0.15s;
  min-width: 120px;
  outline: none;
}
.project-name:hover { border-color: var(--border-bright); color: var(--text-primary); }
.project-name:focus { border-color: var(--orange); color: var(--text-primary); background: var(--bg-elevated); }

.btn-icon {
  width: 32px; height: 32px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.btn-icon:hover { border-color: var(--border-bright); color: var(--text-primary); background: var(--bg-hover); }

.btn-primary {
  display: flex; align-items: center; gap: 6px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.btn-primary:hover { background: #ff7d42; box-shadow: 0 0 16px var(--orange-glow); }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

/* ── WORKSPACE LAYOUT ── */
.workspace {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: var(--left-panel-w) 1fr var(--right-panel-w);
  overflow: hidden;
}

/* ── PANELS ── */
.panel {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel--right { border-right: none; border-left: 1px solid var(--border); }

.panel__header {
  padding: 12px 14px 0;
  flex-shrink: 0;
}
.panel__title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}
.panel__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 0 -14px;
  padding: 0 14px;
}
.ptab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
  letter-spacing: 0.02em;
}
.ptab:hover { color: var(--text-primary); }
.ptab.active { color: var(--orange); border-bottom-color: var(--orange); }

.panel__content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}
.panel__content.hidden { display: none; }

/* ── UPLOAD ZONE ── */
.upload-zone {
  width: 100%;
  border: 1.5px dashed var(--border-bright);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  background: none;
  transition: all 0.2s;
  margin-bottom: 12px;
}
.upload-zone:hover {
  border-color: var(--orange);
  color: var(--text-secondary);
  background: var(--orange-glow2);
}
.upload-zone svg { opacity: 0.4; }
.upload-zone:hover svg { opacity: 0.7; stroke: var(--orange); }

/* ── MEDIA GRID ── */
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.media-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: grab;
  transition: all 0.15s;
  animation: fadeSlideIn 0.3s ease both;
}
.media-item:hover { border-color: var(--orange); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.media-item:active { cursor: grabbing; }

.media-thumb {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.media-thumb--audio {
  background: linear-gradient(135deg, #001a00, #003300);
}
.media-play-icon {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: all 0.15s;
}
.media-item:hover .media-play-icon { color: rgba(255,255,255,0.9); transform: scale(1.2); }
.media-badge {
  position: absolute;
  top: 4px; right: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}
.media-badge.video { background: rgba(255,107,43,0.2); color: var(--orange); border: 1px solid rgba(255,107,43,0.3); }
.media-badge.image { background: rgba(0,212,255,0.2); color: var(--cyan); border: 1px solid rgba(0,212,255,0.3); }
.media-badge.audio { background: rgba(184,255,107,0.2); color: var(--green); border: 1px solid rgba(184,255,107,0.3); }

.media-info {
  padding: 5px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.media-name {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}
.media-dur {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

/* ── AI GENERATE SECTION ── */
.ai-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.ai-gen-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 6px;
}
.ai-gen-card:hover { border-color: var(--orange); background: var(--bg-hover); }
.ai-gen-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg-base); border-radius: var(--radius-sm); flex-shrink: 0; }
.ai-gen-title { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.ai-gen-sub { font-size: 10px; color: var(--text-muted); }

.ai-generated-list { margin-top: 16px; }
.ai-asset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.ai-asset-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ai-asset-name { font-size: 11px; color: var(--text-secondary); flex: 1; }
.ai-asset-tag { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); }

/* ── AUDIO TRACKS ── */
.audio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: grab;
  transition: all 0.15s;
}
.audio-item:hover { border-color: var(--cyan); }
.audio-waveform { width: 40px; flex-shrink: 0; }
.wave-bars { display: flex; align-items: center; gap: 2px; height: 20px; }
.wave-bars span {
  display: block;
  width: 2px;
  background: var(--cyan);
  border-radius: 1px;
  animation: wavePulse 1.2s ease-in-out infinite;
  opacity: 0.5;
}
.wave-bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
.wave-bars span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.wave-bars span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.wave-bars span:nth-child(4) { height: 18px; animation-delay: 0.3s; }
.wave-bars span:nth-child(5) { height: 8px; animation-delay: 0.4s; }
.wave-bars span:nth-child(6) { height: 16px; animation-delay: 0.5s; }
.wave-bars span:nth-child(7) { height: 12px; animation-delay: 0.6s; }
.wave-bars span:nth-child(8) { height: 6px; animation-delay: 0.7s; }
.audio-item:hover .wave-bars span { opacity: 1; }

@keyframes wavePulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

.audio-meta { flex: 1; }
.audio-name { display: block; font-size: 11px; color: var(--text-primary); font-weight: 500; }
.audio-bpm { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.audio-play-btn {
  width: 24px; height: 24px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.audio-play-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── CENTER STAGE ── */
.center-stage {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

/* ── PREVIEW AREA ── */
.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 0;
  min-height: 0;
}

.preview-screen {
  flex: 1;
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.preview-film-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
}

.preview-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.preview-active { width: 100%; height: 100%; }
.preview-video-mock {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0d0d1a 0%, #1a0d00 50%, #0d1a0d 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
}
.preview-clip-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

.preview-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.preview-timecode {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  min-width: 80px;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.pctrl-btn {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.pctrl-btn:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }
.pctrl-play {
  width: 40px; height: 40px;
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.pctrl-play:hover { background: #ff7d42; box-shadow: 0 0 20px var(--orange-glow); }

.preview-vol {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.vol-slider {
  width: 70px;
  accent-color: var(--orange);
  cursor: pointer;
}

/* ── AI PROMPT BAR ── */
.ai-prompt-bar {
  margin-top: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s;
  position: relative;
}
.ai-prompt-bar:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow2);
}
.ai-prompt-icon { flex-shrink: 0; display: flex; align-items: center; }
.ai-prompt-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
}
.ai-prompt-input::placeholder { color: var(--text-muted); }
.ai-prompt-send {
  width: 28px; height: 28px;
  background: var(--orange);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ai-prompt-send:hover { background: #ff7d42; box-shadow: 0 0 12px var(--orange-glow); }

.ai-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.ai-sug-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 10px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ai-sug-chip:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-glow2); }

/* ── TIMELINE AREA ── */
.timeline-area {
  height: var(--timeline-h);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.timeline-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tl-tool {
  width: 28px; height: 28px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.tl-tool:hover { color: var(--text-primary); background: var(--bg-hover); border-color: var(--border); }
.tl-tool.active { color: var(--orange); background: var(--orange-glow2); border-color: var(--orange-dim); }
.tl-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

.timeline-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.tl-zoom-label { font-size: 10px; color: var(--text-muted); }
.zoom-range { width: 80px; accent-color: var(--orange); cursor: pointer; }
.tl-zoom-val { font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); min-width: 24px; }

.timeline-duration {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

/* ── RULER ── */
.timeline-ruler {
  height: 22px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.ruler-marks {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-left: 100px;
}
.ruler-mark {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ruler-mark-line {
  width: 1px;
  background: var(--border-bright);
}
.ruler-mark-line.major { background: #333; height: 10px; }
.ruler-mark-line.minor { height: 5px; }
.ruler-mark-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ── PLAYHEAD ── */
.playhead {
  position: absolute;
  top: 0;
  left: 100px;
  z-index: 10;
  pointer-events: none;
  transform: translateX(-50%);
}
.playhead-head {
  width: 10px; height: 10px;
  background: var(--orange);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  margin: 0 auto;
}
.playhead-line {
  width: 1px;
  height: 200px;
  background: var(--orange);
  margin: 0 auto;
  opacity: 0.7;
}

/* ── TRACK ROWS ── */
.timeline-tracks {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.track-row {
  display: flex;
  height: var(--track-h);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.track-row:hover { background: rgba(255,255,255,0.01); }

.track-label {
  width: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  border-right: 1px solid var(--border);
  height: 100%;
}
.track-label svg { flex-shrink: 0; }
.track-label span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-mute {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex; align-items: center;
  opacity: 0.5;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.track-mute:hover { opacity: 1; }

.track-clips {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ── TIMELINE CLIPS ── */
.tl-clip {
  position: absolute;
  top: 3px;
  height: calc(100% - 6px);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  transition: filter 0.15s, box-shadow 0.15s;
  user-select: none;
  border: 1px solid transparent;
}
.tl-clip:hover { filter: brightness(1.15); }
.tl-clip.selected {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
}
.tl-clip--video { background: linear-gradient(135deg, rgba(255,107,43,0.35), rgba(255,107,43,0.2)); border-color: rgba(255,107,43,0.4); }
.tl-clip--text  { background: linear-gradient(135deg, rgba(0,212,255,0.3), rgba(0,212,255,0.15)); border-color: rgba(0,212,255,0.4); }
.tl-clip--audio { background: linear-gradient(135deg, rgba(184,255,107,0.3), rgba(184,255,107,0.15)); border-color: rgba(184,255,107,0.4); }
.tl-clip--music { background: linear-gradient(135deg, rgba(155,107,255,0.3), rgba(155,107,255,0.15)); border-color: rgba(155,107,255,0.4); }

.tl-clip-label {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.tl-clip-waveform {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 4px 6px;
  opacity: 0.3;
  pointer-events: none;
}
.tl-clip-waveform span {
  display: block;
  width: 1px;
  background: currentColor;
  border-radius: 1px;
}
.tl-clip-resize {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 6px;
  cursor: ew-resize;
  background: rgba(255,255,255,0.1);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.tl-clip:hover .tl-clip-resize { opacity: 1; }

/* ── TIMELINE DROP HINT ── */
.timeline-drop-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  color: var(--text-muted);
  font-size: 11px;
  pointer-events: none;
}
.timeline-tracks:empty + .timeline-drop-hint,
.timeline-tracks.empty .timeline-drop-hint { display: flex; }

/* ── PROPERTIES PANEL ── */
.no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.prop-group { margin-bottom: 12px; }
.prop-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.prop-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 8px;
  outline: none;
  transition: border-color 0.15s;
}
.prop-input:focus { border-color: var(--orange); }
.prop-select {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 8px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.prop-select:focus { border-color: var(--orange); }
.prop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prop-slider-row { display: flex; align-items: center; gap: 8px; }
.prop-range {
  flex: 1;
  accent-color: var(--orange);
  cursor: pointer;
}
.prop-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
}
.prop-actions { display: flex; gap: 6px; margin-top: 16px; }
.prop-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  padding: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.prop-btn:hover { border-color: var(--border-bright); color: var(--text-primary); }
.prop-btn--danger:hover { border-color: #ff4444; color: #ff4444; background: rgba(255,68,68,0.08); }

/* ── EFFECTS ── */
.effects-search { margin-bottom: 12px; }
.fx-category { margin-bottom: 16px; }
.fx-cat-header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.fx-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fx-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.fx-item:hover { border-color: var(--orange); transform: translateY(-1px); }
.fx-item span { display: block; font-size: 10px; color: var(--text-secondary); padding: 4px; }
.fx-preview {
  height: 40px;
  border-radius: 3px 3px 0 0;
}
.fx-preview--cinematic { background: linear-gradient(135deg, #1a0a00, #3d2000); }
.fx-preview--vintage   { background: linear-gradient(135deg, #3d2b1f, #8b6914); }
.fx-preview--neon      { background: linear-gradient(135deg, #0d0d2e, #1a0a3d); box-shadow: inset 0 0 20px rgba(0,212,255,0.3); }
.fx-preview--bw        { background: linear-gradient(135deg, #1a1a1a, #555); }
.fx-preview--fade      { background: linear-gradient(to right, #000, #333, #000); }
.fx-preview--wipe      { background: linear-gradient(to right, #1a1a1a 50%, #333 50%); }
.fx-preview--zoom      { background: radial-gradient(circle, #333 30%, #111 100%); }
.fx-preview--glitch    { background: linear-gradient(135deg, #0d0d0d, #1a0a1a); position: relative; overflow: hidden; }
.fx-preview--grain     { background: #1a1a1a; opacity: 0.8; }
.fx-preview--vignette  { background: radial-gradient(circle, #333 40%, #000 100%); }
.fx-preview--lens      { background: radial-gradient(circle at 30% 30%, rgba(255,200,100,0.4), transparent 60%), #111; }
.fx-preview--scanlines { background: repeating-linear-gradient(0deg, #111, #111 2px, #1a1a1a 2px, #1a1a1a 4px); }

/* ── AI TOOLS ── */
.ai-tools-list { display: flex; flex-direction: column; gap: 6px; }
.ai-tool-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.15s;
}
.ai-tool-card:hover { border-color: var(--border-bright); background: var(--bg-hover); }
.ai-tool-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg-base); border-radius: var(--radius-sm); flex-shrink: 0; }
.ai-tool-info { flex: 1; }
.ai-tool-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.ai-tool-desc { font-size: 10px; color: var(--text-muted); }
.ai-tool-run {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}
.ai-tool-run:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-glow2); }

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  width: 420px;
  max-width: 90vw;
  animation: slideUp 0.25s ease;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px; }

/* AI Modal */
.ai-pulse-dot {
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulseDot 1.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.ai-processing-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.ai-rings {
  position: relative;
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
}
.ai-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid transparent;
  animation: spinRing 2s linear infinite;
}
.ai-ring--1 { width: 80px; height: 80px; border-top-color: var(--orange); animation-duration: 2s; }
.ai-ring--2 { width: 60px; height: 60px; border-top-color: var(--cyan); animation-duration: 1.5s; animation-direction: reverse; }
.ai-ring--3 { width: 40px; height: 40px; border-top-color: var(--green); animation-duration: 1s; }
.ai-ring-center { position: relative; z-index: 1; }

@keyframes spinRing { to { transform: rotate(360deg); } }

.ai-task-label {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.ai-progress-bar {
  height: 3px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.ai-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--orange), var(--cyan));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}
.ai-progress-pct {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.ai-log {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  max-height: 100px;
  overflow-y: auto;
}
.ai-log-line {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.8;
  animation: fadeSlideIn 0.3s ease;
}
.ai-log-line.success { color: var(--green); }
.ai-log-line.highlight { color: var(--orange); }

/* Export Modal */
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.export-option {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.export-option:hover { border-color: var(--border-bright); }
.export-option.active { border-color: var(--orange); background: var(--orange-glow2); }
.export-icon {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 4px;
}
.export-label { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.export-sub { font-size: 10px; color: var(--text-muted); }
.export-settings { margin-bottom: 16px; }

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
  max-width: 280px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast--success { border-left: 3px solid var(--green); }
.toast--info    { border-left: 3px solid var(--cyan); }
.toast--warning { border-left: 3px solid var(--orange); }
.toast-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ── UTILITY ── */
.hidden { display: none !important; }

/* ── DRAG OVER HIGHLIGHT ── */
.track-clips.drag-over {
  background: rgba(255,107,43,0.06);
  outline: 1px dashed var(--orange);
  outline-offset: -2px;
}

/* ── SELECTED CLIP GLOW ── */
.tl-clip.selected.tl-clip--video { box-shadow: 0 0 0 1.5px var(--orange), 0 0 12px var(--orange-glow); }
.tl-clip.selected.tl-clip--text  { box-shadow: 0 0 0 1.5px var(--cyan), 0 0 12px var(--cyan-glow); }