/* Premium Course Preview Modal Styles */
.course-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.course-preview-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.course-preview-modal {
    background: var(--card-bg, #1a1a1a);
    width: 100%;
    max-width: 480px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

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

/* Modal Header (Purple Gradient like the screenshot) */
.preview-header {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    color: white;
}

.preview-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.preview-icon-wrapper {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.preview-icon-wrapper i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modal Body */
.preview-body {
    padding: 1.25rem 1.5rem 1.5rem;
    background: #232323;
    color: #e5e5e5;
}

[data-theme="light"] .preview-body {
    background: white;
    color: #333;
}

.preview-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a78bfa;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.preview-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.3;
    color: white;
}

[data-theme="light"] .preview-title {
    color: #1a1a1a;
}

.preview-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .preview-metrics {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 600;
}

.metric-value {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="light"] .metric-value {
    color: #1a1a1a;
}

.metric-stars {
    color: #fbbf24;
    font-size: 0.8rem;
}

.preview-description {
    margin-bottom: 1rem;
}

.preview-description-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
    font-size: 0.9rem;
}

[data-theme="light"] .preview-description-title {
    color: #1a1a1a;
}

.preview-description-title i {
    color: #3b82f6;
}

.preview-description p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #d1d5db;
    margin-bottom: 0;
}

[data-theme="light"] .preview-description p {
    color: #4b5563;
}

/* Modal Actions */
.preview-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .preview-actions {
    border-top-color: #e2e8f0;
}

.btn-preview {
    flex: 1;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.btn-preview-access {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .btn-preview-access {
    background: white;
    color: #374151;
    border-color: #d1d5db;
}

.btn-preview-access:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .btn-preview-access:hover {
    background: #f3f4f6;
}

.btn-preview-enroll {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-preview-enroll:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

@media (max-width: 640px) {
    .preview-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 1rem;
    }
    
    .preview-actions {
        flex-direction: column;
    }
}
