/* ============================================
   ART AI STUDIO — MAIN STYLESHEET
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6c4aff;
    --primary-dark: #4a2fe0;
    --primary-light: #8a6fff;
    --accent: #ff4a9e;
    --accent-2: #4ad9ff;
    --bg-1: #f7f8ff;
    --bg-2: #eef1ff;
    --text: #1a1a3a;
    --text-soft: #4a4a6e;
    --text-muted: #7a7a9e;
    --white: #ffffff;
    --border: #e0e5ff;
    --shadow-sm: 0 4px 14px rgba(40, 40, 120, 0.06);
    --shadow-md: 0 12px 32px -8px rgba(40, 40, 120, 0.14);
    --shadow-lg: 0 30px 60px -20px rgba(40, 40, 120, 0.28);
    --radius: 28px;
    --radius-sm: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 100%);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND BLOBS ===== */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: float 22s infinite ease-in-out;
}

.blob-1 {
    width: 480px;
    height: 480px;
    background: #8a6fff;
    top: -160px;
    left: -120px;
}

.blob-2 {
    width: 420px;
    height: 420px;
    background: #4ad9ff;
    bottom: -140px;
    right: -100px;
    animation-delay: -7s;
}

.blob-3 {
    width: 380px;
    height: 380px;
    background: #ff4a9e;
    top: 40%;
    left: 45%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -8px var(--primary);
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.35));
}

.logo-icon i {
    color: white;
    font-size: 1.5rem;
    z-index: 1;
}

.logo-text h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.nav-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.badge i {
    color: var(--primary);
    font-size: 0.8rem;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 2.5rem 1rem 3rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.4rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.8rem;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(108, 74, 255, 0.1); }
    50% { box-shadow: 0 4px 24px rgba(108, 74, 255, 0.3); }
}

.hero h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    max-width: 950px;
    margin: 0 auto 1.2rem;
    color: var(--text);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-soft);
    max-width: 720px;
    margin: 0 auto 2rem;
    font-weight: 400;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 0.55rem 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    color: var(--text);
    transition: transform 0.2s ease;
}

.hero-tags span:hover {
    transform: translateY(-3px);
}

.hero-tags span i {
    margin-right: 6px;
    color: var(--primary);
}

/* ===== STUDIO CARD ===== */
.studio-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 48px;
    padding: 2.5rem 2.5rem 2.8rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.75);
    margin-bottom: 3rem;
}

.studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.studio-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
}

.studio-header h3 i {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 10px;
    border-radius: 14px;
    font-size: 1rem;
    box-shadow: 0 8px 20px -6px var(--primary);
}

.feature-pills {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.feature-pills span {
    background: #f0f3ff;
    padding: 0.35rem 0.9rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-dark);
    border: 1px solid #d0d9ff;
}

/* ===== EDITOR GRID ===== */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 1rem;
}

/* ===== STORY AREA ===== */
.story-area label {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.story-area label i {
    color: var(--primary);
}

.story-input {
    width: 100%;
    padding: 1.3rem 1.5rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: white;
    font-size: 1rem;
    line-height: 1.65;
    resize: vertical;
    min-height: 220px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    color: var(--text);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
}

.story-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 74, 255, 0.15);
}

.story-input::placeholder {
    color: #9a9ab8;
}

.char-count {
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.char-count span {
    font-weight: 600;
    color: var(--primary);
}

/* ===== CONTROLS ===== */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.6rem 0 0.5rem;
    align-items: center;
}

.btn {
    border: none;
    background: white;
    padding: 0.85rem 1.6rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
}

.btn i {
    font-size: 1rem;
    color: var(--primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    color: white;
    box-shadow: 0 12px 24px -8px rgba(108, 74, 255, 0.55);
}

.btn-primary i {
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 18px 30px -8px rgba(108, 74, 255, 0.7);
}

.btn-secondary:hover {
    background: #f5f8ff;
    border-color: #b6c2ff;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* ===== SIDE PANEL ===== */
.side-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 36px;
    padding: 1.8rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1.7rem;
}

.panel-block h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.panel-block h4 i {
    color: var(--primary);
    font-size: 0.9rem;
}

.duration-options {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.duration-btn,
.lang-btn {
    background: #f2f5ff;
    border: 1px solid #d0d9ff;
    padding: 0.55rem 1rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-soft);
    font-family: inherit;
}

.duration-btn.active,
.lang-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 18px -6px var(--primary);
}

.duration-btn:hover:not(.active),
.lang-btn:hover:not(.active) {
    background: #e3e9ff;
    border-color: var(--primary-light);
}

.lang-switch {
    display: flex;
    gap: 0.6rem;
}

.lang-btn {
    flex: 1;
    padding: 0.65rem 0;
    text-align: center;
}

.feature-list {
    list-style: none;
    font-size: 0.88rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-soft);
}

.feature-list i {
    color: #22c55e;
    font-size: 0.95rem;
    width: 18px;
}

/* ===== PREVIEW SECTION ===== */
.preview-section {
    margin-top: 2.5rem;
    border-top: 1.5px dashed #cdd6ff;
    padding-top: 2rem;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.preview-header h4 {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.preview-header h4 i {
    color: var(--primary);
}

.preview-meta {
    background: #e8edff;
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.video-placeholder {
    background: linear-gradient(145deg, #0f0f1f, #1a1a3a);
    border-radius: 32px;
    padding: 3rem 2rem 2rem;
    text-align: center;
    color: #b9c2ff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 260px;
    border: 1px solid #2f2f6e;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.video-placeholder::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
    opacity: 0.6;
}

.video-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(108, 74, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(108, 74, 255, 0.3);
}

.video-icon-wrap i {
    font-size: 2.4rem;
    color: #8a8aff;
}

.video-placeholder p {
    font-size: 1rem;
    max-width: 500px;
    color: #a9b2ff;
    line-height: 1.6;
}

.generated-note {
    font-size: 0.85rem;
    color: #7ee0a3;
    margin-top: 0.4rem;
    font-weight: 500;
}

/* Fake video controls */
.fake-controls {
    display: none;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin-top: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fake-controls i {
    color: #b9c2ff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}

.fake-controls i:hover {
    color: white;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    width: 35%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    animation: progressAnim 6s infinite alternate;
}

@keyframes progressAnim {
    from { width: 5%; }
    to { width: 95%; }
}

.fake-controls .time {
    font-size: 0.75rem;
    color: #b9c2ff;
    white-space: nowrap;
}

/* ===== FEATURES GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.feature-card i {
    font-size: 1.8rem;
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(108, 74, 255, 0.12), rgba(255, 74, 158, 0.12));
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== AD SLOT ===== */
.ad-slot {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 1.4rem 2rem;
    margin: 2.5rem 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px dashed #b7c2ff;
    text-align: center;
    flex-wrap: wrap;
}

.ad-slot i {
    font-size: 1.4rem;
    color: var(--primary);
}

/* ===== FOOTER ===== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid #dadfff;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.footer-left p {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.logo.small {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    font-size: 1rem;
}

.logo.small i {
    color: var(--primary);
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 500;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a i {
    color: var(--primary);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .side-panel {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.2rem;
    }

    .panel-block {
        flex: 1 1 200px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1rem 1rem 2rem;
    }

    .hero h2 {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 1rem;
    }

    .studio-card {
        padding: 1.6rem 1.2rem;
        border-radius: 32px;
    }

    .studio-header h3 {
        font-size: 1.2rem;
    }

    .controls {
        gap: 0.6rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
        flex: 1 1 auto;
        justify-content: center;
    }

    .fake-controls {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        gap: 1rem;
    }

    .logo-text h1 {
        font-size: 1.15rem;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
}
