/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #2c3e50;
    color: white;
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding-top: 70px;
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

.sidebar-header {
    padding: 20px;
    background-color: #34495e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 0.85rem;
    color: #bdc3c7;
}

.sidebar-mode-toggle {
    display: flex;
    justify-content: space-around;
    background-color: #2c3e50;
    padding: 0 1rem 1rem;
    position: absolute;
    top: 20px;
    width: 100%;
}

.sidebar-mode-toggle button {
    background: none;
    border: 1px solid #7f8c8d;
    color: #ecf0f1;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar-mode-toggle button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.lesson-menu {
    padding: 10px 0;
}

.lesson-group {
    margin-bottom: 5px;
}

.lesson-group-header {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ecf0f1;
    background-color: rgba(52, 73, 94, 0.5);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.lesson-group-header:hover {
    background-color: rgba(52, 73, 94, 0.8);
}

.lesson-group-toggle {
    transition: transform 0.3s;
}

.lesson-group.collapsed .lesson-group-toggle {
    transform: rotate(-90deg);
}

.lesson-group-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.lesson-group.collapsed .lesson-group-content {
    max-height: 0;
}

.lesson-item {
    padding: 12px 20px 12px 35px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

.lesson-item:hover {
    background-color: #34495e;
}

.lesson-item.active {
    background-color: #3498db;
    border-left-color: #2ecc71;
}

.lesson-item-title {
    font-weight: 500;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.lesson-item-count {
    font-size: 0.8rem;
    color: #bdc3c7;
}

/* Toggle button */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: left 0.3s ease, background-color 0.2s;
}

.sidebar-toggle:hover {
    background-color: #2980b9;
}

.sidebar-toggle span {
    width: 24px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.sidebar-toggle.active {
    left: 300px;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}
