﻿:root {
    --primary-color: #110842;
    --secondary-color: #f5f5f5;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --hover-bg: #e3f2fd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    overflow: hidden;
}

.main-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 10px;
    align-items: center;
    max-height: 90vh;
    overflow: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;
}

    .main-content::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

.video-section {
    flex-shrink: 0;
    position: relative;
    max-width: 1300px;
    width: 100%;
}

.toggle-sidebar-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
    display: none; /* Hidden on desktop */
}

    .toggle-sidebar-btn:hover {
        background-color: rgba(0, 0, 0, 0.9);
    }

.video-container {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    -webkit-justify-content: inherit;
    justify-content: inherit;
    -ms-align-content: inherit;
    -webkit-align-content: inherit;
    align-content: inherit;
    -webkit-align-items: inherit;
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(45deg, #1a1a1a, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    cursor: pointer;
    transition: all 0.3s;
}

    .video-player:hover {
        background: linear-gradient(45deg, #2a2a2a, #444);
    }

.content-section {
    flex: 1;
    padding: 10px;
    background-color: white;
    width: 100%;
    max-width: 1300px;
}

    .content-section::-webkit-scrollbar {
        width: 8px;
    }

    .content-section::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .content-section::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

        .content-section::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

.video-title-main {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.video-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.description-box {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 10px 20px;
    overflow: auto;
    max-height: 300px;
    margin-bottom: 30px;
}

.description-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

.empty-content {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 50px;
}

/* Sidebar Styles - Desktop */
.sidebar {
    width: 400px;
    max-height: 100vh;
    background-color: var(--secondary-color);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

.sidebar-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: fixed;
    max-width: 400px;
    width: 100%;
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s;
    display: none; /* Hidden on desktop */
}

    .close-sidebar-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

#courseList {
    margin-top: 43px;
}

.course-section {
    margin-bottom: 0;
}

.course-header {
    background-color: #e9ecef;
    color: var(--text-primary);
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s;
    border-bottom: 1px solid var(--border-color);
}

    .course-header:hover {
        background-color: #dee2e6;
    }

    .course-header i {
        transition: transform 0.3s;
    }

    .course-header.collapsed i {
        transform: rotate(-90deg);
    }

.video-list {
    background-color: white;
}

.video-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .video-item:hover {
        background-color: var(--hover-bg);
    }

    .video-item.active {
        background-color: var(--primary-color);
        color: white;
    }

        .video-item.active:hover {
            background-color: #1565c0;
        }

.video-thumbnail {
    width: 60px;
    height: 34px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-duration {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.video-item.active .video-duration {
    color: rgba(255, 255, 255, 0.8);
}

.play-icon {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.video-item.active .play-icon {
    color: white;
}

.empty-course {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.course-section .video-list.collapse {
    display: none;
}

    .course-section .video-list.collapse.show {
        display: block;
    }

/* Mobile Styles */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh !important;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        width: 350px;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .toggle-sidebar-btn {
        display: block;
    }

    .close-sidebar-btn {
        display: block;
    }

    .main-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 300px;
    }

    .video-section {
        padding: 10px;
    }

    .content-section {
        padding: 15px;
    }

    .video-title-main {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
/*    height: 100%;*/
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

@media (max-width: 992px) {
    .sidebar-overlay {
        display: block;
    }
}

/* Desktop specific adjustments */
@media (min-width: 993px) {
    .video-player {
        font-size: 3rem;
    }

    .empty-content p:last-child {
        display: none; /* Hide mobile instruction on desktop */
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 992px) {
    .video-player {
        font-size: 3.5rem;
    }
}

.rotated {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}
