/* ===================================
   AI VIDEO DEMO - MODERN WIZARD (B2B APP SIMULATION)
   =================================== */

.ai-demo-section {
    padding: 80px 0 20px 0;
    background: transparent;
    position: relative;
    overflow: visible;
}

/* Background Effect */
.ai-demo-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ===================================
   APP CONTAINER (The "Device" / "Window")
   =================================== */

.ai-app-container {
    background: #ffffff;
    border-radius: 24px;
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 600px;
    transition: all 0.3s ease;
}

/* App Header / Stepper */
.ai-app-header {
    padding: 24px 40px;
    border-bottom: 1px solid #f3f4f6;
    background: #ffffff;
    z-index: 10;
}

.wizard-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

/* Connecting Line */
.wizard-stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
    z-index: 0;
}

.step-item {
    position: relative;
    z-index: 1;
    background: #ffffff;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    /* Optional: allow clicking to go back */
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Active State */
.step-item.active .step-circle {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.step-item.active .step-label {
    color: #8b5cf6;
}

/* Completed State */
.step-item.completed .step-circle {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: #ffffff;
}

.step-item.completed .step-label {
    color: #111827;
}

/* ===================================
   WIZARD CONTENT AREA
   =================================== */

.ai-app-body {
    flex: 1;
    position: relative;
    /* Allow scrolling if content overflows */
    overflow-y: auto;
    overflow-x: hidden;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
}

.wizard-step {
    /* Default state: hidden and absolute to not take up space */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Align to top */
    visibility: hidden;
    /* Ensure it's truly hidden */
}

.wizard-step.active {
    /* Active state: relative to take up space and expand container */
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    z-index: 5;
    visibility: visible;
}

/* Previous step slides out to left */
.wizard-step.prev {
    position: absolute;
    /* Keep absolute while exiting */
    transform: translateX(-20px);
    opacity: 0;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    text-align: center;
}

.step-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 32px;
    text-align: center;
    max-width: 500px;
}

/* ===================================
   STEP 1: UPLOAD
   =================================== */

.upload-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 20px;
    /* Add spacing at bottom */
}

.upload-area-large {
    width: 100%;
    height: 200px;
    /* Reduced height */
    border: 3px dashed #9ca3af;
    /* Thicker border */
    border-radius: 20px;
    background: #ffffff;
    /* White background for better contrast */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.upload-area-large:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.1);
}

.upload-icon-large {
    width: 80px;
    height: 80px;
    color: #8b5cf6;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(139, 92, 246, 0.2));
}

.upload-area-large:hover .upload-icon-large {
    color: #6d28d9;
    transform: scale(1.1);
}

.upload-text-main {
    font-size: 20px;
    /* Even larger */
    font-weight: 800;
    color: #111827;
}

.upload-text-sub {
    font-size: 15px;
    color: #4b5563;
    font-weight: 600;
}

/* Image Preview Grid (Modern) */
.preview-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    width: 100%;
}

.preview-item-modern {
    position: relative;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
}

.preview-item-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* ===================================
   STEP 2: VOICE
   =================================== */

.voice-selection-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns */
    gap: 12px;
    width: 100%;
    max-width: 800px;
    /* Wider container */
}

.voice-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.voice-option:hover {
    border-color: #a855f7;
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.voice-option.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.voice-option.active::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent #8b5cf6 transparent transparent;
}

.voice-avatar-large {
    width: 48px;
    /* Slightly smaller */
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    /* Ensure image covers area */
    margin-right: 12px;
    /* Reduced margin */
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #f3f4f6;
    /* Fallback color */
}

.voice-avatar-large svg {
    width: 28px;
    height: 28px;
    color: white;
}

.voice-details {
    flex: 1;
    min-width: 0;
    /* Prevent text overflow */
}

.voice-name {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    display: block;
    margin-bottom: 4px;
}

.voice-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.voice-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.voice-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 12px;
}

.voice-option:hover .voice-play-btn {
    background: #8b5cf6;
    color: white;
    transform: scale(1.05);
}

@media (max-width: 640px) {
    .voice-selection-container {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

/* ===================================
   STEP 3: STYLE
   =================================== */

.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    /* Reduced gap */
    width: 100%;
    max-width: 800px;
}

.style-card {
    background: #ffffff;
    border-radius: 12px;
    /* Smaller radius */
    overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.style-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #a855f7;
}

.style-card.active {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.style-preview {
    height: 120px;
    /* Reduced height */
    background: #000;
    position: relative;
}

.style-preview video,
.style-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.style-card:hover .style-preview video,
.style-card:hover .style-preview-img {
    opacity: 1;
}

.style-info {
    padding: 12px;
    /* Reduced padding */
    text-align: center;
}

.style-name {
    font-weight: 700;
    color: #111827;
    font-size: 14px;
    /* Smaller font */
}

/* ===================================
   STEP 4: INFO & GENERATE
   =================================== */

.info-form {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

.form-input-modern {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-input-modern:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* ===================================
   APP FOOTER / NAVIGATION
   =================================== */

.ai-app-footer {
    padding: 20px 40px;
    background: #ffffff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.nav-btn {
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn-back {
    background: transparent;
    color: #6b7280;
    border: 1px solid transparent;
}

.nav-btn-back:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-btn-next {
    background: #111827;
    color: #ffffff;
    border: none;
}

.nav-btn-next:hover {
    background: #000000;
    transform: translateY(-1px);
}

.nav-btn-next:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.nav-btn-generate {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.nav-btn-generate:hover {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .ai-app-container {
        border-radius: 0;
        min-height: auto;
        /* Remove full screen on mobile */
        margin: 0;
    }

    .ai-app-header {
        padding: 16px 20px;
    }

    .wizard-step {
        padding: 20px;
    }

    .style-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
    }

    .ai-app-footer {
        padding: 16px 20px;
        position: relative;
        /* Not fixed anymore */
        width: 100%;
        border-top: 1px solid #f3f4f6;
        background: white;
    }

    .ai-app-body {
        padding-bottom: 20px;
    }

    .step-label {
        display: none;
        /* Hide labels on mobile, show only circles */
    }
}