/* ═══════════════════════════════════════════════════════════
   AntTube — Stylesheet
   Fortune 500 grade dark UI with coral accents
   ═══════════════════════════════════════════════════════════ */

/* ─── Fonts ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Custom Properties ────────────────────────────────── */
:root {
    --bg-primary:    #0b1219;
    --bg-secondary:  #111c27;
    --bg-tertiary:   #182635;
    --bg-card:       #14202d;
    --bg-input:      #0f1923;

    --accent:        #ff4f6d;
    --accent-hover:  #ff6b83;
    --accent-glow:   rgba(255, 79, 109, 0.25);
    --accent-soft:   rgba(255, 79, 109, 0.08);

    --text-primary:  #f0f2f5;
    --text-secondary:#8b9bb4;
    --text-muted:    #546a83;
    --text-dim:      #3d5168;

    --border:        rgba(255,255,255,0.06);
    --border-hover:  rgba(255,255,255,0.12);
    --border-accent: rgba(255, 79, 109, 0.3);

    --success:       #34d399;
    --warning:       #fbbf24;
    --error:         #f87171;
    --info:          #60a5fa;

    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-xl:     24px;
    --radius-pill:   999px;

    --shadow-sm:     0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg:     0 12px 40px rgba(0,0,0,0.4);
    --shadow-glow:   0 0 40px var(--accent-glow);

    --transition:    200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-lg: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Background Atmosphere ────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 600px at 20% 10%, rgba(255,79,109,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 600px 400px at 80% 80%, rgba(96,165,250,0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Utility ──────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ─── Navigation ───────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(11,18,25,0.82);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.nav-logo span.accent { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }

.nav-links .badge {
    font-size: 0.65rem;
    background: var(--accent);
    color: white;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    margin-left: 5px;
    font-weight: 600;
    vertical-align: super;
}

/* ─── Hero Section ─────────────────────────────────────── */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.hero-rating .stars { color: #fbbf24; font-size: 1rem; letter-spacing: 2px; }
.hero-rating strong { color: var(--text-primary); font-weight: 600; }

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent), #ff8fa3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.08rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* ─── Main Input Area ──────────────────────────────────── */
.input-group {
    display: flex;
    max-width: 680px;
    margin: 0 auto 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-group:focus-within {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.input-group input {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    letter-spacing: -0.01em;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary svg { width: 18px; height: 18px; }

.btn-primary.btn-block {
    width: 100%;
    justify-content: center;
    padding: 16px 28px;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
}

/* ─── Gated Form (Batch / Channel) ─────────────────────── */
.gated-form {
    max-width: 680px;
    margin: 0 auto 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gated-form[hidden] { display: none; }

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

.gated-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-left: 4px;
}

.gated-field input,
.gated-field textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    resize: vertical;
}

.gated-field textarea {
    min-height: 140px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.84rem;
}

.gated-field input::placeholder,
.gated-field textarea::placeholder {
    color: var(--text-muted);
}

.gated-field input:focus,
.gated-field textarea:focus {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

#single-form[hidden] { display: none; }

/* Secondary buttons row */
.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-secondary svg { width: 14px; height: 14px; }

/* ─── Trust Bar ────────────────────────────────────────── */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

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

.trust-item svg { width: 16px; height: 16px; opacity: 0.6; }
.trust-item strong { color: var(--text-secondary); }

/* ─── Tabs ─────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 4px;
    max-width: 680px;
    margin: 0 auto 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.tab-btn:hover { color: var(--text-secondary); }

.tab-btn.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.tab-btn .soon {
    font-size: 0.6rem;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    margin-left: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ─── Progress / Status ────────────────────────────────── */
.status-panel {
    max-width: 680px;
    margin: 0 auto;
    display: none;
}

.status-panel.visible { display: block; }

.progress-bar-track {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff8fa3);
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-bar-fill.indeterminate {
    width: 30%;
    animation: indeterminate 1.5s infinite ease-in-out;
}

@keyframes indeterminate {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.status-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.status-step.active { color: var(--text-secondary); }
.status-step.done   { color: var(--success); }
.status-step.error  { color: var(--error); }

.status-step .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ─── Results Panel ────────────────────────────────────── */
.results {
    max-width: 900px;
    margin: 48px auto 0;
    display: none;
}

.results.visible { display: block; }

.results-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.video-preview {
    position: relative;
    width: 320px;
    min-width: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.video-preview img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.video-preview .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity var(--transition);
    cursor: pointer;
}

.video-preview:hover .play-overlay { opacity: 1; }

.play-overlay svg {
    width: 48px;
    height: 48px;
    fill: white;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.video-info { flex: 1; }

.video-info h2 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.video-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.video-meta svg { width: 14px; height: 14px; }

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

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-download:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-download svg { width: 16px; height: 16px; }

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-copy:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-hover); }
.btn-copy svg { width: 16px; height: 16px; }

/* ─── Stats Strip ──────────────────────────────────────── */
.stats-strip {
    display: flex;
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
}

.stat-item {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg-secondary);
    text-align: center;
}

.stat-item .stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-item .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* ─── Transcript Viewer ───────────────────────────────── */
.transcript-viewer {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.transcript-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.transcript-search {
    flex: 1;
    max-width: 280px;
    padding: 8px 12px 8px 34px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    outline: none;
    transition: border-color var(--transition);
}

.transcript-search:focus { border-color: var(--border-accent); }

.transcript-search-wrap {
    position: relative;
}

.transcript-search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

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

.toolbar-toggle {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.76rem;
    cursor: pointer;
    transition: all var(--transition);
}

.toolbar-toggle:hover, .toolbar-toggle.active {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.transcript-body {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary) transparent;
}

.transcript-body::-webkit-scrollbar { width: 6px; }
.transcript-body::-webkit-scrollbar-track { background: transparent; }
.transcript-body::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 3px; }
.transcript-body::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

.transcript-line {
    display: flex;
    gap: 12px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.transcript-line:hover { background: var(--accent-soft); }

.transcript-line mark {
    background: rgba(255,79,109,0.25);
    color: var(--text-primary);
    border-radius: 2px;
    padding: 0 2px;
}

.transcript-ts {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    white-space: nowrap;
    min-width: 56px;
    padding-top: 2px;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity var(--transition);
}

.transcript-ts:hover { opacity: 1; }

.transcript-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.transcript-line-no-ts .transcript-text {
    padding-left: 68px;
}

/* ─── Batch / Channel Results ──────────────────────────── */
.batch-results {
    max-width: 900px;
    margin: 48px auto 0;
}

.batch-results[hidden] { display: none; }

.batch-results-header {
    margin-bottom: 24px;
    text-align: center;
}

.batch-results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.batch-results-summary {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.batch-results-summary .succeeded { color: var(--success); font-weight: 600; }
.batch-results-summary .failed    { color: var(--error); font-weight: 600; }

.batch-results-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.batch-card {
    display: flex;
    gap: 16px;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition);
}

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

.batch-card.failed {
    border-left: 3px solid var(--error);
}

.batch-card-thumb {
    width: 160px;
    min-width: 160px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.batch-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.batch-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.batch-card-title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.batch-card-channel {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.batch-card-stats {
    display: flex;
    gap: 14px;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.batch-card-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

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

.batch-card-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.batch-card-actions button:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.batch-card-actions .btn-card-download {
    background: var(--accent);
    color: white;
    border-color: transparent;
}

.batch-card-actions .btn-card-download:hover {
    background: var(--accent-hover);
    color: white;
}

.batch-card-actions svg {
    width: 12px;
    height: 12px;
}

.batch-card-error {
    font-size: 0.84rem;
    color: var(--error);
    background: rgba(248,113,113,0.08);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    word-break: break-word;
}

.batch-card-url {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    word-break: break-all;
}

/* ─── Debug Panel ──────────────────────────────────────── */
.debug-panel {
    max-width: 900px;
    margin: 24px auto 0;
    display: none;
}

.debug-panel.visible { display: block; }

.debug-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all var(--transition);
}

.debug-toggle:hover { color: var(--text-secondary); }

.debug-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition);
}

.debug-toggle.open svg { transform: rotate(90deg); }

.debug-content {
    display: none;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-height: 300px;
    overflow-y: auto;
}

.debug-content.open { display: block; }

.debug-line { padding: 2px 0; }
.debug-line .debug-time { color: var(--text-dim); }
.debug-line .debug-msg  { color: var(--text-muted); }
.debug-line.error .debug-msg { color: var(--error); }

/* ─── Error Toast ──────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    max-width: 420px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--error);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 0.88rem;
    transform: translateY(120%);
    transition: transform 0.3s ease;
}

.toast.visible { transform: translateY(0); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-info { border-left-color: var(--info); }

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-message { color: var(--text-secondary); font-size: 0.82rem; }

/* ─── Footer ───────────────────────────────────────────── */
.footer {
    margin-top: 80px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.footer-version {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-pill);
    letter-spacing: 0.02em;
}

/* ─── Video Modal ──────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.visible { display: flex; }

.modal-content {
    width: 90vw;
    max-width: 900px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.modal-close:hover { opacity: 1; }

/* ─── Animations ───────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .hero { padding: 48px 0 40px; }

    .hero h1 { font-size: 1.75rem; }

    .input-group {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .input-group input { padding: 14px 16px; }

    .btn-primary {
        justify-content: center;
        padding: 14px 20px;
        border-radius: 0;
    }

    .results-header {
        flex-direction: column;
    }

    .video-preview {
        width: 100%;
        min-width: unset;
    }

    .stats-strip { flex-wrap: wrap; }
    .stat-item { min-width: calc(50% - 1px); }

    .nav-links { gap: 16px; }
    .nav-links a { font-size: 0.82rem; }

    .trust-bar { gap: 16px; }

    .video-meta { gap: 8px; }
    .video-actions { flex-direction: column; }

    .transcript-toolbar { flex-direction: column; align-items: stretch; }
    .transcript-search { max-width: none; }

    .batch-card { flex-direction: column; }
    .batch-card-thumb { width: 100%; min-width: 0; }
    .batch-card-actions { gap: 6px; }
}

@media (max-width: 480px) {
    .nav-links .hide-mobile { display: none; }
    .secondary-actions { flex-direction: column; align-items: center; }
}


/* v2 preview panes */
.mode-preview-grid {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

.mode-preview-card {
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(11,17,32,0.92), rgba(8,12,24,0.92));
    border-radius: 24px;
    padding: 1.4rem;
    box-shadow: 0 18px 60px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

.mode-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.mode-preview-head h3 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.25rem;
}

.mode-preview-head p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 48rem;
}

.mode-preview-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    color: var(--accent);
}

.mode-preview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 194, 87, 0.15);
    color: #ffd58f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.mode-preview-columns {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 1rem;
}

.mode-preview-columns.single-column {
    grid-template-columns: 1fr;
}

.mode-field {
    display: grid;
    gap: 0.55rem;
}

.mode-field span {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.mode-field textarea,
.mode-field input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(3, 9, 22, 0.72);
    border-radius: 18px;
    color: var(--text-primary);
    padding: 1rem 1rem;
    resize: vertical;
    font: inherit;
}

.mode-field textarea:focus,
.mode-field input:focus {
    outline: none;
    border-color: rgba(103, 145, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(103,145,255,0.12);
}

.mode-mini-stack,
.mode-mini-grid {
    display: grid;
    gap: 1rem;
}

.mode-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-mini-card {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    border-radius: 18px;
    padding: 1rem;
}

.mode-mini-card h4 {
    margin: 0 0 0.65rem;
    font-size: 0.98rem;
}

.mode-mini-card ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--text-secondary);
}

.mode-mini-card li + li {
    margin-top: 0.45rem;
}

@media (max-width: 960px) {
    .mode-preview-columns,
    .mode-mini-grid {
        grid-template-columns: 1fr;
    }
}
