:root {
    --csp-primary: #009acd;
    --csp-primary-light: #33b3d9;
    --csp-primary-dark: #0078a1;
    --csp-bg-light: #F4FAFC;
    --csp-bg-card: #FAFAFA;
    --csp-text-dark: #333;
    --csp-text-medium: #666;
    --csp-text-light: #999;
    --csp-success: #28a745;
    --csp-warning: #ffc107;
    --csp-danger: #dc3545;
    --csp-border: #e0e8f0;
    --csp-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --csp-radius: 12px;
    --csp-radius-sm: 8px;
}

.csp-course-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.csp-course-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.csp-course-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--csp-text-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.csp-course-thumbnail {
    margin-bottom: 25px;
    border-radius: var(--csp-radius);
    overflow: hidden;
}

.csp-course-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.csp-course-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--csp-bg-light);
    border-radius: var(--csp-radius-sm);
}

.csp-meta-item {
    display: flex;
    gap: 8px;
}

.csp-meta-label {
    font-weight: 600;
    color: var(--csp-text-dark);
}

.csp-meta-value {
    color: var(--csp-text-medium);
}

.csp-course-description {
    line-height: 1.8;
    color: #555;
}

.csp-course-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.csp-price-box {
    background: var(--csp-bg-card);
    padding: 30px;
    border-radius: var(--csp-radius);
    border: 2px solid var(--csp-bg-light);
    text-align: center;
}

.csp-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--csp-primary);
    margin-bottom: 25px;
}

.csp-price-currency {
    font-size: 18px;
    color: var(--csp-text-medium);
    margin-right: 8px;
}

.csp-price-free {
    color: var(--csp-success);
}

.csp-discount-section {
    margin-bottom: 20px;
}

.csp-discount-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.csp-discount-section button {
    width: 100%;
    padding: 10px;
    background: var(--csp-bg-light);
    border: 1px solid var(--csp-primary);
    color: var(--csp-primary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.csp-discount-section button:hover {
    background: var(--csp-primary);
    color: white;
}

.csp-discount-success {
    color: var(--csp-success);
    font-weight: 600;
    margin-top: 10px;
    padding: 8px;
    background: #d4edda;
    border-radius: 4px;
}

.csp-discount-error {
    color: var(--csp-danger);
    font-weight: 600;
    margin-top: 10px;
    padding: 8px;
    background: #f8d7da;
    border-radius: 4px;
}

.csp-final-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--csp-primary);
    margin-top: 8px;
}

.csp-enroll-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--csp-primary), var(--csp-primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 154, 205, 0.3);
}

.csp-enroll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 154, 205, 0.4);
}

.csp-capacity-full {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: var(--csp-radius-sm);
    font-weight: 600;
    text-align: center;
}

.csp-enrolled-status {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: var(--csp-radius-sm);
    font-weight: 600;
    text-align: center;
}

.csp-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: var(--csp-radius-sm);
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid #c3e6cb;
}

.csp-curriculum-section {
    margin-top: 40px;
}

.csp-curriculum-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--csp-text-dark);
    margin-bottom: 25px;
    border-bottom: 3px solid var(--csp-primary);
    padding-bottom: 10px;
}

.csp-curriculum-list {
    background: var(--csp-bg-card);
    border-radius: var(--csp-radius);
    overflow: hidden;
    border: 1px solid var(--csp-bg-light);
}

.csp-chapter {
    border-bottom: 1px solid var(--csp-bg-light);
}

.csp-chapter:last-child {
    border-bottom: none;
}

.csp-chapter-header {
    background: var(--csp-bg-light);
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.csp-chapter-header:hover {
    background: #e8f4f7;
}

.csp-chapter-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--csp-text-dark);
}

.csp-chapter-toggle {
    font-size: 18px;
    color: var(--csp-primary);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.csp-chapter-lessons {
    padding: 0;
}

.csp-lesson {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.csp-lesson:last-child {
    border-bottom: none;
}

.csp-lesson:hover {
    background: #f8fbfc;
}

.csp-lesson.locked {
    opacity: 0.6;
}

.csp-lesson-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.csp-lesson-status {
    font-size: 18px;
    width: 25px;
    text-align: center;
}

.csp-lesson-title {
    font-weight: 600;
    color: var(--csp-text-dark);
}

.csp-preview-badge {
    background: var(--csp-warning);
    color: #212529;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.csp-play-lesson {
    background: var(--csp-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.csp-play-lesson:hover {
    background: var(--csp-primary-dark);
    transform: scale(1.05);
}

.csp-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.csp-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--csp-radius);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.csp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: var(--csp-bg-light);
    border-radius: var(--csp-radius) var(--csp-radius) 0 0;
}

.csp-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--csp-text-dark);
}

.csp-close-modal {
    font-size: 28px;
    font-weight: bold;
    color: var(--csp-text-light);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.csp-close-modal:hover {
    color: var(--csp-text-dark);
}

.csp-video-container {
    padding: 30px;
}

.csp-video-container video {
    width: 100%;
    border-radius: var(--csp-radius-sm);
}

.csp-warning {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: var(--csp-radius-sm);
    margin-top: 15px;
    border: 1px solid #ffeaa7;
    font-weight: 600;
    text-align: center;
}

.csp-video-actions {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 var(--csp-radius) var(--csp-radius);
    text-align: center;
}

#csp-mark-complete {
    background: var(--csp-success);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--csp-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#csp-mark-complete:hover {
    background: #218838;
    transform: scale(1.05);
}

.csp-rating-content {
    padding: 30px;
    text-align: center;
}

.csp-star-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.csp-star {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.csp-star:hover,
.csp-star.active {
    color: var(--csp-warning);
    transform: scale(1.1);
}

#csp-submit-rating {
    background: var(--csp-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--csp-radius-sm);
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

#csp-submit-rating:hover {
    background: var(--csp-primary-dark);
    transform: scale(1.05);
}

.csp-error {
    color: var(--csp-danger);
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: var(--csp-radius-sm);
    margin: 20px 0;
}

.field-error {
    color: var(--csp-danger);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

input.error,
select.error,
textarea.error {
    border-color: var(--csp-danger) !important;
    box-shadow: 0 0 0 1px var(--csp-danger) !important;
}

@media (max-width: 768px) {
    .csp-course-single {
        padding: 15px;
    }
    
    .csp-course-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .csp-course-title {
        font-size: 24px;
    }
    
    .csp-course-meta {
        grid-template-columns: 1fr;
    }
    
    .csp-lesson {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .csp-play-lesson {
        align-self: flex-end;
    }
    
    .csp-modal-content {
        width: 95%;
        margin: 10px auto;
    }
    
    .csp-video-container {
        padding: 20px;
    }
    
    .csp-modal-header {
        padding: 15px 20px;
    }
    
    .csp-video-actions {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .csp-course-single {
        padding: 10px;
    }
    
    .csp-price-box {
        padding: 20px;
    }
    
    .csp-curriculum-section h2 {
        font-size: 22px;
    }
    
    .csp-chapter-header {
        padding: 15px;
    }
    
    .csp-lesson {
        padding: 12px 15px;
    }
}