/* ===========================
   Global & Body
=========================== */
body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    transition: background 0.3s ease, color 0.3s ease;
}

.subject-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 4rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
    overflow: hidden;
    transition: all 0.3s ease;
}

.subject-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-xl);
    pointer-events: none;
}

.subject-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    z-index: 1;
    position: relative;
}

.subject-hero p {
    font-size: 1.2rem;
    z-index: 1;
    position: relative;
}

.subject-hero a.btn {
    z-index: 1;
    position: relative;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.subject-hero a.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .subject-hero {
        padding: 3rem 1.5rem;
    }
    .subject-hero h1 {
        font-size: 2rem;
    }
    .subject-hero p {
        font-size: 1rem;
    }
}



/* ===========================
   Glass Cards (Header, Sidebar, Info)
=========================== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

/* ===========================
   Lesson Cards
=========================== */
.lesson-card {
    background: var(--bg-surface);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.lesson-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

/* Lesson number circle */
.lesson-number {
    font-weight: bold;
    color: var(--primary-color);
}

/* ===========================
   Buttons
=========================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
    font-weight: var(--btn-font-weight);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    transition: var(--btn-transition);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* ===========================
   Texts
=========================== */
.text-muted {
    color: var(--text-secondary) !important;
}

/* Headers & Badges */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
}

.badge {
    font-weight: 600;
    transition: all 0.3s ease;
}

/* ===========================
   Video Container
=========================== */
.video-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(67,97,238,0.05), rgba(76,201,240,0.05));
    padding: 1rem;
    transition: all 0.3s ease;
}

.video-wrapper {
    display: none;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
}

.video-wrapper.active {
    display: block;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-md);
}

/* Pagination buttons for video */
.video-pagination button {
    margin: 0 4px;
    transition: all 0.3s ease;
}

.video-pagination button.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

.video-pagination button.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Progress Circle */
.progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0%, var(--bg-surface) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.progress-inner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-main);
}

/* ===========================
   Sidebar
=========================== */
.lesson-sidebar {
    position: sticky;
    top: 100px;
}

/* Quick Notes Textarea */
textarea.form-control {
    background: var(--bg-surface);
    color: var(--text-main);
    border: var(--glass-border);
    transition: all 0.3s ease;
}

textarea.form-control::placeholder {
    color: var(--text-secondary);
}

/* ===========================
   Responsive Adjustments
=========================== */
@media (max-width: 1200px) {
    .video-container {
        padding: 0.75rem;
    }
    .glass-card, .lesson-card {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .lesson-card h6 {
        font-size: 0.9rem;
    }
    .video-pagination button {
        width: 28px;
        height: 28px;
        padding: 0;
        font-size: 0.8rem;
    }
    .progress-circle {
        width: 50px;
        height: 50px;
    }
    .progress-inner {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
}

/* ===========================
   Toast Messages
=========================== */
.toast {
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-main);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}