.chapter-header {
    display: flex;
    flex-wrap: wrap; /* Обеспечивает перенос вкладок на новые строки при необходимости */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    flex-wrap: wrap; /* Вкладки будут переноситься при необходимости */
    gap: 10px;
    flex-grow: 1; /* Вкладки займут всю доступную ширину */
}

.user {
    background-color: #393939;
    padding: 10px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s;
    flex: 1; /* Каждая вкладка будет занимать одинаковую ширину */
    text-align: center; /* Центрирует текст внутри вкладки */
}

.user.active {
    background-color: #007bff;
}

.buttons {
    display: flex;
    justify-content: flex-end;
}

.buttons button {
    background-color: #393939;
    border: none;
    color: white;
    padding: 10px 20px;
    margin-left: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.buttons button.active {
    background-color: #007bff;
}

.chapter-list {
    list-style: none;
    padding: 0;
}

.chapter-item {
    background-color: #333333;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.chapter-title {
    font-weight: bold;
    color: white;
}

.translation-item {
    display: flex;
    justify-content: space-between;
    padding-left: 20px;
    border-left: 2px solid #888;
    margin-top: 10px;
}

.chapter-translation {
    color: #d9534f;
}

.chapter-date {
    color: #888888;
}

/* Адаптивные медиа-запросы */
@media (max-width: 768px) {
    .chapter-header {
        flex-direction: column; /* Сортировка и вкладки будут располагаться вертикально на малых экранах */
        align-items: stretch;
    }

    .buttons {
        justify-content: center;
        margin-top: 10px;
    }

    .user {
        flex-basis: 100%; /* Вкладки займут 100% ширины экрана */
    }

    .buttons button {
        margin: 5px 0;
        padding: 10px;
        width: 100%; /* Кнопка сортировки тоже будет занимать всю ширину на мобильных устройствах */
    }
}