.course-lessons {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(67, 97, 238, 0.03) 100%);
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.course-lessons::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 50% 0%, rgba(67, 97, 238, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.course-lessons .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.course-header {
    margin-bottom: 40px;
    position: relative;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    transform: translateX(-5px);
    color: var(--secondary);
}

.course-title-container {
    display: flex;
    align-items: center;
    gap: 25px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(67, 97, 238, 0.12);
    transition: all 0.4s ease;
}

.course-title-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(67, 97, 238, 0.15);
    border-color: rgba(67, 97, 238, 0.2);
}

.course-icon-container {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(76, 201, 240, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(67, 97, 238, 0.15);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.course-icon-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 50%;
}

.course-title-container:hover .course-icon-container {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.2);
}

.course-title-container:hover .course-icon-container::before {
    opacity: 1;
}

.course-icon-large {
    font-size: 2.8rem;
    color: var(--primary);
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.course-title-container:hover .course-icon-large {
    color: white;
    transform: scale(1.1);
}

.course-title-content {
    flex-grow: 1;
}

.course-title-content h1 {
    margin: 0 0 10px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--accent) 50%, var(--gradient-end) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    font-weight: 800;
}

.course-description {
    margin: 0;
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

.lessons-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(67, 97, 238, 0.12);
}

.section-title {
    margin: 0 0 35px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
    font-weight: 700;
}

.section-title::after {
    display: none;
}

.section-title i {
    color: var(--primary);
    font-size: 1.4rem;
}

.lessons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.lesson-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 20px 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--dark);
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative;
    overflow: hidden;
}

.lesson-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(76, 201, 240, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lesson-card:hover {
    transform: translateX(8px) translateY(-3px);
    box-shadow: 0 12px 30px rgba(67, 97, 238, 0.15);
    border-color: rgba(67, 97, 238, 0.25);
}

.lesson-card:hover::before {
    opacity: 1;
}

.lesson-card:hover .lesson-arrow {
    transform: translateX(8px);
    color: var(--primary);
}

.lesson-card:hover .lesson-number {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    transform: scale(1.1);
}

.lesson-card:hover .lesson-number span {
    color: white;
}

.lesson-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 20px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(67, 97, 238, 0.15);
}

.lesson-number span {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.lesson-content {
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.lesson-content h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    transition: color 0.3s ease;
}

.lesson-card:hover .lesson-content h3 {
    color: var(--primary);
}

.lesson-meta {
    display: flex;
    gap: 18px;
    font-size: 0.9rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.lesson-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(67, 97, 238, 0.08);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lesson-card:hover .lesson-meta span {
    background: rgba(67, 97, 238, 0.15);
}

.lesson-meta span i {
    font-size: 0.85rem;
}

.lesson-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    color: var(--gray);
    transition: all 0.4s ease;
    flex-shrink: 0;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.empty-lessons {
    text-align: center;
    padding: 40px 20px;
    background: rgba(67, 97, 238, 0.03);
    border-radius: 15px;
    border: 2px dashed rgba(67, 97, 238, 0.1);
    margin-top: 20px;
}

.empty-lessons i {
    font-size: 3rem;
    color: rgba(67, 97, 238, 0.2);
    margin-bottom: 15px;
}

.empty-lessons p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: var(--gray);
}

/* Dark Mode Styles */
.dark-mode .course-lessons {
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(72, 149, 239, 0.05) 100%);
}

.dark-mode .course-lessons::before {
    background: radial-gradient(circle at 50% 0%, rgba(72, 149, 239, 0.12), transparent 50%);
}

.dark-mode .course-title-container {
    background: rgba(26, 35, 50, 0.7);
    border-color: rgba(72, 149, 239, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.dark-mode .course-title-container:hover {
    box-shadow: 0 20px 50px rgba(72, 149, 239, 0.2);
    border-color: rgba(72, 149, 239, 0.25);
}

.dark-mode .course-icon-container {
    background: linear-gradient(135deg, rgba(72, 149, 239, 0.1), rgba(79, 172, 254, 0.1));
    border-color: rgba(72, 149, 239, 0.15);
}

.dark-mode .course-icon-container::before {
    background: linear-gradient(135deg, #4895ef, #4cc9f0);
}

.dark-mode .course-icon-large {
    color: #4895ef;
}

.dark-mode .course-title-content h1 {
    background: linear-gradient(135deg, #4895ef 0%, #4cc9f0 50%, #4facfe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark-mode .course-description {
    color: var(--text-secondary);
}

.dark-mode .lessons-container {
    background: rgba(26, 35, 50, 0.7);
    border-color: rgba(72, 149, 239, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.dark-mode .section-title {
    color: var(--text-primary);
}

.dark-mode .section-title i {
    color: #4895ef;
}

.dark-mode .lesson-card {
    background: rgba(26, 35, 50, 0.6);
    border-color: rgba(72, 149, 239, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .lesson-card::before {
    background: linear-gradient(135deg, rgba(72, 149, 239, 0.08), rgba(79, 172, 254, 0.08));
}

.dark-mode .lesson-card:hover {
    box-shadow: 0 12px 30px rgba(72, 149, 239, 0.2);
    border-color: rgba(72, 149, 239, 0.3);
}

.dark-mode .lesson-number {
    background: rgba(72, 149, 239, 0.15);
    border-color: rgba(72, 149, 239, 0.2);
}

.dark-mode .lesson-number span {
    color: #4895ef;
}

.dark-mode .lesson-card:hover .lesson-number {
    background: linear-gradient(135deg, #4895ef, #4cc9f0);
}

.dark-mode .lesson-content h3 {
    color: var(--text-primary);
}

.dark-mode .lesson-card:hover .lesson-content h3 {
    color: #4895ef;
}

.dark-mode .lesson-meta {
    color: var(--text-secondary);
}

.dark-mode .lesson-meta span {
    background: rgba(72, 149, 239, 0.12);
}

.dark-mode .lesson-card:hover .lesson-meta span {
    background: rgba(72, 149, 239, 0.2);
}

.dark-mode .lesson-arrow {
    color: var(--text-secondary);
}

.dark-mode .lesson-card:hover .lesson-arrow {
    color: #4895ef;
}

.dark-mode .empty-lessons {
    background: rgba(72, 149, 239, 0.08);
    border-color: rgba(72, 149, 239, 0.15);
}

.dark-mode .empty-lessons i {
    color: rgba(72, 149, 239, 0.25);
}

.dark-mode .empty-lessons p {
    color: var(--text-secondary);
}

.empty-lessons .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.empty-lessons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
    color: white;
}

.empty-lessons .btn-primary i {
    font-size: 0.9em;
    color: #fff;
    padding-top: 14px;
}

.dark-mode .empty-lessons .btn-primary {
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.dark-mode .empty-lessons .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

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

/* Staggered animation for first 10 lessons only */
.lesson-card:nth-child(1) { animation: fadeIn 0.4s ease forwards 0.1s; opacity: 0; }
.lesson-card:nth-child(2) { animation: fadeIn 0.4s ease forwards 0.2s; opacity: 0; }
.lesson-card:nth-child(3) { animation: fadeIn 0.4s ease forwards 0.3s; opacity: 0; }
.lesson-card:nth-child(4) { animation: fadeIn 0.4s ease forwards 0.4s; opacity: 0; }
.lesson-card:nth-child(5) { animation: fadeIn 0.4s ease forwards 0.5s; opacity: 0; }
.lesson-card:nth-child(6) { animation: fadeIn 0.4s ease forwards 0.6s; opacity: 0; }
.lesson-card:nth-child(7) { animation: fadeIn 0.4s ease forwards 0.7s; opacity: 0; }
.lesson-card:nth-child(8) { animation: fadeIn 0.4s ease forwards 0.8s; opacity: 0; }
.lesson-card:nth-child(9) { animation: fadeIn 0.4s ease forwards 0.9s; opacity: 0; }
.lesson-card:nth-child(10) { animation: fadeIn 0.4s ease forwards 1s; opacity: 0; }

/* All lessons after 10 are immediately visible without animation */
.lesson-card:nth-child(n+11) { opacity: 1; }

@media (max-width: 768px) {
    .course-lessons {
        padding: 100px 0 60px;
    }

    .course-title-container {
        flex-direction: column;
        text-align: center;
        padding: 28px 25px;
        gap: 20px;
    }

    .course-icon-container {
        width: 80px;
        height: 80px;
    }

    .course-icon-large {
        font-size: 2.4rem;
    }

    .course-title-content h1 {
        font-size: 1.7rem;
    }

    .course-description {
        font-size: 1rem;
    }

    .lessons-container {
        padding: 30px 25px;
        border-radius: 20px;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }

    .lesson-card {
        padding: 18px 20px;
    }

    .lesson-number {
        width: 45px;
        height: 45px;
        margin-right: 15px;
    }

    .lesson-number span {
        font-size: 1.15rem;
    }

    .lesson-content h3 {
        font-size: 1.1rem;
    }

    .lesson-meta {
        gap: 8px;
        font-size: 0.85rem;
    }

    .lesson-meta span {
        padding: 3px 10px;
    }

    .lesson-arrow {
        width: 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .course-lessons {
        padding: 90px 0 50px;
    }

    .course-lessons .container {
        padding: 0 15px;
    }

    .course-title-container {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .course-icon-container {
        width: 70px;
        height: 70px;
    }

    .course-icon-large {
        font-size: 2.2rem;
    }

    .course-title-content h1 {
        font-size: 1.5rem;
    }

    .course-description {
        font-size: 0.95rem;
    }

    .lessons-container {
        padding: 25px 20px;
        border-radius: 18px;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .lessons-grid {
        gap: 15px;
    }

    .lesson-card {
        padding: 15px 18px;
        border-radius: 15px;
    }

    .lesson-card:hover {
        transform: translateX(5px) translateY(-2px);
    }

    .lesson-number {
        width: 42px;
        height: 42px;
        margin-right: 12px;
    }

    .lesson-number span {
        font-size: 1.1rem;
    }

    .lesson-content h3 {
        font-size: 1.05rem;
    }

    .lesson-meta {
        gap: 6px;
        font-size: 0.8rem;
    }

    .lesson-meta span {
        padding: 3px 8px;
    }

    .lesson-arrow {
        font-size: 1rem;
    }
}