/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; min-height: 100vh; }
body {
    font-family: 'Satoshi', 'Plus Jakarta Sans', sans-serif;
    background-color: #F7F9FC;
    color: #1a1a2e;
}

/* === Navbar === */
.course-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-family: 'Lexend', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: #022F66;
}

.nav-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #4a5a75;
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #F0F4FA;
    padding: 6px 16px 6px 6px;
    border-radius: 40px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-profile:hover {
    background-color: #e4ebf5;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background-color: #FFB300;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.profile-name {
    font-family: 'Lexend', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

/* === Course Container === */
.course-container {
    display: grid;
    grid-template-columns: 480px 1fr;
    max-width: 96%;
    margin: 40px auto;
    gap: 80px;
    align-items: start;
}

/* === Sidebar === */
.course-sidebar {
    background-color: #022F66;
    border-radius: 28px;
    padding: 40px 32px;
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Custom Scrollbar for Sidebar */
.course-sidebar::-webkit-scrollbar {
    width: 6px;
}
.course-sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin: 24px 0;
}
.course-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.course-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-title {
    font-family: 'Satoshi', sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 32px;
    padding-left: 8px;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chapter-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 24px;
    background-color: #054085;
    border: 2px solid transparent;
    border-radius: 20px;
    color: #ffffff;
    font-family: 'Lexend', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.chapter-btn:hover {
    background-color: #064b9c;
}

.chapter-btn.active {
    background-color: #054085;
    border-color: #ffffff;
    box-shadow: inset 0 0 0 2px #022F66;
}

.chapter-progress {
    color: #FFB300;
    font-size: 14px;
    font-weight: 700;
}

/* === Main Content === */
.course-main {
    min-width: 0;
}

.chapter-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.chapter-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.chapter-heading {
    font-family: 'Satoshi', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.chapter-meta {
    font-family: 'Lexend', sans-serif;
    font-size: 15px;
    color: #6a7a95;
    font-weight: 500;
}

.rapid-fire-btn {
    background-color: #0056D2;
    color: #ffffff;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.rapid-fire-btn:hover {
    background-color: #0046b0;
    transform: translateY(-2px);
}

/* === Lesson List === */
.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lesson-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    gap: 32px;
    align-items: stretch;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}

.lesson-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.lesson-thumb-wrap {
    width: 35%;
    min-width: 280px;
    max-width: 440px;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background-color: #e0e5f0;
}

.lesson-thumb-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.lesson-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lesson-thumb-wrap:hover .lesson-thumb {
    transform: scale(1.05);
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.lesson-thumb-wrap:hover .play-icon-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon-overlay svg {
    width: 24px;
    height: 24px;
    margin-left: 2px;
}

.lesson-details {
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.lesson-title-link {
    text-decoration: none;
    color: inherit;
}

.lesson-title {
    font-family: 'Satoshi', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.lesson-title-link:hover .lesson-title {
    color: #0056D2;
}

.lesson-duration {
    font-family: 'Lexend', sans-serif;
    font-size: 18px;
    color: #6a7a95;
}

.lesson-actions {
    display: flex;
    gap: 24px;
    width: 100%;
    margin-top: auto;
}

.lesson-btn {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px 32px;
    border-radius: 12px;
    font-family: 'Lexend', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, filter 0.2s;
}

.lesson-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn-quiz {
    background-color: #FFB300;
    color: #1a1a2e;
}

.btn-notes {
    background-color: #022F66;
    color: #ffffff;
}

.no-lessons {
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    color: #6a7a95;
    padding: 40px;
    text-align: center;
    background: #ffffff;
    border-radius: 20px;
}

@media (max-width: 1024px) {
    .course-container {
        grid-template-columns: 1fr;
        padding: 0 24px;
        gap: 32px;
    }
    
    .course-sidebar {
        width: 100%;
        position: static;
        padding: 24px;
    }
    
    .lesson-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .lesson-thumb-wrap {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .course-nav {
        padding: 16px 20px;
    }
    
    .nav-title {
        display: none;
    }
    
    .chapter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
