/* --- 1. FONTS (EXACT SOURCE URL) --- */
        @font-face {
            font-family: 'arial_narrowregular';
            src: local('Arial Narrow'), local('Arial');
            font-weight: normal;
            font-style: normal;
        }

        :root {
            --lyric-font: 'arial_narrowregular', "Arial Narrow", sans-serif;

            /* UI Theme Variables - neutral dark frosted glass effect */
            --ui-bg-color: rgba(25, 25, 30, 0.88);
            --ui-text-color: #ffffff;
            --ui-accent-color: #ffffff;
            --ui-border-color: rgba(255, 255, 255, 0.15);
            --ui-input-bg: rgba(255, 255, 255, 0.08);
            --ui-input-border: rgba(255, 255, 255, 0.12);
        }

        /* --- 2. LAYOUT & RESET --- */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #222;
    font-family: 'Arial', sans-serif;
}
body.ui-hidden #sidebar { display: none; }
body.ui-hidden #sidebarToggle { display: none; }
body.ui-hidden #lyric-wrapper { height: 100vh; }

/* SIDEBAR */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--ui-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--ui-border-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 100;
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

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

/* Sidebar Header & Footer */
.sidebar-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
}

.sidebar-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--ui-border-color);
}

/* Tab Bar */
.sidebar-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 1px solid var(--ui-border-color);
    margin: 0 -15px;
    padding: 0 15px;
}

.sidebar-tab {
    flex: 1;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--ui-text-color);
    opacity: 0.5;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.sidebar-tab:hover {
    opacity: 0.8;
    background: transparent;
    color: var(--ui-text-color);
}

.sidebar-tab.active {
    opacity: 1;
    border-bottom-color: var(--ui-accent-color);
}

/* Tab Content */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

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

/* Sidebar Toggle Button */
#sidebarToggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 28px;
    height: 50px;
    background: var(--ui-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--ui-border-color);
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease, background 0.2s ease;
    padding: 0;
}

#sidebarToggle:hover {
    background: var(--ui-accent-color);
}

#sidebarToggle.shifted {
    left: 280px;
}

#sidebarToggle::after {
    content: '';
    border: solid var(--ui-text-color);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(-45deg);
    margin-left: -2px;
    transition: transform 0.3s ease;
}

#sidebarToggle.shifted::after {
    transform: rotate(135deg);
    margin-left: 2px;
}

#sidebarToggle:hover::after {
    border-color: #000;
}

/* Section Headers */
.section-header {
    color: var(--ui-text-color);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0 6px 0;
    border-bottom: 1px solid var(--ui-border-color);
    margin-top: 4px;
}

.section-header:first-child {
    margin-top: 0;
    padding-top: 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

label {
    color: var(--ui-text-color);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.8;
}

input, select {
    background: var(--ui-input-bg);
    color: var(--ui-text-color);
    border: 1px solid var(--ui-input-border);
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

button {
    background: transparent;
    color: var(--ui-text-color);
    border: 1px solid var(--ui-accent-color);
    padding: 8px 12px;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Arial', sans-serif;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

button:hover {
    background: var(--ui-accent-color);
    color: #000;
}

button.primary {
    background: var(--ui-accent-color);
    color: #000;
}

button.primary:hover {
    opacity: 0.85;
}

.hint-text {
    color: var(--ui-text-color);
    font-size: 10px;
    opacity: 0.7;
}
        
#spotifyStatus {
    color: var(--ui-text-color);
    font-size: 11px;
    font-family: monospace;
    background: var(--ui-input-bg);
    border: 1px solid var(--ui-input-border);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    opacity: 0.8;
}

#textOverlay { box-sizing: border-box; }

#fontSearch {
    background: var(--ui-input-bg);
    color: var(--ui-text-color);
    border: 1px solid var(--ui-input-border);
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

#fontSelector {
    background: var(--ui-input-bg);
    color: var(--ui-text-color);
    border: 1px solid var(--ui-input-border);
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    max-height: 160px;
    box-sizing: border-box;
}

.color-hex {
    background: var(--ui-input-bg);
    color: var(--ui-text-color);
    border: 1px solid var(--ui-input-border);
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

#freewriteInput {
    background: var(--ui-input-bg);
    color: var(--ui-text-color);
    border: 1px solid var(--ui-input-border);
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

/* Custom Range Slider Styling */
.range-input,
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--ui-input-bg);
    border: 1px solid var(--ui-input-border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    margin: 8px 0;
}

/* Slider thumb - WebKit (Chrome, Safari, Edge) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--ui-accent-color);
    border: 2px solid var(--ui-bg-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

/* Slider thumb - Firefox */
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--ui-accent-color);
    border: 2px solid var(--ui-bg-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Slider track - Firefox */
input[type="range"]::-moz-range-track {
    background: var(--ui-input-bg);
    border: 1px solid var(--ui-input-border);
    border-radius: 3px;
    height: 6px;
}

/* Slider value display wrapper */
.slider-with-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-value {
    min-width: 36px;
    text-align: right;
    font-size: 11px;
    color: var(--ui-text-color);
    opacity: 0.7;
    font-family: monospace;
}

/* Color picker styling */
input[type="color"] {
    width: 100%;
    height: 32px;
    padding: 2px;
    border-radius: 4px;
    cursor: pointer;
}
#textOverlay {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    transform: translateZ(0);
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    resize: none;
    overflow: visible;
}
#bgVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    display: none;
    z-index: 0;
    pointer-events: none;
}
.textFitted {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    transform: translateZ(0);
}
.inline-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Editable lyric box state */
#textOverlay.box-edit {
    border: 1px dashed var(--ui-accent-color);
    cursor: move;
    resize: both;
    overflow: auto;
}

        /* --- 3. THE LYRIC WRAPPER --- */
#lyric-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

        /* --- 4. THEME CSS (Exact Source Logic) --- */
        #lyric-wrapper.white { background-color: #FFFFFF; }
        #lyric-wrapper.white #textOverlay {
            color: black;
            font-family: var(--lyric-font);
            font-weight: 500;
            width: 500px;
            max-width: none;
            height: 500px;
            padding: 20px;
            text-align: justify; text-align-last: justify;
            line-height: normal;
            filter: blur(2px);
            display: block;
            margin: 0 auto;
        }

        #lyric-wrapper.green { background-color: #8ACE00; }
        #lyric-wrapper.green #textOverlay {
            color: black;
            font-family: var(--lyric-font);
            font-weight: 500;
            width: 500px;
            max-width: none;
            height: 500px;
            padding: 20px;
            text-align: justify; text-align-last: justify;
            line-height: normal;
            filter: blur(2px);
            display: block;
            margin: 0 auto;
        }

        #lyric-wrapper.black { background-color: #000000; }
        #lyric-wrapper.black #textOverlay {
            color: white;
            font-family: var(--lyric-font);
            font-weight: 500;
            width: 500px;
            max-width: none;
            height: 500px;
            padding: 20px;
            text-align: justify; text-align-last: justify;
            line-height: normal;
            filter: blur(2px);
            display: block;
            margin: 0 auto;
        }
        #lyric-wrapper.black .textFitted { text-align: left; }

        #lyric-wrapper.pink { background-color: #ff6eb4; }
        #lyric-wrapper.pink #textOverlay {
            color: white;
            font-family: var(--lyric-font);
            font-weight: 500;
            width: 500px;
            max-width: none;
            height: 500px;
            padding: 20px;
            text-align: justify; text-align-last: justify;
            line-height: normal;
            filter: blur(2px);
            display: block;
            margin: 0 auto;
        }
        .textFitted { display: block; width: 100%; }
        .diamond-row { font-family: var(--lyric-font); font-weight: 400; text-align: left; white-space: nowrap; }

        /* Pond canvas overlays the lyric area */
#pondCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 1;
}

/* ==========================================
   BACKGROUND EDIT OVERLAY
   Interactive drag/resize for background media
   ========================================== */

/* Edit overlay container */
.bg-edit-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: move;
    background: transparent;
}

/* When editing is active */
#lyric-wrapper.editing-bg {
    cursor: move;
}

#lyric-wrapper.editing-bg .bg-edit-overlay {
    display: block !important;
    background: rgba(0, 0, 0, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

/* Corner resize handles */
.bg-edit-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(59, 130, 246, 0.8);
    border-radius: 4px;
    z-index: 10;
    transition: transform 0.15s ease, background 0.15s ease;
}

.bg-edit-handle:hover {
    transform: scale(1.2);
    background: #fff;
    border-color: rgba(59, 130, 246, 1);
}

.bg-edit-handle-nw {
    top: 10px;
    left: 10px;
    cursor: nw-resize;
}

.bg-edit-handle-ne {
    top: 10px;
    right: 10px;
    cursor: ne-resize;
}

.bg-edit-handle-sw {
    bottom: 10px;
    left: 10px;
    cursor: sw-resize;
}

.bg-edit-handle-se {
    bottom: 10px;
    right: 10px;
    cursor: se-resize;
}

/* Info text at bottom */
.bg-edit-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

/* Hide text overlay during bg editing for better UX */
#lyric-wrapper.editing-bg #textOverlay {
    opacity: 0.3;
    pointer-events: none;
}

#uiRevealBtn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 300;
    display: none;
}

        #lyric-wrapper.mini {
            position: fixed;
            width: 300px;
            height: 300px;
            top: 20px;
            left: 20px;
            z-index: 200;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
            cursor: move;
        }
        #lyric-wrapper.mini #textOverlay {
            width: 100%;
            max-width: 100%;
            height: 100%;
            padding: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

/* --- 5. ENHANCED LRC WORD-LEVEL HIGHLIGHTING --- */

/* Default: word preview disabled (opacity 0 = hidden) */
#lyric-wrapper {
    --word-pending-opacity: 0;
}

/* Word that has been sung (past words) - inherits text color */
.word-sung {
    opacity: 1;
}

/* Currently active word - inherits text color */
.word-active {
    position: relative;
}

/* Pending words (not yet sung) - uses CSS variable for opacity */
.word-pending {
    opacity: var(--word-pending-opacity, 0);
}

/* Smooth transitions for word states */
.word-sung, .word-active, .word-pending {
    transition: opacity 0.15s ease-out;
}

/* --- 6. SPACEBAR FLICKER EFFECT --- */

/* Flicker effect - white overlay on top of background (preserves GIF animation) */
#lyric-wrapper.flicker-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FFFFFF;
    z-index: 1;
    pointer-events: none;
}

/* Ensure text overlay stays above the white flash */
#lyric-wrapper.flicker-white #textOverlay {
    z-index: 2;
}

/* Flicker effect - white text */
#textOverlay.flicker-text-white,
#textOverlay.flicker-text-white .textFitted,
#textOverlay.flicker-text-white .word-sung,
#textOverlay.flicker-text-white .word-active,
#textOverlay.flicker-text-white .word-pending {
    color: #FFFFFF !important;
    text-shadow: none !important;
}

/* Flicker effect - hide pond canvas during white flash */
#pondCanvas.flicker-canvas-white {
    opacity: 0;
}

/* --- 7. LOCAL AUDIO FLOATING PANEL --- */

/* Floating Panel */
.floating-panel {
  position: fixed;
  top: 100px;
  right: 40px;
  width: 400px;
  max-height: 600px;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Panel Header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: move;
  user-select: none;
}

.panel-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.panel-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 20px;
  transition: color 0.2s ease;
}

.panel-close:hover {
  color: rgba(255, 255, 255, 1);
}

/* Panel Content */
.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-section label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.panel-section input[type="file"] {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.panel-section input[type="text"],
.panel-section select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  font-size: 12px;
}

.panel-section input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Track List */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.track-item {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.track-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.track-item.active {
  border-color: rgba(76, 175, 80, 0.6);
  background: rgba(76, 175, 80, 0.1);
}

.track-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

.track-artist {
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

.track-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.track-remove:hover {
  color: #ff4444;
}

/* Panel Footer */
.panel-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
}

/* Now Playing */
.now-playing {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 32px;
}

.now-playing-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
}

.now-playing-artist {
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

/* Playback Controls */
.playback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.seek-bar {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.seek-bar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border: none;
}

.time-display {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

/* Volume Controls */
.volume-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-bar {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.volume-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.volume-bar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border: none;
}

/* Status Text */
.status-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  min-height: 14px;
}

/* Scrollbar Styling for Panel */
.panel-content::-webkit-scrollbar,
.track-list::-webkit-scrollbar {
  width: 6px;
}

.panel-content::-webkit-scrollbar-track,
.track-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.panel-content::-webkit-scrollbar-thumb,
.track-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.track-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* ==========================================
   LYRICS EDITOR STYLES
   ========================================== */

/* Editor Mode - Hide main UI */
body.editor-mode #lyric-wrapper {
  display: none;
}

body.editor-mode #sidebar {
  pointer-events: none;
  opacity: 0.3;
}

body.editor-mode #sidebarToggle {
  display: none;
}

body.editor-mode #localAudioPanel {
  display: none !important;
}

body.editor-mode #editorPanel {
  display: flex !important;
}

/* Preview Mode - Show lyric wrapper over editor */
#lyric-wrapper.preview-overlay {
  display: flex !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 400;
  cursor: pointer;
}

#editorPanel.preview-dimmed {
  opacity: 0.3;
  pointer-events: none;
}

.preview-exit-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 401;
  pointer-events: none;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Editor Panel - Fullscreen */
.editor-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ui-bg-color);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  z-index: 300;
  color: var(--ui-text-color);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Editor Header */
.editor-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ui-border-color);
  flex-shrink: 0;
}

.editor-back-btn {
  background: transparent;
  border: 1px solid var(--ui-border-color);
  color: var(--ui-text-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.editor-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.editor-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

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

/* Dropdown Menus */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(30, 30, 35, 0.98);
  border: 1px solid var(--ui-border-color);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 180px;
  z-index: 400;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--ui-text-color);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Editor Action Buttons */
.editor-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--ui-border-color);
  color: var(--ui-text-color);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.editor-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.editor-action-btn.primary {
  background: rgba(59, 130, 246, 0.8);
  border-color: rgba(59, 130, 246, 0.9);
}

.editor-action-btn.primary:hover {
  background: rgba(59, 130, 246, 0.95);
}

/* Waveform Section */
.editor-waveform-section {
  position: relative;
  height: 120px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--ui-border-color);
  flex-shrink: 0;
}

.waveform-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

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

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

.waveform-time-ruler {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.waveform-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

/* Editor Controls */
.editor-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--ui-border-color);
  flex-shrink: 0;
  flex-wrap: wrap;
}

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

.editor-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--ui-border-color);
  color: var(--ui-text-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.editor-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.editor-play-btn {
  width: 44px;
  height: 44px;
  font-size: 18px;
  background: rgba(34, 197, 94, 0.7);
  border-color: rgba(34, 197, 94, 0.8);
}

.editor-play-btn:hover {
  background: rgba(34, 197, 94, 0.9);
}

.editor-time-display {
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.8);
  min-width: 100px;
}

/* Speed Controls */
.editor-speed-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.control-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-right: 4px;
}

.speed-btn {
  background: transparent;
  border: 1px solid var(--ui-border-color);
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
}

.speed-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ui-text-color);
}

.speed-btn.active {
  background: rgba(59, 130, 246, 0.6);
  border-color: rgba(59, 130, 246, 0.8);
  color: var(--ui-text-color);
}

/* Zoom Controls */
.editor-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ui-text-color);
  cursor: pointer;
}

/* Follow Playhead */
.editor-follow-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.editor-follow-control input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

/* Mode Bar */
.editor-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  border-bottom: 1px solid var(--ui-border-color);
  flex-shrink: 0;
}

.editor-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-btn {
  background: transparent;
  border: 1px solid var(--ui-border-color);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mode-btn.active {
  background: rgba(59, 130, 246, 0.6);
  border-color: rgba(59, 130, 246, 0.8);
  color: var(--ui-text-color);
}

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

/* Line List Container */
.editor-line-list-container {
  flex: 1;
  overflow: hidden;
  padding: 0 20px;
}

.editor-line-list {
  height: 100%;
  overflow-y: auto;
  padding: 12px 0;
}

.editor-empty-state {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  padding: 60px 20px;
}

.editor-empty-state p {
  margin: 8px 0;
}

/* Editor Line Item */
.editor-line {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}

/* Line header row (status, timestamp, line number) */
.editor-line-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-line-number {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.editor-line:hover {
  background: rgba(255, 255, 255, 0.05);
}

.editor-line.selected {
  background: rgba(59, 130, 246, 0.2);
  outline: 1px solid rgba(59, 130, 246, 0.5);
}

.editor-line.playing {
  background: rgba(34, 197, 94, 0.15);
}

/* Synced line indicator */
.editor-line.synced .editor-line-status {
  color: #22c55e;
}

.editor-line.synced .editor-line-time {
  color: #22c55e;
}

.editor-line.unsynced .editor-line-status {
  color: rgba(255, 255, 255, 0.3);
}

.editor-line.unsynced .editor-line-time {
  color: rgba(255, 255, 255, 0.3);
}

/* Editor line elements */
.editor-line-status {
  flex-shrink: 0;
  font-size: 10px;
  margin-top: 4px;
}

.editor-line-time {
  flex-shrink: 0;
  width: 80px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-top: 3px;
}

.editor-line-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ui-text-color);
  word-break: break-word;
  outline: none;
  padding: 2px 4px;
  border-radius: 3px;
}

.editor-line-text:focus {
  background: rgba(255, 255, 255, 0.1);
}

.editor-line-expand {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.editor-line-expand:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* Word tokens container */
.editor-words-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-left: 90px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-words-stats {
  width: 100%;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.editor-word {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.editor-word:hover {
  background: rgba(255, 255, 255, 0.15);
}

.editor-word.selected {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.6);
}

.editor-word.timed {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.editor-word.untimed {
  color: rgba(255, 255, 255, 0.5);
}

/* Currently playing word highlight */
.editor-word.playing {
  background: rgba(239, 68, 68, 0.5) !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  transform: scale(1.05);
  transition: all 0.1s ease-out;
}

/* Inline words layout (new unified mode) */
.editor-words-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}

.editor-word-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.editor-word-wrapper .editor-word {
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 4px;
  min-width: 0;
}

.editor-word-timestamp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

.editor-word-timestamp.timed {
  color: rgba(34, 197, 94, 0.8);
}

/* Assign buttons styling */
.editor-assign-actions {
  display: flex;
  gap: 8px;
}

.assign-btn {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
}

.assign-btn:hover {
  background: rgba(34, 197, 94, 0.3) !important;
}

/* Empty state */
.editor-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  gap: 8px;
}

/* Line Sync Status */
.line-sync-status {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-top: 2px;
}

.line-sync-status.synced {
  background: rgba(34, 197, 94, 0.8);
  color: white;
}

.line-sync-status.unsynced {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
}

/* Line Timestamp */
.line-timestamp {
  flex-shrink: 0;
  width: 70px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.line-timestamp.has-time {
  color: rgba(34, 197, 94, 0.9);
}

/* Line Content */
.line-content {
  flex: 1;
  min-width: 0;
}

.line-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ui-text-color);
  word-break: break-word;
}

/* Word Tokens */
.line-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.word-token {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.word-token:hover {
  background: rgba(255, 255, 255, 0.15);
}

.word-token.selected {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.6);
}

.word-token.timed {
  background: rgba(34, 197, 94, 0.2);
}

.word-token-text {
  font-size: 13px;
  color: var(--ui-text-color);
}

.word-token-time {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.5);
}

.word-token.timed .word-token-time {
  color: rgba(34, 197, 94, 0.9);
}

/* Action Bar */
.editor-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--ui-border-color);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.editor-line-actions,
.editor-nudge-actions,
.editor-history-actions {
  display: flex;
  gap: 8px;
}

.editor-nudge-btn {
  background: transparent;
  border: 1px solid var(--ui-border-color);
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.15s;
}

.editor-nudge-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ui-text-color);
}

/* Keyboard Shortcuts Help */
.editor-shortcuts {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.shortcut-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* Editor Modal */
.editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.editor-modal-content {
  background: rgba(30, 30, 35, 0.98);
  border: 1px solid var(--ui-border-color);
  border-radius: 12px;
  padding: 24px;
  min-width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.editor-modal-content h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.editor-modal-content textarea {
  width: 100%;
  min-height: 200px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--ui-border-color);
  border-radius: 6px;
  padding: 12px;
  color: var(--ui-text-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  resize: vertical;
  box-sizing: border-box;
}

.editor-modal-content textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.6);
}

.editor-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* Scrollbar for editor */
.editor-line-list::-webkit-scrollbar {
  width: 8px;
}

.editor-line-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.editor-line-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.editor-line-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   VIDEO EXPORTER STYLES
   ========================================== */

/* Exporter Mode - Hide main UI */
body.exporter-mode #lyric-wrapper {
  display: none;
}

body.exporter-mode #sidebar {
  pointer-events: none;
  opacity: 0.3;
}

body.exporter-mode #sidebarToggle {
  display: none;
}

body.exporter-mode #localAudioPanel {
  display: none !important;
}

body.exporter-mode #editorPanel {
  display: none !important;
}

body.exporter-mode #exporterPanel {
  display: flex !important;
}

/* Exporter Panel */
.exporter-panel {
  position: fixed;
  inset: 0;
  background: var(--ui-bg-color);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  z-index: 300;
  color: var(--ui-text-color);
}

/* Exporter Header */
.exporter-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ui-border-color);
  flex-shrink: 0;
}

.exporter-back-btn {
  background: transparent;
  border: 1px solid var(--ui-border-color);
  color: var(--ui-text-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.exporter-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.exporter-title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

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

.exporter-action-btn {
  background: transparent;
  border: 1px solid var(--ui-border-color);
  color: var(--ui-text-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.exporter-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.exporter-action-btn.primary {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.6);
  color: #93c5fd;
}

.exporter-action-btn.primary:hover {
  background: rgba(59, 130, 246, 0.5);
}

.exporter-action-btn.primary.large {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
}

.exporter-action-btn.danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.exporter-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Exporter Content */
.exporter-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Preview Section */
.exporter-preview-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  min-width: 0;
}

.exporter-canvas-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

#exporterPreviewCanvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #111;
}

/* Safe Area Guides */
.safe-area-guides {
  position: absolute;
  inset: 5%;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  pointer-events: none;
  border-radius: 4px;
}

.safe-area-guides::before {
  content: 'Safe Area';
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

/* Box Overlay (draggable) */
.exporter-box-overlay {
  position: absolute;
  border: 2px solid rgba(59, 130, 246, 0.8);
  background: rgba(59, 130, 246, 0.1);
  cursor: move;
  border-radius: 4px;
  min-width: 50px;
  min-height: 50px;
}

.exporter-box-overlay:hover {
  border-color: rgba(59, 130, 246, 1);
  background: rgba(59, 130, 246, 0.2);
}

/* Preview Controls */
.exporter-preview-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0 0 8px 8px;
  margin-top: -8px;
}

.exporter-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--ui-border-color);
  color: var(--ui-text-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.exporter-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.exporter-seek-bar {
  flex: 1;
  height: 6px;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
}

.exporter-seek-bar::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.exporter-time-display {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'JetBrains Mono', monospace;
  min-width: 100px;
  text-align: right;
}

/* Settings Section */
.exporter-settings-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  min-width: 300px;
  max-width: 400px;
  border-left: 1px solid var(--ui-border-color);
}

/* Exporter Tabs */
.exporter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.exporter-tab {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: 1px solid var(--ui-border-color);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.exporter-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.exporter-tab.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: var(--ui-text-color);
}

.exporter-tab-content {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.exporter-tab-content.active {
  display: flex;
}

/* Range Value Display */
.range-value {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'JetBrains Mono', monospace;
  min-width: 50px;
  text-align: right;
}

/* Time Input */
.time-input {
  width: 80px;
  padding: 8px;
  background: var(--ui-input-bg);
  border: 1px solid var(--ui-input-border);
  border-radius: 4px;
  color: var(--ui-text-color);
  font-size: 13px;
}

.time-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.6);
}

.range-separator {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

/* Checkbox Label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Background Preview */
.bg-preview {
  width: 100%;
  height: 150px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--ui-border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.bg-preview-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

/* Warning Box */
.warning-box {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  padding: 12px 16px;
}

.warning-box p {
  margin: 0;
  font-size: 12px;
  color: #fbbf24;
  line-height: 1.5;
}

/* Info Box */
.info-box {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  padding: 12px 16px;
}

.info-box p {
  margin: 0;
  font-size: 12px;
  color: #93c5fd;
  line-height: 1.5;
}

#exporterAudioTrackName {
  font-weight: 600;
}

/* Exporter Footer */
.exporter-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--ui-border-color);
  flex-shrink: 0;
}

/* Progress Section */
.exporter-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

#exporterProgressText {
  flex: 1;
}

#exporterProgressPercent {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  margin-right: 16px;
}

#exporterEta {
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.5);
}

/* Scrollbar for settings */
.exporter-settings-section::-webkit-scrollbar {
  width: 8px;
}

.exporter-settings-section::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.exporter-settings-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.exporter-settings-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
