/* ==========================================================================
   COURSE PAGE STYLES (syllabus view)
   ========================================================================== */

body {
    background-color: #030005;
    color: #e2e8f0;
    font-family: var(--font-main);
    overflow-x: hidden;
}

.course-main {
    min-height: 70vh;
}

.course-loading, .lesson-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(192, 132, 252, 0.2);
    border-top-color: #c026d3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.course-body {
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 24px 90px 24px;
}

/* ---- Hero ---- */
.course-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    background: linear-gradient(135deg, rgba(15, 2, 18, 0.9), rgba(30, 2, 34, 0.6));
    border: 1px solid rgba(192, 132, 252, 0.28);
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.course-hero-icon {
    width: 110px;
    height: 110px;
    min-width: 110px;
    border-radius: 50%;
    border: 2px solid;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
}

.course-hero-info {
    flex: 1;
    min-width: 0;
}

.course-tag {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(225, 29, 72, 0.18);
    color: #f3e8ff;
    border: 1px solid rgba(225, 29, 72, 0.4);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.course-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.course-desc {
    color: #a792a9;
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0;
}

.course-stats {
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stats-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(192, 132, 252, 0.15);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c026d3, #f43f5e);
    border-radius: 20px;
    transition: width 0.5s ease;
}

.progress-count {
    font-size: 0.85rem;
    color: #e879f9;
    margin-top: 4px;
}

.course-xp-block .xp-value {
    color: #facc15;
    font-weight: 700;
    font-size: 1.1rem;
}

.course-xp-block .xp-value i {
    color: #facc15;
}

.course-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #c026d3, #9f1239);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 18px rgba(159, 18, 57, 0.35);
    width: fit-content;
}

.course-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(192, 38, 211, 0.45);
}

.course-cta-btn.completed {
    background: linear-gradient(135deg, #059669, #0d9488);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}

.course-cert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.45);
    color: #facc15;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: fit-content;
}

.course-cert-btn:hover {
    background: rgba(250, 204, 21, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(250, 204, 21, 0.25);
}

/* ---- Chapters ---- */
.course-chapters {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.chapter-block {
    background: rgba(15, 2, 18, 0.6);
    border: 1px solid rgba(192, 132, 252, 0.18);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.chapter-block:hover {
    border-color: rgba(244, 63, 94, 0.4);
}

.chapter-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(192, 132, 252, 0.14);
}

.chapter-index {
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 700;
    color: #f43f5e;
}

.chapter-title {
    flex: 1;
    margin: 0;
    color: #f3e8ff;
    font-size: 1.25rem;
}

.chapter-lesson-count {
    font-size: 0.8rem;
    color: #94a3b8;
    background: rgba(192, 132, 252, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
}

.lesson-list {
    display: flex;
    flex-direction: column;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 24px;
    color: #e2e8f0;
    text-decoration: none;
    border-bottom: 1px solid rgba(192, 132, 252, 0.08);
    transition: background 0.2s ease;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-item:hover {
    background: rgba(192, 132, 252, 0.08);
}

.lesson-check {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid rgba(192, 132, 252, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: transparent;
    transition: all 0.25s ease;
}

.lesson-item.done .lesson-check {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.lesson-index {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: #64748b;
    width: 22px;
}

.lesson-item-title {
    flex: 1;
    font-size: 0.98rem;
}

.lesson-quiz-mark {
    color: #c084fc;
    font-size: 0.9rem;
}

/* ---- Coming soon / empty ---- */
.course-empty {
    text-align: center;
    padding: 60px 20px;
    margin-top: 40px;
    background: rgba(15, 2, 18, 0.6);
    border: 1px dashed rgba(192, 132, 252, 0.3);
    border-radius: 14px;
}

.course-empty i {
    font-size: 3rem;
    color: #c084fc;
    margin-bottom: 18px;
}

.course-empty h2 {
    color: #f3e8ff;
    font-size: 1.6rem;
    margin: 0 0 10px 0;
}

.course-empty p {
    color: #a792a9;
    margin: 0 0 24px 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .course-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .course-hero-icon {
        width: 84px;
        height: 84px;
        min-width: 84px;
        font-size: 2.4rem;
    }

    .course-stats {
        width: 100%;
        min-width: 0;
    }

    .course-title {
        font-size: 1.8rem;
    }
}