:root {
  /* Quvirl Pure Black & Surface Hierarchy */
  --bg: #000000;
  --bg-dark: #000000;
  --bg-sidebar: #070707;
  --bg-panel: #0a0a0a;
  --bg-card: #0c0c0c;
  --bg-card-hover: #141414;
  --surface: #0a0a0a;
  --card: #0c0c0c;
  --card-2: #141414;

  /* Quvirl Subtle Lines & Strong Borders */
  --border-color: rgba(255, 255, 255, 0.09);
  --border-light: rgba(255, 255, 255, 0.15);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);

  /* Quvirl Signature Accents (Electric Blue #58a6ff & Emerald #22c55e) */
  --brand: #58a6ff;
  --brand-2: #3b82f6;
  --primary: #58a6ff;
  --primary-hover: #3b82f6;
  --primary-glow: rgba(88, 166, 255, 0.35);
  --primary-gradient: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
  --accent: #22c55e;
  --accent-2: #14b8a6;
  --accent-glow: rgba(34, 197, 94, 0.3);

  /* Status Colors */
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #ef4444;
  --virality-high: #22c55e;
  --virality-mid: #fbbf24;
  --virality-low: #8b98ab;

  /* Quvirl Typography Colors */
  --text-main: #f1f5f9;
  --text-sub: #c3cddb;
  --text-muted: #8b98ab;
  --text-dim: #64748b;
  --faint: #64748b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient 56px Quvirl Background Grid */
.bgFx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #000000;
}
.bgFx::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
}

/* Main Layout Shell */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: transparent;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.logoIcon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, #0f4c8a, #0a3563);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.25) inset, 0 6px 18px rgba(59, 130, 246, 0.3);
  flex-shrink: 0;
}
.logoIcon svg { width: 20px; height: 20px; }

.brandQu { color: #ffffff !important; font-weight: 900; }
.brandVirl { color: #58a6ff !important; font-weight: 900; }
.brandSub { font-size: 11px; font-weight: 800; color: #8b98ab; letter-spacing: 0.8px; margin-left: 4px; }

.brand-text h2 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
}

.badge-tag-opus {
  font-size: 10px;
  font-weight: 700;
  background: rgba(88, 166, 255, 0.12);
  color: #9cc8ff;
  border: 1px solid rgba(88, 166, 255, 0.22);
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-top: 4px;
  display: inline-block;
  letter-spacing: 0.3px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  background: rgba(88, 166, 255, 0.12);
  color: #9cc8ff;
  border: 1px solid rgba(88, 166, 255, 0.25);
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.12);
}

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

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.device-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.device-info-text {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}
.device-info-text b { color: var(--text-main); }
.device-info-text span { color: var(--text-dim); }

/* Main Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  background: var(--bg-dark);
}

.content-view {
  display: none;
}
.content-view.active {
  display: block;
}

/* View Header */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.view-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #14b8a6) !important;
  color: #03140a !important;
  font-weight: 800 !important;
  border: 1px solid transparent !important;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12) inset !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1fb355, #11a393) !important;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.18) inset !important;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #0c0c0c !important;
  color: var(--text-sub) !important;
  border: 1px solid var(--border-light) !important;
}
.btn-secondary:hover {
  background: #141414 !important;
  color: #ffffff !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

.btn-ghost {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-color) !important;
}
.btn-ghost:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
  width: 100%;
}

.btn-icon {
  background: #0c0c0c;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-icon:hover {
  background: #141414;
  border-color: rgba(148, 163, 184, 0.3);
}

.btn-cancel-card {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-cancel-card:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-color: #ef4444;
}

/* Drag and Drop Zone */
.drop-zone {
  border: 1px dashed rgba(88, 166, 255, 0.32) !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.92), rgba(7, 7, 7, 0.92)) !important;
  box-shadow: var(--shadow) !important;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 36px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.drop-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #58a6ff, #22c55e, transparent);
}
.drop-zone.dragover {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.06) !important;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.2) !important;
}

.drop-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.drop-zone h3 { font-size: 18px; margin-bottom: 6px; }
.drop-zone p { font-size: 13px; color: var(--text-muted); max-width: 500px; margin: 0 auto; }

.progress-bar-container {
  margin-top: 20px;
  background: var(--bg-card);
  border-radius: 999px;
  height: 20px;
  position: relative;
  overflow: hidden;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width 0.3s ease;
}

.progress-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Projects Grid */
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.count-badge {
  background: var(--border-color);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.search-input-small {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.92), rgba(8, 8, 8, 0.92));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 166, 255, 0.35);
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.95), rgba(12, 12, 12, 0.95));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(88, 166, 255, 0.12);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.project-card-title {
  font-size: 16px;
  font-weight: 700;
  word-break: break-all;
}

.project-card-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.tag-status {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-status.ready { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.tag-status.analyzing { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.tag-status.error { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Workspace Dual Pane */
.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.workspace-title-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.workspace-title-box h2 {
  font-size: 20px;
  font-weight: 700;
}

.status-tags {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tag-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.workspace-body {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 24px;
  height: calc(100vh - 140px);
}

/* Left: Player Column */
.player-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

#main-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.subtitle-overlay,
.phone-subtitle-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 25;
  text-align: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.35;
  box-sizing: border-box;
}

.subtitle-overlay {
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 86%;
}

.phone-subtitle-overlay {
  bottom: 25%;
  left: 6%;
  right: 6%;
  width: 88%;
  padding: 8px 10px;
}

/* Preset: Hormozi Gold */
.caption-preset-hormozi {
  font-family: Impact, "Arial Black", sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #FFFFFF;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 3px 8px rgba(0,0,0,0.9);
  font-size: 23px;
}
.phone-subtitle-overlay.caption-preset-hormozi {
  font-size: 20px;
}
.caption-preset-hormozi .caption-word-active {
  color: #FEE500 !important;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 16px rgba(254, 229, 0, 0.9) !important;
  transform: scale(1.18);
  display: inline-block;
}
.caption-preset-hormozi .caption-word-secondary {
  color: #00FF66 !important;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 12px rgba(0, 255, 102, 0.8) !important;
}

/* Preset: MrBeast Neon */
.caption-preset-mrbeast {
  font-family: Impact, "Arial Black", Montserrat, sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #FFFFFF;
  text-shadow: 2px 2px 0 #050b14, -2px -2px 0 #050b14, 2px -2px 0 #050b14, -2px 2px 0 #050b14, 0 4px 10px rgba(0,0,0,0.95);
  font-size: 22px;
}
.phone-subtitle-overlay.caption-preset-mrbeast {
  font-size: 19px;
}
.caption-preset-mrbeast .caption-word-active {
  color: #00F0FF !important;
  background: rgba(0, 240, 255, 0.22);
  padding: 1px 7px;
  border-radius: 5px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.7);
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 0 0 12px rgba(0, 240, 255, 0.9) !important;
  transform: scale(1.15);
  display: inline-block;
}
.caption-preset-mrbeast .caption-word-secondary {
  color: #FFEE00 !important;
  background: rgba(255, 238, 0, 0.22);
  padding: 1px 6px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(255, 238, 0, 0.65);
}

/* Preset: Ali Abdaal Clean */
.caption-preset-abdaal {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: #F8FAFC;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 6px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.phone-subtitle-overlay.caption-preset-abdaal {
  font-size: 14.5px;
  padding: 5px 14px;
}
.caption-preset-abdaal .caption-word-active {
  color: #FFFFFF !important;
  border-bottom: 2.5px solid #FFFFFF;
  font-weight: 800;
  display: inline-block;
}

/* Preset: Red Alert */
.caption-preset-redalert {
  font-family: Impact, "Arial Black", sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #FFFFFF;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 4px 8px rgba(0,0,0,0.9);
  font-size: 23px;
}
.phone-subtitle-overlay.caption-preset-redalert {
  font-size: 20px;
}
.caption-preset-redalert .caption-word-active {
  color: #FF2A2A !important;
  background: rgba(255, 42, 42, 0.25);
  padding: 1px 7px;
  border-radius: 5px;
  box-shadow: 0 0 14px rgba(255, 42, 42, 0.7);
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 0 0 12px rgba(255, 42, 42, 0.9) !important;
  transform: scale(1.16);
  display: inline-block;
}

.player-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-play-pause {
  background: var(--primary);
  color: #fff;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.player-aux {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.control-label { color: var(--text-dim); }

.player-aux select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.scrubber-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  margin-top: 4px;
}

.scrubber-progress {
  height: 100%;
  background: var(--primary);
  width: 0%;
  border-radius: 4px;
}

.scrubber-head {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Right: Studio Column */
.studio-column {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-tab-bar {
  display: flex;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
}

.studio-tab {
  padding: 12px 16px;
  background: transparent;
  color: var(--text-muted);
  border: 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.studio-tab:hover { color: var(--text-main); }
.studio-tab.active {
  color: #fff;
  border-bottom-color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
}

.studio-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

.tab-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

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

/* Transcript Tab */
.transcript-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
}

.transcript-row {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.transcript-row:hover { background: var(--bg-card); }
.transcript-row.active {
  background: rgba(79, 70, 229, 0.2);
  border-left: 3px solid var(--primary);
}

.ts-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
  flex-shrink: 0;
}

.ts-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
}

/* Search Tab */
.search-box-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.search-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.search-input:focus { border-color: var(--primary); }

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.suggestion-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.suggestion-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.search-result-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modality-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}
.modality-badge.transcript { background: rgba(79, 70, 229, 0.2); color: #818cf8; }
.modality-badge.ocr { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.modality-badge.object { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.modality-badge.visual { background: rgba(236, 72, 153, 0.2); color: #f472b6; }

/* Chat Tab */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.6;
}

.chat-bubble.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble.assistant h3 {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--accent);
}

.chat-bubble.assistant strong { color: #fff; }

.chat-bubble a.time-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
}

.chat-suggestions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.prompt-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.prompt-pill:hover { color: var(--text-main); border-color: var(--text-muted); }

.chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* Quvirl AI Model Badges & Studio Styling */
.tag.model-tag {
  background: rgba(139, 92, 246, 0.16) !important;
  border: 1px solid rgba(139, 92, 246, 0.45) !important;
  color: #c4b5fd !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
}

.tag.model-tag b {
  color: #ffffff;
  font-weight: 700;
}

.tab-model-pill {
  font-size: 9px;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.22);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.45);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.2px;
}

.model-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.model-badge-tag b {
  color: #ffffff;
  font-weight: 700;
}

.chat-tab-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.chat-sender-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-sender-name {
  font-weight: 700;
  font-size: 12px;
  color: #c4b5fd;
  letter-spacing: 0.3px;
}

.chat-sender-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.chat-bubble-body {
  font-size: 13px;
  line-height: 1.6;
}

/* Highlights Tab */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.15s;
}

.highlight-card:hover { border-color: var(--border-light); }

.highlight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.score-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.signals-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.signal-pill {
  font-size: 11px;
  background: var(--bg-panel);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* Ratio Selector */
.ratio-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.ratio-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ratio-card input { display: none; }
.ratio-card.active {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
}

.ratio-icon {
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  margin-bottom: 4px;
}

.ratio-9-16 { width: 18px; height: 32px; }
.ratio-1-1 { width: 24px; height: 24px; }
.ratio-16-9 { width: 32px; height: 18px; }

.ratio-card b { font-size: 15px; }
.ratio-card span { font-size: 11px; color: var(--text-dim); }

/* Switch Toggle */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #374151;
  transition: .2s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Text-Based Editor */
.textedit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
}

.sentence-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.sentence-card.cut {
  opacity: 0.4;
  text-decoration: line-through;
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Timeline Track */
.timeline-track-container {
  display: flex;
  height: 48px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 10px;
  gap: 2px;
}

.timeline-clip-block {
  background: linear-gradient(135deg, #4338ca, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 4px;
}

/* Clips Grid */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

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

.clip-card video {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: var(--radius-sm);
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Metadata Items */
.meta-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.meta-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.meta-hashtag {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
}

/* Utility classes */
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }

/* URL Import Styles */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.drop-actions-group {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.supported-platforms-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Modal Backdrop & Card */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.btn-close:hover { color: #fff; background: var(--bg-card); }

.input-with-action {
  display: flex;
  gap: 8px;
}

/* Alert Banners */
.alert-banner {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.alert-banner.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-banner.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.banner-actions {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.link-tag {
  color: var(--accent) !important;
  text-decoration: none;
}
.link-tag:hover {
  text-decoration: underline;
}

/* Alert Banner Success */
.alert-banner.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* Cookie Management Modal Styles */
.cookie-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  gap: 16px;
}

.cookie-status-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
.status-indicator-dot.active {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.status-indicator-dot.inactive {
  background: #ef4444;
}

.cookie-status-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cookie-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 6px;
}

.cookie-tabs .tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cookie-tabs .tab-btn:hover {
  color: var(--text-main);
}

.cookie-tabs .tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  border-radius: 6px 6px 0 0;
}

.cookie-tab-panel {
  display: none;
}
.cookie-tab-panel.active {
  display: block;
}

.file-drop-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-drop-area:hover, .file-drop-area.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}

.cookie-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: monospace;
  font-size: 12px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}
.cookie-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.guide-steps {
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.7;
}

.guide-steps li {
  margin-bottom: 6px;
}

.guide-steps a {
  color: var(--accent);
  text-decoration: underline;
}

.text-danger {
  color: #f87171 !important;
}

/* ==========================================================================
   OPUS CLIP SIGNATURE DESIGN SYSTEM
   ========================================================================== */

/* Radar pulse animation for 12H Cloud Server */
@keyframes radar-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-dot-online {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  animation: radar-pulse 2s infinite;
}

.badge-tag-opus {
  font-size: 10px;
  font-weight: 800;
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: #58a6ff;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Quvirl Visual Metric Boxes (Virality Score, YouTube Box, Total Video Min, Ready Box) */
.quvirl-metric-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 16px 0 20px 0;
  width: 100%;
}

.quvirl-metric-box {
  background: #080c16;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1.5px solid transparent;
}
.quvirl-metric-box:hover {
  transform: translateY(-2px);
}

/* 1. Virality Score (Quvirl Brand Blue Theme) */
.quvirl-metric-box.box-virality {
  border-color: rgba(88, 166, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 16px rgba(88, 166, 255, 0.05);
}
.quvirl-metric-box.box-virality:hover {
  border-color: #58a6ff;
  box-shadow: 0 6px 24px rgba(88, 166, 255, 0.22);
}

/* 2. YouTube Box (Crimson / Red Theme) */
.quvirl-metric-box.box-youtube {
  border-color: #4a1c24;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 16px rgba(239, 68, 68, 0.05);
}
.quvirl-metric-box.box-youtube:hover {
  border-color: #ef4444;
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.22);
}

/* 3. Total Video Min (Blue / Cyan Theme) */
.quvirl-metric-box.box-video-min {
  border-color: #123757;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 16px rgba(14, 165, 233, 0.05);
}
.quvirl-metric-box.box-video-min:hover {
  border-color: #0ea5e9;
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.22);
}

/* 4. Ready Box (Emerald / Green Theme) */
.quvirl-metric-box.box-ready {
  border-color: #114232;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 16px rgba(16, 185, 129, 0.05);
}
.quvirl-metric-box.box-ready:hover {
  border-color: #10b981;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.22);
}

.quvirl-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quvirl-icon-flame {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quvirl-icon-flame svg {
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.quvirl-icon-youtube {
  width: 44px;
  height: 30px;
  background: #e50914;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.45);
}

.quvirl-icon-clock {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quvirl-icon-clock svg {
  filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.5));
}

.quvirl-icon-check {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quvirl-icon-check svg {
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

.quvirl-box-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.quvirl-box-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}

.quvirl-info-btn {
  font-size: 11px;
  color: #64748b;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #475569;
  line-height: 1;
  font-weight: 700;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}
.quvirl-info-btn:hover {
  color: #f8fafc;
  border-color: #94a3b8;
}

.quvirl-box-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}

.quvirl-val-num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}
.quvirl-val-num.purple { color: #8b5cf6; }
.quvirl-val-num.red { color: #ef4444; }
.quvirl-val-num.blue { color: #0ea5e9; }
.quvirl-val-num.green { color: #10b981; }

.quvirl-val-denom {
  font-size: 14px;
  font-weight: 600;
}
.quvirl-val-denom.purple { color: #73678f; }
.quvirl-val-denom.red { color: #855359; }
.quvirl-val-denom.blue { color: #436d8f; }
.quvirl-val-denom.green { color: #3d705e; }

/* Header Metric Boxes (YouTube Box & Total Video Min in Workspace Header) */
.header-metric-box {
  padding: 6px 12px !important;
  gap: 10px !important;
  border-radius: 10px !important;
  min-height: unset !important;
  display: inline-flex !important;
  align-items: center !important;
}
.header-metric-box .quvirl-icon-youtube {
  width: 32px !important;
  height: 22px !important;
  border-radius: 6px !important;
}
.header-metric-box .quvirl-icon-youtube svg {
  width: 14px !important;
  height: 14px !important;
}
.header-metric-box .quvirl-icon-clock {
  width: 28px !important;
  height: 28px !important;
}
.header-metric-box .quvirl-icon-clock svg {
  width: 26px !important;
  height: 26px !important;
}
.header-metric-box .quvirl-box-content {
  gap: 2px !important;
}
.header-metric-box .quvirl-box-header {
  font-size: 11px !important;
  line-height: 1.1 !important;
  gap: 4px !important;
}
.header-metric-box .quvirl-box-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1.1;
}
.header-metric-box .quvirl-val-num {
  font-size: 16px !important;
  font-weight: 800;
}
.header-metric-box .quvirl-val-denom {
  font-size: 11px !important;
}
.header-metric-box .quvirl-exact-time {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 3px;
}
.header-metric-box .quvirl-platform-val {
  font-size: 15px !important;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.2px;
}

/* Highlight Card Virality Box (Box 1 in Each Highlight Card) */
.highlight-virality-box {
  padding: 8px 14px !important;
  gap: 12px !important;
  border-radius: 12px !important;
  min-height: unset !important;
  flex-shrink: 0 !important;
}
.highlight-virality-box .quvirl-icon-flame {
  width: 34px !important;
  height: 34px !important;
}
.highlight-virality-box .quvirl-icon-flame svg {
  width: 28px !important;
  height: 28px !important;
}
.highlight-virality-box .quvirl-box-content {
  gap: 2px !important;
}
.highlight-virality-box .quvirl-box-header {
  font-size: 11px !important;
  gap: 4px !important;
}
.highlight-virality-box .quvirl-box-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.highlight-virality-box .quvirl-val-num {
  font-size: 20px !important;
  font-weight: 800;
}
.highlight-virality-box .quvirl-val-denom {
  font-size: 12px !important;
}
.highlight-tier-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}
.highlight-tier-badge.high {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.highlight-tier-badge.mid {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.highlight-tier-badge.low {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Opus Highlight Cards */
.opus-highlight-card {
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow);
}
.opus-highlight-card:hover {
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(88, 166, 255, 0.15);
  transform: translateY(-2px);
}
.opus-card-glow-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #58a6ff, #22c55e, transparent);
  opacity: 0.9;
}

.opus-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.opus-card-headline-group {
  flex: 1;
  min-width: 0;
}

.opus-card-headline-group h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  line-height: 1.35;
}

.opus-headline-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opus-headline-idx {
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: #58a6ff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.opus-card-timecode {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

/* Virality Gauge Pill */
.opus-virality-gauge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.opus-virality-gauge.high {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.14);
}
.opus-virality-gauge.mid {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
}

.gauge-fire {
  font-size: 16px;
}
.gauge-score {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.gauge-score small {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}
.gauge-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
}
.gauge-label.high {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.gauge-label.mid {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.opus-desc-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0 12px 0;
  backdrop-filter: blur(4px);
}
.opus-desc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.opus-desc-icon {
  font-size: 14px;
}
.opus-desc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #60a5fa;
}
.opus-desc-content {
  font-size: 13.5px;
  color: #f1f5f9;
  line-height: 1.55;
  margin: 0;
}
.phone-card-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  margin: 4px 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Opus "Why it will go viral" Hook Box */
.opus-hook-box {
  background: rgba(88, 166, 255, 0.08);
  border-left: 3px solid #58a6ff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.opus-hook-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.opus-hook-content b {
  color: #9cc8ff;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}
.opus-hook-content p {
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.45;
  margin: 0;
}

/* Dynamic Word Highlight Preview Block */
.opus-quote-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 10px 0 14px;
  position: relative;
}
.opus-quote-badge {
  position: absolute;
  top: -8px;
  right: 14px;
  background: #1e2438;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.opus-quote-text {
  font-size: 13.5px;
  color: #f1f5f9;
  line-height: 1.65;
}

/* Hormozi / MrBeast caption preview highlighted words */
.hl-word-yellow {
  background: rgba(250, 204, 21, 0.22);
  color: #fde047;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}
.hl-word-cyan {
  background: rgba(6, 182, 212, 0.22);
  color: #38bdf8;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}
.hl-word-green {
  background: rgba(16, 185, 129, 0.22);
  color: #4ade80;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
.hl-word-red {
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Multi-Signal Micro Metrics */
.opus-signals-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.opus-signal-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
}
.opus-signal-item b {
  color: #f1f5f9;
}
.opus-signal-item.opus-signal-model {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}
.opus-signal-item.opus-signal-model b {
  color: #ffffff;
}

/* Card Actions */
.opus-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Opus 9:16 Vertical Phone Mockup Gallery */
.opus-shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.opus-phone-card {
  background: #0f1422;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
}
.opus-phone-card:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 166, 255, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(88, 166, 255, 0.2);
}

.phone-screen-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}
.phone-screen-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}
.phone-virality-pill {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #22c55e;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.phone-dur-pill {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
}
.phone-format-pill {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: #58a6ff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.phone-screen-wrap.ratio-wrap-1-1 {
  aspect-ratio: 1 / 1 !important;
}
.phone-screen-wrap.ratio-wrap-16-9 {
  aspect-ratio: 16 / 9 !important;
}
.phone-screen-wrap.ratio-wrap-9-16 {
  aspect-ratio: 9 / 16 !important;
}
.opus-phone-shell.ratio-shell-1-1 {
  width: 360px !important;
  max-width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 18px !important;
}
.opus-phone-shell.ratio-shell-1-1 .phone-speaker-notch,
.opus-phone-shell.ratio-shell-1-1 .phone-home-indicator {
  display: none !important;
}
.opus-phone-shell.ratio-shell-1-1 .phone-top-bar {
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
}
.opus-phone-shell.ratio-shell-16-9 {
  width: 460px !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  border-radius: 16px !important;
}
.opus-phone-shell.ratio-shell-16-9 .phone-speaker-notch,
.opus-phone-shell.ratio-shell-16-9 .phone-home-indicator {
  display: none !important;
}
.opus-phone-shell.ratio-shell-16-9 .phone-top-bar {
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
}
.opus-phone-shell.ratio-shell-9-16 {
  width: 300px !important;
  max-width: 100% !important;
  aspect-ratio: 9 / 18.5 !important;
  border-radius: 38px !important;
}
.opus-phone-shell.ratio-shell-9-16 .phone-speaker-notch {
  display: block !important;
}
.opus-phone-shell.ratio-shell-9-16 .phone-home-indicator {
  display: block !important;
}
.opus-phone-shell.ratio-shell-9-16 .phone-top-bar {
  top: 30px !important;
}

.phone-hover-play {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 4;
}
.phone-screen-wrap:hover .phone-hover-play {
  opacity: 1;
}
.play-circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #03140a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.5);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}
.phone-screen-wrap:hover .play-circle-btn {
  transform: scale(1.05);
}

.phone-card-footer {
  padding: 10px 4px 4px;
}
.phone-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}
.phone-card-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* Opus 9:16 Smartphone Modal Player */
.opus-modal-container {
  background: rgba(10, 10, 10, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  width: 95vw;
  max-width: 1040px;
  max-height: 92vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 50px rgba(88, 166, 255, 0.15);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.opus-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 50;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s ease;
}
.opus-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.opus-modal-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  padding: 32px;
  overflow-y: auto;
  max-height: calc(92vh - 20px);
}

/* Authentic Phone Shell */
.opus-phone-shell {
  width: 300px;
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  background: #030407;
  border: 4px solid #262c3d;
  border-radius: 38px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone-speaker-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 14px;
  background: #000;
  border-radius: 20px;
  z-index: 20;
}

.phone-screen {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-top-bar {
  position: absolute;
  top: 30px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 15;
}

.phone-tag-badge {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.6);
  color: #34d399;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.phone-time-tag {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
}

.phone-play-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.2s ease;
}
.phone-play-overlay.playing {
  opacity: 0;
  pointer-events: none;
}
.phone-play-overlay .overlay-icon {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  border-radius: 50%;
  color: #03140a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5);
}

.phone-progress-bar {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  z-index: 15;
}
.phone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #58a6ff, #22c55e);
  width: 0%;
  border-radius: 2px;
}

.phone-home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  z-index: 20;
}

/* Opus Insights Panel in Modal */
.opus-insights-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.score-circle-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}

.score-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(#10b981 0% 88%, rgba(255, 255, 255, 0.1) 88% 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}
.score-circle::before {
  content: "";
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0f1422;
}
.score-circle .score-number {
  position: relative;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.score-circle .score-denom {
  position: relative;
  font-size: 9px;
  color: var(--text-dim);
}

.tier-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.opus-card-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}
.opus-card-section h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.opus-hook-explanation {
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
}

.opus-styled-quote {
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
  border-left: 2px solid var(--primary);
  padding-left: 10px;
  margin: 0;
}

.suggested-titles-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.suggested-title-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.suggested-title-pill:hover {
  background: rgba(88, 166, 255, 0.12);
  border-color: rgba(88, 166, 255, 0.4);
  color: #fff;
}

.suggested-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.suggested-tag-pill {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: #38bdf8;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.suggested-tag-pill:hover {
  background: rgba(6, 182, 212, 0.2);
}

/* Caption Presets Grid */
.caption-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.caption-preset-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.caption-preset-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.caption-preset-card.active {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.2);
}

.preset-preview {
  height: 44px;
  background: #000;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.active-word-yellow {
  color: #fde047;
  background: rgba(250, 204, 21, 0.25);
  padding: 2px 5px;
  border-radius: 3px;
}
.active-word-cyan {
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.25);
  padding: 2px 5px;
  border-radius: 3px;
}
.active-word-white {
  color: #fff;
  border-bottom: 2px solid #fff;
}
.active-word-red {
  color: #f87171;
  background: rgba(239, 68, 68, 0.25);
  padding: 2px 5px;
  border-radius: 3px;
}

/* Highlights Toolbar (Filters & Sort) */
.highlights-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}
.toolbar-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 2px;
}
.highlight-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.filter-pill.active {
  background: rgba(88, 166, 255, 0.15);
  border-color: #58a6ff;
  color: #58a6ff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.2);
}
.highlight-sort-group .btn {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Highlights List — Pure Detailed Layout */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.opus-card-expandable {
  margin-top: 12px;
  display: block;
}

.opus-dur-pill {
  color: #94a3b8;
  font-size: 11px;
}

/* Mobile Navigation Components */
.mobile-top-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 20, 34, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  padding: 10px 16px;
  justify-content: space-between;
  align-items: center;
}
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.mobile-brand-icon {
  font-size: 18px;
}
.mobile-brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.mobile-brand-name b {
  color: #a855f7;
}
.mobile-badge {
  font-size: 9px;
  padding: 2px 6px;
}
.mobile-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.btn-device-toggle {
  font-size: 16px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 15, 28, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px)) 12px;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}
.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
  min-width: 56px;
}
.mobile-nav-btn:hover, .mobile-nav-btn.active {
  color: #a855f7;
}
.mobile-nav-btn.active .mobile-nav-icon {
  transform: scale(1.15);
}
.mobile-nav-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.15s ease;
}
.mobile-nav-action-btn {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #03140a !important;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  margin-top: -12px;
  border: 2px solid #000000;
}
.mobile-nav-action-btn .mobile-nav-icon {
  font-size: 22px;
  font-weight: 700;
}
.mobile-nav-action-btn .mobile-nav-label {
  display: none;
}

/* Responsive adjustments & Mobile Scroll Architecture */
@media (max-width: 1100px) {
  .quvirl-metric-boxes { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .opus-modal-layout { grid-template-columns: 1fr; }
  .workspace-body { grid-template-columns: 1fr; height: auto; }
  .video-container { aspect-ratio: 16 / 9; }
}

@media (max-width: 768px), (max-device-width: 768px) {
  /* Allow HTML and Body to scroll natively with touch momentum */
  html {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    position: relative !important;
  }

  /* Unconstrain App Layout so it expands naturally to full content height */
  .app-layout {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: visible !important;
    position: relative !important;
  }

  /* Activate Mobile Top Bar & Bottom Nav */
  .mobile-top-bar {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
  }
  
  /* Hide Desktop Sidebar */
  .sidebar { display: none !important; }

  /* Main Content scrolls fluidly with plenty of padding for bottom nav */
  .main-content {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    overflow-y: visible !important;
    padding: 12px 14px 110px 14px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Projects Dashboard on Mobile */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* View Header & Actions */
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  .view-header h1 {
    font-size: 20px;
  }
  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .header-actions .btn, .header-actions .upload-btn {
    flex: 1 1 auto;
    font-size: 12px;
    padding: 8px 12px;
    justify-content: center;
  }

  /* Drop Zone */
  .drop-zone {
    padding: 24px 14px;
  }
  .drop-zone h3 {
    font-size: 16px;
  }

  /* Workspace Layout on Mobile — Fluid Vertical Flow */
  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .workspace-title-box h2 {
    font-size: 17px;
  }
  .workspace-actions {
    width: 100%;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .workspace-actions .btn {
    font-size: 11px;
    padding: 6px 10px;
    white-space: nowrap;
  }

  /* Quvirl Header & Highlight Metric Boxes on Mobile */
  .header-metric-box {
    padding: 5px 9px !important;
    gap: 8px !important;
    border-radius: 8px !important;
  }
  .header-metric-box .quvirl-icon-youtube {
    width: 28px !important;
    height: 19px !important;
  }
  .header-metric-box .quvirl-icon-clock {
    width: 24px !important;
    height: 24px !important;
  }
  .header-metric-box .quvirl-icon-clock svg {
    width: 22px !important;
    height: 22px !important;
  }
  .header-metric-box .quvirl-val-num {
    font-size: 14px !important;
  }
  .highlight-virality-box {
    padding: 6px 10px !important;
    gap: 10px !important;
    border-radius: 10px !important;
  }
  .highlight-virality-box .quvirl-icon-flame {
    width: 28px !important;
    height: 28px !important;
  }
  .highlight-virality-box .quvirl-icon-flame svg {
    width: 24px !important;
    height: 24px !important;
  }
  .highlight-virality-box .quvirl-val-num {
    font-size: 17px !important;
  }

  /* Dual Pane Becomes Single Column — Fully Scrollable */
  .workspace-body {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    gap: 16px !important;
  }

  /* Constrain Video Player on Mobile */
  .video-container {
    max-height: 220px !important;
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
  }

  /* Studio Column & Tab Content — Zero Nested Scroll Traps */
  .studio-column {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    border-radius: var(--radius-md) !important;
  }

  .studio-tab-bar {
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding: 4px 6px;
  }
  .studio-tab-bar::-webkit-scrollbar {
    display: none;
  }
  .studio-tab {
    padding: 9px 13px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .studio-tab-content {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding: 14px 10px !important;
  }

  /* Tab Header on Mobile */
  .tab-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .highlights-header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .highlights-header-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px;
    text-align: center;
    justify-content: center;
  }

  /* Highlights Toolbar on Mobile */
  .highlights-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
  }
  .highlight-filters {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  /* Highlight Card Layout on Mobile: Score Badge leading, Title beside, full details */
  .opus-highlight-card {
    padding: 16px 14px !important;
  }
  .opus-card-top {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    flex-wrap: wrap !important;
  }
  .highlight-virality-box,
  .opus-virality-gauge {
    flex-shrink: 0 !important;
  }
  .opus-card-headline-group {
    flex: 1 1 200px !important;
    min-width: 0 !important;
  }
  .opus-card-headline-group h3 {
    font-size: 14.5px !important;
  }

  /* Touch Card Actions */
  .opus-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .opus-card-actions .btn {
    flex: 1 1 auto;
    font-size: 11px;
    padding: 8px 10px;
    min-height: 38px;
    justify-content: center;
  }

  /* Sub-scrollable internal tab items (e.g. transcript list) */
  .transcript-list {
    max-height: 380px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Opus Modal on Mobile */
  .opus-modal-layout {
    grid-template-columns: 1fr !important;
    gap: 14px;
    padding: 12px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .opus-modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 10px auto;
  }
}

/* Also support .device-mobile class if user explicitly toggles it on PC */
body.device-mobile {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}
body.device-mobile .app-layout {
  display: block !important;
  height: auto !important;
  min-height: 100vh !important;
  width: 100% !important;
  overflow: visible !important;
  position: relative !important;
}
body.device-mobile .mobile-top-bar { display: flex !important; }
body.device-mobile .mobile-bottom-nav {
  display: flex !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
}
body.device-mobile .sidebar { display: none !important; }
body.device-mobile .main-content {
  display: block !important;
  max-width: 480px !important;
  margin: 0 auto !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  overflow-y: visible !important;
  padding: 12px 14px 110px 14px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
  box-sizing: border-box !important;
}
body.device-mobile .projects-grid {
  grid-template-columns: 1fr !important;
}
body.device-mobile .workspace-body {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  gap: 16px !important;
}
body.device-mobile .studio-column {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}
body.device-mobile .studio-tab-content {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  padding: 14px 10px !important;
}
body.device-mobile .video-container {
  max-height: 220px;
}
body.device-mobile .header-metric-box {
  padding: 5px 9px !important;
  gap: 8px !important;
}
body.device-mobile .opus-card-top {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
  flex-wrap: wrap !important;
}
body.device-mobile .highlight-virality-box,
body.device-mobile .opus-virality-gauge {
  flex-shrink: 0 !important;
}
body.device-mobile .opus-card-headline-group {
  flex: 1 1 200px !important;
  min-width: 0 !important;
}

