/* ============================================================
   QWINT CAPTION - PREMIUM CINEMATIC HERO ANIMATION
   PRO-LEVEL FIX: Explicit Layout & Visibility
   ============================================================ */

:root {
    --animation-bg: #050508;
    --workspace-bg: #1A1A1A;
    --timeline-bg: #0D0D14;
    --accent-purple: #A259FF;
    --accent-glow: rgba(162, 89, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --success-green: #00C896;
    --panel-border: #323232;
    --input-bg: #262626;
    --text-main: #E6E6E6;
    --text-dim: #999999;
}

.hero-visual-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 40px auto 0;
    aspect-ratio: 16 / 9;
    perspective: 2000px;
    z-index: 5;
}

@media (max-width: 768px) {
    .hero-visual-container {
        aspect-ratio: 4 / 5;
        width: 100%;
        max-width: 100vw;
        height: auto;
        margin: 20px auto 0;
    }
}



.animation-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--animation-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.animation-canvas::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    filter: contrast(150%) brightness(100%);
    opacity: 0.12;
    pointer-events: none;
    z-index: 100;
}

/* Editor Workspace */
.editor-workspace {
    position: relative;
    width: 92%;
    height: 88%;
    background: var(--workspace-bg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-rows: 36px 1fr 120px;

    overflow: hidden;
    z-index: 5;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.workspace-header {
    background: #141414;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.filename-text {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.workspace-main {
    display: grid;
    grid-template-columns: 1fr 280px;
    background: #0D0D14;
    overflow: hidden;
}

.preview-area {
    position: relative;
    background: #000;
    overflow: hidden;
    border-right: 1px solid var(--panel-border);
}

.preview-video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #111118, #1a1a2e);
}

.video-overlay-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(162, 89, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
}

.caption-overlay {
    position: absolute;
    bottom: 20%;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.caption-text-reveal {
    display: inline-block;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
}

/* PLUGIN PANEL */
.plugin-panel {
    background: #1A1A1A;
    border-left: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 50;
}


.plugin-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #141414;
    border-bottom: 1px solid var(--panel-border);
}

.plugin-logo-sq {
    width: 22px;
    height: 22px;
    background: var(--accent-purple);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plugin-content-scroll {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}


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


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

.video-info-card {
    background: var(--input-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-select {
    background: var(--input-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 10px;
    font-size: 11px;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.generate-container {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.generate-btn-premium {
    width: 100%;
    background: var(--accent-purple);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(162, 89, 255, 0.3);
}

.mini-progress-track {
    width: 100%;
    height: 4px;
    background: #262626;
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
}

.mini-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-purple);
}

/* Timeline Area */
.timeline-area {
    background: var(--timeline-bg);
    border-top: 1px solid var(--panel-border);
    padding: 24px;
    position: relative;
}

.timeline-tracks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.track {
    height: 36px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    position: relative;
}

.video-clip {
    position: absolute;
    left: 10%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, rgba(162, 89, 255, 0.15), rgba(106, 0, 255, 0.25));
    border: 1px solid rgba(162, 89, 255, 0.3);
    border-radius: 6px;
}

.caption-segments-container {
    display: flex;
    gap: 6px;
    position: absolute;
    left: 10%;
    width: 80%;
    height: 100%;
}

.caption-segment {
    height: 100%;
    background: var(--accent-purple);
    border-radius: 4px;
    flex: 1;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
}

.playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: #FF3D00;
    z-index: 20;
}

/* Final State Overlay */
.final-text-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 8, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 150;
    opacity: 0;
    text-align: center;
}

.final-headline {
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
}

.final-subheadline {
    font-size: 1.2rem;
    color: var(--text-dim);
}

/* Fake Cursor */
.fake-cursor {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
}

@media (max-width: 768px) {
    .editor-workspace {
        width: 96%;
        height: 96%;
        grid-template-rows: 28px 1fr 1.2fr 60px;
    }
    
    .workspace-main {
        grid-template-columns: 1fr;
        grid-row: span 2;
    }

    .preview-area {
        height: 100%;
        border-bottom: 1px solid var(--panel-border);
    }

    .plugin-panel {
        height: 100%;
        border-left: none;
    }

    .plugin-header {
        height: 36px;
        padding: 0 10px;
    }

    .plugin-content-scroll {
        padding: 8px;
        gap: 8px;
    }

    .plugin-section {
        display: none !important;
    }

    .generate-container {
        padding-top: 5px;
        margin-top: 0;
    }

    .generate-btn-premium {
        padding: 10px;
        font-size: 12px;
        border-radius: 6px;
    }

    .timeline-area {
        padding: 8px;
    }

    .track {
        height: 18px;
    }

    .caption-segments-container {
        gap: 4px;
    }

    .final-headline {
        font-size: 1.5rem;
    }

    .caption-text-reveal {
        font-size: 1rem;
        padding: 8px 16px;
    }
}


