:root {
    --primary-color: #8BADC4;
    --secondary-color: #A3CDC3;
    --accent-color: #C8D9BD;
    --success-color: #A3CDC3;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --background: #FFFFFF;
    --surface: #f8f9fa;
    --border: #e0e0e0;
    --hover: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #F5EDD6 0%, #C8D9BD 50%, #A3CDC3 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--background);
    border-radius: 28px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    background: linear-gradient(135deg, #8BADC4 0%, #A3CDC3 100%);
    color: white;
    padding: 40px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 30px); }
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

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

.logo h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.header-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Main Content */
.main-content {
    padding: 60px;
}

/* Input Section */
.input-section {
    margin-bottom: 60px;
}

.input-container {
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 32px;
    border: 2px solid var(--border);
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.input-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.idea-input {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    background: white;
}

.idea-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.settings-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.setting-item label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.setting-item select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.setting-item select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.generate-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #8BADC4 0%, #A3CDC3 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
    opacity: 0.9;
}
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.generate-btn:hover::before {
    left: 100%;
}



.generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    transition: var(--transition);
}

.generate-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: start;
    gap: 18px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1.5px solid rgba(139, 173, 196, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(139, 173, 196, 0.1);
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(139, 173, 196, 0.2);
    border-color: rgba(139, 173, 196, 0.4);
}

.info-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8BADC4 0%, #A3CDC3 100%);
    border-radius: 14px;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 173, 196, 0.25);
    transition: all 0.3s ease;
}

.info-card:hover .info-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(139, 173, 196, 0.35);
}

.info-icon svg {
    stroke-width: 2.5;
}

.info-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1.05rem;
    font-weight: 600;
}
}

.info-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Status Section */
.status-section {
    margin-bottom: 60px;
}

.status-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 40px;
    border: 2px solid var(--border);
}

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

.status-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#statusTitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

#statusMessage {
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 32px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s ease;
}

.status-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.4;
    transition: var(--transition);
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: var(--transition);
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Results Section */
.results-section {
    margin-bottom: 60px;
}

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

.results-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.results-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.video-container {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 32px;
    margin-bottom: 24px;
}

.video-player {
    width: 100%;
    aspect-ratio: 9/16;
    max-width: 400px;
    margin: 0 auto 24px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-secondary);
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.detail-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.action-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.4);
}

.action-btn.secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

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

/* Gallery Section */
.gallery-section h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.gallery-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-thumbnail {
    width: 100%;
    aspect-ratio: 9/16;
    background: linear-gradient(135deg, #8BADC4 0%, #A3CDC3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.gallery-info {
    padding: 16px;
}

.gallery-info h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--surface);
    padding: 32px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 16px;
    }

    .header {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .header-subtitle {
        font-size: 0.95rem;
    }

    .main-content {
        padding: 30px 20px;
    }

    .input-container {
        padding: 20px;
    }

    .status-card {
        padding: 24px;
    }

    .status-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 8px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: var(--text-primary);
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #ef4444;
}

.notification.success {
    background: #22c55e;
}

.notification.info {
    background: #3b82f6;
}

/* Hidden utility class */
.hidden {
    display: none !important;
}
