.sidebar-toggle {
    display: none;
    position: fixed;
    top: 80px;
    left: 10px;
    z-index: 1000;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.toc-toggle {
    display: none;
    position: fixed;
    top: 130px;
    right: 10px;  /* ПРАВАЯ сторона для TOC */
    z-index: 1000;
    background: #198754;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
}

@media (max-width: 768px) {
    .sidebar-toggle,
    .toc-toggle {
        display: block;
    }
 
    /* ЛЕВАЯ панель (состав урока) - ДУБЛИРУЕМ СТИЛИ БЕЗ ИЗМЕНЕНИЙ */
    .theory-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 999;
        background: white;
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        margin-bottom: 0;
        padding: 1rem;
    }
    
    .theory-sidebar.show {
        left: 0;
        transform: translateX(0);
    }
    
    /* ПРАВАЯ панель (содержание) - ДУБЛИРУЕМ СТИЛИ БЕЗ ИЗМЕНЕНИЙ */
    .theory-toc {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        z-index: 999;
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        margin-bottom: 0;
        padding: 1rem;
    }
    
    .theory-toc.show {
        right: 0;
        transform: translateX(0);
    }
    
    .sidebar-overlay,
    .toc-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .sidebar-overlay.show,
    .toc-overlay.show {
        display: block;
    }
    
    /* Кнопки закрытия всегда видны на мобильных */
    .theory-sidebar .btn-close,
    .theory-toc .btn-close {
        display: block !important;
    }
}

/* Десктопные стили */
@media (min-width: 769px) {
    .sidebar-toggle,
    .toc-toggle {
        display: none;
    }
    
    .left-sidebar-column,
    .right-sidebar-column {
        display: block;
    }
    
    .left-sidebar-column {
        position: sticky;
        top: 20px;
        height: fit-content;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }

    .right-sidebar-column {
        position: sticky;
        top: 20px;
        height: fit-content;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    /* На десктопе скрываем кнопки закрытия */
    .theory-sidebar .btn-close,
    .theory-toc .btn-close {
        display: none !important;
    }
}