/* YouTube-Style Player Styles - Only for the video player section */
.youtube-player-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
    cursor: pointer;
    animation: playerFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Video Wrapper - uses aspect ratio for responsive height */
.youtube-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio (standard video) */
    max-height: 500px;
    overflow: hidden;
    border-radius: 12px;
    animation: wrapperScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Initially hide controls and progress bar, show play overlay */
.youtube-controls-container,
.youtube-progress-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
}

.youtube-play-overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

/* Show controls and progress bar, hide play overlay on container hover */
.youtube-player-container:hover .youtube-controls-container,
.youtube-player-container:hover .youtube-progress-container,
.youtube-player-container.controls-visible .youtube-controls-container,
.youtube-player-container.controls-visible .youtube-progress-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.youtube-player-container.controls-visible .youtube-play-overlay,
.youtube-player-container:fullscreen .youtube-play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.9);
}

/* Mobile: Slightly taller video player for better fit */
@media (max-width: 991px) {
    .youtube-video-wrapper {
        padding-bottom: 56.25% !important;
        /* Maintain 16:9 aspect ratio on mobile */
        max-height: none !important;
        /* Remove height restriction on mobile */
    }
}

/* ========================================
   RESPONSIVE LAYOUT FIX
   ======================================== */
@media (max-width: 991px) {

    /* Override inline styles for responsive layout */
    .col-lg-9[style*="width: 70%"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .col-lg-3[style*="width: 30%"] {
        display: none !important;
    }

    /* Hide sidebar on mobile */
    .course-sidebar {
        display: none !important;
    }

    /* Show mobile-only tabs */
    .mobile-only-tab {
        display: flex !important;
    }
}

.youtube-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Ensure nothing overflows the container */
}

.youtube-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: cover;
}

/* YouTube-style play overlay - only shown initially before first play */
.youtube-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.youtube-play-overlay:hover {
    background: rgba(0, 0, 0, 0.6);
}

.youtube-play-overlay .youtube-play-icon {
    font-size: 6rem;
    color: white;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: playIconPulse 2s ease-in-out infinite;
}

.youtube-play-overlay:hover .youtube-play-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
    animation: none;
}

/* YouTube-style action indicator - brief feedback on play/pause */
.youtube-action-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.1s ease, visibility 0.1s ease, transform 0.3s ease;
}

.youtube-action-indicator.show {
    opacity: 1;
    visibility: visible;
    animation: actionIndicatorPop 0.6s ease forwards;
}

.youtube-action-indicator i {
    font-size: 2.5rem;
    color: white;
}

@keyframes actionIndicatorPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* YouTube-style loading spinner */
.youtube-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    z-index: 15;
    animation: spinPulse 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* YouTube-style progress bar */
.youtube-progress-container {
    position: absolute;
    bottom: 64px;
    /* Positioned above the controls */
    left: 0;
    right: 0;
    padding: 0;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-black background */
    cursor: pointer;
    z-index: 25;
    /* Higher than controls */
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.youtube-progress-container:hover {
    height: 10px;
    cursor: ew-resize;
}

.youtube-progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
}

.youtube-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    /* Blue gradient progress */
    width: 0;
    border-radius: 2px;
    z-index: 2;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Progress thumb - circle at the end of progress bar (always visible) */
.youtube-progress::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
    opacity: 1;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.youtube-progress-container:hover .youtube-progress::after,
.youtube-player-container.controls-visible .youtube-progress::after {
    transform: translateY(-50%) scale(1.15);
}

.youtube-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(192, 192, 192, 0.7);
    /* Silver/gray loaded */
    width: 0%;
    border-radius: 2px;
    z-index: 1;
    transition: width 0.3s ease;
}

.youtube-played-marker {
    position: absolute;
    top: 0;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    z-index: 5;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
}

.youtube-progress-container:hover .youtube-played-marker {
    transform: translate(-50%, -50%) scale(1.2);
}

/* YouTube-style controls container */
.youtube-controls-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 20;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    padding: 8px 12px 12px 12px;
    border-radius: 0 0 12px 12px;
}

/* Fullscreen mode - ensure controls are visible */
.youtube-player-container:fullscreen .youtube-controls-container,
.youtube-player-container:-webkit-full-screen .youtube-controls-container,
.youtube-player-container:-moz-full-screen .youtube-controls-container,
.youtube-player-container:-ms-fullscreen .youtube-controls-container,
:fullscreen .youtube-player-container .youtube-controls-container,
::-webkit-full-screen .youtube-player-container .youtube-controls-container,
::-moz-full-screen .youtube-player-container .youtube-controls-container,
:-ms-fullscreen .youtube-player-container .youtube-controls-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2147483647;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s;
}

/* Show controls when mouse is active in fullscreen */
:fullscreen .youtube-player-container.controls-visible .youtube-controls-container,
:fullscreen .youtube-player-container.controls-visible .youtube-progress-container,
.youtube-player-container:fullscreen.controls-visible .youtube-controls-container,
.youtube-player-container:-webkit-full-screen.controls-visible .youtube-controls-container,
.youtube-player-container:-moz-full-screen.controls-visible .youtube-controls-container,
.youtube-player-container:-ms-fullscreen.controls-visible .youtube-controls-container,
:fullscreen .youtube-player-container.controls-visible .youtube-progress-container,
.youtube-player-container:fullscreen.controls-visible .youtube-progress-container,
::-webkit-full-screen .youtube-player-container.controls-visible .youtube-controls-container,
::-webkit-full-screen .youtube-player-container.controls-visible .youtube-progress-container,
::-moz-full-screen .youtube-player-container.controls-visible .youtube-controls-container,
::-moz-full-screen .youtube-player-container.controls-visible .youtube-progress-container,
:-ms-fullscreen .youtube-player-container.controls-visible .youtube-controls-container,
:-ms-fullscreen .youtube-player-container.controls-visible .youtube-progress-container {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Fullscreen mode - progress bar visibility */
.youtube-player-container:fullscreen .youtube-progress-container,
.youtube-player-container:-webkit-full-screen .youtube-progress-container,
.youtube-player-container:-moz-full-screen .youtube-progress-container,
.youtube-player-container:-ms-fullscreen .youtube-progress-container,
:fullscreen .youtube-player-container .youtube-progress-container,
::-webkit-full-screen .youtube-player-container .youtube-progress-container,
::-moz-full-screen .youtube-player-container .youtube-progress-container,
:-ms-fullscreen .youtube-player-container .youtube-progress-container {
    z-index: 2147483647;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Show progress bar when mouse is active or hovering in fullscreen */
:fullscreen .youtube-player-container.controls-visible .youtube-progress-container,
:fullscreen .youtube-player-container.controls-visible .youtube-progress-container,
.youtube-player-container:fullscreen.controls-visible .youtube-progress-container,
.youtube-player-container:-webkit-full-screen.controls-visible .youtube-progress-container,
.youtube-player-container:-moz-full-screen.controls-visible .youtube-progress-container,
.youtube-player-container:-ms-fullscreen.controls-visible .youtube-progress-container {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Show progress bar when mouse is active or hovering in fullscreen */
:fullscreen .youtube-player-container.controls-visible .youtube-progress-container,
:fullscreen .youtube-player-container.controls-visible .youtube-progress-container,
.youtube-player-container:fullscreen.controls-visible .youtube-progress-container,
.youtube-player-container:-webkit-full-screen.controls-visible .youtube-progress-container,
.youtube-player-container:-moz-full-screen.controls-visible .youtube-progress-container,
.youtube-player-container:-ms-fullscreen.controls-visible .youtube-progress-container {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Progress bar should still be visible on hover even without controls-visible */
:fullscreen .youtube-player-container:fullscreen .youtube-progress-container:hover,
:fullscreen .youtube-player-container .youtube-progress-container:hover,
.youtube-player-container:fullscreen .youtube-progress-container:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Progress bar thumb in fullscreen */
:fullscreen .youtube-player-container.controls-visible .youtube-progress::after,
:fullscreen .youtube-player-container .youtube-progress-container:hover .youtube-progress::after,
.youtube-player-container:fullscreen.controls-visible .youtube-progress::after,
:fullscreen .youtube-player-container:fullscreen .youtube-progress-container:hover .youtube-progress::after {
    opacity: 1 !important;
}

/* Fullscreen mode - video container fills screen */
:fullscreen .youtube-video-wrapper,
::-webkit-full-screen .youtube-video-wrapper,
::-moz-full-screen .youtube-video-wrapper,
:-ms-fullscreen .youtube-video-wrapper {
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
}

:fullscreen .youtube-player-container,
::-webkit-full-screen .youtube-player-container,
::-moz-full-screen .youtube-player-container,
:-ms-fullscreen .youtube-player-container {
    width: 100% !important;
    height: 100% !important;
    background: #000;
}

.youtube-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    cursor: default;
    flex-direction: row !important;
    direction: ltr !important;
}

.youtube-controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    order: 1 !important;
    direction: ltr !important;
}

/* Include time display in the left section */
.youtube-controls-left .youtube-time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 4px;
    direction: ltr !important;
}

.youtube-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto !important;
    margin-right: 0 !important;
    order: 2 !important;
    direction: ltr !important;
}

.youtube-control-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.youtube-control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.youtube-control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.youtube-control-btn:hover::before {
    opacity: 1;
}

.youtube-control-btn:active {
    transform: scale(0.95);
}

.youtube-control-icon {
    font-size: 1.5rem;
    color: white;
    width: 24px;
    height: 24px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.youtube-control-btn:hover .youtube-control-icon {
    transform: scale(1.1);
}

/* Volume wrapper - shadow box */
.youtube-volume-wrapper {
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.youtube-volume-wrapper:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Volume slider */
.youtube-volume-slider {
    width: 52px;
    height: 3px;
    background: #494949;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.youtube-volume-slider:hover {
    width: 60px;
    background: #5a5a5a;
}

.youtube-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.youtube-volume-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Time display */
.youtube-time-display {
    color: white;
    font-size: 0.8125rem;
    font-weight: 400;
    white-space: nowrap;
}

/* Make play/pause button slightly bigger - main control */
#youtubePlayPauseBtn {
    width: 44px;
    height: 44px;
}

#youtubePlayPauseBtn .youtube-control-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Settings menu */
.youtube-settings-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0 !important;
    left: auto !important;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 160px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    direction: ltr !important;
    text-align: left !important;
}

.youtube-settings-option {
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.875rem;
}

.youtube-settings-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* YouTube Iframe Container */
#youtubeIframeContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

/* Fullscreen mode - YouTube iframe fills screen */
:fullscreen #youtubeIframeContainer,
::-webkit-full-screen #youtubeIframeContainer,
::-moz-full-screen #youtubeIframeContainer,
:-ms-fullscreen #youtubeIframeContainer {
    width: 100% !important;
    height: 100% !important;
}

:fullscreen #youtubeIframeContainer iframe,
::-webkit-full-screen #youtubeIframeContainer iframe,
::-moz-full-screen #youtubeIframeContainer iframe,
:-ms-fullscreen #youtubeIframeContainer iframe {
    width: 100% !important;
    height: 100% !important;
}

#youtubeIframeContainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Custom Player Container */
#customPlayerContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}



.youtube-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    z-index: 15;
    display: none;
}



/* Video Info Panel */
#video-info-panel {
    display: none;
}

#video-info-panel.video-info {
    display: block;
}

.video-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
}

.video-description {
    color: #000000;
    line-height: 1.6;
    max-height: 4.5em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.video-description.expanded {
    max-height: none;
}

.description-toggle {
    background: none;
    border: none;
    color: #1e40af;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    transition: color 0.2s;
}

.description-toggle:hover {
    color: #1e3a8a;
}



/* General body styles */
body {
    font-family: 'Manrope', sans-serif;
    color: #000;
    line-height: 1.6;
    background-color: #fff;
}

@media (max-width: 767px) {
    .course-player-wrapper {
        padding: 0 !important;
    }
}

/* Main Container */
.course-container {
    animation: fadeIn 0.6s ease-out;
    width: 100%;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.course-header {
    margin-bottom: 2rem;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-header h1 {
    font-family: 'Crimson Pro', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #000000;
}

.course-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Layout Grid */
.course-grid {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 2rem;
    align-items: start;
    overflow-x: hidden;
    width: 100%;
}

@media (max-width: 1200px) {
    .course-grid {
        grid-template-columns: 1fr;
    }

    .course-sidebar {
        order: -1;
    }
}

/* Video Player Section */
.video-section {
    animation: slideUp 0.6s ease-out 0.2s both;
    overflow-x: hidden;
    width: 100%;
    margin-bottom: 2rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-container {
    background: #000000;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.video-container:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.video-player {
    position: relative;
    aspect-ratio: 16/9;
    background: #000000;
}

.video-player video,
.video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.video-info {
    padding: 1.5rem;
    border-top: 1px solid #f8f9fa;
    background: white;
}

.video-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
}

.video-description {
    color: #000000;
    line-height: 1.6;
    max-height: 4.5em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.video-description.expanded {
    max-height: none;
}

.description-toggle {
    background: none;
    border: none;
    color: #1e40af;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    transition: color 0.2s;
}

.description-toggle:hover {
    color: #1e3a8a;
}

/* Progress & Certificate Section */
.progress-certificate-section {
    background: white;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.progress-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}

.progress-header-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.encouragement-text {
    font-size: 1rem;
    color: #3b82f6;
    font-weight: 600;
    margin: 0;
}

/* Course Progress Bar */
.course-progress-bar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.progress-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
}

.progress-label i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-value {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.progress-value .count {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.progress-value .separator {
    font-size: 1.5rem;
    font-weight: 600;
    color: #cbd5e1;
    line-height: 1;
}

.progress-value .total {
    font-size: 1.5rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1;
}

.progress-value .lessons-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin-left: 0.25rem;
}

.progress-bar-wrapper-large {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-track-large {
    flex: 1;
    height: 14px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar-fill-large {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.progress-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-percentage-large {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 4rem;
    text-align: right;
}

/* Certificate Ready */
.certificate-ready {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(22, 163, 74, 0.08) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    animation: celebrationPulse 2s ease-in-out infinite;
}

@keyframes celebrationPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

.certificate-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
    flex-shrink: 0;
}

.certificate-content {
    flex: 1;
}

.certificate-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 0.375rem;
}

.certificate-content p {
    font-size: 0.9375rem;
    color: #166534;
    margin: 0;
}

.certificate-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    font-size: 0.9375rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.certificate-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
    color: white;
}

.certificate-download-btn i {
    font-size: 1.125rem;
}

.certificate-download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Requirements Message */
.requirements-message {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(234, 88, 12, 0.08) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #c2410c;
}

.requirements-message i {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: #f97316;
}

.requirements-message p {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #c2410c;
}

/* Video Completion Toast */
.video-toast {
    position: fixed;
    top: -200px;
    right: 2rem;
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 420px;
    z-index: 10000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #3b82f6;
    overflow: hidden;
}

.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(59, 130, 246, 0.1);
}

.toast-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    width: 0%;
    transition: width 5s linear;
}

.video-toast.show {
    top: 2rem;
    animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.video-toast.hide {
    opacity: 0;
    transform: translateX(120%);
}

@keyframes slideInBounce {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }

    60% {
        transform: translateX(-10px);
        opacity: 1;
    }

    80% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0);
    }
}

.toast-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
    }
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.toast-message {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

.toast-close i {
    font-size: 1.25rem;
}

/* Mobile Toast */
@media (max-width: 640px) {
    .video-toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
        padding: 1rem;
    }

    .video-toast.show {
        top: 1rem;
    }

    .toast-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .toast-title {
        font-size: 0.9375rem;
    }

    .toast-message {
        font-size: 0.8125rem;
    }
}

/* Tabs Section - shadcn style */
.tabs-section {
    width: 100%;
}

.tabs-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: -1px;
}

.tab-button i {
    font-size: 1.125rem;
}

.tab-button.active {
    color: var(--foreground);
    border-bottom-color: var(--primary);
}

.tab-button.active i {
    color: var(--primary);
}

.tab-button:hover:not(.active) {
    color: var(--foreground);
}

.tabs-content-wrapper {
    width: 100%;
}

.tab-content {
    display: none;
    animation: tabFadeIn 0.3s ease;
}

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

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tabs-header {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.25rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        flex: 0 0 auto;
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .tab-button i {
        font-size: 1rem;
    }

    .tab-content.active {
        width: 100% !important;
    }

    .quiz-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .quiz-actions {
        width: 100%;
    }

    .quiz-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .course-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .course-info-card {
        padding: 1rem 1.25rem;
    }

    /* Video Player Info Mobile */
    .video-player-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.875rem;
        padding: 0.875rem 1rem;
    }

    .video-player-info .instructor-info {
        width: 100%;
    }

    .video-player-info .course-meta-tags {
        width: 100%;
        flex-wrap: wrap;
    }

    .video-player-info .meta-tag {
        flex: 1;
        justify-content: center;
        min-width: calc(33.333% - 0.375rem);
    }

    .empty-state {
        padding: 2rem 1.5rem;
    }

    /* Progress Section Mobile */
    .progress-certificate-section {
        padding: 1.5rem;
    }

    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .progress-icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.75rem;
    }

    .progress-header-content h3 {
        font-size: 1.25rem;
    }

    .encouragement-text {
        font-size: 0.9375rem;
    }

    .course-progress-bar {
        padding: 1.5rem;
    }

    .progress-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .certificate-ready {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .certificate-download-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .quiz-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }

    .quiz-content h4 {
        font-size: 1rem;
    }

    .quiz-content p {
        font-size: 0.8125rem;
    }

    .empty-state-icon {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

    .empty-state p {
        font-size: 0.9375rem;
    }

    /* Progress Section Smaller Screens */
    .progress-certificate-section {
        padding: 1.25rem;
    }

    .progress-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }

    .progress-header-content h3 {
        font-size: 1.125rem;
    }

    .encouragement-text {
        font-size: 0.875rem;
    }

    .course-progress-bar {
        padding: 1.25rem;
    }

    .progress-label {
        font-size: 0.9375rem;
    }

    .progress-label i {
        font-size: 1.25rem;
    }

    .progress-value .count {
        font-size: 1.5rem;
    }

    .progress-value .total {
        font-size: 1.25rem;
    }

    .progress-value .lessons-text {
        font-size: 0.8125rem;
    }

    .progress-bar-track-large {
        height: 12px;
    }

    .progress-percentage-large {
        font-size: 1.125rem;
        min-width: 3.5rem;
    }

    .certificate-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }

    .certificate-content h4 {
        font-size: 1rem;
    }

    .certificate-content p {
        font-size: 0.875rem;
    }

    .certificate-download-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Quiz Generation CTA */
.quiz-cta {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #1e40af 100%);
    background-size: 200% 200%;
    animation: gradientAnimation 6s ease infinite;
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quiz-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.quiz-cta:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.5);
}

.quiz-cta-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.quiz-cta-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quiz-cta-content p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.quiz-cta-button {
    background: white;
    color: #1e40af;
    border: 2px solid #1e40af;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.quiz-cta-button:hover {
    background: #1e40af;
    color: white;
    transform: scale(1.05);
}

/* Course Sidebar */
.course-sidebar {
    position: sticky;
    top: 2rem;
    animation: slideLeft 0.6s ease-out 0.4s both;
}

/* Fix Bootstrap column layout for sidebar on large screens (1200px+) */
@media (min-width: 1200px) {
    .row:has(.course-sidebar) {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .row:has(.course-sidebar)>.col-lg-9 {
        flex: 1;
        max-width: calc(100% - 400px);
    }

    .row:has(.course-sidebar)>.col-lg-3 {
        flex: 0 0 380px;
        max-width: 380px;
    }
}

/* Hide the sidebar column on screens below 1200px */
@media (max-width: 1199px) {
    .col-lg-3:has(.course-sidebar) {
        display: none;
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-card {
    background: white;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.sidebar-header {
    padding: 1.75rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
}

.sidebar-header h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header h2 i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar {
    height: 8px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.875rem;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.progress-text::before {
    content: '';
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
}

.sidebar-content {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 99px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 99px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
}

/* Accordion */
.accordion-item {
    margin-bottom: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.accordion-trigger {
    width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1e293b;
    transition: all 0.2s;
}

.accordion-trigger:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(147, 197, 253, 0.03) 100%);
}

.accordion-trigger.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
}

.accordion-trigger-content .title {
    margin-bottom: 0.25rem;
    color: #1e293b;
    font-weight: 700;
}

.accordion-trigger-content .subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.accordion-trigger-content .subtitle::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #3b82f6;
    border-radius: 50%;
}

.accordion-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.25rem;
    color: #3b82f6;
}

.accordion-trigger.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(248, 250, 252, 0.4);
}

.accordion-content.active {
    max-height: max-content;
}

/* Lesson Item */
.lesson-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
    margin-bottom: 0.5rem;
}

.lesson-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lesson-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
    transform: translateX(2px);
}

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

.lesson-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(147, 197, 253, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.lesson-item.active::before {
    opacity: 1;
}

.lesson-thumbnail {
    width: 90px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.lesson-thumbnail-placeholder {
    width: 90px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 197, 253, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 1.75rem;
    flex-shrink: 0;
}

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

.lesson-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.lesson-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.lesson-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    flex-wrap: wrap;
    font-weight: 500;
}

.lesson-meta i {
    font-size: 0.875rem;
    color: #ffffff;
}

.lesson-meta>span:first-child {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge.free {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background: white;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--color-primary);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* Quiz List */
.quiz-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    box-sizing: border-box;
}

.quiz-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quiz-item:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.quiz-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.quiz-content {
    flex: 1;
}

.quiz-content h4 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.375rem;
}

.quiz-content p {
    font-size: 0.875rem;
    color: #64748b;
}

.quiz-actions {
    display: flex;
    gap: 0.75rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(37, 99, 235, 0.03) 100%);
    border-radius: 16px;
    border: 2px dashed rgba(59, 130, 246, 0.2);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.625rem;
}

.empty-state p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 32rem;
    margin: 0 auto;
}

/* Course Info Cards - Overview Tab (shadcn style) */
.course-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.course-info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.course-info-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.course-info-card .info-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted);
    border-radius: 8px;
    flex-shrink: 0;
}

.course-info-card .info-icon i {
    font-size: 1.25rem;
    color: var(--foreground);
}

.course-info-card .info-content {
    flex: 1;
    min-width: 0;
}

.course-info-card .info-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.course-info-card .info-value {
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.9375rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Compact Video Player Info Section (shadcn style) */
.video-player-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0;
    margin-bottom: 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.video-player-info .instructor-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
    min-width: 0;
}

.video-player-info .instructor-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.video-player-info .instructor-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.video-player-info .instructor-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
}

.video-player-info .instructor-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1;
}

.video-player-info .instructor-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-player-info .course-meta-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.video-player-info .meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.video-player-info .meta-tag i {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ========================================
   FRESH MODERN TABS DESIGN
   ======================================== */
.fresh-tabs-container {
    background: transparent;
    border-radius: 16px;
    overflow: visible;
    border: none;
    padding: 4px 0;
}

.fresh-tabs-list {
    display: flex;
    gap: 6px;
    padding: 0;
    background: linear-gradient(135deg, rgba(244, 246, 248, 0.8) 0%, rgba(241, 245, 249, 0.9) 100%);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fresh-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex: 1;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.fresh-tab .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fresh-tab .tab-icon i {
    font-size: 1.125rem;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fresh-tab .tab-label {
    color: inherit;
    opacity: 0.8;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fresh-tab:hover {
    color: #64748b;
}

.fresh-tab:hover .tab-label {
    opacity: 1;
}

.fresh-tab.active {
    color: #1e293b;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.fresh-tab.active .tab-icon {
    transform: scale(1.1);
}

.fresh-tab.active .tab-icon i {
    color: #3b82f6;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.fresh-tab.active .tab-label {
    opacity: 1;
    color: #1e293b;
}


.fresh-tabs-content {
    padding: 10px 10px;
}

/* ========================================
   MODERN TABS (deprecated - use fresh-tabs)
   ======================================== */
.modern-tabs {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.modern-tabs-list {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 0.5rem;
}

.modern-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.modern-tab i {
    font-size: 1.125rem;
}

.modern-tab:hover {
    color: #475569;
}

.modern-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: white;
}

.modern-tab.active i {
    color: #2563eb;
}

.modern-tabs-panels {
    padding: 1.5rem;
}

.modern-tab-panel {
    display: none;
}

.modern-tab-panel.active {
    display: block;
}

/* ========================================
   INFO PANELS (Tab Content)
   ======================================== */
.info-panel {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.info-panel:last-child {
    margin-bottom: 0;
}

.info-panel-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #e2e8f0;
}

.info-panel-title i {
    font-size: 1.25rem;
    color: #2563eb;
}

.info-panel-title h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.info-panel-body {
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.75;
}

.expand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding: 0;
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.expand-link:hover {
    color: #1d4ed8;
}

.expand-link i {
    font-size: 0.875rem;
}

/* ========================================
   MARKDOWN CONTENT STYLING
   ======================================== */
.markdown-content {
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.8;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #0f172a;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.4;
}

.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.25rem; }
.markdown-content h3 { font-size: 1.125rem; }
.markdown-content h4 { font-size: 1rem; }

.markdown-content p {
    margin-bottom: 1em;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.markdown-content li {
    margin-bottom: 0.5em;
}

.markdown-content li::marker {
    color: #2563eb;
}

.markdown-content strong {
    color: #0f172a;
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content code {
    background: #f1f5f9;
    padding: 0.125em 0.375em;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #be185d;
}

.markdown-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.markdown-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1rem;
    margin: 1em 0;
    color: #64748b;
    font-style: italic;
}

.markdown-content a {
    color: #2563eb;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.5em 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    text-align: left;
}

.markdown-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}

/* Clamp styles for collapsed content */
.markdown-clamp {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.markdown-clamp::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
}

.markdown-clamp-lg {
    max-height: 250px;
    overflow: hidden;
    position: relative;
}

.markdown-clamp-lg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
}

/* Transcript specific styling */
.transcript-content {
    white-space: pre-wrap;
}

/* Dark mode overrides for markdown */
html.dark-mode .markdown-content {
    color: #cbd5e1;
}

html.dark-mode .markdown-content h1,
html.dark-mode .markdown-content h2,
html.dark-mode .markdown-content h3,
html.dark-mode .markdown-content h4,
html.dark-mode .markdown-content h5,
html.dark-mode .markdown-content h6,
html.dark-mode .markdown-content strong {
    color: #f1f5f9;
}

html.dark-mode .markdown-content code {
    background: #334155;
    color: #f472b6;
}

html.dark-mode .markdown-content blockquote {
    color: #94a3b8;
}

html.dark-mode .markdown-content th {
    background: #334155;
    color: #f1f5f9;
}

html.dark-mode .markdown-content th,
html.dark-mode .markdown-content td {
    border-color: #475569;
}

html.dark-mode .markdown-clamp::after,
html.dark-mode .markdown-clamp-lg::after {
    background: none;
}

/* ========================================
   EMPTY PANEL STATE
   ======================================== */
.empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.empty-icon i {
    font-size: 2rem;
    color: #94a3b8;
}

.empty-panel h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.empty-panel p {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    max-width: 28rem;
    line-height: 1.6;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .modern-tabs-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .modern-tab {
        flex: 0 0 auto;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .modern-tabs-panels {
        padding: 1rem;
    }

    .fresh-tabs-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 4px;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: 16px;
    }

    .fresh-tabs-list::-webkit-scrollbar {
        display: none;
    }

    .fresh-tab {
        padding: 10px 16px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex: none;
        border-radius: 14px;
    }

    .fresh-tab .tab-icon {
        width: 20px;
        height: 20px;
    }

    .fresh-tab .tab-icon i {
        font-size: 1rem;
    }


    .fresh-tabs-content {
        padding: 10px 0;
    }

    .info-panel {
        padding: 1rem;
    }
}

/* What You'll Learn Section */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 52, 54, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--color-mist);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-slate);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-charcoal);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    padding: var(--spacing-xl);
    border-top: 1px solid var(--color-mist);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
    .course-container {
        padding: var(--spacing-lg) var(--spacing-md);
        width: 100%;
    }

    .course-header h1 {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .course-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .tabs-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    .video-section {
        display: flex;
        flex-direction: column;
        order: 1;
        width: 100%;
        flex-shrink: 0;
    }

    .video-container {
        order: 1;
    }

    .quiz-cta {
        order: 2;
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
    }

    .quiz-cta-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }

    .quiz-cta-content h3 {
        font-size: 1.125rem;
    }

    .quiz-cta-content p {
        font-size: 0.8125rem;
        margin-bottom: var(--spacing-sm);
    }

    .quiz-cta-button {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
    }

    .tabs-container {
        order: 3;
    }

    .course-sidebar {
        order: 4;
    }

    .tabs-header {
        flex-direction: column;
    }

    .tab-button {
        justify-content: flex-start;
    }
}

/* ========================================
   AI QUIZ GENERATION MODAL STYLES
   ======================================== */
.video-modal {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-modal.flex {
    display: flex !important;
}

.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.video-modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 48rem;
    width: 100%;
    max-height: calc(95vh - 100px);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-mist);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.modal-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-title-wrapper {
    flex: 1;
}

.video-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin: 0;
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--color-slate);
    margin: 0.25rem 0 0 0;
}

.video-modal-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-mist);
    background: var(--color-white);
    color: var(--color-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.video-modal-close:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.video-modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 250px);
    overflow-y: auto;
}

.ai-quiz-info {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.info-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
}

.info-content p {
    font-size: 0.875rem;
    color: var(--color-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.quiz-length-indicator {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.length-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #1e40af;
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.video-selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.video-selection-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.selection-stats {
    display: flex;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

.video-selection-list {
    max-height: 24rem;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 0.5rem;
}

.video-selection-item {
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.video-selection-item:not(.disabled):hover {
    background: #f9fafb;
}

.video-selection-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.video-selection-label {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
}

.video-selection-item.disabled .video-selection-label {
    cursor: not-allowed;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.video-select-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.video-select-checkbox:checked {
    background: #2563eb;
    border-color: #2563eb;
}

.video-selection-info {
    flex: 1;
}

.video-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.video-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.video-selection-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.video-selection-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
}

.video-selection-badge.transcript-ready {
    background: #d1fae5;
    color: #047857;
}

.video-selection-badge.transcript-processing {
    background: #fef3c7;
    color: #b45309;
}

.video-selection-badge.no-transcript {
    background: #fee2e2;
    color: #b91c1c;
}

.video-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quiz-language-section {
    margin-top: 1.5rem;
}

.quiz-language-section h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

.language-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.language-option {
    position: relative;
    cursor: pointer;
}

.language-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.language-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    background: white;
}

.language-option input[type="radio"]:checked+.language-label {
    border-color: #2563eb;
    background: #eff6ff;
}

.language-option:hover .language-label {
    border-color: #cbd5e1;
}

.language-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.language-option input[type="radio"]:checked+.language-label .language-icon {
    background: #2563eb;
    color: white;
}

.language-info h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.language-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.video-modal-footer {
    padding: 2rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    background: #fafafa;
    min-height: 80px;
}

.footer-actions {
    display: flex;
    gap: 0.75rem;
}

/* ========================================
   RESPONSIVE CONTENTS TAB
   ======================================== */

/* Desktop: Hide Contents tab, show sidebar */
@media (min-width: 1200px) {
    .mobile-only-tab {
        display: none !important;
    }

    .mobile-only-tab-content {
        display: none !important;
    }

    .course-sidebar {
        display: block !important;
    }
}

/* Tablet and Mobile: Show Contents tab, hide sidebar */
@media (max-width: 1199px) {
    .mobile-only-tab {
        display: flex !important;
    }

    /* Don't force display - let the tab system control it via .active class */
    .mobile-only-tab-content {
        /* Removed display: block */
    }

    .course-sidebar {
        display: none !important;
    }

    /* Make the contents tab content scrollable and fully visible */
    .mobile-only-tab-content .sidebar-content {
        max-height: none;
        overflow-y: visible;
        min-height: auto;
        height: auto;
    }

    /* Ensure mobile tab content is fully visible when active */
    .mobile-only-tab-content.active {
        display: block !important;
        width: 100% !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 576px) {
    .mobile-only-tab-content .sidebar-content {
        max-height: none;
        overflow-y: visible;
    }
}

/* Certificate Share Styles */
.certificate-buttons-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.certificate-share-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    cursor: pointer;
    border: none;
}

/* Share Modal Styles */
.share-modal-preview {
    margin-bottom: 20px;
}

.share-modal-preview img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-success-banner {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.share-success-banner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.share-success-icon {
    color: #16a34a;
    font-size: 20px;
}

.share-success-title {
    font-weight: 700;
    color: #166534;
}

.share-success-text {
    font-size: 14px;
    color: #166534;
    margin: 0;
}

.share-instructions-box {
    text-align: left;
    background: #eff6ff;
    border: 2px solid #93c5fd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.share-instructions-header {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-instructions-header i {
    font-size: 20px;
}

.share-instructions-list {
    margin: 0;
    padding-left: 20px;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.6;
}



.share-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.share-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-social-btn i {
    font-size: 20px;
}

.share-social-btn.facebook {
    background: #1877f2;
}

.share-social-btn.twitter {
    background: #1da1f2;
}

.share-social-btn.linkedin {
    background: #0077b5;
}

.share-social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-download-again-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: #6b7280;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    margin-top: 12px;
}

.share-download-again-btn:hover {
    background: #4b5563;
}

.share-download-again-btn i {
    font-size: 20px;
}

/* Expandable Text Styles */
.expandable-content {
    position: relative;
}

.expandable-text {
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 1.7;
    color: #475569;
}

.expandable-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: var(--max-lines, 5);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.show-more-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    transition: color 0.2s;
}

.show-more-btn:hover {
    color: #2563eb;
}

.show-more-btn i {
    transition: transform 0.3s ease;
}

.show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* ========================================
   UTILITY CLASSES (replacing inline styles)
   ======================================== */

/* Layout Utilities */
.col-lg-70 {
    width: 70%;
    max-width: 70%;
    flex: 0 0 70%;
}

.col-lg-30 {
    width: 30%;
    max-width: 30%;
    flex: 0 0 30%;
}

/* Display Utilities */
/* Removed .d-none to avoid conflict with Bootstrap */
.d-flex {
    display: flex !important;
}

/* Flex Utilities */
.flex-column {
    flex-direction: column !important;
}

.flex-row {
    flex-direction: row !important;
}

.align-items-center {
    align-items: center !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.gap-0 {
    gap: 0 !important;
}

.gap-1 {
    gap: 0.25rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 0.75rem !important;
}

.gap-4 {
    gap: 1rem !important;
}

.gap-5 {
    gap: 1.25rem !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

.gap-8 {
    gap: 2rem !important;
}

.gap-12 {
    gap: 3rem !important;
}

/* Spacing Utilities */
.m-0 {
    margin: 0 !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mr-0 {
    margin-right: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.ml-0 {
    margin-left: 0 !important;
}

.m-1 {
    margin: 0.25rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.ml-1 {
    margin-left: 0.25rem !important;
}

.m-2 {
    margin: 0.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

.m-3 {
    margin: 0.75rem !important;
}

.mt-3 {
    margin-top: 0.75rem !important;
}

.mr-3 {
    margin-right: 0.75rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.ml-3 {
    margin-left: 0.75rem !important;
}

.m-4 {
    margin: 1rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.mr-4 {
    margin-right: 1rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.ml-4 {
    margin-left: 1rem !important;
}

.mt-6 {
    margin-top: 1.5rem !important;
}

.mb-6 {
    margin-bottom: 1.5rem !important;
}

.mt-8 {
    margin-top: 2rem !important;
}

.mb-8 {
    margin-bottom: 2rem !important;
}

.p-0 {
    padding: 0 !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

/* Content Typography */
.content-text {
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.75;
}

.content-heading {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1rem 0;
}

/* Progress Bar Dynamic Width */
.progress-width-dynamic {
    /* Width set inline via style attribute */
}

/* Checkmark icon for watched videos */
.icon-check-success {
    color: var(--color-success);
    flex-shrink: 0;
    font-size: 1.125rem;
}

/* Modal styles */
.modal-hidden {
    display: none !important;
}

/* Quiz Link */
.quiz-link {
    text-decoration: none;
    color: inherit;
}

/* Certificate Section */
.certificate-section-flat {
    margin: 0;
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

/* Share Social Buttons */
.share-social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.share-social-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #1da1f2;
}

.share-linkedin {
    background: #0077b5;
}

.share-whatsapp {
    background: #25d366;
}

.share-icon {
    font-size: 24px;
}

.share-text {
    font-weight: 600;
}

/* Notification Styles */
.notification-box {
    text-align: left;
}

.notification-message {
    margin-bottom: 16px;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.notification-icon {
    color: #487bff;
    font-size: 20px;
}

.notification-title {
    color: #1f2937;
    font-weight: 600;
}

.notification-list {
    margin: 0;
    padding-left: 32px;
    color: #4b5563;
}

/* Error Message */
.error-message {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Download Actions */
.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* Dynamic Width Classes */
.width-dynamic {
    /* Width set inline via style attribute */
}

/* Progress Bar Position */
.progress-bar-position {
    position: absolute;
    bottom: 42px;
    left: 0;
    right: 0;
    padding: 0;
}

/* Button Margin Top */
.btn-mt-6 {
    margin-top: 1.5rem;
}

/* Text Align Left */
.text-left {
    text-align: left;
}

/* Margin Bottom */
.mb-12 {
    margin-bottom: 16px;
}

.mb-8px {
    margin-bottom: 8px;
}

/* Notification Box Gradient */
.notification-box-gradient {
    background: linear-gradient(135deg, rgba(72, 123, 255, 0.1) 0%, rgba(52, 97, 219, 0.1) 100%);
    border-radius: 12px;
    padding: 16px;
}

/* Share Copy Button */
.share-copy-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #6b7280;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.share-copy-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Cache buster - 1766416892 */

/* Custom Layout: Match Bootstrap grid (col-lg-9 = 75%, col-lg-3 = 25%) */
@media (min-width: 992px) {
    .sidebar-custom {
        width: 25% !important;
        max-width: 25% !important;
        flex: 0 0 25% !important;
    }

    .main-content-custom {
        width: 75% !important;
        max-width: 75% !important;
        flex: 0 0 75% !important;
    }
}

/* ========================================
   PREVIEW PAGE STYLES
   ======================================== */

/* Mobile Sidebar Section */
.mobile-sidebar-section {
    margin-bottom: 2rem;
}

.mobile-learn-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.mobile-learn-header {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary-foreground);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-learn-content {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Videos Section */
.videos-section {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.course-section-wrapper {
    margin-bottom: 1.5rem;
}

/* Section Header */
.section-header-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 1px solid var(--border);
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon-wrapper {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 0.5rem;
    color: var(--primary);
}

.section-icon {
    font-size: 1.125rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-foreground);
    margin: 0;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

.section-toggle-icon {
    transition: transform 0.3s;
}

.section-toggle-icon.rotated {
    transform: rotate(180deg);
}

/* Videos Grid */
.videos-grid {
    margin-top: 1rem;
}

/* Empty State */
.empty-state-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}
/* ========================================
   MODERN PLAYER ANIMATIONS
   ======================================== */

/* Player container fade in animation */
@keyframes playerFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Wrapper scale bounce animation */
@keyframes wrapperScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Spinning pulse for loading spinner */
@keyframes spinPulse {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
        opacity: 1;
    }
}

/* Pulse glow effect for progress bar */
@keyframes progressPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    }
}

/* Smooth ripple effect for buttons */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Play icon continuous pulse animation */
@keyframes playIconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.7));
    }
}
