/* Course Player Styles */

.course-player-container {
    min-height: calc(100vh - 70px);
    background-color: #000;
    padding-top: 0;
}

.player-layout {
    display: flex;
    height: calc(100vh - 70px);
}

/* Main Player Section */
.player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #000;
    overflow-y: auto;
}

/* Player Main Content */
.player-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

/* Video Player Wrapper */
.video-player-wrapper {
    position: relative;
    width: 100%;
    background-color: #000;
}

/* Back to Course Button */
.player-back-header {
    padding: 16px 24px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.back-to-course-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.back-to-course-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.back-to-course-btn:active {
    transform: translateY(0);
}

.back-to-course-btn svg {
    width: 20px;
    height: 20px;
}

/* Course Progress Bar */
.course-progress-container {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.course-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.course-progress-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.course-progress-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.course-progress-percentage {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.course-progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.course-progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
}

.course-progress-filled {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.course-progress-filled::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;
}

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

/* Audio Container - Independent from video */
.audio-container {
    position: relative;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: none;
    padding: 60px 40px;
    border-radius: 12px;
    margin: 20px;
    min-height: 400px;
    z-index: 10;
}

.audio-player-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.audio-player-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.audio-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.audio-info {
    flex: 1;
}

.audio-title-display {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.audio-time-display {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
}

.audio-controls-container {
    position: relative;
}

.course-audio {
    display: none;
}

.audio-main-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.audio-control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.audio-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.audio-progress-wrapper {
    flex: 1;
    position: relative;
}

.audio-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-light);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-filled {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s;
}

.audio-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: grab;
    transition: left 0.1s;
}

.audio-progress-handle:active {
    cursor: grabbing;
}

.audio-volume-wrapper {
    width: 100px;
    display: flex;
    align-items: center;
}

.audio-volume-slider {
    width: 100%;
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
}

.audio-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* PDF Viewer Container */
.pdf-container {
    display: none;
    width: calc(100% - 40px);
    background-color: #525252;
    min-height: 600px;
    margin: 20px;
    border-radius: 8px;
    overflow: hidden;
    z-index: 10;
}

.pdf-viewer-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.pdf-toolbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #404040;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-toolbar-btn:hover {
    background-color: #525252;
}

.pdf-page-info {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin: 0 8px;
}

.pdf-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: white;
    font-size: 14px;
}

.pdf-zoom-controls button {
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: 600;
}

.pdf-viewer {
    flex: 1;
    overflow: auto;
    background-color: #525252;
    position: relative;
}

.pdf-viewer iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}

/* Quiz Container */
.quiz-container {
    display: none;
    width: 100%;
    background-color: var(--white);
    min-height: 600px;
    padding: 40px;
}

.quiz-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.quiz-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.quiz-progress {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 600;
}

.quiz-content {
    margin-bottom: 32px;
}

.quiz-question {
    margin-bottom: 24px;
}

.quiz-question h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 24px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-light);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background-color: #f3f0ff;
}

.quiz-option input[type="radio"],
.quiz-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.quiz-option-text {
    flex: 1;
    font-size: 16px;
    color: var(--text-color);
    cursor: pointer;
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.quiz-btn {
    padding: 12px 32px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-prev-btn {
    background-color: var(--bg-light);
    color: var(--text-color);
}

.quiz-prev-btn:hover {
    background-color: #e9ecef;
}

.quiz-next-btn,
.quiz-submit-btn {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.quiz-next-btn:hover,
.quiz-submit-btn:hover {
    background-color: #4a1fb8;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    cursor: pointer;
}

/* Video Navigation Buttons */
.video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
}

.video-container:hover .video-nav-btn {
    opacity: 1;
    pointer-events: auto;
}

.video-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev-video-btn {
    left: 20px;
}

.next-video-btn {
    right: 20px;
}

.download-certificate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    height: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: relative;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.download-certificate-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.certificate-btn-text {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.download-certificate-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.video-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2.5;
}

.course-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Video Watermark */
.video-watermark {
    position: absolute;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    z-index: 15;
    user-select: none;
    -webkit-user-select: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Video Protection Overlay */
.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        );
    pointer-events: none;
    z-index: 5;
    user-select: none;
    -webkit-user-select: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
}

.video-container:hover .video-overlay {
    opacity: 1;
}

.play-pause-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: auto;
}

.play-pause-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Custom Video Controls */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 16px;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 20;
}

.video-container:hover .custom-controls,
.custom-controls.show {
    opacity: 1;
}

.controls-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.control-btn svg {
    width: 20px;
    height: 20px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 12px;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #a435f0;
    width: 0%;
    transition: width 0.1s;
    z-index: 2;
}

.progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    width: 0%;
    z-index: 1;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-color: #a435f0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
    pointer-events: none;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

/* Controls Bottom */
.controls-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Control Dropdown */
.control-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    min-width: 120px;
    padding: 4px 0;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: white;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

.time-display {
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
}

.volume-slider-container {
    width: 80px;
    display: none;
    align-items: center;
    position: relative;
}

.controls-left:hover .volume-slider-container {
    display: flex;
}

.volume-slider-container:hover {
    display: flex;
}

.volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Course Info Header */
.course-info-header {
    padding: 24px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.course-info-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.course-info-header p {
    font-size: 16px;
    color: var(--text-light);
}

/* Player Tabs */
.player-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.player-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.player-tab-btn:hover {
    color: var(--text-color);
}

.player-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.player-tab-btn svg {
    width: 20px;
    height: 20px;
}

/* Hide tabs section - Notes moved to main content */
.player-tabs {
    display: none;
}

.player-tab-content {
    display: none;
}

/* Course Info Header */
.course-info-header {
    padding: 24px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.course-info-header > div {
    flex: 1;
}

.course-info-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.course-info-header p {
    font-size: 14px;
    color: var(--text-light);
}

.complete-lesson-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.complete-lesson-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

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

.complete-lesson-btn svg {
    width: 20px;
    height: 20px;
}

/* Course Completion Modal */
.completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.completion-content {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.celebration-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #667eea;
    animation: confettiFall 3s infinite;
}

.confetti:nth-child(1) {
    left: 10%;
    background: #667eea;
    animation-delay: 0s;
}

.confetti:nth-child(2) {
    left: 20%;
    background: #764ba2;
    animation-delay: 0.3s;
}

.confetti:nth-child(3) {
    left: 30%;
    background: #f093fb;
    animation-delay: 0.6s;
}

.confetti:nth-child(4) {
    left: 40%;
    background: #4facfe;
    animation-delay: 0.9s;
}

.confetti:nth-child(5) {
    left: 50%;
    background: #10b981;
    animation-delay: 1.2s;
}

.confetti:nth-child(6) {
    left: 60%;
    background: #f59e0b;
    animation-delay: 1.5s;
}

.confetti:nth-child(7) {
    left: 70%;
    background: #ef4444;
    animation-delay: 1.8s;
}

.confetti:nth-child(8) {
    left: 80%;
    background: #8b5cf6;
    animation-delay: 2.1s;
}

.confetti:nth-child(9) {
    left: 90%;
    background: #06b6d4;
    animation-delay: 2.4s;
}

.confetti:nth-child(10) {
    left: 50%;
    background: #ec4899;
    animation-delay: 2.7s;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(600px) rotate(720deg);
        opacity: 0;
    }
}

.completion-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.completion-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}

.completion-message {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 8px;
}

.completion-submessage {
    font-size: 16px;
    color: #718096;
    margin-bottom: 32px;
}

.completion-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.completion-actions .btn-primary,
.completion-actions .btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.completion-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.completion-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.completion-actions .btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.completion-actions .btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* Player Notes and AI Section */
.player-notes-ai-section {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.player-notes-ai-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.player-notes-ai-tab-btn {
    flex: 1;
    padding: 16px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.player-notes-ai-tab-btn:hover {
    color: var(--text-color);
    background-color: var(--white);
}

.player-notes-ai-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--white);
}

.player-notes-ai-content {
    padding: 24px;
    min-height: 400px;
    width: 100%;
    box-sizing: border-box;
}

.player-notes-ai-pane {
    display: none;
    width: 100%;
}

.player-notes-ai-pane.active {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    visibility: visible;
    opacity: 1;
}

.player-notes-ai-pane .add-note-section {
    margin-bottom: 24px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.player-notes-ai-pane .notes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 8px;
}

/* AI Assistant Main */
.ai-assistant-main {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    height: 100%;
    width: 100%;
    visibility: visible;
    opacity: 1;
}

.ai-assistant-main .ai-chat {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: var(--white);
    border-radius: 8px;
    margin-bottom: 16px;
    min-height: 300px;
    max-height: 500px;
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.ai-assistant-main .ai-input-container {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.ai-assistant-main .ai-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.ai-assistant-main .ai-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ai-assistant-main .ai-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background-color: #000;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-assistant-main .ai-send-btn:hover {
    background-color: #333;
}

.ai-assistant-main .ai-message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s;
}

.ai-assistant-main .message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.ai-assistant-main .ai-message.user .message-avatar {
    background-color: #000;
}

.ai-assistant-main .message-content {
    flex: 1;
    background-color: var(--bg-light);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-assistant-main .message-content p {
    margin: 0;
    padding: 0;
}

.ai-assistant-main .ai-message.ai-welcome {
    margin-bottom: 16px;
}

.ai-assistant-main .ai-message.ai-welcome .message-content {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.ai-assistant-main .ai-message.user {
    flex-direction: row-reverse;
}

.ai-assistant-main .ai-message.user .message-content {
    background-color: #000;
    color: white;
    border-color: #000;
}

.note-time-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px;
    background-color: var(--bg-light);
    border-radius: 6px;
}

.note-time-display span {
    font-size: 14px;
    color: var(--text-color);
}

.note-time-display strong {
    color: var(--primary-color);
    font-size: 16px;
}

.note-time-display button,
#addNoteBtn {
    background-color: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.note-time-display button:hover,
#addNoteBtn:hover {
    background-color: #333;
}

#noteText {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

#noteText:focus {
    outline: none;
    border-color: var(--primary-color);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 8px;
}

.notes-list::-webkit-scrollbar {
    width: 6px;
}

.notes-list::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.notes-list::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 3px;
}

.notes-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

.note-item {
    background-color: var(--white);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    position: relative;
}

.note-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.note-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.note-time-badge:hover {
    background-color: #8b2cd4;
    transform: scale(1.05);
}

.note-time-badge svg {
    width: 14px;
    height: 14px;
}

.note-actions {
    display: flex;
    gap: 8px;
}

.note-action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.note-action-btn:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.note-content {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
}

.note-date {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-light);
}

/* AI Assistant Section */
.ai-assistant {
    display: flex;
    flex-direction: column;
    height: 600px;
    background-color: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.ai-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.ai-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-color);
}

.ai-header p {
    font-size: 14px;
    color: var(--text-light);
}

.ai-chat {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.ai-message.user .message-avatar {
    background-color: var(--primary-color);
    color: white;
}

.ai-message.ai .message-avatar,
.ai-message.ai-welcome .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-content {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: var(--bg-light);
}

.ai-message.user .message-content {
    background-color: var(--primary-color);
    color: white;
}

.message-content p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
}

.ai-input-container {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--white);
}

.ai-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.ai-input:focus {
    border-color: var(--primary-color);
}

.ai-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    background-color: #8b2cd4;
    transform: scale(1.05);
}

.ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sidebar */
.player-sidebar {
    width: 360px;
    background-color: var(--white);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background-color: var(--bg-light);
}

.course-content-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    min-height: 0;
}

/* Sidebar Notes Section */
.sidebar-notes-section {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
    max-height: 50%;
    min-height: 0;
}

.sidebar-notes-header {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.sidebar-tab-btn:hover {
    color: var(--text-color);
    background-color: var(--white);
}

.sidebar-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--white);
}

.sidebar-notes-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

.sidebar-tab-pane {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    flex-direction: column;
    min-height: 0;
}

.sidebar-tab-pane.active {
    display: flex;
}

.sidebar-notes-content .add-note-section {
    margin-bottom: 16px;
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-notes-content .add-note-section h3 {
    display: none;
}

.sidebar-notes-content .notes-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 8px;
    margin-top: 16px;
}

/* AI Assistant in Sidebar */
.ai-assistant-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.ai-assistant-sidebar .ai-chat {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.ai-assistant-sidebar .ai-input-container {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background-color: var(--white);
    flex-shrink: 0;
}

.ai-assistant-sidebar .ai-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.ai-assistant-sidebar .ai-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ai-assistant-sidebar .ai-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background-color: #000;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-assistant-sidebar .ai-send-btn:hover {
    background-color: #333;
}

.ai-assistant-sidebar .ai-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s;
}

.ai-assistant-sidebar .message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.ai-assistant-sidebar .ai-message.user .message-avatar {
    background-color: #000;
}

.ai-assistant-sidebar .message-content {
    flex: 1;
    background-color: var(--bg-light);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
}

.ai-assistant-sidebar .ai-message.user {
    flex-direction: row-reverse;
}

.ai-assistant-sidebar .ai-message.user .message-content {
    background-color: #000;
    color: white;
}

.content-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.section-header:hover {
    background-color: #e9ecef;
}

.section-header.active {
    background-color: var(--primary-color);
    color: white;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.section-count {
    font-size: 12px;
    opacity: 0.8;
}

.lesson-item-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.lesson-item-sidebar:hover {
    background-color: var(--bg-light);
}

.lesson-item-sidebar.active {
    background-color: #e7d5f5;
    border-left: 3px solid var(--primary-color);
}

.lesson-item-sidebar.completed {
    opacity: 0.7;
}

.lesson-item-sidebar.completed .lesson-title-sidebar::after {
    content: '✓';
    margin-left: 8px;
    color: var(--primary-color);
    font-weight: 700;
}

.lesson-icon-sidebar {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.lesson-icon-sidebar.video {
    background-color: #e3f2fd;
    color: #1976d2;
}

.lesson-icon-sidebar.file {
    background-color: #fff3e0;
    color: #f57c00;
}

.lesson-icon-sidebar.quiz {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

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

.lesson-title-sidebar {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-duration-sidebar {
    font-size: 12px;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .player-sidebar {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .player-back-header {
        padding: 12px 16px;
    }
    
    .back-to-course-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .audio-container {
        padding: 40px 20px;
        min-height: 400px;
    }
    
    .audio-player-wrapper {
        padding: 24px;
    }
    
    .audio-title {
        font-size: 20px;
    }
    
    .audio-control-btn {
        width: 48px;
        height: 48px;
    }
    
    .player-layout {
        flex-direction: column;
    }
    
    .player-sidebar {
        width: 100%;
        max-height: 300px;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    /* Hide video navigation buttons on mobile */
    .video-nav-btn {
        display: none !important;
    }
    
    .course-progress-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .download-certificate-btn {
        padding: 6px 12px;
        min-width: auto;
    }
    
    .certificate-btn-text {
        font-size: 11px;
    }
    
    .download-certificate-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .player-sidebar.collapsed {
        max-height: 60px;
        overflow: hidden;
    }
    
    .controls-left,
    .controls-right {
        gap: 8px;
    }
    
    .time-display {
        font-size: 12px;
        min-width: 80px;
    }
    
}

