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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --text: #2d3748;
    --text-light: #718096;
    --bg: #f7fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

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

.built-with {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.3s;
}

.built-with:hover {
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea15, #764ba215);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.video-preview {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.preview-avatars {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    position: relative;
    transition: transform 0.3s;
}

.avatar.speaking {
    animation: speak 0.5s ease-in-out infinite;
}

.avatar-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #9ca3af;
    border-radius: 50%;
}

@keyframes speak {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.waveform {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 40px;
}

.wave-bar {
    width: 4px;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; height: 20px; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 30px; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 25px; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 35px; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; height: 28px; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* Generator Section */
.generator-section {
    padding: 4rem 0;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.generator-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.generator-sidebar {
    background: var(--bg);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.step.active {
    background: var(--primary);
    color: white;
}

.step:hover:not(.active) {
    background: var(--white);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step.active .step-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.step-label {
    font-weight: 500;
}

.generator-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

.step-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.next-btn, .prev-btn, .generate-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.next-btn, .generate-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.next-btn:hover, .generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.prev-btn {
    background: var(--bg);
    color: var(--text);
    margin-right: 1rem;
}

.prev-btn:hover {
    background: var(--border);
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.generate-btn {
    width: 100%;
    font-size: 1.125rem;
    padding: 1rem;
    margin-top: 2rem;
}

.btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Audio Upload */
.audio-upload-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.audio-upload-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.audio-upload-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.upload-zone svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.upload-zone span {
    display: block;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-zone small {
    color: var(--text-light);
}

.audio-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 6px;
}

/* Avatar Selection */
.avatar-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.avatar-option {
    text-align: center;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.avatar-option:hover {
    border-color: var(--primary);
}

.avatar-option.selected {
    border-color: var(--primary);
    background: var(--bg);
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    position: relative;
    overflow: hidden;
}

.avatar-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #4a5568;
}

.business-man { background: linear-gradient(135deg, #cbd5e0, #a0aec0); }
.business-woman { background: linear-gradient(135deg, #fed7e2, #fbb6ce); }
.casual-man { background: linear-gradient(135deg, #bee3f8, #90cdf4); }
.casual-woman { background: linear-gradient(135deg, #c6f6d5, #9ae6b4); }
.professor { background: linear-gradient(135deg, #e9d8fd, #d6bcfa); }
.student { background: linear-gradient(135deg, #feebc8, #fbd38d); }

.avatar-option span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Generation Summary */
.generation-summary {
    background: var(--bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item label {
    font-weight: 600;
    color: var(--text-light);
}

/* Preview Section */
.preview-section {
    padding: 4rem 0;
    background: var(--bg);
}

.video-player {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.video-player video {
    width: 100%;
    height: auto;
}

.video-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.share-btn {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.edit-btn {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    color: #a0aec0;
    margin-top: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-links a {
    display: block;
    color: #a0aec0;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    text-align: center;
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .generator-container {
        grid-template-columns: 1fr;
    }
    
    .generator-sidebar {
        display: flex;
        overflow-x: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .step {
        min-width: 120px;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .avatar-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav {
        display: none;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--text);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s;
}

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

.toast.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.toast.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.toast.info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}