:root {
    /* Primary Colors */
    --preview-primary: #667eea;
    --preview-secondary: #764ba2;
    --preview-accent: #f093fb;

    /* Gradient Backgrounds */
    --preview-gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --preview-gradient-card: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --preview-gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    /* Shadows */
    --preview-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --preview-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --preview-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
    --preview-shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    /* Animations */
    --preview-transition-fast: 0.2s ease;
    --preview-transition-normal: 0.3s ease;
    --preview-transition-slow: 0.5s ease;
}

/* Modal Backdrop */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--preview-transition-normal), visibility var(--preview-transition-normal);
}

.preview-modal.active {
    opacity: 1;
    visibility: visible;
}

.preview-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

/* Modal Container */
.preview-container {
    position: relative;
    width: 95%;
    max-width: 1400px;
    max-height: 95vh;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--preview-shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--preview-transition-slow);
}

.preview-modal.active .preview-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #374151;
    transition: all var(--preview-transition-fast);
    box-shadow: var(--preview-shadow-sm);
}

.preview-close:hover {
    background: white;
    transform: rotate(90deg);
    color: #ef4444;
}

/* Content Layout */
.preview-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 90vh;
    max-height: 95vh;
}

/* Left Panel - Video */
.preview-left-panel {
    background: #0f172a;
    position: relative;
    display: flex;
    flex-direction: column;
}

.preview-video-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.preview-video-container video,
.preview-video-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity var(--preview-transition-normal);
}

.preview-video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--preview-gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--preview-transition-normal);
    box-shadow: var(--preview-shadow-glow);
}

.play-button-large i {
    color: white;
    font-size: 2.5rem;
    margin-left: 8px;
}

.play-button-large:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(102, 126, 234, 0.5);
}

/* Video Progress */
.preview-video-progress {
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-video-progress .progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.preview-video-progress .progress-fill {
    height: 100%;
    background: var(--preview-gradient-hero);
    transition: width var(--preview-transition-normal);
}

.preview-badge {
    background: var(--preview-gradient-success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Right Panel - Info */
.preview-right-panel {
    padding: 2.5rem;
    overflow-y: auto;
    max-height: 95vh;
}

/* Header */
.preview-header {
    margin-bottom: 1.5rem;
}

.preview-category {
    display: inline-block;
    background: var(--preview-gradient-hero);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.preview-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.preview-subtitle {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

/* Instructor Card */
.preview-instructor-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--preview-gradient-card);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.instructor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: var(--preview-shadow-sm);
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructor-details h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.instructor-details p {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.instructor-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
}

.instructor-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.instructor-stats i {
    color: var(--preview-primary);
}

/* Stats Grid */
.preview-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all var(--preview-transition-fast);
}

.stat-item:hover {
    border-color: var(--preview-primary);
    transform: translateY(-2px);
    box-shadow: var(--preview-shadow-sm);
}

.stat-item i {
    font-size: 1.25rem;
    color: var(--preview-primary);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

/* Curriculum */
.preview-curriculum {
    margin-bottom: 1.5rem;
}

.preview-curriculum h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.curriculum-accordion {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.curriculum-accordion::-webkit-scrollbar {
    width: 6px;
}

.curriculum-accordion::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.curriculum-accordion::-webkit-scrollbar-thumb {
    background: var(--preview-primary);
    border-radius: 3px;
}

/* Module Item */
.module-preview-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all var(--preview-transition-fast);
}

.module-preview-item:hover {
    border-color: var(--preview-primary);
    box-shadow: var(--preview-shadow-sm);
}

.module-header {
    padding: 1rem;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.module-header .module-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

.module-lessons {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--preview-transition-normal);
}

.module-lessons.expanded {
    max-height: 500px;
    padding: 0.5rem 0;
}

.lesson-preview-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background var(--preview-transition-fast);
}

.lesson-preview-item:hover {
    background: #f1f5f9;
}

.lesson-preview-item i {
    color: var(--preview-primary);
    font-size: 0.9rem;
}

.lesson-preview-item span {
    font-size: 0.85rem;
    color: #374151;
}

.lesson-preview-item .duration {
    margin-left: auto;
    font-size: 0.75rem;
    color: #64748b;
}

/* CTA Section */
.preview-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--preview-gradient-card);
    border-radius: 16px;
    margin-top: auto;
}

.price-display {
    text-align: left;
}

.price-free {
    font-size: 2rem;
    font-weight: 800;
    background: var(--preview-gradient-success);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-amount {
    font-size: 2rem;
    font-weight: 800;
    background: var(--preview-gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-enroll-now {
    background: var(--preview-gradient-hero);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--preview-transition-fast);
    border: none;
    cursor: pointer;
}

.btn-enroll-now:hover {
    transform: translateY(-2px);
    box-shadow: var(--preview-shadow-glow);
}

.btn-add-wishlist {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #64748b;
    transition: all var(--preview-transition-fast);
}

.btn-add-wishlist:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-add-wishlist.active {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

/* Additional curriculum styles */
.free-badge {
    background: var(--preview-gradient-success);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.module-chevron {
    transition: transform var(--preview-transition-fast);
}

.preview-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.preview-prompt-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: var(--preview-shadow-lg);
}

.prompt-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--preview-gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.prompt-icon i {
    font-size: 2rem;
    color: white;
}

.preview-prompt-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.preview-prompt-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-continue-preview {
    background: transparent;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all var(--preview-transition-fast);
}

.btn-continue-preview:hover {
    border-color: var(--preview-primary);
    color: var(--preview-primary);
}

/* Video preview specific styles */
.upgrade-prompt {
    text-align: center;
    color: white;
    padding: 2rem;
}

.upgrade-prompt i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.upgrade-prompt h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.upgrade-prompt p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.upgrade-prompt .btn-enroll-now {
    background: white;
    color: var(--preview-primary);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--preview-transition-fast);
}

.upgrade-prompt .btn-enroll-now:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

/* Instructor showcase styles */
.instructor-showcase {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.instructor-header-detailed {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.instructor-avatar-large {
    position: relative;
    width: 100px;
    height: 100px;
}

.instructor-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--preview-shadow-md);
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--preview-gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
}

.verified-badge i {
    color: white;
    font-size: 0.9rem;
}

.instructor-info-detailed h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.instructor-title {
    color: var(--preview-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.instructor-bio {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.instructor-stats-detailed {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all var(--preview-transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--preview-shadow-sm);
}

.stat-card i {
    font-size: 1.25rem;
    color: var(--preview-primary);
    margin-bottom: 0.5rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-content .stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-content .stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

.instructor-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    transition: all var(--preview-transition-fast);
}

.social-link:hover {
    background: var(--preview-gradient-hero);
    color: white;
    transform: translateY(-2px);
}

/* Reviews section styles */
.reviews-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.reviews-header-detailed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.reviews-header-detailed h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reviews-header-detailed h3 i {
    color: #fbbf24;
}

.rating-summary-detailed {
    text-align: right;
}

.rating-big {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rating-number-big {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--preview-gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rating-stars {
    margin: 0.25rem 0;
}

.rating-count {
    font-size: 0.8rem;
    color: #64748b;
}

.reviews-list-detailed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card-modern {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    transition: all var(--preview-transition-fast);
}

.review-card-modern:hover {
    border-color: var(--preview-primary);
    box-shadow: var(--preview-shadow-sm);
}

.reviewer-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-rating {
    display: flex;
    gap: 0.125rem;
}

.review-rating i {
    font-size: 0.75rem;
}

.review-date {
    font-size: 0.75rem;
    color: #64748b;
}

.review-text-content {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.review-helpful {
    display: flex;
    justify-content: flex-end;
}

.helpful-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #64748b;
    cursor: pointer;
    transition: all var(--preview-transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.helpful-btn:hover {
    border-color: var(--preview-primary);
    color: var(--preview-primary);
}

.view-all-reviews {
    width: 100%;
    background: transparent;
    border: 2px solid #e2e8f0;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all var(--preview-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.view-all-reviews:hover {
    border-color: var(--preview-primary);
    color: var(--preview-primary);
}

/* Mobile-specific styles for preview */
@media (max-width: 1024px) {
    .preview-content {
        grid-template-columns: 1fr;
    }

    .preview-left-panel {
        max-height: 50vh;
    }

    .preview-right-panel {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .preview-modal {
        padding: 0;
    }

    .preview-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .preview-content {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .preview-left-panel {
        height: 40vh;
        min-height: 250px;
    }

    .preview-right-panel {
        flex: 1;
        overflow-y: auto;
        padding: 1.5rem;
    }

    .preview-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .preview-title {
        font-size: 1.5rem;
    }

    .preview-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .instructor-stats-detailed {
        grid-template-columns: repeat(2, 1fr);
    }

    .instructor-showcase {
        padding: 1.5rem;
    }

    .instructor-header-detailed {
        flex-direction: column;
        text-align: center;
    }

    .instructor-avatar-large {
        margin: 0 auto;
    }

    .curriculum-accordion {
        max-height: 200px;
    }

    .preview-cta {
        flex-direction: column;
        text-align: center;
    }

    .price-display {
        margin-bottom: 1rem;
    }

    .cta-buttons {
        width: 100%;
        flex-direction: column;
        justify-content: center;
    }

    .btn-enroll-now {
        width: 100%;
        justify-content: center;
    }

    .btn-add-wishlist {
        width: 100%;
    }

    .swipe-indicator {
        display: block;
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.8rem;
        z-index: 100;
    }
}

/* Touch-friendly interactions */
@media (hover: none) {
    .content-item:hover {
        transform: none;
    }

    .module-preview-item:hover {
        box-shadow: none;
    }

    .stat-item:hover {
        transform: none;
    }

    .review-card-modern:hover {
        border-color: #e2e8f0;
        box-shadow: none;
    }
}