/* Lesson Viewer Specific Styles */
.lesson-viewer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 55px 20px 20px 20px;
}

/* Main Content Layout */
.lesson-main-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    margin-top: 30px;
}

.lesson-video-area {
    flex: 3;
    min-width: 0;
}

.lesson-bottom-content {
    width: 100%;
}

.lesson-header {
    margin-bottom: 20px;
    padding: 15px 0;
}

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.back-to-course {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
}

.back-to-course:hover {
    text-decoration: underline;
}

.lesson-progress-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lesson-number {
    color: #646970;
    font-weight: 500;
}

.course-progress-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar-mini {
    width: 100px;
    height: 6px;
    background: #f6f7f7;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, #16a085, #3498db);
    transition: width 0.3s ease;
}

.progress-text-mini {
    font-size: 0.9rem;
    color: #646970;
    font-weight: 500;
}

.lesson-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #3B82F6;
    line-height: 1.3;
}

.lesson-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.lesson-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid #E5E7EB;
}

.lesson-duration {
    color: #646970;
}

.lesson-status.completed {
    background: #d4edda;
    color: #155724;
}

.lesson-status.in-progress {
    background: #fff3cd;
    color: #856404;
}

.lesson-video-section {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Video Container Styles */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 15px;
}

/* Plyr Player Styles */
.video-container .plyr {
    border-radius: 8px;
    overflow: hidden;
}

.video-container .plyr--video {
    background: #000;
}

.video-container .plyr__video-wrapper {
    border-radius: 8px;
}

.video-container .plyr__poster {
    border-radius: 8px;
}

/* Plyr Controls Customization */
.plyr--video .plyr__controls {
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    border: none;
}

.plyr__control--overlaid {
    background: rgba(59, 130, 246, 0.9);
    border: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.plyr__control--overlaid:hover {
    background: rgba(59, 130, 246, 1);
    transform: scale(1.1);
}

/* Video Loading and Error States */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Manrope', sans-serif;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
}

/* Audio Container Styles */
.lesson-audio-section {
    margin: 0px 0px 20px 0px;
    padding: 25px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lesson-audio-section h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lesson-audio-player {
    width: 100%;
    height: 40px;
    border-radius: 50px;
    outline: none;
    background: #ffffff;
    border: 1px solid #ddd;
}

.lesson-audio-player::-webkit-media-controls-panel {
    background-color: #ffffff;
    border-radius: 6px;
}

.lesson-audio-player::-webkit-media-controls-play-button,
.lesson-audio-player::-webkit-media-controls-pause-button {
    background-color: white;
    border-radius: 50%;
}

.audio-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.audio-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #e3f2fd;
    border-radius: 15px;
    font-weight: 500;
    color: #1565c0;
}

.audio-duration:before {
    content: "⏱️";
    font-size: 0.8rem;
}

/* Audio Player States */
.lesson-audio-section.audio-loading {
    opacity: 0.7;
}

.lesson-audio-section.audio-loading:after {
    content: "Loading audio...";
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

.lesson-audio-section.audio-playing .lesson-audio-player {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.lesson-audio-section.audio-completed {
    background: #f0f8f0;
    border-color: #4caf50;
}

.audio-completion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 10px;
    animation: completionPulse 0.6s ease-out;
}

@keyframes completionPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.audio-error-message {
    padding: 10px;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    color: #c62828;
    font-size: 0.9rem;
    margin-top: 10px;
}

.lesson-audio-section.audio-error {
    background: #ffebee;
    border-color: #f44336;
}

/* Responsive audio player */
@media screen and (max-width: 768px) {
    .lesson-audio-section {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .lesson-audio-player {
        max-width: 100%;
    }

    .audio-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: white;
}

.video-controls {
    padding: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.mark-complete-btn, .completed-btn, .download-video-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.completed-btn {
    background: #16a085;
    color: white;
}

.no-video-message {
    background: white;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.no-video-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-video-content svg {
    color: #c3c4c7;
    margin-bottom: 20px;
}

.no-video-content h3 {
    color: #3B82F6;
    margin-bottom: 15px;
}

.lesson-description {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.lesson-description h2 {
    color: #3B82F6;
    margin-bottom: 20px;
}

.lesson-content-text {
    line-height: 1.6;
    color: #646970;
}

.lesson-navigation-bottom {
    margin-top: 40px;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #3B82F6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    flex: 1;
    max-width: 300px;
}

.nav-button:hover {
    transform: translateY(-2px);
    color: #3B82F6;
}

.nav-button span {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-button small {
    color: #646970;
    font-size: 0.85rem;
}

.next-lesson {
    margin-left: auto;
    text-align: right;
}

.lesson-sidebar {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    position: sticky;
    top: -33px;
}

.info-sidebar {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    position: sticky;
    top: 534px;
    margin-top: 20px;
}

.course-lessons-sidebar h3 {
    color: #3B82F6;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #e1e8ed;
    padding-bottom: 10px;
}

.week-subtitle-sidebar {
    margin-top: 16px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.lesson-item-sidebar {
    margin-bottom: 1px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid transparent;
}

.lesson-item-sidebar.current {
    border-color: #3B82F6;
}

.lesson-item-sidebar.completed .lesson-status-sidebar {
    color: #16a085;
}

.btn-back-to-course {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #3B82F6;
    width: fit-content;
}

.lesson-link-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.lesson-link-sidebar:hover {
    background: #f8f9fa;
    color: inherit;
}

.lesson-number-sidebar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f6f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: #646970;
    flex-shrink: 0;
}

.lesson-item-sidebar.current .lesson-number-sidebar {
    background: #3B82F6;
    color: white;
}

.lesson-item-sidebar.locked {
    opacity: 0.6;
}

.lesson-item-sidebar.locked .lesson-link-sidebar {
    cursor: not-allowed;
    pointer-events: none;
}

.lesson-item-sidebar.locked .lesson-number-sidebar {
    background: #c3c4c7;
    color: #646970;
}

.lesson-item-sidebar.locked .lesson-status-sidebar {
    color: #c3c4c7;
}

.lesson-info-sidebar {
    flex: 1;
    min-width: 0;
}

.lesson-info-sidebar h4 {
    margin: 0 0 3px 0;
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 500;
    color: #2c3e50;
}

.lesson-info-sidebar .duration {
    font-size: 0.75rem;
    color: #646970;
}

.lesson-status-sidebar {
    color: #c3c4c7;
    flex-shrink: 0;
}

.lesson-status-sidebar svg {
    width: 16px;
    height: 16px;
}

/* Lesson Attachments Styles */
.lesson-attachments {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.lesson-attachments h2 {
    color: #3B82F6;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-attachments h2:before {
    content: "📎";
    font-size: 1.2em;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.attachment-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e1e4e8;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.attachment-item:hover {
    border-color: #3B82F6;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.attachment-icon {
    flex-shrink: 0;
}

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

.attachment-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.attachment-description {
    font-size: 0.9rem;
    color: #646970;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.attachment-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.file-type {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    background: #e9ecef;
    color: #495057;
    border-radius: 4px;
}

.file-name {
    font-size: 0.8rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-download {
    flex-shrink: 0;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #3B82F6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #1e5d8c;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Lesson Comments Styles */
.lesson-comments-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.lesson-comments-section h2 {
    color: #3B82F6;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-comments-section h2:before {
    content: "💬";
    font-size: 1.2em;
}

.comments-container {
    max-width: 100%;
}

#lesson-comments-list {
    margin-bottom: 30px;
    max-height: 500px;
    overflow-y: auto;
}

.comment-item {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #e1e4e8;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.comment-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.teacher-comment {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.student-comment {
    border-left-color: #3B82F6;
    background: #f0f6fc;
}

.own-comment {
    margin-left: 40px;
    border-left-color: #16a085;
    background: #f0fff0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-header strong {
    color: #2c3e50;
    font-size: 1rem;
}

.comment-role {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.teacher-comment .comment-role {
    background: #dc3545;
    color: white;
}

.student-comment .comment-role {
    background: #3B82F6;
    color: white;
}

.comment-date {
    color: #6c757d;
    font-size: 0.85rem;
    margin-left: auto;
}

.comment-text {
    color: #2c3e50;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-comments {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.add-comment-form {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 10px;
    padding: 25px;
}

.comment-form-group {
    margin-bottom: 20px;
}

.comment-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.comment-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-form-group textarea:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.comment-form-group select {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.comment-form-group select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.add-comment-form .button {
    background: #3B82F6;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-comment-form .button:hover {
    background: #1e5d8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.add-comment-form .button:disabled {
    background: #c3c4c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive comments */
@media screen and (max-width: 768px) {
    .lesson-comments-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .own-comment {
        margin-left: 20px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .comment-date {
        margin-left: 0;
        margin-top: 5px;
    }

    .add-comment-form {
        padding: 20px;
    }
};


.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #3B82F6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #1a5a96;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(0);
}

/* Tab Navigation Styles */
.lesson-content-tabs {
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

.tab-navigation {
    display: flex;
    background: white;
    margin: 0;
    padding: 0;
}

.tab-button {
    flex: 1;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: #646970;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #ffffff;
    color: #3B82F6;
    transform: translateY(-1px);
}

.tab-button.active {
    background: #ffffff;
    color: #3B82F6;
    border-bottom-color: #3B82F6;
}

.tab-button:focus {
    outline: none;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-button.active::before {
    width: 100%;
}

.tab-button svg {
    margin-right: 8px;
    vertical-align: middle;
}

.tab-pane {
    display: none;
    padding: 30px;
    background: white;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

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

/* Tab Content Styles */
.tab-downloads {
    min-height: 300px;
}

.tab-quiz {
    min-height: 400px;
}

.tab-comments {
    min-height: 350px;
}

.tab-overview {
    min-height: 500px;
}

/* Overview Tab Styles */
.overview-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* .overview-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border-left: 4px solid #3B82F6;
} */

.overview-section h3 {
    color: #3B82F6;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 10px;
}

/* Lesson Information Section */


.lesson-header-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lesson-title-overview {
    font-size: 2.2rem;
    margin: 0;
    color: #3B82F6;
    line-height: 1.3;
    font-weight: 700;
}

.lesson-progress-info-overview {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lesson-meta-overview {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.lesson-meta-overview span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.lesson-number-overview {
    background: #3B82F633;
    color: #1565c0;
    border: 1px solid #3B82F6;
}

.lesson-duration-overview {
    background: #3B82F633;
    color: #3B82F6;
    border: 1px solid #3B82F6;
}

.lesson-status-overview.completed {
    background: #3B82F633;
    color: #3B82F6;
    border: 1px solid #3B82F6;
}

.lesson-status-overview.in-progress {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc80;
}

.course-progress-overview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-overview {
    width: 100%;
    height: 12px;
    background: #e1e8ed;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill-overview {
    height: 100%;
    background: #3B82F6;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.progress-text-overview {
    font-size: 0.9rem;
    color: #646970;
    font-weight: 600;
    text-align: center;
}

.lesson-completion-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.overview-complete-btn,
.overview-completed-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.overview-complete-btn {
    background: #16a085;
    border-color: #16a085;
}

.overview-complete-btn:hover {
    background: #138b75;
    border-color: #138b75;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.3);
}

.overview-completed-btn {
    background: #28a745;
    border-color: #28a745;
    opacity: 0.8;
}

/* Quick Access Section */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    color: #3B82F6;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-access-btn:hover {
    border-color: #3B82F6;
    background: #f0f6fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.1);
}

.quick-access-btn svg {
    color: #3B82F6;
}

.quick-access-btn span {
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Compact Attachments for Overview */
.overview-attachments .attachment-item.compact {
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
    transition: all 0.3s ease;
}

.overview-attachments .attachment-item.compact:hover {
    border-color: #3B82F6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
}

.overview-attachments .attachment-item.compact .attachment-info {
    flex: 1;
    min-width: 0;
}

.overview-attachments .attachment-item.compact .attachment-info h5 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-attachments .attachment-item.compact .file-type {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: #e9ecef;
    color: #495057;
    border-radius: 3px;
    font-weight: bold;
}

.download-btn-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #3B82F6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.download-btn-small:hover {
    background: #1a5a96;
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

/* Quiz Status in Overview */
.quiz-overview-status {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.quiz-overview-status.completed {
    border-color: #16a085;
    background: #f0fff0;
}

.quiz-overview-status.pending {
    border-color: #f39c12;
    background: #fffbf0;
}

.quiz-status-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-overview-status.completed .quiz-status-icon {
    background: #16a085;
    color: white;
}

.quiz-overview-status.pending .quiz-status-icon {
    background: #f39c12;
    color: white;
}

.quiz-status-text {
    flex: 1;
    min-width: 0;
}

.quiz-status-text strong {
    display: block;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.quiz-status-text p {
    margin: 0;
    color: #646970;
    font-size: 0.9rem;
}

.switch-tab-btn {
    background: #3B82F6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.switch-tab-btn:hover {
    background: #1a5a96;
    transform: translateY(-1px);
}

/* Comments Overview */
.comments-overview {
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
}

#overview-comments-preview {
    max-height: 200px;
    overflow-y: auto;
    padding: 20px;
}

.comments-overview .switch-tab-btn {
    width: 100%;
    border-radius: 0;
    margin: 0;
    border-top: 1px solid #e1e4e8;
}

.no-resources,
.no-quiz-overview {
    color: #646970;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 6px;
    border: 2px dashed #dee2e6;
}

.no-downloads,
.no-quiz {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
}

.no-downloads svg,
.no-quiz svg {
    color: #c3c4c7;
    margin-bottom: 20px;
}

.no-downloads h3,
.no-quiz h3 {
    color: #3B82F6;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.no-downloads p,
.no-quiz p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Tab Icons */
.tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.tab-button:hover .tab-icon {
    transform: scale(1.1);
}

.tab-button.active .tab-icon {
    transform: scale(1.2);
}

/* Downloads Tab Specific */
.downloads-section {
    padding: 0;
}

.downloads-section .lesson-attachments {
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
}

.downloads-section .lesson-attachments h2 {
    display: none;
}

/* Quiz Tab Specific */
.quiz-section {
    padding: 0;
}

.quiz-section .lesson-quiz-section {
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    border: none;
}

.quiz-section .lesson-quiz-section h2 {
    display: none;
}

/* Comments Tab Specific */
.comments-section {
    padding: 0;
}

.comments-section .lesson-comments-section {
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
}

.comments-section .lesson-comments-section h2 {
    display: none;
}

/* Tab Badge for counts */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    line-height: 1;
    padding: 2px 6px;
}

.tab-button.active .tab-badge {
    background: #3B82F6;
}

/* Loading state for tabs */
.tab-pane.loading {
    position: relative;
    opacity: 0.6;
}

.tab-pane.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .lesson-main-content {
        flex-direction: column-reverse;
    }
    
    .lesson-video-area {
        flex: none;
    }
    
    .lesson-sidebar {
        position: static;
        max-height: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .lesson-viewer-container {
        padding: 85px 15px 15px 15px;
    }

    .lesson-main-content {
        gap: 20px;
    }

    .lesson-header {
        margin-bottom: 15px;
    }

    .lesson-sidebar {
        padding: 15px;
    }

    /* Overview responsive */
    .lesson-title-overview {
        font-size: 1.8rem;
    }

    .lesson-meta-overview {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .lesson-meta-overview span {
        justify-content: center;
        padding: 10px 16px;
    }

    .quick-access-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .quick-access-btn {
        padding: 15px;
        flex-direction: row;
        text-align: left;
    }

    .quick-access-btn svg {
        flex-shrink: 0;
    }

    /* Tab navigation responsive */
    .tab-navigation {
        flex-direction: column;
        background: white;
    }

    .tab-button {
        flex: none;
        text-align: left;
        border-bottom: 1px solid #f0f0f1;
        border-radius: 0;
        padding: 16px 20px;
        position: relative;
    }

    .tab-button:last-child {
        border-bottom: none;
    }

    .tab-button::before {
        display: none;
    }

    .tab-button.active::after {
        content: '';
        position: absolute;
        width: 4px;
        height: 100%;
        left: 0;
        top: 0;
        background: linear-gradient(180deg, #3B82F6, #16a085);
        border-radius: 0 2px 2px 0;
    }

    .tab-button:hover {
        transform: none;
        padding-left: 25px;
    }

    .tab-button.active {
        border-bottom-color: transparent;
        padding-left: 25px;
        background: #f8f9fa;
    }

    .tab-pane {
        padding: 20px;
    }

    .tab-icon {
        margin-right: 12px;
    }
}

@media (max-width: 480px) {
    .lesson-title {
        font-size: 1.6rem;
    }

    .tab-button {
        padding: 14px 15px;
        font-size: 0.9rem;
    }

    .tab-button:hover,
    .tab-button.active {
        padding-left: 20px;
    }

    .tab-pane {
        padding: 15px;
    }

    .no-downloads,
    .no-quiz {
        padding: 40px 15px;
    }

    .tab-badge {
        font-size: 0.7rem;
        min-width: 18px;
        height: 18px;
        margin-left: 6px;
    }
}

/* Introduction Video Styles */
.lesson-intro-video-section {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f0f6fc 0%, #e6f3ff 100%);
    border-radius: 8px;
    border: 1px solid #d0d7de;
    border-left: 4px solid #0969da;
}

.lesson-intro-video-section h2 {
    color: #0969da;
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-intro-video-section h2:before {
    content: "▶";
    font-size: 1.2rem;
}

.intro-video-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px auto;
    background: black;
    border-radius: 6px;
    overflow: hidden;
}

.intro-video-container iframe,
.intro-video-container video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.intro-video-meta {
    text-align: center;
    margin-top: 10px;
}

.intro-video-meta .video-duration {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #656d76;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #d1d9e0;
}

/* Week Introduction Video Styles */

.week-intro-video h5 {
    color: #24292f;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-lessons-header,
.week-intro-video-header {
    display: flex;
    gap: 8px;
    align-items: center;
}

.week-video-container {
    position: relative;
    width: 100%;
    margin: 0 auto 10px auto;
    background: black;
    border-radius: 4px;
    overflow: hidden;
}

.week-video-container iframe,
.week-video-container video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.week-video-meta {
    text-align: center;
    margin-top: 8px;
}

.week-video-meta .video-duration {
    font-size: 0.85rem;
    color: #656d76;
    background: white;
    padding: 3px 10px;
    border-radius: 15px;
    border: 1px solid #d1d9e0;
}

.week-intro-video-locked {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #d1d9e0;
    text-align: center;
}

.week-intro-video-locked p {
    margin: 0;
    color: #656d76;
    font-style: italic;
}

/* Quiz Styles */
.lesson-quiz-section {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.lesson-quiz-section h2 {
    color: #3B82F6;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-quiz-section h2:before {
    content: "📝";
    font-size: 1.2em;
}

.quiz-completed {
    text-align: center;
    padding: 20px;
}

.quiz-score {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.score-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #16a085;
    margin: 15px 0;
}

.score-display .percentage {
    font-size: 1.5rem;
    color: #646970;
    margin-left: 10px;
}

.quiz-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quiz-description {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 30px;
    color: #0066cc;
}

.quiz-question {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fafbfc;
}

.quiz-question h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.question-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #2c3e50;
}

.question-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: #3B82F6;
    background: #f0f6fc;
}

.quiz-option input[type="radio"] {
    margin: 0;
}

.quiz-option span {
    flex: 1;
    font-weight: 500;
}

.quiz-text-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.quiz-text-input:focus {
    border-color: #3B82F6;
    outline: none;
}

.quiz-submit {
    background: #16a085;
    border-color: #16a085;
    font-size: 1.1rem;
    padding: 12px 30px;
    margin-top: 20px;
}

.quiz-submit:hover {
    background: #138b75;
    border-color: #138b75;
}

.quiz-review-item {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ddd;
}

.quiz-review-item.correct {
    background: #d4edda;
    border-left-color: #28a745;
}

.quiz-review-item.incorrect {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.quiz-review-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.quiz-review-item .question-text {
    font-weight: 500;
    margin-bottom: 10px;
}
