* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    width: 340px;
    background-color: #1e1e1e;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #333;
    background-color: #252525;
}
.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
}
.search-box {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #121212;
    color: #fff;
    margin-bottom: 10px;
}
.filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.btn {
    padding: 6px 10px;
    border: 1px solid #444;
    background-color: #2c2c2c;
    color: #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}
.btn:hover, .btn.active {
    background-color: #3a7afe;
    border-color: #3a7afe;
    color: #fff;
}
.backup-bar {
    display: flex;
    gap: 6px;
}
.course-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.nav-group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin: 12px 8px 6px;
}
.course-btn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin-bottom: 4px;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.course-btn:hover {
    background-color: #2a2a2a;
}
.course-btn.active {
    background-color: #3a7afe;
    color: #fff;
    font-weight: 600;
}
.badge {
    background-color: #333;
    color: #aaa;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
}
.course-btn.active .badge {
    background-color: rgba(0,0,0,0.3);
    color: #fff;
}
.main-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.course-section {
    display: none;
    max-width: 920px;
    margin: 0 auto;
}
.course-section.active {
    display: block;
}
.course-title {
    font-size: 24px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}
.module-divider {
    background: linear-gradient(90deg, #2b3548 0%, #1e1e1e 100%);
    border-left: 4px solid #3a7afe;
    padding: 10px 16px;
    margin: 24px 0 14px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #9ec0ff;
    letter-spacing: 0.3px;
}
.lesson-card {
    background-color: #1e1e1e;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}
.lesson-card.is-done {
    border-color: #2e6b3e;
    background-color: #18221b;
}
.lesson-card.is-fav {
    box-shadow: 0 0 0 1px #d4a017;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
.card-meta {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
}
.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.media-box {
    margin-bottom: 12px;
}
video {
    width: 100%;
    max-height: 520px;
    background-color: #000;
    border-radius: 6px;
}
audio {
    width: 100%;
}
.lesson-img {
    max-width: 100%;
    max-height: 420px;
    border-radius: 6px;
    cursor: zoom-in;
}
.file-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #293242;
    color: #8ab4f8;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}
.lesson-text {
    line-height: 1.55;
    font-size: 14px;
    color: #d4d4d4;
    margin-bottom: 12px;
    word-wrap: break-word;
}
.tc-link {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 600;
    background-color: rgba(88,166,255,0.12);
    padding: 1px 5px;
    border-radius: 4px;
}
.tc-link:hover {
    text-decoration: underline;
}
.note-area {
    width: 100%;
    min-height: 60px;
    background-color: #141414;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    padding: 8px;
    font-size: 13px;
    resize: vertical;
}
.speed-select {
    background-color: #2c2c2c;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
}
#lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.88);
    justify-content: center;
    align-items: center;
}
#lightbox img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 6px;
}
/* Адаптивный интерфейс для смартфонов */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 999;
        width: 290px;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .menu-toggle {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        background-color: #2480f6;
        color: #fff;
        border: none;
        border-radius: 50%;
        font-size: 24px;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.4);
        z-index: 1000;
        cursor: pointer;
    }
    body {
        position: relative;
    }
}
.menu-toggle {
    display: none;
}
