﻿:root {
  --red: #e63946;
  --white: #ffffff;
  --dark-text: #1d3557;
  --slate: #64748b;
  --font: "Poppins", sans-serif;
}

body {
  font-family: var(--font);
}

/* The Header Bar */
.course-header-bar {
    background-color: #1d3557; 
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.3s;
}

.back-link:hover {
    color: var(--red); 
}

.course-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-course-title {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 700;
}

.student-welcome {
    font-size: 0.85rem;
    opacity: 0.9;
}

.dashboard-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #f1f5f9;
    max-width: 100%; 
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* LEFT SIDE */
.video-section {
    flex: 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; 
    width: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; 
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.lecture-header-info {
    margin-top: 25px;
    background: white;
    padding: 30px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    box-sizing: border-box;
}

.lecture-title {
    color: var(--dark-blue);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.lecture-meta {
    display: flex;
    gap: 20px;
    color: var(--slate);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

/* RIGHT SIDE (SIDEBAR) */
.lecture-sidebar {
    flex: 1;
    min-width: 300px; 
    max-width: 380px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    height: calc(100vh - 60px);
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.sidebar-header h3 {
    margin: 0;
    color: var(--dark-blue);
}

.progress-info {
    font-size: 0.85rem;
    color: var(--slate);
    margin: 5px 0 0 0;
}

.lecture-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; 
}

.lecture-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--dark-blue);
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.lecture-info {
    display: flex;
    gap: 12px;
}

.lecture-number {
    font-weight: bold;
    color: var(--slate);
    opacity: 0.6;
}

.lecture-name {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ACTIVE STATE */
.lecture-item.active {
    background: var(--red);
}

.lecture-item.active .lecture-name,
.lecture-item.active .lecture-number,
.lecture-item.active i {
    color: white;
    opacity: 1;
}

.lecture-item:hover:not(.active) {
    background: #fff5f5;
    padding-left: 25px; 
}

.lecture-item.active {
    background-color: var(--red);
}

.lecture-item.active a, 
.lecture-item.active i {
    color: white !important; 
}

.lecture-item.completed i {
    color: #2a9d8f; 
}

.lecture-item.completed .lecture-name {
    color: #64748b; 
}

.lecture-item:hover:not(.active) {
    background-color: #f1f5f9;
}

.lecture-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
}

@media screen and (max-width: 1024px) {
    .dashboard-container {
        flex-direction: column;
        padding: 10px;
    }

    .lecture-sidebar {
        max-width: 100%;
        min-width: 0;
        height: auto;
        position: relative;
        top: 0;
    }
}