/* ===============================================================
   NOCTURNE HORROR STUDIO - DARK OBSIDIAN & BLOOD CRIMSON STUDIO
   Automated Musical Horror & Dark Ballad Video Pipeline
   =============================================================== */

/* Horror & Gothic Studio Web Fonts */
@font-face {
  font-family: 'Creepster';
  src: url('/assets/fonts/Creepster.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Nosifer';
  src: url('/assets/fonts/Nosifer.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Eater';
  src: url('/assets/fonts/Eater.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Butcherman';
  src: url('/assets/fonts/Butcherman.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'PirataOne';
  src: url('/assets/fonts/PirataOne.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Lacquer';
  src: url('/assets/fonts/Lacquer.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'NewRocker';
  src: url('/assets/fonts/NewRocker.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'GothicSerif';
  src: url('/assets/fonts/GothicSerif.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'CinematicSerif';
  src: url('/assets/fonts/CinematicSerif.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/assets/fonts/PixelifySans.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Silkscreen';
  src: url('/assets/fonts/Silkscreen.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Press Start 2P';
  src: url('/assets/fonts/PressStart2P.ttf') format('truetype');
  font-display: swap;
}

:root {
  /* Backgrounds: Dark Obsidian Slate */
  --bg-base: #06090e;
  --bg-surface: #0c121d;
  --bg-surface-elevated: #131c2e;
  --bg-surface-hover: #1c273e;
  --bg-surface-active: #24324f;
  --bg-input: #04070b;
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(230, 57, 70, 0.25);
  --border-strong: rgba(230, 57, 70, 0.45);
  --border-focus: #E63946;
  
  /* Typography */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --font-serif-gothic: "Cinzel", "Georgia", "Times New Roman", serif;
  
  /* Dark Gothic & Horror Accent Palette */
  --accent-primary: #E63946;             /* Blood Crimson */
  --accent-primary-hover: #FF4D5E;
  --accent-secondary: #7F1D1D;           /* Deep Maroon */
  --accent-secondary-hover: #991B1B;
  --accent-cyan: #06B6D4;                /* Ghostly Cyan */
  --accent-cyan-hover: #22D3EE;
  --accent-emerald: #10B981;             /* Toxic Crypt Green */
  --accent-emerald-hover: #34D399;
  --accent-amber: #F59E0B;               /* Occult Lantern Amber */
  --accent-amber-hover: #FBBF24;
  --accent-rose: #E63946;
  --accent-rose-hover: #FF4D5E;
  --accent-purple: #9333EA;              /* Necromancy Violet */
  --accent-purple-hover: #A855F7;

  /* Modern Geometric Radiuses */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Ambient Shadows & Glows */
  --shadow-card: 0 10px 32px -4px rgba(0, 0, 0, 0.75);
  --shadow-glow-amber: 0 0 24px rgba(230, 57, 70, 0.35);
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.25);
  --shadow-glow-purple: 0 0 20px rgba(147, 51, 234, 0.25);
  
  /* Backwards compatibility aliases */
  --card-bg: var(--bg-surface);
  --panel-left: var(--bg-surface);
  --bg-window: var(--bg-base);
  --border-color: var(--border-subtle);
  --text-main: var(--text-primary);
  --pop-yellow: var(--accent-amber);
  --pop-green: var(--accent-emerald);
  --pop-cyan: var(--accent-cyan);
  --pop-pink: var(--accent-rose);
  --pop-purple: var(--accent-purple);
  --pop-red: var(--accent-rose);
  --neo-radius: 16px;
  --neo-shadow: var(--shadow-card);
  --neo-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --neo-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

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

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars (Universal Sleek Studio Style) */
html,
body,
:root,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

::-webkit-scrollbar-thumb:active {
  background: var(--accent-primary);
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---------------------------------------------------------------
   LAYOUT CONTAINER & MASTER ARCHITECTURE
   --------------------------------------------------------------- */
.app-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 18% 12%, rgba(99, 102, 241, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(255, 107, 0, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
}

/* TOP COMMAND BAR (GLOBAL HEADER) */
.top-header {
  height: 58px;
  min-height: 58px;
  background-color: rgba(12, 16, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  gap: 16px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-brand-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
  flex-shrink: 0;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #E63946 0%, #991B1B 50%, #450A0A 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(230, 57, 70, 0.45);
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-family: var(--font-serif-gothic);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  text-shadow: 0 0 12px rgba(230, 57, 70, 0.5);
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(230, 57, 70, 0.15);
  color: #FF6B7A;
  border: 1px solid rgba(230, 57, 70, 0.35);
  padding: 2px 8px;
  border-radius: 9999px;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 640px;
  justify-content: center;
  min-width: 0;
}

.project-selector-widget,
.header-project-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 32, 53, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 3px 12px;
  height: 38px;
  flex: 1;
  min-width: 250px;
  max-width: 440px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.project-selector-widget:hover,
.project-selector-widget:focus-within,
.header-project-selector:focus-within {
  border-color: rgba(255, 107, 0, 0.5);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 14px rgba(255, 107, 0, 0.15);
}

.project-selector-widget select,
.header-project-selector select {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 2px 4px;
  flex: 1;
  min-width: 0;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-selector-widget select option,
.header-project-selector select option {
  background-color: #121826;
  color: var(--text-primary);
}

.project-selector-widget select optgroup,
.header-project-selector select optgroup {
  background-color: #0A0E18;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 6px 4px;
}

.header-style-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  max-width: none;
  white-space: nowrap;
  background: rgba(6, 182, 212, 0.12);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.3);
  flex-shrink: 0;
  cursor: default;
  user-select: none;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.1);
  transition: all 0.15s ease;
}

.header-style-chip svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
  color: #22D3EE;
  flex-shrink: 0;
}

.header-style-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.header-action-group .btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.header-action-group .btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.project-status-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  user-select: none;
  flex-shrink: 0;
}

.project-status-toggle-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.project-status-toggle-btn svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.badge-status-progress {
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.badge-status-finish {
  background: rgba(168, 85, 247, 0.18);
  color: #C084FC;
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.header-pipeline-hud,
.header-status-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 23, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 3px 8px;
  height: 38px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.status-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  display: inline-block;
  flex-shrink: 0;
}

/* STUDIO WORKSPACE: ACTIVITY RAIL + INSPECTOR + CANVAS */
.studio-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  height: calc(100vh - 58px);
}

/* 1. LEFT ACTIVITY RAIL (SLIM STEAM DOCK) */
.activity-rail {
  width: 66px;
  min-width: 66px;
  background-color: #0C101B;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 10px;
  z-index: 40;
}

.rail-item {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8E9BAE;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.rail-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #F8FAFC;
  transform: translateX(2px);
}

.rail-item.active {
  background: rgba(255, 107, 0, 0.14);
  border-color: rgba(255, 107, 0, 0.35);
  color: #FF8533;
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.25);
}

.rail-item.active::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 11px;
  bottom: 11px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: #FF6B00;
  box-shadow: 0 0 12px #FF6B00;
}

.rail-divider {
  width: 28px;
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

/* Quick Action: Sync / Copy to Phone Rail Button */
.rail-item-phone {
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(56, 189, 248, 0.05);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.rail-item-phone:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
  transform: translateX(2px) scale(1.05);
}

.rail-item-phone:active {
  transform: scale(0.95);
}

.rail-item-phone.is-syncing {
  pointer-events: none;
  opacity: 0.8;
  animation: phone-pulse 1.2s infinite ease-in-out;
}

@keyframes phone-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5);
    border-color: rgba(56, 189, 248, 0.8);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 18px 4px rgba(56, 189, 248, 0.4);
    border-color: #38bdf8;
    transform: scale(1.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5);
    border-color: rgba(56, 189, 248, 0.8);
    transform: scale(1);
  }
}

/* 2. PROJECT INSPECTOR (SIDEBAR) - Hidden in modern wide studio layout */
.sidebar,
.project-inspector {
  display: none !important;
}

/* PIPELINE STATUS PILLS (TOP HEADER HUD) */
.pipeline-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.pipeline-stage-pill:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.pipeline-stage-pill .chk-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.pipeline-stage-pill:hover .chk-icon {
  color: var(--accent-primary);
}

.pipeline-stage-pill .chk-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.pipeline-stage-pill .chk-val {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Slide-out Project Switcher Drawer (Starts at left: 0 with visibility: hidden to prevent leaks) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.project-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 440px;
  max-width: calc(100vw - 32px);
  background-color: rgba(13, 18, 30, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.85);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 14px;
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s ease;
}

.project-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.project-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #FFFFFF;
}

.project-drawer-title .icon {
  color: #FF6B00;
}

.drawer-count-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22D3EE;
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
}

.drawer-close-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

/* 3. CENTER MAIN WORKSPACE CANVAS */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-base);
}

.tab-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.tab-panel.active {
  display: flex;
}

/* ---------------------------------------------------------------
   STUDIO CARDS & PANELS
   --------------------------------------------------------------- */
.neo-card,
.studio-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.neo-card:hover,
.studio-card:hover {
  border-color: var(--border-medium);
}

.card-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

/* ---------------------------------------------------------------
   BUTTON SYSTEM (WITH ICON-ONLY & TOOLTIP SUPPORT)
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  transition: all 0.18s ease;
  user-select: none;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.82rem;
  border-radius: 7px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 1.02rem;
  border-radius: 12px;
  font-weight: 800;
}

.btn-full {
  width: 100%;
}

.btn-pill {
  border-radius: 9999px !important;
}

/* Icon-only Button */
.btn-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

/* Button Color Variants */
.btn-primary,
.btn-purple {
  background: linear-gradient(135deg, #FF6B00 0%, #E05300 100%);
  border-color: #FF6B00;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}
.btn-primary:hover,
.btn-purple:hover {
  background: linear-gradient(135deg, #FF8533 0%, #FF6B00 100%);
  border-color: #FF8533;
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.45);
  color: #FFFFFF;
}

.btn-cyan {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
  color: #38BDF8;
}
.btn-cyan:hover {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.btn-green {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34D399;
}
.btn-green:hover {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #FFFFFF;
}

.btn-yellow,
.btn-orange {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #FBBF24;
}
.btn-yellow:hover,
.btn-orange:hover {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #000000;
}

.btn-red,
.btn-pink {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.35);
  color: #FB7185;
}
.btn-red:hover,
.btn-pink:hover {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

/* ---------------------------------------------------------------
   TOOLTIPS (HIGH-PERFORMANCE PURE CSS TOOLTIPS)
   --------------------------------------------------------------- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #020617;
  color: #F8FAFC;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 99999;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Explicit bottom placement */
[data-tooltip-pos="bottom"]::after {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}
[data-tooltip-pos="bottom"]:hover::after {
  transform: translateX(-50%) translateY(0);
}

/* Top Header tooltips ALWAYS pop downward so they are never clipped by the window top */
.top-header [data-tooltip]::after {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}
.top-header [data-tooltip]:hover::after {
  transform: translateX(-50%) translateY(0);
}

/* Header pills on the right align to the right to avoid overflowing the window edge */
.header-status-pills .pipeline-stage-pill:last-child::after,
.header-status-pills .pipeline-stage-pill:nth-last-child(2)::after,
.header-pipeline-hud .pipeline-stage-pill:last-child::after,
.header-pipeline-hud .pipeline-stage-pill:nth-last-child(2)::after {
  left: auto;
  right: 0;
  transform: translateY(-4px);
}
.header-status-pills .pipeline-stage-pill:last-child:hover::after,
.header-status-pills .pipeline-stage-pill:nth-last-child(2):hover::after,
.header-pipeline-hud .pipeline-stage-pill:last-child:hover::after,
.header-pipeline-hud .pipeline-stage-pill:nth-last-child(2):hover::after {
  transform: translateY(0);
}

[data-tooltip-pos="right"]::after {
  bottom: auto;
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%) translateX(-4px);
}
[data-tooltip-pos="right"]:hover::after {
  transform: translateY(-50%) translateX(0);
}

/* ---------------------------------------------------------------
   FORM INPUTS, SELECTS & CONTROLS
   --------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.92rem;
  padding: 8px 12px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.form-select {
  cursor: pointer;
}

.form-select optgroup {
  background-color: #0d1117;
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 6px 4px 4px 4px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.form-select option {
  background-color: #161b22;
  color: #e6edf3;
  font-weight: 500;
  font-size: 0.88rem;
  padding: 6px 12px;
}

.form-textarea {
  resize: vertical;
  line-height: 1.5;
}

/* ---------------------------------------------------------------
   STATUS BADGES & PILLS
   --------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-info {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-success,
.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning,
.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger,
.badge-red {
  background: rgba(244, 63, 94, 0.15);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* ---------------------------------------------------------------
   CHECKLIST & QUICK SWITCHER (INSPECTOR)
   --------------------------------------------------------------- */
.asset-checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.asset-checklist-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.asset-checklist-item .chk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  color: var(--text-secondary);
}

.asset-checklist-item .chk-label {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.85rem;
  flex: 1;
}

.asset-checklist-item .chk-val {
  font-size: 0.78rem;
  padding: 2px 7px;
}

/* ---------------------------------------------------------------
   PROJECT MANAGER DRAWER (STEAM & GAME STUDIO WORKSPACE)
   --------------------------------------------------------------- */
/* Active Project Spotlight in Drawer */
.drawer-hero-card {
  background: linear-gradient(135deg, rgba(22, 32, 53, 0.9) 0%, rgba(14, 20, 34, 0.98) 100%);
  border: 1px solid rgba(255, 107, 0, 0.28);
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.drawer-hero-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.drawer-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drawer-hero-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-hero-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF6B00;
  box-shadow: 0 0 8px #FF6B00;
  animation: pulseGlow 2s infinite ease-in-out;
}

.drawer-hero-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.drawer-hero-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.drawer-meta-chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #22D3EE;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.drawer-char-chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #A5B4FC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.drawer-toggle-status-btn {
  width: 100%;
  height: 29px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 2px;
}

/* Project Filter Category Dock */
.project-filter-dock,
.project-filter-tabs {
  display: flex;
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.project-filter-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.project-filter-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.project-filter-btn.active {
  background: linear-gradient(135deg, #FF8533 0%, #FF6B00 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(255, 107, 0, 0.4);
}

.project-filter-btn svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.project-filter-btn .filter-count {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

/* Search Bar in Drawer */
.drawer-search-wrap {
  position: relative;
  width: 100%;
}

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

.drawer-search-input {
  width: 100%;
  height: 38px;
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0 12px 0 34px;
  font-size: 0.86rem;
  color: #FFFFFF;
  outline: none;
  transition: all 0.2s ease;
}

.drawer-search-input:focus {
  border-color: rgba(255, 107, 0, 0.55);
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.25);
  background: #0B101D;
}

/* Quick Project List */
#quickProjectList {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}


.quick-project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: rgba(16, 22, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
}

.quick-project-item:hover {
  background: rgba(22, 32, 53, 0.9);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.quick-project-item.active {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.14) 0%, rgba(16, 22, 38, 0.95) 100%);
  border-color: #FF6B00;
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.22);
}

.quick-project-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: #FF6B00;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px #FF6B00;
}

.q-item-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.quick-project-item:hover .q-item-icon-box {
  color: #FF8533;
  border-color: rgba(255, 107, 0, 0.3);
  background: rgba(255, 107, 0, 0.08);
}

.quick-project-item.active .q-item-icon-box {
  color: #FF6B00;
  border-color: rgba(255, 107, 0, 0.4);
  background: rgba(255, 107, 0, 0.15);
}

.q-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.q-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.q-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-item-scene-pill {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 1px 7px;
  flex-shrink: 0;
}

.q-item-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.q-status-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.q-status-badge svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.q-status-badge.badge-progress {
  background: rgba(255, 107, 0, 0.12);
  color: #FF8533;
  border: 1px solid rgba(255, 107, 0, 0.35);
}

.q-status-badge.badge-finish {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.q-status-badge:hover {
  transform: scale(1.06);
  filter: brightness(1.2);
}

.q-meta-dot {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.7rem;
}

.q-item-style-chip {
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.q-format-badges {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.q-format-badge {
  font-size: 0.67rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  line-height: 1.35;
  white-space: nowrap;
  letter-spacing: 0.02em;
  user-select: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.q-format-badge.badge-fmt-16x9 {
  background: rgba(6, 182, 212, 0.14);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.38);
}

.q-format-badge.badge-fmt-16x9:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #22D3EE;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
}

.q-format-badge.badge-fmt-9x16 {
  background: rgba(217, 70, 239, 0.14);
  color: #F0ABFC;
  border: 1px solid rgba(217, 70, 239, 0.38);
}

.q-format-badge.badge-fmt-9x16:hover {
  background: rgba(217, 70, 239, 0.25);
  border-color: #F0ABFC;
  box-shadow: 0 0 8px rgba(217, 70, 239, 0.35);
}

.drawer-hero-formats {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.drawer-footer {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

/* ---------------------------------------------------------------
   SCENE CARDS (TAB 2 PROMPTS & VISUALS)
   --------------------------------------------------------------- */
.scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.scene-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scene-card:hover {
  border-color: var(--border-medium);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.scene-header {
  padding: 8px 12px;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scene-number {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
}

.scene-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scene-media-preview {
  width: 100%;
  height: 160px;
  background-color: var(--bg-input);
  border: 1px dashed var(--border-medium);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.scene-media-preview:hover {
  border-color: var(--accent-primary);
  background-color: rgba(99, 102, 241, 0.05);
}

.scene-media-preview img,
.scene-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prompt-box,
.scene-prompt-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: #CBD5E1;
  font-family: "Consolas", monospace;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.55;
}

/* ---------------------------------------------------------------
   RENDER STUDIO (TAB 3)
   --------------------------------------------------------------- */
.render-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.progress-bar-container {
  height: 8px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.terminal-box {
  background-color: #05080E;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 12px;
  color: #10B981;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.video-player-wrapper {
  background-color: #05080E;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.video-player-wrapper video {
  width: 100%;
  max-height: 380px;
  display: block;
}

/* ---------------------------------------------------------------
   THUMBNAIL STUDIO (TAB 4)
   --------------------------------------------------------------- */
.thumb-preview-box {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background-color: #05080E;
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.thumb-preview-box img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------------------------------------------------------------
   MODALS (DARK STUDIO OVERLAY)
   --------------------------------------------------------------- */
.neo-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.neo-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.neo-modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.neo-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------------------------------------------------------------
   TOAST NOTIFICATION (PRO GLASS HUD)
   --------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid var(--border-medium);
  border-left: 3px solid var(--accent-emerald);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(15px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-warning {
  border-left-color: var(--accent-amber);
}

.toast-error {
  border-left-color: var(--accent-rose);
}

.toast-info {
  border-left-color: var(--accent-cyan);
}

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

.toast.toast-success .toast-icon {
  color: #34d399;
}

.toast.toast-error .toast-icon {
  color: #fb7185;
}

.toast.toast-warning .toast-icon {
  color: #fbbf24;
}

.toast.toast-info .toast-icon {
  color: #38bdf8;
}

.toast-text {
  flex: 1;
}

/* ---------------------------------------------------------------
   ICONS INLINE UTILITY
   --------------------------------------------------------------- */
.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-xs {
  width: 11px;
  height: 11px;
}

.icon-sm {
  width: 13px;
  height: 13px;
}

.icon-lg {
  width: 20px;
  height: 20px;
}

/* Audio Player Dark Restyle */
audio {
  filter: invert(0.9) hue-rotate(180deg);
  border-radius: 6px;
}

/* ---------------------------------------------------------------
   SUNO AUDIO ENGINE - WORKSTATION 2-COLUMN CONSOLE
   --------------------------------------------------------------- */
.studio-toolbar-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(17, 24, 39, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

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

.badge-accent {
  background: rgba(99, 102, 241, 0.16);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.suno-studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 16px;
  min-height: calc(100vh - 170px);
  align-items: stretch;
}

.suno-left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.suno-right-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.suno-style-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-cyan {
  color: var(--accent-cyan);
}

.icon-emerald {
  color: var(--accent-emerald);
}

.icon-rose {
  color: var(--accent-rose);
}

.suno-style-textarea {
  width: 100%;
  min-height: 95px;
  resize: vertical;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.suno-style-textarea:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.genre-preset-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.preset-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.genre-select {
  flex: 1;
  min-width: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.suno-deck-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.audio-player-unit {
  background: var(--bg-input);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-player-unit audio {
  width: 100%;
  height: 38px;
  outline: none;
}

.audio-upload-dropzone {
  background: var(--bg-surface-elevated);
  border: 2px dashed var(--border-medium);
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-upload-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
}

.audio-dropzone-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.audio-file-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.audio-browse-btn {
  flex-shrink: 0;
}

.audio-filename-badge {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.audio-filename-badge.has-file {
  color: var(--accent-emerald);
  font-weight: 700;
}

.audio-upload-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-upload-hint code {
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
}

.suno-lyrics-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lyrics-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lyrics-tags-hint {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: monospace;
}

.lyrics-editor-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  height: 100%;
  margin-top: 8px;
}

.suno-lyrics-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 420px;
  resize: none;
  background: #080D15;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #E2E8F0;
  tab-size: 4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.suno-lyrics-textarea:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

@media (max-width: 1100px) {
  .suno-studio-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    height: auto;
  }
  .suno-lyrics-textarea {
    min-height: 320px;
  }
}

/* ---------------------------------------------------------------
   TAB 2: PROMPTS & VISUALS - 3D CHARACTER SPOTLIGHT & SCENE CARDS
   --------------------------------------------------------------- */
/* Character Spotlight Card (Inspired by 3D Character Game Customizer) */
.character-spotlight-card {
  background: linear-gradient(135deg, rgba(22, 32, 53, 0.85) 0%, rgba(14, 20, 34, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.character-spotlight-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.char-spotlight-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.char-avatar-podium {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366F1 0%, #06B6D4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.char-avatar-podium .icon {
  width: 24px;
  height: 24px;
}

.char-info-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.char-name-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-desc-preview {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Floating Category Dock for Prompt Modes */
.prompt-mode-dock {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.btn-prompt-mode {
  border-radius: 9999px !important;
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
  transition: all 0.18s ease !important;
}

.btn-prompt-mode:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.btn-prompt-mode.active.btn-cyan {
  background: #06B6D4 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.45) !important;
}

.btn-prompt-mode.active.btn-red {
  background: #FF6B00 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(255, 107, 0, 0.45) !important;
}

.btn-prompt-mode.active.btn-green {
  background: #10B981 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45) !important;
}

.view-mode-dock {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.btn-view-mode {
  border-radius: 9999px !important;
  padding: 5px 12px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
}

.btn-view-mode.active,
.btn-view-mode.active.btn-yellow {
  background: linear-gradient(135deg, rgba(255, 133, 51, 0.25) 0%, rgba(255, 107, 0, 0.35) 100%) !important;
  border-color: rgba(255, 107, 0, 0.5) !important;
  color: #FF8533 !important;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.2) !important;
}

/* Scene Cards Grid (Steam Store Showcase Style) */
.scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.scene-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  position: relative;
}

.scene-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.65);
}

.scene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scene-number {
  font-size: 0.94rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Media Preview Stage in Scene Card */
.scene-media-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #080C14;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.scene-media-preview img,
.scene-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.scene-media-preview.dropzone {
  cursor: pointer;
  transition: all 0.2s ease;
}

.scene-media-preview.dropzone:hover {
  border-color: rgba(255, 107, 0, 0.45);
  background: #0D1322;
}

.media-empty-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  padding: 16px;
  text-align: center;
}

.media-empty-slot .icon {
  width: 30px;
  height: 30px;
  opacity: 0.65;
}

.media-empty-slot span {
  font-size: 0.82rem;
  font-weight: 600;
}

/* Narration / Sajak Box */
.scene-narration-box {
  background: rgba(10, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
}

.scene-narration-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scene-narration-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 3px;
  line-height: 1.4;
}

/* Prompt Box */
.prompt-box {
  background: #070B13;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #CBD5E1;
  overflow-y: auto;
  height: 86px;
  max-height: 86px;
  white-space: pre-wrap;
}

.prompt-box:focus-within {
  border-color: var(--border-focus);
}

/* ---------------------------------------------------------------
   TAB 3: MASTER RENDER ENGINE WORKSTATION
   --------------------------------------------------------------- */
.render-container {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 16px;
  min-height: calc(100vh - 160px);
  align-items: stretch;
}

@media (max-width: 1100px) {
  .render-container {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------
   TAB 4: THUMBNAIL STUDIO & TAB 5: METADATA
   --------------------------------------------------------------- */
.thumbnail-container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  min-height: calc(100vh - 160px);
  align-items: stretch;
}

@media (max-width: 1100px) {
  .thumbnail-container {
    grid-template-columns: 1fr;
  }
}

/* ===============================================================
   YOUTUBE STUDIO AUTO UPLOADER MODAL (STEAM / DARK NLE WORKSTATION)
   =============================================================== */
.neo-modal.yt-modal {
  max-width: 980px;
  width: min(980px, 95vw);
  max-height: 92vh;
  background: linear-gradient(180deg, #101626 0%, #0B0F19 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 107, 0, 0.08);
}

.yt-workstation-grid {
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 860px) {
  .yt-workstation-grid {
    grid-template-columns: 1fr;
  }
}

.yt-grid-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.yt-modal-header {
  padding: 16px 20px;
  background: rgba(16, 22, 38, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yt-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-modal-logo-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 50%, #990000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.35);
  flex-shrink: 0;
}

.yt-modal-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yt-modal-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #FFFFFF;
}

.yt-modal-subtitle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yt-tag-automation {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #22D3EE;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 1px 7px;
  border-radius: 9999px;
}

.yt-tag-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Account & Engine Unified Card */
.yt-account-card {
  background: rgba(22, 32, 53, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.yt-account-card.is-connected {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 22, 38, 0.8) 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}

.yt-account-card.is-disconnected {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.07) 0%, rgba(16, 22, 38, 0.8) 100%);
}

.yt-account-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.yt-engine-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yt-engine-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.yt-engine-select {
  width: auto;
  min-width: 170px;
  height: 34px;
  background: #080C15;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0 10px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.yt-engine-select:focus {
  border-color: var(--accent-primary);
}

.yt-session-status-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.yt-session-status-badge.is-connected {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
}

.yt-session-status-badge.is-disconnected {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
}

.yt-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
  animation: pulseGlow 2s infinite ease-in-out;
}

.yt-dot-warning {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FBBF24;
}

.yt-account-bot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.yt-session-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yt-session-sub-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.yt-session-desc {
  font-size: 0.84rem;
  font-weight: 600;
  color: #FFFFFF;
}

.yt-session-desc b {
  color: #22D3EE;
}

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

/* Config & Media Box */
.yt-config-card {
  background: rgba(22, 32, 53, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yt-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.yt-input-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

/* Media Summary Card (Structured Inspector) */
.yt-media-summary-card {
  background: #080C14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yt-media-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  min-height: 28px;
}

.yt-media-row:not(:last-child) {
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.yt-media-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.yt-media-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.yt-media-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.yt-media-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.yt-media-name {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #F8FAFC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-media-name.is-missing {
  color: #FB7185;
  font-style: italic;
}

.yt-media-name.is-muted {
  color: var(--text-muted);
  font-style: italic;
}

.yt-media-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yt-media-badge svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.yt-media-badge.is-ready {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
}

.yt-media-badge.is-format {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22D3EE;
}

.yt-media-badge.is-missing {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #FB7185;
}

.yt-media-badge.is-default {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.yt-alert-missing {
  display: none;
  padding: 8px 12px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 8px;
  color: #FB7185;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Form Groups & Badges */
.yt-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.yt-char-counter {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.yt-field-input {
  width: 100%;
  background-color: #070B14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.88rem;
  color: #FFFFFF;
  outline: none;
  transition: all 0.18s ease;
}

.yt-field-input:focus {
  border-color: #FF6B00;
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.25);
  background-color: #0A101D;
}

.yt-field-textarea {
  width: 100%;
  background-color: #070B14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.84rem;
  color: #E2E8F0;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  min-height: 90px;
  transition: all 0.18s ease;
}

.yt-field-textarea:focus {
  border-color: #FF6B00;
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.25);
  background-color: #0A101D;
}

/* COPPA Toggle Card */
.yt-coppa-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(22, 32, 53, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.yt-coppa-card:hover {
  background: rgba(22, 32, 53, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.yt-coppa-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-coppa-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #FF6B00;
  cursor: pointer;
}

.yt-coppa-texts {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.yt-coppa-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #FFFFFF;
}

.yt-coppa-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.yt-coppa-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Upload Progress Area */
.yt-progress-area {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #080C14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
}

.yt-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 800;
}

.yt-progress-status {
  color: #22D3EE;
  display: flex;
  align-items: center;
  gap: 6px;
}

.yt-progress-pct {
  font-family: 'JetBrains Mono', Consolas, monospace;
  color: #FF8533;
}

.yt-progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.yt-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF6B00 0%, #06B6D4 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.yt-terminal-logs {
  background-color: #03060C;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  color: #34D399;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  max-height: 110px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Success Box */
.yt-success-card {
  display: none;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 22, 38, 0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.yt-success-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34D399;
  font-size: 0.92rem;
  font-weight: 800;
}

.yt-success-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
}

.yt-success-url {
  color: #6EE7B7;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', Consolas, monospace;
  text-decoration: underline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modal Footer */
.yt-modal-footer {
  padding: 14px 20px;
  background: rgba(16, 22, 38, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.yt-footer-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.yt-footer-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-yt-upload {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: 1px solid #34D399;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 9px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-yt-upload:hover:not(:disabled) {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.btn-yt-upload:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===============================================================
   LIVE SUBTITLE PREVIEW COMPONENT (TAB 3 RENDER)
   =============================================================== */
.sub-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.sub-chip-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
  user-select: none;
}

.sub-chip-btn:hover {
  background: var(--bg-surface-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.sub-chip-btn.active {
  background: rgba(230, 57, 70, 0.18);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.28);
}

.sub-chip-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.sub-preview-card {
  background: #070b12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

.sub-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sub-preview-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sub-preview-ratio-switch {
  display: inline-flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px;
}

.sub-aspect-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sub-aspect-btn.active {
  background: var(--accent-primary);
  color: #fff;
}

.sub-preview-monitor-outer {
  width: 100%;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
}

.sub-preview-screen {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #030508;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  transition: aspect-ratio 0.25s ease, height 0.25s ease;
}

.sub-preview-screen.ratio-16-9 {
  aspect-ratio: 16 / 9;
  max-height: 200px;
}

.sub-preview-screen.ratio-9-16 {
  aspect-ratio: 9 / 16;
  max-height: 240px;
}

.sub-preview-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65) contrast(1.15);
  transition: background-image 0.3s ease;
}

.sub-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.65) 75%, rgba(0,0,0,0.85) 100%),
              linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 40%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}

.sub-preview-aspect-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.62rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.sub-preview-captions {
  position: relative;
  z-index: 2;
  width: 90%;
  margin: 0 auto 14px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.sub-caption-line {
  line-height: 1.25;
  text-align: center;
  font-size: 1.12rem;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  word-break: break-word;
}

.sub-preview-screen.ratio-9-16 .sub-caption-line {
  font-size: 0.95rem;
}

.sub-caption-line.line-2 {
  opacity: 0.82;
  font-size: 0.95rem;
}

.sub-preview-screen.ratio-9-16 .sub-caption-line.line-2 {
  font-size: 0.82rem;
}

.karaoke-word {
  display: inline-block;
  margin: 0 3px;
  transition: color 0.22s ease, text-shadow 0.22s ease, transform 0.18s ease;
}

.karaoke-word.word-sung {
  font-weight: 900;
}

.karaoke-word.active-wipe {
  transform: scale(1.08);
}

.sub-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sub-font-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-swatches-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sub-swatch-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: help;
}

.sub-swatch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
}

.sub-swatch-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===============================================================
   IMAGE OPTIONS COLLAPSIBLE DRAWER (CLEAN UI & ACCORDION)
   =============================================================== */
.image-options-drawer {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.image-options-drawer:hover {
  border-color: rgba(16, 185, 129, 0.45);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.1);
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease;
}

.drawer-header:hover {
  background: rgba(16, 185, 129, 0.18);
}

.drawer-header:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: -2px;
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.drawer-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.drawer-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drawer-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-emerald);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.drawer-summary {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.drawer-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.drawer-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.drawer-chevron {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  color: var(--accent-emerald);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-options-drawer.is-collapsed .drawer-chevron {
  transform: rotate(-90deg);
}

.drawer-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(10, 15, 20, 0.45);
  border-top: 1px solid rgba(16, 185, 129, 0.18);
  transition: all 0.25s ease;
}

.image-options-drawer.is-collapsed .drawer-content {
  display: none;
}

/* ---------------------------------------------------------------
   MODAL & SUBTITLE TIMELINE / WAVEFORM EDITOR
   --------------------------------------------------------------- */
.studio-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.studio-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.sub-event-row {
  display: grid;
  grid-template-columns: 48px 100px 100px 70px 1fr 110px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  transition: background 0.15s ease;
}

.sub-event-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.sub-event-row.is-active {
  background: rgba(6, 182, 212, 0.12);
  border-left: 3px solid var(--accent-cyan);
}

.sub-time-input {
  background: #0d131f;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #38bdf8;
  font-family: 'Consolas', monospace;
  font-size: 0.82rem;
  padding: 4px 6px;
  width: 100%;
  text-align: center;
}

.sub-time-input:focus {
  border-color: var(--accent-cyan);
  outline: none;
  background: #111a2e;
}

.sub-text-input {
  background: #0d131f;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #f1f5f9;
  font-size: 0.84rem;
  padding: 5px 8px;
  width: 100%;
}

.sub-text-input:focus {
  border-color: var(--accent-emerald);
  outline: none;
  background: #111e28;
}

.sub-row-num {
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
}

.sub-row-dur {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: monospace;
  text-align: center;
}

.sub-btn-play-line {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.sub-btn-play-line:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34d399;
}

.btn-preview-scene {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-preview-scene:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* ---------------------------------------------------------------
   NLE SUBTITLE TIMELINE & LYRIC BLOCK BARS (PREMIERE / CAPCUT STYLE)
   --------------------------------------------------------------- */
.nle-lcd-timer {
  background: #040711;
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 4px 10px;
  border-radius: 5px;
  font-family: 'Consolas', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.nle-live-lyric-banner {
  flex: 1;
  max-width: 480px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nle-lyric-icon {
  color: var(--accent-emerald);
  font-size: 0.95rem;
  flex-shrink: 0;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.nle-lyric-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nle-snap-btn {
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: 5px;
  transition: all 0.15s ease;
}

.nle-snap-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

.nle-zoom-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.8);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nle-zoom-group input[type="range"] {
  width: 75px;
  cursor: pointer;
}

.nle-zoom-badge {
  font-size: 0.74rem;
  font-family: monospace;
  font-weight: 800;
  color: #38bdf8;
  min-width: 32px;
  text-align: center;
}

.nle-timeline-viewport {
  position: relative;
  background: #070b14;
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 182, 212, 0.5) rgba(15, 23, 42, 0.8);
}

.nle-timeline-viewport::-webkit-scrollbar {
  height: 8px;
}

.nle-timeline-viewport::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.8);
}

.nle-timeline-viewport::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.4);
  border-radius: 4px;
}

.nle-timeline-tracks-wrap {
  position: relative;
  min-width: 100%;
}

.nle-track-watermark {
  position: absolute;
  left: 8px;
  top: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: 5;
}

/* Ruler Track */
.nle-ruler-track {
  height: 22px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  font-size: 9px;
  font-family: monospace;
  color: #94a3b8;
  cursor: pointer;
}

.nle-ruler-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 3px;
  line-height: 22px;
  pointer-events: none;
}

.nle-ruler-tick.major {
  border-left: 1px solid rgba(6, 182, 212, 0.5);
  color: #38bdf8;
  font-weight: 700;
}

/* Subtitle Track Container */
.nle-subtitles-track {
  position: relative;
  height: 58px;
  background: rgba(10, 15, 26, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Subtitle Block Bar (Alternating Modern Palette) */
.nle-sub-block {
  position: absolute;
  top: 6px;
  height: 46px;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  overflow: visible;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  z-index: 10;
}

/* Warna Ganjil: Cyan - Indigo */
.nle-sub-block.tone-odd {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28) 0%, rgba(99, 102, 241, 0.28) 100%);
  border: 1px solid rgba(6, 182, 212, 0.65);
}

/* Warna Genap: Emerald - Teal */
.nle-sub-block.tone-even {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(13, 148, 136, 0.28) 100%);
  border: 1px solid rgba(16, 185, 129, 0.65);
}

.nle-sub-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.45);
  z-index: 15;
}

.nle-sub-block.tone-odd:hover {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.42) 0%, rgba(99, 102, 241, 0.42) 100%);
}

.nle-sub-block.tone-even:hover {
  border-color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.42) 0%, rgba(13, 148, 136, 0.42) 100%);
}

/* Highlight Aktif: Emas / Amber Berpendar */
.nle-sub-block.is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0.35) 100%) !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.6) !important;
  z-index: 20;
}

.nle-sub-block.is-dragging {
  cursor: grabbing !important;
  opacity: 0.95;
  transform: scale(1.02);
  z-index: 35;
}

/* Content inside the bar */
.nle-block-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.nle-block-idx {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

.nle-sub-block.is-active .nle-block-idx {
  background: #fbbf24;
  color: #000;
  border-color: #fbbf24;
}

.nle-block-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.nle-block-dur {
  font-size: 0.7rem;
  color: #cbd5e1;
  font-family: monospace;
  font-weight: 700;
  background: rgba(0,0,0,0.3);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Trim Resize Handles dengan visual grip yang jelas */
.nle-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.nle-handle::after {
  content: '';
  width: 3px;
  height: 18px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  transition: all 0.15s ease;
}

.nle-handle:hover::after {
  background: #fff;
  height: 26px;
  box-shadow: 0 0 6px #fff;
}

.nle-handle-left {
  left: 0;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.nle-handle-left:hover {
  background: rgba(6, 182, 212, 0.6);
}

.nle-handle-right {
  right: 0;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.nle-handle-right:hover {
  background: rgba(16, 185, 129, 0.6);
}

/* Playhead Line */
#waveformPlayhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #ef4444;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 0 10px #ef4444;
}

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

/* Modern Card Row di Bawah (User-Friendly Stepper Cards) */
.sub-event-row {
  display: grid;
  grid-template-columns: 80px 170px 170px 85px 1fr 140px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  transition: all 0.15s ease;
  background: var(--bg-surface);
}

.sub-event-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.sub-event-row.is-active {
  background: rgba(245, 158, 11, 0.08) !important;
  border-left: 4px solid #fbbf24;
}

/* Stepper Group for Time Input [-] [ 00:00.00 ] [+] */
.sub-stepper-wrap {
  display: flex;
  align-items: center;
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.sub-stepper-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-secondary);
  width: 26px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.85rem;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.sub-stepper-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  color: #38bdf8;
}

.sub-stepper-wrap input {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-family: 'Consolas', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  width: 100%;
  padding: 4px 2px;
  outline: none;
}

.sub-pill-dur {
  font-size: 0.76rem;
  font-family: monospace;
  font-weight: 800;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: 5px;
  text-align: center;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.sub-btn-playhead-sync {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.sub-btn-playhead-sync:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

/* ===============================================================
   ULTRA-WIDE NLE SUBTITLE & WAVEFORM STUDIO MODAL (PREMIERE / CAPCUT STYLE)
   =============================================================== */
.studio-modal-dialog.modal-nle-wide {
  width: 96vw;
  max-width: 1880px;
  height: 94vh;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.35);
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.2s ease;
}

.studio-modal-dialog.modal-nle-wide.is-fullscreen {
  width: 99.2vw !important;
  max-width: 99.5vw !important;
  height: 98.5vh !important;
  max-height: 99vh !important;
  border-radius: 6px;
  border-color: rgba(16, 185, 129, 0.5);
}

.modal-nle-wide .nle-timeline-viewport {
  border-radius: 8px;
  background: #05080f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
}

.modal-nle-wide .sub-event-row {
  grid-template-columns: 88px 175px 175px 85px 1fr 145px;
  gap: 12px;
}

.modal-nle-wide #subEditorEventsTable {
  flex: 1;
  min-height: 200px;
  max-height: calc(94vh - 350px);
  overflow-y: auto;
}

.studio-modal-dialog.modal-nle-wide.is-fullscreen #subEditorEventsTable {
  max-height: calc(98vh - 350px);
}






