﻿* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-soft: #f8faff;
    --border: #e2e7f0;
    --border-strong: #d5dce8;
    --text: #172033;
    --heading: #101828;
    --muted: #667085;
    --accent: #635bdb;
    --accent-dark: #5148c7;
    --accent-soft: #eeedff;
    --teal: #0f9f8f;
    --input: #fbfcfe;
    --shadow: 0 18px 55px rgba(28, 39, 66, 0.08);
}


/* =========================
   GLOBAL
   ========================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient( circle at 85% 0%, rgba(99, 91, 219, 0.08), transparent 28% ), radial-gradient( circle at 8% 30%, rgba(15, 159, 143, 0.045), transparent 25% ), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font-family: inherit;
}


/* =========================
   TOP NAVIGATION
   ========================= */

.topbar {
    height: 72px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 231, 240, 0.9);
}


/* Logo */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--heading);
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.5px;
}

    .brand > span:last-child > span {
        color: var(--accent);
    }

.brand-mark {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient( 135deg, #746be8, #5950d0 );
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 7px 20px rgba(99, 91, 219, 0.22);
}


/* Navigation */

.nav-menu {
    display: flex;
    gap: 5px;
    padding: 4px;
    background: #f1f3f8;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.nav-link {
    padding: 9px 15px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

    .nav-link:hover,
    .nav-link.active {
        color: var(--accent-dark);
        background: #ffffff;
        box-shadow: 0 2px 7px rgba(30, 41, 59, 0.07);
    }

.header-button {
    color: #596579;
    font-size: 13px;
    font-weight: 600;
}

    .header-button:hover {
        color: var(--accent);
    }


/* =========================
   HERO
   ========================= */

.hero {
    padding: 76px 5% 52px;
    text-align: center;
}

.hero-content {
    max-width: 760px;
    margin: auto;
}

.eyebrow,
.panel-label {
    color: var(--teal);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.hero h1 {
    margin: 15px 0 18px;
    color: var(--heading);
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -3px;
}

    .hero h1 span {
        background: linear-gradient( 90deg, #6258d9, #0f9f8f );
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.hero-text {
    max-width: 610px;
    margin: auto;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
}


/* =========================
   MAIN WORKSPACE
   ========================= */

.workspace {
    width: min(1200px, 90%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 390px 1fr;
    gap: 18px;
}


/* Panels */

.control-panel,
.preview-panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.control-panel {
    padding: 24px;
}

.preview-panel {
    min-width: 0;
    padding: 24px;
}


/* Panel headings */

.panel-heading,
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

    .panel-heading h2,
    .preview-header h2 {
        margin: 7px 0 0;
        color: var(--heading);
        font-size: 22px;
        letter-spacing: -0.7px;
    }


/* Format badge */

.format-badge,
.preview-size {
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
    color: #667085;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
}


/* =========================
   FORM
   ========================= */

label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 12px;
    font-weight: 650;
}


/* Textarea */

textarea {
    width: 100%;
    min-height: 145px;
    padding: 13px;
    resize: vertical;
    border: 1px solid var(--border-strong);
    outline: none;
    border-radius: 10px;
    background: var(--input);
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    textarea::placeholder {
        color: #98a2b3;
    }

    textarea:focus {
        border-color: #918ae6;
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(99, 91, 219, 0.09);
    }


/* =========================
   WIDTH / HEIGHT
   ========================= */

.dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 17px;
}

.field {
    min-width: 0;
}

.input-wrap {
    position: relative;
}

    .input-wrap input {
        width: 100%;
        padding: 11px 38px 11px 12px;
        border: 1px solid var(--border-strong);
        outline: none;
        border-radius: 10px;
        background: var(--input);
        color: var(--text);
        font-size: 13px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

        .input-wrap input:focus {
            border-color: #918ae6;
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(99, 91, 219, 0.09);
        }

    .input-wrap span {
        position: absolute;
        right: 11px;
        top: 50%;
        transform: translateY(-50%);
        color: #98a2b3;
        font-size: 10px;
        pointer-events: none;
    }


/* =========================
   QUICK SIZE BUTTONS
   ========================= */

.quick-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 13px 0 19px;
}

    .quick-sizes button {
        padding: 7px 9px;
        border: 1px solid var(--border);
        border-radius: 7px;
        background: #ffffff;
        color: #667085;
        font-size: 10px;
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

        .quick-sizes button:hover {
            border-color: #aaa4e9;
            background: var(--accent-soft);
            color: var(--accent-dark);
        }


/* =========================
   GENERATE BUTTON
   ========================= */

.create-button {
    width: 100%;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 10px;
    background: linear-gradient( 100deg, #7067df, #5e8be8 );
    color: #ffffff;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 91, 219, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

    .create-button:hover {
        filter: brightness(1.04);
        box-shadow: 0 13px 30px rgba(99, 91, 219, 0.24);
        transform: translateY(-1px);
    }

    .create-button:active {
        transform: translateY(0);
    }

.arrow {
    font-size: 18px;
}

.hint {
    margin: 11px 0 0;
    color: #98a2b3;
    font-size: 10px;
    text-align: center;
}


/* =========================
   PREVIEW
   ========================= */

.iframe-shell {
    width: 100%;
    min-height: 430px;
    height: calc(100% - 72px);
    display: grid;
    place-items: center;
    padding: 22px;
    overflow: auto;
    border: 1px dashed #cfd6e2;
    border-radius: 13px;
    background: linear-gradient( 45deg, #f2f4f8 25%, transparent 25% ), linear-gradient( -45deg, #f2f4f8 25%, transparent 25% ), linear-gradient( 45deg, transparent 75%, #f2f4f8 75% ), linear-gradient( -45deg, transparent 75%, #f2f4f8 75% );
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}



#previewFrame {
    border: none;
    transform-origin: center center;
    position: absolute;
}
/*#previewFrame {
    display: block;
    width: 800px;
    height: 450px;
    max-width: 100%;
    flex: 0 0 auto;
    border: 0;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(28, 39, 66, 0.18);
}*/


/* =========================
   FEATURES
   ========================= */

.features,
.faq {
    width: min(1200px, 90%);
    margin: 105px auto 0;
}

.section-title {
    margin-bottom: 26px;
}

    .section-title h2 {
        margin: 7px 0 0;
        color: var(--heading);
        font-size: 30px;
        letter-spacing: -1px;
    }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.feature-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 28px rgba(28, 39, 66, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .feature-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(28, 39, 66, 0.08);
    }

.feature-number {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}

.feature-card h3 {
    margin: 35px 0 9px;
    color: var(--heading);
    font-size: 18px;
}

.feature-card p,
.faq p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}


/* =========================
   FAQ
   ========================= */

.faq-list {
    border-top: 1px solid var(--border);
}

details {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

summary {
    cursor: pointer;
    color: #344054;
    font-size: 14px;
    font-weight: 650;
}

details p {
    padding: 13px 25px 0 0;
}


/* =========================
   FOOTER
   ========================= */

footer {
    width: 90%;
    margin: 100px auto 0;
    padding: 25px 0 35px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    color: #98a2b3;
    font-size: 11px;
}

.footer-brand {
    color: #475467;
    font-weight: 700;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 850px) {

    .topbar {
        padding: 0 4%;
    }

    .nav-menu {
        display: none;
    }

    .hero {
        padding-top: 55px;
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .iframe-shell {
        min-height: 330px;
    }
}


@media (max-width: 500px) {

    .hero h1 {
        letter-spacing: -1.8px;
    }

    .dimensions {
        grid-template-columns: 1fr;
    }

    .header-button {
        display: none;
    }

    .workspace,
    .features,
    .faq {
        width: 92%;
    }

    .control-panel,
    .preview-panel {
        padding: 18px;
    }

    .hero {
        padding-left: 4%;
        padding-right: 4%;
    }

    .hero-text {
        font-size: 14px;
    }

    footer {
        flex-direction: column;
        gap: 6px;
    }
}
/* =========================
   SELECT
   ========================= */

.input-wrap select {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 12px;
    border: 1px solid var(--border-strong);
    outline: none;
    border-radius: 10px;
    background-color: var(--input);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    /* Custom dropdown arrow */
    background-image: linear-gradient(45deg, transparent 50%, #98a2b3 50%), linear-gradient(135deg, #98a2b3 50%, transparent 50%);
    background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

    .input-wrap select:hover {
        border-color: #aaa4e9;
    }

    .input-wrap select:focus {
        border-color: #918ae6;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(99, 91, 219, 0.09);
    }

    .input-wrap select option {
        background: #ffffff;
        color: var(--text);
    }
.dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 17px;
}
@media (max-width: 600px) {
    .dimensions {
        grid-template-columns: 1fr;
    }
}
/* =========================
   ERROR DIALOG
   ========================= */

.error-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

    .error-dialog-overlay.show {
        display: flex;
    }

.error-dialog {
    width: min(420px, 100%);
    display: grid;
    grid-template-columns: 46px 1fr;
    column-gap: 16px;
    row-gap: 20px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e7f0;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.18);
    animation: errorDialogShow 0.18s ease-out;
}

@keyframes errorDialogShow {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Error icon */

.error-dialog-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    font-size: 20px;
    font-weight: 800;
}


/* Content */

.error-dialog-content h3 {
    margin: 1px 0 7px;
    color: #101828;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.error-dialog-content p {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.6;
}


/* OK button */

.error-dialog-close {
    grid-column: 2;
    justify-self: end;
    min-width: 72px;
    padding: 9px 17px;
    border: 0;
    border-radius: 8px;
    background: #635bdb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

    .error-dialog-close:hover {
        background: #5148c7;
        transform: translateY(-1px);
    }

    .error-dialog-close:active {
        transform: translateY(0);
    }

/* =========================
           VIDEO GENERATION PAGE
           ========================= */

.generation-page {
    width: min(900px, 90%);
    margin: 0 auto;
    padding: 58px 0 80px;
}

.generation-hero {
    text-align: center;
    margin-bottom: 34px;
}

    .generation-hero h1 {
        margin: 13px 0 12px;
        color: var(--heading);
        font-size: clamp(32px, 5vw, 48px);
        line-height: 1.05;
        letter-spacing: -2px;
    }

        .generation-hero h1 span {
            background: linear-gradient(90deg, #6258d9, #0f9f8f);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

    .generation-hero p {
        max-width: 590px;
        margin: 0 auto;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.7;
    }

.generation-card {
    position: relative;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

    .generation-card::before {
        content: "";
        position: absolute;
        width: 380px;
        height: 380px;
        top: -210px;
        right: -130px;
        border-radius: 50%;
        background: rgba(99, 91, 219, 0.07);
        pointer-events: none;
    }

    .generation-card::after {
        content: "";
        position: absolute;
        width: 280px;
        height: 280px;
        bottom: -180px;
        left: -100px;
        border-radius: 50%;
        background: rgba(15, 159, 143, 0.05);
        pointer-events: none;
    }

.generation-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    text-align: center;
}

/* Loading state */

#loadingState {
    display: block;
}

.generation-spinner {
    width: 58px;
    height: 58px;
    margin: 0 auto 25px;
    border: 5px solid #e9eaf5;
    border-top-color: var(--accent);
    border-right-color: #5e8be8;
    border-radius: 50%;
    animation: generationSpin 0.9s linear infinite;
}

@keyframes generationSpin {
    to {
        transform: rotate(360deg);
    }
}

.generation-title {
    margin: 0;
    color: var(--heading);
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -0.7px;
}

.generation-message {
    margin: 10px auto 0;
    max-width: 480px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.generation-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: #667085;
    font-size: 11px;
    font-weight: 650;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: statusPulse 1.4s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: .35;
        transform: scale(.8);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.generation-progress {
    width: min(430px, 100%);
    height: 5px;
    margin: 27px auto 0;
    overflow: hidden;
    border-radius: 10px;
    background: #edf0f6;
}

.generation-progress-bar {
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7067df, #5e8be8, #0f9f8f);
    animation: progressMove 1.7s ease-in-out infinite;
}

@keyframes progressMove {
    0% {
        transform: translateX(-130%);
    }

    100% {
        transform: translateX(390%);
    }
}

/* Ready state */

#readyState {
    display: none;
}

.ready-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid #dcd9ff;
    color: var(--accent);
    font-size: 27px;
    font-weight: 800;
}

.ready-title {
    margin: 0;
    color: var(--heading);
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -0.7px;
}

.ready-message {
    margin: 9px 0 23px;
    color: var(--muted);
    font-size: 13px;
}

.video-shell {
    width: min(760px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #111827;
    box-shadow: 0 14px 38px rgba(28, 39, 66, 0.13);
}

#resultVideo {
    display: block;
    width: 100%;
    max-height: 55vh;
    background: #000;
}

.video-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 19px;
}

.download-video-button {
    min-width: 145px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(100deg, #7067df, #5e8be8);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 91, 219, 0.18);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

    .download-video-button:hover {
        filter: brightness(1.04);
        transform: translateY(-1px);
        box-shadow: 0 13px 30px rgba(99, 91, 219, 0.24);
    }

.secondary-button {
    min-width: 115px;
    padding: 10px 17px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: #fff;
    color: #596579;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

    .secondary-button:hover {
        border-color: #aaa4e9;
        background: var(--accent-soft);
        color: var(--accent-dark);
    }

/* Error state */

#errorState {
    display: none;
}

.generation-error-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    font-size: 26px;
    font-weight: 800;
}

.error-title-page {
    margin: 0;
    color: var(--heading);
    font-size: 23px;
    letter-spacing: -0.5px;
}

.error-message-page {
    max-width: 500px;
    margin: 9px auto 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* Footer text */

.generation-note {
    margin-top: 20px;
    color: #98a2b3;
    text-align: center;
    font-size: 10px;
}

@media (max-width: 600px) {
    .generation-page {
        width: 92%;
        padding-top: 40px;
    }

    .generation-card {
        min-height: 400px;
        padding: 25px 18px;
    }

    .generation-hero h1 {
        letter-spacing: -1.5px;
    }

    .generation-hero p {
        font-size: 13px;
    }
}
/* =========================
   EARLY ACCESS BAR
   ========================= */

.early-access-bar {
    width: 100%;
    min-height: 42px;
    padding: 8px 5%;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    background: rgba(99, 91, 219, 0.045);
    border-bottom: 1px solid rgba(99, 91, 219, 0.12);

    color: #667085;
    font-size: 11px;
    line-height: 1.5;
}

.early-access-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
}

.early-access-badge {
    flex: 0 0 auto;

    padding: 4px 7px;

    border: 1px solid #dcd9ff;
    border-radius: 6px;

    background: #eeedff;
    color: #5950d0;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.early-access-feedback {
    flex: 0 0 auto;

    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.early-access-feedback:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}


@media (max-width: 600px) {

    .early-access-bar {
        padding: 9px 4%;
    }

    .early-access-content {
        align-items: flex-start;
    }

    .early-access-feedback {
        display: none;
    }

    .early-access-bar {
        font-size: 10px;
    }
}