/* ═══════════════════════════════════════════════════
   SyncFlow — Tailwind v4 Patterns (Pure CSS, No Build)
   ═══════════════════════════════════════════════════
   Architecture: @layer base, theme, utilities, components
   Following Tailwind v4 design philosophy without the CLI.
   ═══════════════════════════════════════════════════ */

/* ── Layer Declaration (sets cascade priority order) ── */
@layer base, theme, utilities, components;

/* ── @property declarations (top-level, typed custom properties) ── */
@property --bg-base {
    syntax: "<color>";
    inherits: true;
    initial-value: #0b0f19;
}
@property --bg-surface {
    syntax: "<color>";
    inherits: true;
    initial-value: rgba(17, 24, 39, 0.7);
}
@property --text-primary {
    syntax: "<color>";
    inherits: true;
    initial-value: #f3f4f6;
}
@property --primary-color {
    syntax: "<color>";
    inherits: true;
    initial-value: #6366f1;
}
@property --radius-lg {
    syntax: "<length>";
    inherits: true;
    initial-value: 20px;
}

/* ═══════════════════════════════════════════════
   BASE LAYER — Reset, document defaults, a11y
   ═══════════════════════════════════════════════ */
@layer base {
    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    html {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    body {
        background-color: var(--bg-base);
        color: var(--text-primary);
        font-family: var(--font-body);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        color-scheme: dark;
    }

    .light-theme {
        color-scheme: light;
    }

    /* Smooth theme transitions — explicit properties only */
    body,
    .card,
    .app-header,
    .drop-zone,
    .field input,
    .field select,
    .search-box input {
        transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    }

    /* Focus visible — only show focus ring for keyboard users */
    :focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Reduce motion for accessibility */
    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* ═══════════════════════════════════════════════
   THEME LAYER — Design tokens (Tailwind v4 @theme style)
   ═══════════════════════════════════════════════ */
@layer theme {
    :root,
    body.dark-theme {
        /* ── Surface Colors ── */
        --bg-base: #0b0f19;
        --bg-surface: rgba(17, 24, 39, 0.7);
        --bg-surface-solid: #111827;
        --border-color: rgba(255, 255, 255, 0.08);
        --border-hover: rgba(255, 255, 255, 0.15);

        /* ── Text Colors ── */
        --text-primary: #f3f4f6;
        --text-secondary: #9ca3af;
        --text-muted: #6b7280;

        /* ── Brand / Accent ── */
        --primary-color: #6366f1;
        --primary-hover: #4f46e5;
        --primary-glow: rgba(99, 102, 241, 0.15);
        --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        --accent-color: #8b5cf6;

        /* ── Semantic ── */
        --success-color: #10b981;
        --success-bg: rgba(16, 185, 129, 0.1);
        --warning-color: #f59e0b;
        --warning-bg: rgba(245, 158, 11, 0.1);
        --danger-color: #ef4444;
        --danger-bg: rgba(239, 68, 68, 0.1);

        /* ── Radii ── */
        --radius-sm: 8px;
        --radius-md: 12px;
        --radius-lg: 20px;

        /* ── Shadows ── */
        --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

        /* ── Typography ── */
        --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

    body.light-theme {
        /* ── Surface Colors ── */
        --bg-base: #f8fafc;
        --bg-surface: rgba(255, 255, 255, 0.8);
        --bg-surface-solid: #ffffff;
        --border-color: rgba(0, 0, 0, 0.06);
        --border-hover: rgba(0, 0, 0, 0.12);

        /* ── Text Colors ── */
        --text-primary: #0f172a;
        --text-secondary: #475569;
        --text-muted: #94a3b8;

        /* ── Brand / Accent ── */
        --primary-color: #4f46e5;
        --primary-hover: #4338ca;
        --primary-glow: rgba(79, 70, 229, 0.1);
        --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        --accent-color: #7c3aed;

        /* ── Semantic ── */
        --success-color: #059669;
        --success-bg: rgba(5, 150, 105, 0.08);
        --warning-color: #f59e0b;
        --warning-bg: rgba(245, 158, 11, 0.1);
        --danger-color: #ef4444;
        --danger-bg: rgba(239, 68, 68, 0.1);

        /* ── Shadows ── */
        --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    }
}

/* ═══════════════════════════════════════════════
   UTILITIES LAYER — Low-level reusable classes
   ═══════════════════════════════════════════════ */
@layer utilities {
    /* ── Text ── */
    .gradient-text {
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .tabular-nums,
    .value-display,
    .status-value,
    #current-cue-start,
    #current-cue-end,
    .ms-input-container input {
        font-variant-numeric: tabular-nums;
    }

    /* ── Visibility ── */
    .hidden {
        display: none !important;
    }

    .placeholder-text {
        text-align: center;
        color: var(--text-muted);
        font-size: 13px;
        padding: 48px 0;
        width: 100%;
    }

    /* ── Keyboard Shortcut Tags ── */
    .kbd {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
        padding: 1px 6px;
        border-radius: 4px;
        font-size: 11px;
    }

    /* ── Button Loading Spinner ── */
    .btn-loading {
        position: relative;
        pointer-events: none;
        opacity: 0.8;
    }

    .btn-loading::after {
        content: '';
        width: 14px;
        height: 14px;
        border: 2px solid transparent;
        border-top-color: currentColor;
        border-radius: 50%;
        animation: btn-spin 0.6s linear infinite;
        margin-left: 8px;
        display: inline-block;
    }

    /* ── Rotation ── */
    .rotate-180 {
        transform: rotate(180deg);
    }

    /* ── Cue Status Indicators ── */
    .status-visible { color: var(--success-color); }
    .status-hidden { color: var(--danger-color); }
    .status-waiting { color: var(--text-muted); }

    .dot-active {
        color: var(--success-color);
        font-size: 16px;
    }

    .dot-inactive {
        color: var(--text-muted);
        font-size: 16px;
    }

    .active-cue { color: var(--success-color); }
    .no-cue { color: var(--text-muted); }
}

/* ═══════════════════════════════════════════════
   COMPONENTS LAYER — Reusable visual primitives
   ═══════════════════════════════════════════════ */
@layer components {

    /* ── App Container & Layout ── */
    .app-container {
        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
        padding: 24px env(safe-area-inset-right) 24px env(safe-area-inset-left);
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        gap: 24px;
    }

    .workspace {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .editor-grid {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 24px;
    }

    .left-panel,
    .right-panel {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    /* ── Header ── */
    /* ── Launch Button (Initial Screen) ── */
    .launch-btn-container {
        grid-column: 1 / -1;
        margin-top: 32px;
        padding: 32px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        animation: slide-up 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .launch-btn-container.hidden {
        display: none;
    }

    .launch-status {
        display: flex;
        gap: 32px;
        margin-bottom: 8px;
    }

    .status-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-muted);
    }

    .status-item .status-dot {
        font-size: 10px;
        transition: color 0.3s ease;
    }

    .status-item.ready {
        color: var(--text-primary);
    }

    .status-item.ready .status-dot {
        color: var(--success-color);
        text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    }

    .launch-hint {
        font-size: 13px;
        color: var(--text-muted);
        font-style: italic;
    }

    @keyframes slide-up {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .app-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 24px;
        background: var(--bg-surface);
        backdrop-filter: blur(12px);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-premium);
    }

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

    .brand h1 {
        font-family: var(--font-heading);
        font-size: 24px;
        font-weight: 700;
        letter-spacing: -0.5px;
    }

    .logo-icon {
        font-size: 24px;
    }

    .badge {
        font-size: 11px;
        font-weight: 600;
        padding: 2px 8px;
        background: var(--primary-glow);
        color: var(--primary-color);
        border: 1px solid var(--primary-color);
        border-radius: 20px;
        margin-left: 8px;
    }

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

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

    .icon-btn {
        background: transparent;
        border: none;
        font-size: 20px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        min-width: 44px;
        min-height: 44px;
    }

    .icon-btn:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    /* ── Cards (General Component) ── */
    .card {
        background: var(--bg-surface);
        backdrop-filter: blur(16px);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-premium);
        padding: 24px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

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

    .card-header h2 {
        font-family: var(--font-heading);
        font-size: 18px;
        font-weight: 600;
    }

    /* ── Drop Zones (Upload) ── */
    .upload-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 48px 24px;
        text-align: center;
    }

    .drop-zone {
        border: 2px dashed var(--border-color);
        border-radius: var(--radius-lg);
        padding: 48px 24px;
        position: relative;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.01);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 250px;
    }

    .drop-zone:hover,
    .drop-zone.dragover {
        border-color: var(--primary-color);
        background: var(--primary-glow);
        transform: translateY(-2px);
    }

    .file-input {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
        top: 0;
        left: 0;
    }

    .upload-icon {
        font-size: 48px;
        margin-bottom: 16px;
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .drop-zone:hover .upload-icon {
        transform: scale(1.1) rotate(5deg);
    }

    .drop-zone h3 {
        font-family: var(--font-heading);
        font-size: 18px;
        margin-bottom: 8px;
    }

    .drop-zone p {
        color: var(--text-secondary);
        font-size: 14px;
        margin-bottom: 12px;
    }

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

    .file-info {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--bg-surface-solid);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
        border-radius: var(--radius-lg);
        font-weight: 500;
    }

    .file-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 80%;
        font-size: 14px;
    }

    .remove-file-btn {
        background: var(--danger-bg);
        color: var(--danger-color);
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        cursor: pointer;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .remove-file-btn:hover {
        background: var(--danger-color);
        color: white;
    }

    /* ── Light theme drop zone override ── */
    .light-theme .drop-zone {
        background: rgba(0, 0, 0, 0.01);
    }

    /* ── Video Player ── */
    .player-card {
        padding: 12px;
        background: #000000;
        overflow: hidden;
    }

    .video-wrapper {
        position: relative;
        width: 100%;
        background: #000;
        border-radius: var(--radius-md);
        aspect-ratio: 16 / 9;
    }

    #video-player {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: var(--radius-md);
    }

    .subtitle-overlay {
        position: absolute;
        bottom: 45px;
        left: 50%;
        transform: translateX(-50%);
        width: 85%;
        text-align: center;
        pointer-events: none;
        z-index: 10;
    }

    #subtitle-text {
        background: rgba(0, 0, 0, 0.75);
        color: #ffffff;
        padding: 6px 16px;
        border-radius: 6px;
        font-size: 20px;
        font-weight: 500;
        line-height: 1.4;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        display: inline-block;
        max-width: 100%;
        word-wrap: break-word;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .player-controls-hint {
        text-align: center;
        font-size: 12px;
        color: var(--text-muted);
        padding: 8px 0 0 0;
    }

    .subtitle-appearance {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 0 4px;
    }

    .appearance-label {
        font-size: 12px;
        color: var(--text-secondary);
        margin-right: 4px;
    }

    .font-size-btn {
        width: 32px;
        height: 32px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--bg-surface);
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: var(--font-body);
        transition: all 0.2s;
    }

    .font-size-btn:hover {
        border-color: var(--primary-color);
        color: var(--text-primary);
    }

    .font-size-btn.active {
        border-color: var(--primary-color);
        background: var(--primary-glow);
        color: var(--primary-color);
    }

    .font-size-btn[data-size="small"] { font-size: 12px; font-weight: 500; }
    .font-size-btn[data-size="medium"] { font-size: 15px; font-weight: 600; }
    .font-size-btn[data-size="large"] { font-size: 19px; font-weight: 700; }

    /* ── Sync Controls ── */
    .control-group {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .control-label-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .control-label-row label {
        font-weight: 600;
        font-size: 14px;
    }

    .value-display {
        font-family: var(--font-heading);
        font-size: 18px;
        font-weight: 700;
        color: var(--primary-color);
    }

    .slider-container {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .slider-bound {
        font-size: 12px;
        color: var(--text-muted);
        font-weight: bold;
    }

    #offset-slider {
        flex-grow: 1;
        -webkit-appearance: none;
        appearance: none;
        height: 6px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.1);
        outline: none;
    }

    #offset-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--primary-color);
        cursor: pointer;
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
        transition: transform 0.1s;
    }

    #offset-slider::-webkit-slider-thumb:hover {
        transform: scale(1.2);
    }

    #offset-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--primary-color);
        cursor: pointer;
        border: none;
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    }

    .precision-row {
        display: flex;
        gap: 16px;
        align-items: center;
        margin-top: 8px;
    }

    .ms-input-container {
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 0 12px;
        width: 120px;
    }

    .ms-input-container input {
        width: 100%;
        background: transparent;
        border: none;
        color: var(--text-primary);
        padding: 8px 0;
        outline: none;
        font-family: var(--font-heading);
        font-size: 16px;
        font-weight: 600;
        text-align: right;
    }

    .ms-input-container .unit {
        color: var(--text-muted);
        font-size: 12px;
        margin-left: 4px;
        font-weight: bold;
    }

    .light-theme .ms-input-container {
        background: rgba(0, 0, 0, 0.02);
    }

    .quick-nudge-buttons {
        display: flex;
        gap: 8px;
        flex-grow: 1;
        flex-wrap: wrap;
    }

    .quick-nudge-buttons .btn {
        min-height: 36px;
        min-width: 44px;
    }

    .action-bar-row {
        display: flex;
        justify-content: stretch;
        margin-top: 4px;
    }

    .action-bar-row button {
        width: 100%;
        padding: 12px;
    }

    .sync-hint {
        text-align: center;
        font-size: 11px;
        color: var(--text-muted);
        margin-top: 4px;
    }

    /* ── Buttons ── */
    .btn {
        border: none;
        padding: 8px 16px;
        font-family: var(--font-body);
        font-size: 13px;
        font-weight: 600;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .btn-primary {
        background: var(--primary-gradient);
        color: white;
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    }

    .btn-primary:hover {
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
        transform: translateY(-1px);
    }

    .btn-secondary {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-primary);
        border: 1px solid var(--border-color);
    }

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--border-hover);
    }

    .light-theme .btn-secondary {
        background: rgba(0, 0, 0, 0.02);
    }

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

    .btn-warning:hover {
        background: var(--warning-color);
        color: white;
    }

    .btn-success {
        background: var(--success-color);
        color: white;
    }

    .btn-success:hover {
        background: #059669;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 16px;
        border-radius: var(--radius-md);
        width: 100%;
    }

    .btn-giant {
        padding: 18px 32px;
        font-size: 20px;
        font-weight: 700;
        width: 100%;
        border-radius: var(--radius-md);
        letter-spacing: 0.5px;
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    }

    .btn-giant:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 35px rgba(99, 102, 241, 0.45);
    }

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

    .btn-danger-outline:hover {
        background: var(--danger-color);
        color: white;
    }

    /* ── Current Cue Panel ── */
    .current-cue-card {
        padding: 16px 20px;
        background: var(--bg-surface-solid);
        border-left: 3px solid var(--primary-color);
    }

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

    .cue-info-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .cue-indicator-dot {
        font-size: 14px;
        color: var(--text-muted);
        transition: color 0.15s ease;
    }

    .cue-indicator-dot.active {
        color: var(--success-color);
        text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    }

    .cue-indicator-dot.inactive {
        color: var(--text-muted);
    }

    .cue-label {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-secondary);
    }

    .cue-number-badge {
        margin-left: auto;
        font-size: 12px;
        font-weight: 700;
        background: var(--primary-glow);
        color: var(--primary-color);
        padding: 2px 10px;
        border-radius: 20px;
        font-family: var(--font-heading);
    }

    .cue-text-display {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 10px 14px;
        font-size: 15px;
        font-weight: 500;
        line-height: 1.5;
        min-height: 40px;
        word-wrap: break-word;
    }

    .cue-text-display .placeholder-txt {
        color: var(--text-muted);
        font-weight: 400;
        font-size: 13px;
    }

    .cue-times-row {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
    }

    .cue-time-label {
        color: var(--text-muted);
        font-weight: 600;
        font-size: 10px;
        text-transform: uppercase;
    }

    .cue-time-value {
        font-family: var(--font-heading);
        font-weight: 600;
        color: var(--text-primary);
        font-size: 14px;
    }

    .cue-time-sep {
        color: var(--text-muted);
        font-size: 14px;
        margin: 0 4px;
    }

    .cue-status-row {
        margin-top: 4px;
    }

    .cue-status-badge {
        font-size: 12px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    /* ── Live Status Bar ── */
    .live-status-bar {
        display: flex;
        gap: 20px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 12px;
    }

    .status-item {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .status-label {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
    }

    .status-value {
        font-family: var(--font-heading);
        font-size: 15px;
        font-weight: 700;
        color: var(--text-primary);
    }

    .status-indicator {
        font-size: 14px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* ── Collapsible (Drift Fix) ── */
    .toggle-header {
        cursor: pointer;
        user-select: none;
    }

    .toggle-icon {
        font-size: 12px;
        transition: transform 0.3s;
        color: var(--text-secondary);
    }

    .toggle-header:hover .toggle-icon {
        color: var(--primary-color);
    }

    .collapsible-content {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }

    .help-text {
        font-size: 12px;
        color: var(--text-secondary);
        line-height: 1.5;
    }

    .anchor-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .anchor-point {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .anchor-point h3 {
        font-size: 13px;
        font-weight: 600;
        color: var(--text-secondary);
    }

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

    .field label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .field input,
    .field select {
        background: var(--bg-surface-solid);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        padding: 8px 12px;
        font-size: 13px;
        outline: none;
    }
    .field select option {
        background-color: var(--bg-surface-solid);
        color: var(--text-primary);
    }

    .field input:focus,
    .field select:focus {
        border-color: var(--primary-color);
    }

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

    .input-with-button input {
        flex-grow: 1;
    }

    .calibration-actions {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
    }

    /* ── Export + Cue List ── */
    .export-card {
        background: var(--bg-surface-solid);
    }

    .export-controls {
        display: grid;
        grid-template-columns: 0.8fr 1.2fr;
        gap: 16px;
        align-items: flex-end;
    }

    .project-actions {
        display: flex;
        gap: 10px;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--border-color);
    }
    .project-actions .btn {
        flex: 1;
        font-size: 13px;
        padding: 10px 12px;
    }

    .list-card {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        min-height: 400px;
        max-height: 600px;
        padding: 0;
    }

    .list-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px;
        border-bottom: 1px solid var(--border-color);
    }

    .list-header h2 {
        font-family: var(--font-heading);
        font-size: 16px;
        font-weight: 600;
    }

    .search-box input {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 6px 16px;
        color: var(--text-primary);
        font-size: 12px;
        outline: none;
        width: 180px;
    }

    .search-box input:focus {
        border-color: var(--primary-color);
        width: 220px;
    }

    .cues-container {
        flex-grow: 1;
        overflow-y: auto;
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .cues-container * {
        scrollbar-width: thin;
    }

    .cues-container::-webkit-scrollbar {
        width: 6px;
    }

    .cues-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .cues-container::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }

    .cues-container::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }

    .cue-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 12px;
        border-radius: var(--radius-sm);
        border: 1px solid transparent;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.01);
    }

    .cue-row:hover {
        background: rgba(255, 255, 255, 0.03);
        border-color: var(--border-color);
    }

    .cue-row.active {
        background: var(--primary-glow);
        border-color: var(--primary-color);
    }

    .cue-meta-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 11px;
        font-weight: 600;
        color: var(--text-muted);
    }

    .cue-index {
        background: rgba(255, 255, 255, 0.05);
        padding: 1px 6px;
        border-radius: 4px;
    }

    .cue-row.active .cue-index {
        background: var(--primary-color);
        color: white;
    }

    .cue-time {
        font-family: var(--font-heading);
    }

    .cue-text-area {
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-family: inherit;
        font-size: 13px;
        resize: none;
        outline: none;
        overflow: hidden;
        line-height: 1.4;
        padding: 2px 0;
    }

    .cue-text-area:focus {
        border-bottom: 1px solid var(--primary-color);
        background: rgba(255, 255, 255, 0.02);
    }

    /* ── Hero Section ── */
    .hero-section {
        text-align: center;
        padding: 48px 24px 24px;
    }

    .hero-title {
        font-family: var(--font-heading);
        font-size: 44px;
        font-weight: 800;
        line-height: 1.15;
        letter-spacing: -1px;
        margin-bottom: 16px;
    }

    .hero-sub {
        font-size: 18px;
        color: var(--text-secondary);
        max-width: 560px;
        margin: 0 auto 20px;
        line-height: 1.6;
    }

    .hero-badges {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-bottom: 40px;
        flex-wrap: wrap;
    }

    .hero-badge {
        font-size: 13px;
        font-weight: 600;
        padding: 6px 16px;
        background: var(--primary-glow);
        border: 1px solid rgba(99, 102, 241, 0.2);
        border-radius: 20px;
        color: var(--primary-color);
    }

    .hero-steps {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        max-width: 450px;
        margin: 0 auto;
    }

    .hero-step {
        display: flex;
        align-items: center;
        gap: 16px;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 16px 24px;
        width: 100%;
    }

    .step-num {
        font-size: 24px;
        font-weight: 700;
        color: var(--primary-color);
        min-width: 36px;
        text-align: center;
    }

    .step-content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
        text-align: left;
    }

    .step-content strong {
        font-size: 15px;
        font-weight: 600;
    }

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

    .step-arrow {
        color: var(--primary-color);
        font-size: 16px;
        opacity: 0.6;
    }

    /* ── Quick Guide Card ── */
    .quick-guide-card {
        padding: 14px 20px;
        background: var(--primary-glow);
        border: 1px solid rgba(99, 102, 241, 0.15);
    }

    .guide-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }

    .guide-icon {
        font-size: 18px;
    }

    .guide-title {
        font-family: var(--font-heading);
        font-size: 15px;
        font-weight: 700;
    }

    .guide-steps {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .guide-step {
        font-size: 13px;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 8px;
        line-height: 1.4;
    }

    .guide-num {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        font-size: 11px;
        font-weight: 700;
        flex-shrink: 0;
    }

    /* ── Problem Cards ── */
    .problem-cards {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .problem-card {
        display: flex;
        align-items: center;
        gap: 12px;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 14px 18px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .problem-card:hover {
        border-color: var(--primary-color);
        background: var(--primary-glow);
        transform: translateX(4px);
    }

    .problem-icon {
        font-size: 24px;
        flex-shrink: 0;
    }

    .problem-text {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .problem-text strong {
        font-size: 14px;
        font-weight: 600;
    }

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

    .problem-hint {
        font-size: 12px;
        font-weight: 600;
        color: var(--primary-color);
        white-space: nowrap;
    }

    /* ── Global Drop Overlay ── */
    .global-drop-overlay {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(11, 15, 25, 0.92);
        backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .global-drop-overlay.visible {
        opacity: 1;
        pointer-events: all;
    }

    .drop-overlay-content {
        text-align: center;
        padding: 48px;
        border: 2px dashed var(--primary-color);
        border-radius: var(--radius-lg);
        background: var(--bg-surface);
        max-width: 480px;
    }

    .drop-overlay-icon {
        font-size: 56px;
        display: block;
        margin-bottom: 16px;
    }

    .drop-overlay-content h2 {
        font-family: var(--font-heading);
        font-size: 24px;
        color: var(--text-primary);
        margin: 0 0 8px;
    }

    .drop-overlay-content p {
        font-size: 14px;
        color: var(--text-secondary);
        margin: 0;
    }

    /* ── Ad Banner Placeholder ── */
    .ad-banner-placeholder {
        max-width: 1100px;
        margin: 24px auto;
        padding: 0 16px;
    }

    .ad-placeholder-content {
        background: var(--bg-surface);
        border: 1px dashed var(--border-hover);
        border-radius: var(--radius-md);
        padding: 20px 32px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        min-height: 60px;
    }

    .ad-placeholder-content span {
        font-size: 24px;
    }

    .ad-placeholder-content p {
        font-size: 14px;
        color: var(--text-secondary);
        margin: 0;
    }

    /* ── SEO Content Section ── */
    .seo-content-section {
        max-width: 800px;
        margin: 40px auto;
        padding: 32px 24px;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
    }

    .seo-content-section h2 {
        font-family: var(--font-heading);
        font-size: 22px;
        color: var(--text-primary);
        margin: 0 0 20px;
    }

    .seo-content-section h3 {
        font-family: var(--font-heading);
        font-size: 17px;
        color: var(--text-primary);
        margin: 24px 0 10px;
    }

    .seo-content-section p {
        font-size: 14px;
        line-height: 1.7;
        color: var(--text-secondary);
        margin: 0 0 14px;
    }

    .seo-content-section ol {
        padding-left: 20px;
        margin: 0 0 14px;
    }

    .seo-content-section ol li {
        font-size: 14px;
        line-height: 1.7;
        color: var(--text-secondary);
        margin-bottom: 6px;
    }

    /* ── Footer ── */
    .app-footer {
        text-align: center;
        color: var(--text-muted);
        font-size: 12px;
        padding: 16px;
        border-top: 1px solid var(--border-color);
    }

    .footer-links {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .footer-links a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 12px;
        font-weight: 500;
        transition: color 0.2s;
    }

    .footer-links a:hover {
        color: var(--primary-color);
        text-decoration: underline;
    }

    .footer-sep {
        color: var(--border-color);
        font-size: 12px;
    }

    .footer-affiliate {
        display: none;
        margin-top: 12px;
        padding: 10px 16px;
        background: var(--primary-glow);
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
        text-align: center;
        font-size: 12px;
        line-height: 1.5;
    }

    .footer-affiliate:not(.hidden) {
        display: inline-block;
    }

    .footer-affiliate p {
        margin: 0;
        color: var(--text-secondary);
    }

    .footer-affiliate a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 600;
    }

    .footer-affiliate a:hover {
        text-decoration: underline;
    }

.affiliate-notice {
        font-size: 10px;
        color: var(--text-muted);
        display: block;
        margin-top: 4px;
    }

    /* ── Card Hints & Info Tooltips ── */

    .card-hint {
        font-size: 11px;
        color: var(--text-muted);
        margin: 0;
        padding: 0 0 8px;
        line-height: 1.4;
    }

    .info-tip {
        position: relative;
        display: inline-flex;
        align-items: center;
        cursor: help;
        margin-left: 5px;
        vertical-align: middle;
    }

    .info-icon {
        font-size: 14px;
        opacity: 0.45;
        transition: opacity 0.2s;
        font-style: normal;
    }

    .info-tip:hover .info-icon,
    .info-tip:focus-visible .info-icon {
        opacity: 1;
    }

    .info-text {
        display: none;
        position: absolute;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-surface-solid, #1e1e2e);
        color: var(--text-primary, #e2e8f0);
        border: 1px solid var(--border-color, #334155);
        border-radius: 8px;
        padding: 10px 14px;
        font-size: 12px;
        line-height: 1.5;
        width: 280px;
        white-space: normal;
        z-index: 999;
        box-shadow: 0 6px 20px rgba(0,0,0,0.4);
        pointer-events: none;
        font-weight: 400;
    }

    .info-tip:hover .info-text,
    .info-tip:focus-visible .info-text {
        display: block;
    }

    /* Tooltip arrow pointing down */
    .info-text::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -6px;
        border: 6px solid transparent;
        border-top-color: var(--border-color, #334155);
    }

    .info-text::before {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -4px;
        border: 4px solid transparent;
        border-top-color: var(--bg-surface-solid, #1e1e2e);
        z-index: 1;
    }

    /* ── Toast Notification ── */
    .toast {
        position: fixed;
        bottom: 24px;
        right: 24px;
        background: var(--bg-surface-solid);
        color: var(--text-primary);
        border: 1px solid var(--primary-color);
        border-radius: var(--radius-md);
        padding: 12px 24px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        z-index: 999;
        font-weight: 600;
        font-size: 14px;
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .toast.hidden {
        opacity: 0;
        transform: translateY(20px);
        pointer-events: none;
    }

    /* Mini-tutorial styles for drift correction */
    .mini-tutorial {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
        background: rgba(99, 102, 241, 0.05);
        border: 1px solid rgba(99, 102, 241, 0.15);
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 24px;
    }

    .mini-tutorial .step {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .mini-tutorial .step-num {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: var(--primary-color);
        color: white;
        border-radius: 50%;
        font-weight: 700;
        font-size: 13px;
        box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    }

    .mini-tutorial p {
        font-size: 13px;
        line-height: 1.5;
        color: var(--text-secondary);
        margin: 0;
    }

    .mini-tutorial p strong {
        color: var(--text-primary);
    }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Unlayered (wins over all layers)
   ═══════════════════════════════════════════════ */

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .list-card {
        min-height: 350px;
        max-height: 450px;
    }
}

@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
        padding: 24px 12px;
    }

    .anchor-grid {
        grid-template-columns: 1fr;
    }

    .export-controls {
        grid-template-columns: 1fr;
    }

    .precision-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ms-input-container {
        width: 100%;
    }

    .quick-nudge-buttons .btn {
        min-height: 44px;
        min-width: 48px;
        flex: 1;
    }
}

/* ── Auto-Transcribe Card ── */
.transcribe-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(16, 185, 129, 0.05));
}

.transcribe-card .card-header h2 {
    display: flex;
    align-items: center;
    gap: 6px;
}

#transcribe-tech-badge {
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.transcribe-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.transcribe-controls .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transcribe-controls .field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transcribe-controls select {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.transcribe-controls select option {
    background-color: var(--bg-surface-solid);
    color: var(--text-primary);
}

.transcribe-controls select:focus {
    border-color: var(--primary-color);
}

.transcribe-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 0;
}

.transcribe-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #10b981);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.transcribe-status-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 110px;
}

.light-theme .transcribe-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), rgba(16, 185, 129, 0.03));
}

.light-theme .transcribe-progress-bar {
    background: rgba(0, 0, 0, 0.08);
}

/* When no subs loaded, transcribe card is prominent; with subs it blends in */
.editor-grid .transcribe-card {
    transition: opacity 0.2s;
}

.requires-subtitles.hidden {
    display: none !important;
}

/* ============================================
   Help / Keyboard Shortcuts Overlay
   ============================================ */
.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}
.help-overlay.hidden {
    display: none;
}
.help-modal {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.15s ease;
}
.help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}
.help-header h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
}
.help-close {
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.help-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
.help-body {
    padding: 18px 24px 24px;
}
.shortcut-group {
    margin-bottom: 18px;
}
.shortcut-group:last-child {
    margin-bottom: 0;
}
.shortcut-group h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}
.shortcut-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.shortcut-row kbd {
    display: inline-block;
    font-family: var(--font-heading);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 24px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.shortcut-row kbd + kbd {
    margin-left: 0;
}
.help-tip {
    margin: 16px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Light theme help overlay */
.light-theme .help-overlay {
    background: rgba(255, 255, 255, 0.7);
}
.light-theme .shortcut-row kbd {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.light-theme .help-close:hover {
    background: rgba(0, 0, 0, 0.04);
}
.light-theme .help-tip {
    background: rgba(0, 0, 0, 0.02);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* .cue-row.selected — user clicked to select for nudge */
.cue-row.selected {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* ============================================
   Waveform Preview
   ============================================ */
.requires-video.hidden {
    display: none !important;
}

.waveform-card {
    overflow: hidden;
}
.waveform-container {
    position: relative;
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}
.waveform-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    gap: 8px;
    z-index: 2;
}
.waveform-loading.hidden { display: none; }
.wf-loading-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.wf-progress-track {
    width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.wf-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}
.waveform-hint {
    margin: 6px 0 0 0;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* Waveform badge states */
#waveform-badge.extracting {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}
#waveform-badge.ready {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
#waveform-badge.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
