/* BoxyCut Video & Audio Engineering Studio - BoxyKit Modern Adaptive Design */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Dark Theme (Default) */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-sidebar: rgba(13, 19, 33, 0.95);
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-subtle: rgba(22, 31, 50, 0.55);
  --bg-input: rgba(15, 23, 42, 0.92);

  --border-color: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: #f43f5e;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #f43f5e;
  --accent-hover: #e11d48;
  --accent-glow: rgba(244, 63, 94, 0.28);
  --accent-light: #fb7185;
  --accent-bg: rgba(244, 63, 94, 0.12);

  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-cyan: #06b6d4;
  --color-purple: #8b5cf6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --sidebar-width: 280px;
  --header-height: 56px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --bg-gradient: radial-gradient(circle at 10% 20%, rgba(244, 63, 94, 0.08) 0%, transparent 40%),
                 radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-sidebar: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-subtle: rgba(241, 245, 249, 0.85);
  --bg-input: #ffffff;

  --border-color: rgba(0, 0, 0, 0.09);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --border-focus: #e11d48;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #e11d48;
  --accent-hover: #be123c;
  --accent-glow: rgba(225, 29, 72, 0.2);
  --accent-light: #f43f5e;
  --accent-bg: rgba(225, 29, 72, 0.08);

  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  --bg-gradient: radial-gradient(circle at 10% 20%, rgba(244, 63, 94, 0.04) 0%, transparent 40%),
                 radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Background Atmosphere */
.bg-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-orb-1 {
  position: absolute;
  top: -150px;
  right: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.12) 0%, transparent 70%);
  filter: blur(80px);
}

.aurora-orb-2 {
  position: absolute;
  bottom: 10%;
  left: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, transparent 70%);
  filter: blur(90px);
}

/* Header Action Slots */
.menu-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 8px;
  transition: var(--transition);
}

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

/* Layout */
.app-layout {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}

.sidebar-search {
  position: relative;
  width: 100%;
}

.sidebar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.sidebar-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px 8px 34px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.sidebar-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 12px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-bg);
  color: var(--accent-primary);
  font-weight: 600;
  border-color: rgba(244, 63, 94, 0.25);
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Main Studio Workspace */
.main-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: calc(100% - var(--sidebar-width));
  gap: 20px;
  transition: width 0.25s ease, max-width 0.25s ease;
}

@media (min-width: 961px) {
  .app-layout.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-right: none;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .app-layout.sidebar-collapsed .main-workspace {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

.btn.active-fullscreen {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  color: #38bdf8 !important;
}

/* Workspace Tool Header */
.tool-header-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tool-meta h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--accent-bg);
  color: var(--accent-primary);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.tool-meta p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.btn:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-focus);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--accent-glow);
}

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

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Dynamic Controls Bar */
.controls-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.control-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-item label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.control-select, .control-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.control-select:focus, .control-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Split Editor Stage (Timeline / Captions) */
.stage-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  flex: 1;
  min-height: 480px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.panel-card-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-subtle);
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-stats {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.code-editor {
  flex: 1;
  width: 100%;
  min-height: 400px;
  padding: 14px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  border: none;
  outline: none;
  resize: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

/* Shake Animation on Empty/Invalid Input */
.input-error-highlight {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border: 1px solid var(--color-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* Timecode Grid Results */
.tc-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tc-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.tc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tc-table th {
  background: var(--bg-card-subtle);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.tc-table td {
  padding: 12px 14px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.tc-table tr:hover td {
  background: var(--bg-card-subtle);
}

.badge-tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-primary);
}

/* Loudness Meter Dashboard */
.loudness-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dropzone-box {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  background: var(--bg-card-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-bg);
}

.dropzone-icon {
  margin-bottom: 12px;
  color: var(--accent-primary);
}

.dropzone-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.dropzone-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.metric-gauge-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card-subtle);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.metric-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
  border-radius: 9999px;
  width: 0%;
  transition: width 0.5s ease-out;
}

.metric-status {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.status-compliant {
  color: var(--color-success);
}

.status-warning {
  color: var(--color-warning);
}

/* Probe Box Tree Inspector */
.probe-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.probe-meta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tree-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.tree-node {
  margin-left: 20px;
  border-left: 1px dashed var(--border-color);
  padding-left: 12px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.tree-node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}

.tree-node-header:hover {
  background: var(--bg-card-subtle);
}

.box-fourcc {
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-bg);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

.box-desc {
  color: var(--text-secondary);
  font-size: 12px;
}

.box-offset-size {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: auto;
}

.tree-details {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* Bottom SEO Content Section */
.seo-section {
  margin-top: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.seo-header-area h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.seo-intro-text {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.feature-box h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-box p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.faq-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.faq-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* =============================================================================
   NEW EDITING TOOLS STYLES (Video Cutter, Audio Editor, Transcoder, NLE Studio)
   ============================================================================= */

/* Video Cutter */
.cutter-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cutter-player-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
}

.cutter-hud-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card-subtle);
  padding: 10px 16px;
  border-radius: var(--radius-md);
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.hud-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.hud-val {
  color: var(--text-primary);
  font-weight: 700;
}

.cutter-timeline-track {
  position: relative;
  height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.cutter-buffer-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 0%;
  background: rgba(6, 182, 212, 0.35);
  border-right: 2px solid rgba(56, 189, 248, 0.85);
  border-radius: 4px;
  pointer-events: none;
  transition: width 0.15s ease-out, left 0.15s ease-out;
  z-index: 2;
}

.cutter-selection-range {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 100%;
  background: rgba(6, 182, 212, 0.22);
  border-left: 2px solid var(--color-cyan);
  border-right: 2px solid var(--color-emerald);
  z-index: 5;
}

.cutter-playhead-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: #ef4444;
  z-index: 10;
  pointer-events: none;
}

.keyframe-markers-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.keyframe-tick {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 12px;
  background: var(--color-emerald);
  opacity: 0.85;
  border-radius: 2px 2px 0 0;
}

.cutter-transport-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

/* Audio Editor */
.audio-editor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.audio-timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  background: var(--bg-card-subtle);
  padding: 10px 16px;
  border-radius: var(--radius-md);
}

/* Selection Start/End Fine-Tune Bar & Channel Lock */
.audio-trim-nudge-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.trim-channel-lock-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-channel-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.audio-channel-lock-btn.locked {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.audio-channel-lock-btn.locked:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}

.audio-channel-lock-btn.unlocked {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.audio-channel-lock-btn.unlocked:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
}

.audio-channel-select-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-chip {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.channel-chip:hover {
  border-color: #38bdf8;
  color: #f8fafc;
}

.channel-chip.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: #22d3ee;
  color: #ecfeff;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.3);
}

.trim-target-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.trim-bar-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 2px;
  white-space: nowrap;
}

.trim-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.trim-target-chip:hover {
  color: var(--text-primary);
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.trim-target-chip.active {
  color: #ecfeff;
  background: rgba(6, 182, 212, 0.22);
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.28), 0 0 10px rgba(6, 182, 212, 0.2);
}

.trim-target-chip .chip-bracket {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: #22d3ee;
}

.trim-inputs-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.trim-point-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trim-point-control.active {
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.22);
}

.trim-point-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 3px;
}

.trim-point-control.active .trim-point-label {
  color: #22d3ee;
}

.trim-step-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-secondary);
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.trim-step-btn:hover {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.35);
  border-color: #22d3ee;
}

.trim-time-input {
  width: 76px;
  height: 22px;
  padding: 0 4px;
  font-size: 12px;
  text-align: right;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
}

.trim-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}

.trim-range-sep {
  color: var(--text-muted);
  font-weight: 600;
}

.trim-reset-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

/* Unified Timeline Ruler + Waveform Stage */
.waveform-timeline-stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-input);
}

.waveform-ruler-wrapper {
  position: relative;
  width: 100%;
  height: 30px;
  background: #0d1526;
  border-bottom: 1px solid rgba(51, 65, 85, 0.85);
  cursor: pointer;
  user-select: none;
}

.waveform-ruler-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.waveform-ruler-hover-tip {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.3;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #38bdf8;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 12;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.waveform-canvas-wrapper {
  position: relative;
  width: 100%;
  min-height: 200px;
  background: var(--bg-input);
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}

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

/* Multi-channel Lanes Overlay */
.waveform-channel-lanes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.channel-lane-row {
  position: relative;
  width: 100%;
  flex: 1;
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
  box-sizing: border-box;
}

.channel-lane-row:last-child {
  border-bottom: none;
}

.channel-lane-badge {
  position: absolute;
  top: 6px;
  left: 8px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  font-family: var(--font-mono, monospace);
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 4px;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.channel-lane-badge:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #22d3ee;
  color: #ffffff;
}

.channel-lane-row.active .channel-lane-badge {
  color: #083344;
  background: #22d3ee;
  border-color: #a5f3fc;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

.channel-lane-row.active {
  box-shadow: inset 0 0 0 1.5px rgba(34, 211, 238, 0.55);
}

.channel-lane-row.dimmed {
  background: rgba(2, 6, 23, 0.35);
}

.waveform-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.52);
  pointer-events: none;
  z-index: 2;
}

.waveform-mask-left {
  left: 0;
}

.waveform-mask-right {
  right: 0;
}

.waveform-selection-box {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 0%;
  background: rgba(168, 85, 247, 0.16);
  border-top: 1px solid rgba(192, 132, 252, 0.55);
  border-bottom: 1px solid rgba(192, 132, 252, 0.55);
  pointer-events: none;
  display: none;
  z-index: 4;
}

.waveform-selection-box.is-full-range {
  background: transparent;
  border-top-color: transparent;
  border-bottom-color: transparent;
}

.waveform-trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 6;
}

.waveform-trim-handle.handle-start {
  left: -6px;
}

.waveform-trim-handle.handle-end {
  right: -6px;
}

.waveform-handle-grip {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #a855f7;
  transition: background 0.15s ease, box-shadow 0.15s ease, width 0.15s ease;
}

.waveform-trim-handle.handle-start .waveform-handle-grip {
  left: 6px;
}

.waveform-trim-handle.handle-end .waveform-handle-grip {
  right: 6px;
}

.waveform-handle-grip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 28px;
  border-radius: 3px;
  background: #a855f7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.waveform-handle-badge {
  position: absolute;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  color: #f3e8ff;
  background: rgba(126, 34, 206, 0.88);
  border: 1px solid rgba(216, 180, 254, 0.5);
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  transition: all 0.15s ease;
}

.waveform-trim-handle.handle-start .waveform-handle-badge {
  top: 6px;
  left: 9px;
}

.waveform-trim-handle.handle-end .waveform-handle-badge {
  bottom: 6px;
  right: 9px;
}

.waveform-trim-handle:hover .waveform-handle-grip,
.waveform-trim-handle.active .waveform-handle-grip {
  width: 3px;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.85);
}

.waveform-trim-handle:hover .waveform-handle-grip::after,
.waveform-trim-handle.active .waveform-handle-grip::after {
  width: 8px;
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.9);
}

.waveform-trim-handle:hover .waveform-handle-badge,
.waveform-trim-handle.active .waveform-handle-badge {
  color: #083344;
  background: #22d3ee;
  border-color: #a5f3fc;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.55);
}

.waveform-hover-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(56, 189, 248, 0.55);
  pointer-events: none;
  z-index: 3;
}

.waveform-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.65);
  pointer-events: none;
  z-index: 7;
}

.audio-hud-footer {
  padding-top: 4px;
}

.audio-hud-footer kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-primary);
  background: rgba(51, 65, 85, 0.65);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Transcode & Compressor */
.transcode-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transcode-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.transcode-progress-card {
  background: var(--bg-card-subtle);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-indigo));
  transition: width 0.2s ease;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.transcode-output-card {
  background: var(--bg-card-subtle);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-emerald);
}

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

/* NLE Multi-track Studio */
.nle-workspace-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nle-top-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.nle-monitor-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nle-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nle-timecode-hud {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
  background: rgba(0, 0, 0, 0.75);
  padding: 4px 10px;
  border-radius: 4px;
}

.nle-inspector-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.inspector-item label {
  color: var(--text-secondary);
  font-weight: 500;
}

.nle-timeline-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  overflow-x: auto;
}

.nle-ruler-row {
  display: flex;
  height: 36px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  min-width: 800px;
}

.nle-ruler-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.nle-ruler-track {
  flex-grow: 1;
  height: 100%;
  background: var(--bg-input);
  position: relative;
  cursor: pointer;
  user-select: none;
  overflow: visible;
}

.nle-ruler-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.nle-playhead-needle {
  position: absolute;
  top: 0;
  height: 600px;
  width: 2px;
  background: #ef4444;
  z-index: 30;
  pointer-events: none;
  transition: none;
}

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

.nle-audition-needle {
  position: absolute;
  top: 0;
  height: 600px;
  width: 2px;
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  z-index: 31;
  pointer-events: none;
  transition: none;
}

.nle-audition-needle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5px;
  width: 12px;
  height: 10px;
  background: #38bdf8;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.nle-audition-needle-tc {
  position: absolute;
  top: 14px;
  left: 6px;
  background: rgba(14, 165, 233, 0.95);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, monospace;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.nle-snap-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #00f2fe;
  box-shadow: 0 0 6px #00f2fe;
  z-index: 28;
  pointer-events: none;
}

.nle-track-row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 800px;
  width: 100%;
}

.nle-track-main {
  display: flex;
  height: 42px;
  width: 100%;
  align-items: center;
  position: relative;
}

.track-header {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.nle-track-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
}

.nle-ruler-header {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  box-sizing: border-box;
}

.nle-sub-channels-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: rgba(10, 15, 26, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.nle-sub-track-row {
  display: flex;
  height: 32px;
  width: 100%;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.nle-sub-track-header {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 8px 0 14px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.6);
  border-right: 1px solid var(--border-subtle);
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.nle-sub-track-lane {
  flex-grow: 1;
  height: 100%;
  position: relative;
  background: rgba(0, 0, 0, 0.22);
}

.track-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.track-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  min-width: 24px;
  height: 24px;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.track-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.track-btn.active {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
}

.track-btn.active-solo {
  background: rgba(234, 179, 8, 0.25);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.6);
  font-weight: 700;
}

.track-btn.active-solo-l {
  background: rgba(56, 189, 248, 0.28);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.6);
  font-weight: 700;
}

.track-btn.active-solo-r {
  background: rgba(245, 158, 11, 0.28);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.6);
  font-weight: 700;
}

.track-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.track-tag-ch-l {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.track-tag-ch-r {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.nle-sub-clip {
  position: absolute;
  height: 20px;
  top: 4px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.nle-sub-clip-l {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.nle-sub-clip-r {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.nle-clip.compound-clip {
  border: 2px dashed rgba(168, 85, 247, 0.8) !important;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.7), rgba(126, 34, 206, 0.7)) !important;
}

.track-tag-v {
  background: rgba(6, 182, 212, 0.2);
  color: var(--color-cyan);
}

.track-tag-t {
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-amber);
}

.track-tag-a {
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-emerald);
}

.track-lane {
  flex-grow: 1;
  height: 100%;
  position: relative;
  background: var(--bg-card-subtle);
}

.nle-clip {
  position: absolute;
  height: 36px;
  top: 5px;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nle-clip.dragging {
  cursor: grabbing;
  opacity: 0.8;
  z-index: 15;
}

.nle-clip-fixed-tag {
  position: absolute;
  right: 6px;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.5);
  color: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nle-clip-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  z-index: 10;
  cursor: ew-resize;
}

.nle-clip-handle-in {
  left: 0;
  border-left: 3px solid rgba(255, 255, 255, 0.8);
}

.nle-clip-handle-out {
  right: 0;
  border-right: 3px solid rgba(255, 255, 255, 0.8);
}

.nle-clip-handle:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nle-clip-v {
  background: linear-gradient(90deg, #0284c7, #0369a1);
  color: #fff;
}

.nle-clip-t {
  background: linear-gradient(90deg, #d97706, #b45309);
  color: #fff;
}

.nle-clip-a {
  background: linear-gradient(90deg, #059669, #047857);
  color: #fff;
}

.nle-clip.selected {
  outline: 2px solid #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  z-index: 10;
}

.nle-clip.multi-selected {
  outline: 2px solid #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8), 0 0 4px #fff !important;
  z-index: 12;
}

/* =============================================================================
   Dual-Row Workbench (上下双行工作台) Styles
   ============================================================================= */
.nle-track-dual-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 800px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2px;
  background: rgba(15, 23, 42, 0.35);
}

.nle-track-row-output {
  display: flex;
  height: 46px;
  width: 100%;
  align-items: center;
  position: relative;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.nle-track-row-source {
  display: flex;
  height: 44px;
  width: 100%;
  align-items: center;
  position: relative;
  background: rgba(10, 15, 26, 0.5);
}

.track-row-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.track-row-badge-output {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.track-row-badge-source {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.nle-source-lane {
  flex-grow: 1;
  height: 100%;
  position: relative;
  background: rgba(6, 11, 20, 0.7);
  overflow: hidden;
  cursor: crosshair;
}

.nle-source-asset-bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  pointer-events: none;
}

.nle-source-waveform-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.nle-source-usage {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(16, 185, 129, 0.22);
  border-bottom: 2px solid #10b981;
  pointer-events: none;
  z-index: 2;
}

.nle-source-tag {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 3px;
  background: rgba(147, 51, 234, 0.28);
  border: 1px solid rgba(168, 85, 247, 0.6);
  z-index: 3;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 11px;
  color: #e9d5ff;
  font-weight: 600;
  pointer-events: auto;
  transition: all 0.15s ease;
}

.nle-source-tag:hover {
  background: rgba(147, 51, 234, 0.45);
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
}

.nle-source-selection {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid #38bdf8;
  border-radius: 3px;
  z-index: 5;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
  pointer-events: auto;
  cursor: grab;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nle-source-selection.focused {
  border: 2px solid #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
  background: rgba(56, 189, 248, 0.32);
}

.nle-source-selection-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 6;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.nle-source-selection-handle.active {
  background-color: #38bdf8 !important;
  box-shadow: 0 0 8px #38bdf8;
}

.nle-source-selection-handle-left {
  left: 0;
  background: #38bdf8;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

.nle-source-selection-handle-right {
  right: 0;
  background: #38bdf8;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

.nle-selection-floating-bar {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 4px;
  padding: 2px 6px;
  z-index: 20;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.nle-selection-floating-bar button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #f1f5f9;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.12s ease;
}

.nle-selection-floating-bar button:hover {
  background: rgba(56, 189, 248, 0.35);
  color: #fff;
}

/* =============================================================================
   Context Menu (鼠标右键菜单)
   ============================================================================= */
.nle-context-menu {
  position: fixed;
  z-index: 99999;
  min-width: 260px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #e2e8f0;
  user-select: none;
  animation: nleMenuFadeIn 0.1s ease-out;
}

@keyframes nleMenuFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.nle-context-header {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  padding: 5px 10px 3px;
  letter-spacing: 0.3px;
}

.nle-context-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px;
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.55);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.nle-context-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}

.nle-context-item:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #fff;
}

.nle-context-item.danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.nle-context-shortcut {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  margin-left: 12px;
}

.nle-context-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 3px 0;
}

/* OPFS Disaster Recovery Banner */
.recovery-banner {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(6, 95, 70, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  padding: 10px 16px;
  margin: 12px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recovery-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recovery-banner-icon {
  font-size: 20px;
}

.recovery-banner-text {
  font-size: 13px;
  color: var(--text-primary);
}

.recovery-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Light Theme Adjustments */
[data-theme="light"] .cutter-workspace-card,
[data-theme="light"] .audio-editor-card,
[data-theme="light"] .transcode-workspace-card,
[data-theme="light"] .nle-inspector-panel,
[data-theme="light"] .nle-timeline-container {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .cutter-hud-bar,
[data-theme="light"] .audio-timeline-header,
[data-theme="light"] .audio-trim-nudge-bar,
[data-theme="light"] .transcode-progress-card,
[data-theme="light"] .transcode-output-card {
  background: #f8fafc;
}

[data-theme="light"] .trim-target-chip {
  background: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}

[data-theme="light"] .trim-target-chip.active {
  background: rgba(6, 182, 212, 0.14);
  color: #0e7490;
  border-color: #06b6d4;
}

[data-theme="light"] .trim-step-btn,
[data-theme="light"] .audio-hud-footer kbd {
  background: #e2e8f0;
  color: #334155;
}

[data-theme="light"] .waveform-ruler-wrapper {
  background: #e2e8f0;
  border-bottom-color: #cbd5e1;
}

[data-theme="light"] .waveform-mask {
  background: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .cutter-timeline-track,
[data-theme="light"] .waveform-canvas-wrapper,
[data-theme="light"] .nle-ruler-track,
[data-theme="light"] .track-lane {
  background: #f1f5f9;
}

/* Responsive */
@media (max-width: 960px) {
  .menu-toggle-btn {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 100;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    display: none;
    backdrop-filter: blur(4px);
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .main-workspace {
    width: 100%;
    padding: 16px;
  }

  .stage-panels {
    grid-template-columns: 1fr;
  }

  .nle-top-row {
    grid-template-columns: 1fr;
  }
}

/* Video Render Progress Modal */
.render-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.render-modal-card {
  background: var(--bg-surface-elevated, #1e293b);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.15));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.render-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.render-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin: 0;
}

.render-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.render-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary, #6366f1), var(--color-success, #10b981));
  transition: width 0.1s ease;
}

.render-modal-stats {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
}

.render-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-cancel-render {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  transition: all 0.2s ease;
}

.btn-cancel-render:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* =============================================================================
   10. MOVIE DIALOGUE SUBTITLE STITCHER STYLES
   ============================================================================= */

.stitcher-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stitcher-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
}

.stitcher-player-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stitcher-player-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.stitcher-player-container video,
.stitcher-player-container canvas {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
}

.stitcher-crop-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2%;
  height: 14%;
  border: 2px dashed var(--color-cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.2);
  box-sizing: border-box;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
  transition: bottom 0.05s ease, height 0.05s ease;
  z-index: 5;
}

.stitcher-crop-label {
  display: none;
}

.stitcher-hud-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-md);
}

.stitcher-timeline-track {
  position: relative;
  height: 32px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.stitcher-buffer-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 0%;
  background: rgba(6, 182, 212, 0.35);
  border-right: 2px solid rgba(56, 189, 248, 0.85);
  border-radius: 4px;
  pointer-events: none;
  transition: width 0.15s ease-out, left 0.15s ease-out;
  z-index: 2;
}

.stitcher-playhead-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: #ef4444;
  z-index: 10;
  pointer-events: none;
}

.stitcher-transport-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stitcher-crop-settings {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stitcher-crop-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.stitcher-crop-row label {
  min-width: 120px;
  color: var(--text-secondary);
}

.stitcher-crop-row .control-slider {
  flex: 1;
}

.control-num-unit {
  display: flex;
  align-items: center;
  gap: 4px;
}

.control-input-sm {
  width: 55px;
  height: 28px;
  padding: 2px 6px;
  font-size: 13px;
  text-align: center;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
}

.control-num-unit .unit {
  font-size: 12px;
  color: var(--text-muted);
}

.stitcher-slices-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 380px;
  max-height: 580px;
}

.stitcher-slices-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.stitcher-empty-slices {
  padding: 48px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  line-height: 1.6;
}

.stitcher-slice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.stitcher-slice-item:hover {
  border-color: var(--color-cyan, #06b6d4);
}

.stitcher-slice-badge {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-cyan, #06b6d4);
  min-width: 26px;
  text-align: center;
}

.stitcher-slice-thumb-box {
  width: 120px;
  height: 34px;
  flex-shrink: 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.stitcher-slice-thumb-box canvas,
.stitcher-slice-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stitcher-slice-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stitcher-slice-time {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-secondary);
}

.stitcher-slice-text {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stitcher-slice-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.slice-action-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.slice-action-btn:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.1));
  color: var(--color-cyan, #06b6d4);
  border-color: var(--color-cyan, #06b6d4);
}

.slice-action-btn.btn-del:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.stitcher-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.preview-header-left {
  display: flex;
  align-items: center;
}

.stitcher-preview-viewport {
  max-height: 640px;
  overflow-y: auto;
  overflow-x: auto;
  background: #050811;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.stitcher-preview-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  display: block;
}

/* Light Theme Adjustments for Subtitle Stitcher */
[data-theme="light"] .stitcher-workspace-card,
[data-theme="light"] .stitcher-slices-panel,
[data-theme="light"] .stitcher-preview-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .stitcher-hud-bar,
[data-theme="light"] .stitcher-crop-settings,
[data-theme="light"] .stitcher-slice-item {
  background: #f8fafc;
}

[data-theme="light"] .stitcher-timeline-track,
[data-theme="light"] .stitcher-preview-viewport {
  background: #f1f5f9;
}

@media (max-width: 960px) {
  .stitcher-layout-grid {
    grid-template-columns: 1fr;
  }
}



/* ==========================================================================
   Timeline Seek Step & Keyboard Shortcuts Component Styles
   ========================================================================== */

.btn-timeline-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color, #334155);
  color: var(--text-color, #f1f5f9);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  user-select: none;
}

.btn-timeline-step:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--color-blue, #3b82f6);
  color: #38bdf8;
  transform: translateY(-1px);
}

.btn-timeline-step .step-val {
  color: #38bdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
}

/* Timeline Step Settings Modal */
.timeline-step-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 29, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: fadeInModal 0.2s ease-out;
}

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

.timeline-step-modal-card {
  width: 90%;
  max-width: 520px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  animation: scaleInCard 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleInCard {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.timeline-step-modal-header {
  padding: 16px 20px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-step-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-step-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.timeline-step-modal-close:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-step-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-step-modal-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
  background: rgba(56, 189, 248, 0.06);
  border-left: 3px solid #38bdf8;
  padding: 8px 12px;
  border-radius: 4px;
}

.timeline-step-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-step-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-chip:hover {
  background: #334155;
  border-color: #38bdf8;
  color: #38bdf8;
}

.preset-chip.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.timeline-step-custom-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #273549;
  border-radius: 8px;
  padding: 14px;
}

.timeline-step-input-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

.timeline-step-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-step-field label {
  font-size: 12px;
  color: #94a3b8;
}

.timeline-step-calc-preview {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}

.timeline-step-modal-footer {
  padding: 14px 20px;
  background: #1e293b;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Floating Timeline Seek HUD Pill */
.timeline-step-hud {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #38bdf8;
  color: #f8fafc;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.4);
  pointer-events: none;
  z-index: 100000;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-step-hud.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

.timeline-step-hud .hud-tc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #38bdf8;
}

/* Light Theme overrides */
[data-theme="light"] .btn-timeline-step {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

[data-theme="light"] .btn-timeline-step:hover {
  background: #e2e8f0;
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="light"] .btn-timeline-step .step-val {
  color: #0284c7;
}

[data-theme="light"] .timeline-step-modal-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .timeline-step-modal-header,
[data-theme="light"] .timeline-step-modal-footer {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .timeline-step-modal-title {
  color: #0f172a;
}

[data-theme="light"] .timeline-step-modal-desc {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #334155;
}

[data-theme="light"] .timeline-step-field-label {
  color: #475569;
}

[data-theme="light"] .preset-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

[data-theme="light"] .preset-chip:hover {
  background: #e2e8f0;
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="light"] .preset-chip.active {
  background: rgba(2, 132, 199, 0.15);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="light"] .timeline-step-custom-section {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .timeline-step-hud {
  background: rgba(255, 255, 255, 0.95);
  border-color: #0284c7;
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .timeline-step-hud .hud-tc {
  color: #0284c7;
}
