:root {
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-light: #e0f2fe;
  --accent-border: #38bdf8;
  --clip-bg: #7dd3fc;
  --clip-bg-active: #38bdf8;
  --clip-border: #bae6fd;
  --clip-border-active: #0284c7;
  --clip-muted: #cbd5e1;
  --bg-main: #f8fafc;
  --panel-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --line-color: #e2e8f0;
  --ruler-bg: #f8fafc;
  --playhead-color: #0284c7;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --ok: #10b981;
  --ok-bg: #ecfdf5;
}

.tools-float {
  border-radius: 6px;
}

html, body.tool-page {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-y: auto;
}

.bg-shape, .shape-one, .shape-two {
  display: none !important;
}

.app-shell {
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 6px;
  z-index: 1;
  margin: 20px 0 0;
  padding: 0 8px 16px;
  box-sizing: border-box;
}

.app-header {
  text-align: center;
  margin: 2px 0 0;
}

.app-header h1, h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  letter-spacing: -0.01em;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line-color);
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
  box-sizing: border-box;
}

.studio-panel {
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  width: 100%;
}

/* Upload Panel */
.upload-panel {
  border: 2px dashed #cbd5e1;
  text-align: center;
  padding: 28px 18px;
  cursor: pointer;
  background: #ffffff;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.upload-panel:hover {
  border-color: var(--accent);
  background: #f0f9ff;
}

.upload-panel.drag-over {
  border-color: var(--accent);
  background: #e0f2fe;
}

.upload-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.upload-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.upload-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.file-types-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #0284c7;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 10px;
}

/* Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

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

.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn.secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
}

.btn.secondary:hover:not(:disabled) {
  background: #f1f5f9;
}

.btn.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn.danger:hover:not(:disabled) {
  background: var(--danger);
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

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

.btn-lg {
  padding: 10px 20px;
  font-size: 0.95rem;
}

/* Panel Header */
.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-top h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.count-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.tracks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.track-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.track-num {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.format-tag {
  background: #0284c7;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.track-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
}

.track-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

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

/* =========================================================================
   CLEAN NLE TIMELINE STUDIO
   ========================================================================= */
.studio-wrapper {
  background: #ffffff;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  width: 100%;
}

/* Top Toolbar Bar */
.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  gap: 10px;
  flex-wrap: wrap;
}

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

/* Icon Buttons (Split, Delete, Undo, Redo, Copy, Paste) */
.tool-icon-btn {
  background: transparent;
  border: none;
  color: #475569;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-icon-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.tool-icon-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tool-icon-btn.split-tool-btn {
  color: #0284c7;
}

.tool-icon-btn.split-tool-btn:hover:not(:disabled) {
  background: #e0f2fe;
  color: #0369a1;
}

.tool-icon-btn.delete-tool-btn {
  color: #ef4444;
}

.tool-icon-btn.delete-tool-btn:hover:not(:disabled) {
  background: #fee2e2;
  color: #dc2626;
}

.tool-icon-btn.redo-tool-btn {
  color: #475569;
}

.tool-icon-btn.redo-tool-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}


/* Center Playback Controls */
.playback-btn-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.playback-btn-round:hover:not(:disabled) {
  background: #e2e8f0;
  transform: scale(1.04);
}

.playback-btn-round:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.playback-btn-round.is-playing {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.35);
}

.skip-btn {
  background: transparent;
  border: none;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.skip-btn:hover:not(:disabled) {
  color: #0f172a;
  background: #f1f5f9;
}

.skip-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Timecode Display */
.timecode-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
}

.timecode-display .time-current {
  color: #0f172a;
  font-weight: 700;
}

.timecode-display .time-sep {
  color: #94a3b8;
}

.timecode-display .time-total {
  color: #64748b;
}

/* Zoom Slider & Controls */
.zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.zoom-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zoom-btn:hover:not(:disabled) {
  color: #0f172a;
}

.zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.zoom-slider {
  width: 80px;
  height: 4px;
  accent-color: #0f172a;
  cursor: pointer;
}

.zoom-slider:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fit-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fit-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

.fit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* =========================================================================
   SELECTED CLIP INSPECTOR BAR
   ========================================================================= */
.clip-inspector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.82rem;
  color: #334155;
  gap: 8px;
  flex-wrap: wrap;
}

.inspector-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-tag {
  background: #0284c7;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.inspector-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stepper-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 2px 4px;
  height: 36px;
  box-sizing: border-box;
  transition: all 0.15s ease;
  user-select: none;
}

.stepper-item.disabled {
  opacity: 0.4;
  pointer-events: none;
  background: #f8fafc;
}

.stepper-label {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.stepper-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  width: 22px;
  height: 24px;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.12s ease;
}

.stepper-btn:hover:not(:disabled) {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

.stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
  min-width: 44px;
  text-align: center;
}

/* =========================================================================
   DAW TIMELINE LAYOUT (LEFT FIXED HEADERS + RIGHT TIMELINE)
   ========================================================================= */
.studio-timeline-layout {
  display: flex;
  width: 100%;
  position: relative;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.track-headers-sidebar {
  width: 132px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  z-index: 45;
  display: flex;
  flex-direction: column;
}

.sidebar-ruler-corner {
  height: 26px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.sidebar-add-track-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.sidebar-add-track-btn:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.track-headers-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 3px 0;
  background: #f8fafc;
}

.track-header-cell {
  height: 72px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.track-header-cell:hover {
  background: #f8fafc;
}

.track-header-cell.active {
  background: #e0f2fe;
  border-left: 4px solid #0284c7;
}

.track-hdr-info {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
}

.track-hdr-icon {
  font-size: 0.85rem;
}

.track-hdr-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.track-hdr-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 23px;
  height: 23px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.12s ease;
}

.track-hdr-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.track-hdr-btn.active {
  background: #fee2e2;
  border-color: #f87171;
  color: #dc2626;
}

.track-hdr-btn.add-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

.track-hdr-btn.link-btn:hover {
  background: #f0fdf4;
  border-color: #10b981;
  color: #059669;
}

.track-hdr-btn.del-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

/* =========================================================================
   SCROLLABLE MULTI-TRACK TIMELINE AREA
   ========================================================================= */
.timeline-scroll-area {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fdfdfd;
  position: relative;
  scrollbar-width: thin;
}

.timeline-inner-container {
  min-width: 100%;
  position: relative;
  user-select: none;
  cursor: crosshair;
}

/* Ruler Canvas */
.ruler-canvas {
  width: 100%;
  height: 26px;
  display: block;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Tracks Stack */
.tracks-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 3px 0;
  background: #f8fafc;
  min-height: auto;
}

/* Track Lane Row */
.track-row {
  position: relative;
  width: 100%;
  height: 72px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  box-sizing: border-box;
  transition: background 0.15s ease;
  overflow: hidden;
}

.track-row.active {
  background: #e0f2fe;
}

.track-row-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.empty-track-prompt {
  width: calc(100% - 24px);
  height: calc(100% - 16px);
  margin: 8px 12px;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
  user-select: none;
}

.empty-track-prompt:hover, .empty-track-prompt.drag-over, .track-row.drag-over .empty-track-prompt {
  border-color: #0284c7;
  background: #f0f9ff;
  border-style: solid;
}

.prompt-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prompt-text {
  display: flex;
  flex-direction: column;
}

.prompt-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
}

.prompt-title strong {
  color: #0284c7;
  text-decoration: underline;
}

.prompt-sub {
  font-size: 0.70rem;
  color: #64748b;
}

.track-lane-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  user-select: none;
}

.track-name-lbl {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 6px;
}

.track-action-icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #e2e8f0;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.track-action-icon-btn.add-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

.track-action-icon-btn.del-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Empty Track Drop Placeholder Lane */
.empty-track-lane {
  width: calc(100% - 24px);
  margin: 12px;
  height: 90px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
  text-align: center;
  padding: 10px;
}

.empty-track-lane:hover, .empty-track-lane.drag-over {
  border-color: #0284c7;
  background: #f0f9ff;
  color: #0284c7;
}

.empty-track-lane .empty-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.empty-track-lane .empty-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}

.empty-track-lane .empty-sub {
  font-size: 0.75rem;
  color: #64748b;
}

/* Playhead Needle (Black inverted triangle on top + vertical line across all tracks) */
.playhead-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #0f172a;
  pointer-events: none;
  z-index: 60;
  display: block;
}

.playhead-needle::before {
  content: '';
  position: absolute;
  top: 0px;
  left: -6px;
  width: 14px;
  height: 10px;
  background: #0f172a;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Hover Guide */
.hover-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(15, 23, 42, 0.4);
  pointer-events: none;
  z-index: 30;
  display: none;
}

/* Output Settings & Inline Export Row */
.export-row-container {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.export-row-container .setting-item {
  flex: 1 1 140px;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.export-row-container .stepper-item {
  justify-content: space-between;
}

.export-row-container .setting-btn-item {
  flex: 1.6 1 220px;
  min-width: 200px;
}

.export-inline-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
}

.setting-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.format-toggle {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  padding: 3px;
  gap: 4px;
}

.format-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 7px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.format-btn.active {
  background: #0284c7;
  color: #fff;
}

.form-select-custom {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
}

/* Progress bar */
.conversion-progress-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  width: 0%;
  background: #0284c7;
  border-radius: 999px;
  transition: width 0.15s linear;
}

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

/* Result Box */
.result-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--ok-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
}

.result-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ok);
}

/* Buttons */
.btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn.primary {
  color: #fff;
  background: #0284c7;
}

.btn.primary:hover:not(:disabled) {
  background: #0369a1;
  color: #fff;
}

.btn.secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
}

.btn.secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.btn.success {
  background: var(--ok);
  color: #fff;
}

.btn.danger-ghost {
  background: transparent;
  color: var(--danger);
  padding: 6px 8px;
  border-radius: 8px;
}

.btn.danger-ghost:hover {
  background: var(--danger-bg);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.84rem;
  border-radius: 8px;
}

.btn:disabled, .tool-icon-btn:disabled, .playback-btn-round:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none !important;
}

.actions-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Toast */
.editor-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border-left: 4px solid #0284c7;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .app-shell {
    margin: 16px auto 40px;
  }
  .studio-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .toolbar-left, .toolbar-center, .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .clip-inspector-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================================
   URL IMPORT MODAL
   ========================================================================= */
.url-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.url-modal-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(12px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

.url-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.url-modal-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.url-modal-title svg {
  color: #0284c7;
}

.url-modal-close {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.url-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.url-modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.url-modal-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.url-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  gap: 6px;
}

.url-text-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
  color: #0f172a;
  background: #ffffff;
}

.url-text-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.url-paste-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.url-paste-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.url-supported-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 0.72rem;
  color: #64748b;
}

.url-badge {
  background: #f1f5f9;
  color: #0284c7;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.url-modal-status {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.url-modal-status.loading {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.url-modal-status.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.url-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.url-btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: urlSpin 0.6s linear infinite;
  margin-right: 4px;
  vertical-align: middle;
}

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

.prompt-url-btn {
  color: #0284c7;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.prompt-url-btn:hover {
  color: #0369a1;
}
