/* Общие стили */
body {
    width: 99%;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    height: 100vh;
}

/* Заголовки */
h1, h2, h3 {
    color: #333;
}

/* Основной контейнер */
.container {
    width: 80%;
    margin: auto;
}

/* Кнопки */
.button, .menu-toggle {
    display: inline-block;
    font-size: 16px;
    color: white;
    background: #007BFF;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    left: 10px;
    top: 10px; /* Сдвинут ниже */
    z-index: 1000;
    width: 220px;
}

.menu-toggle.active {
    width: 220px; /* Ширина кнопки при открытом меню */
}

.menu-toggle.closed {
    width: auto; /* Ширина кнопки при закрытом меню */
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #007BFF;
    color: white;
}

/* Боковое меню */
.sidebar {
    width: 250px;
    height: 100vh;
    background-color: #333;
    position: fixed;
    top: 0;
    left: 0;
    transition: left 0.3s ease;

    display: flex;
    flex-direction: column; /* Чтобы элементы располагались вертикально */
    padding-top: 50px;
}

.sidebar a {
    padding: 15px 20px;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
}

.sidebar a:hover {
    background-color: #575757;
}

.sidebar i {
    font-size: 24px; /* Увеличение размера иконок */
    margin-right: 10px; /* Отступ перед текстом */
}

main {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    height: 100vh;
    overflow-y: auto;
}

.sidebar.active {
    left: -175px; /* отступ для видимости */
}

.active-main {
    margin-left: 85px;
}

/* Скрыть текст в закрытом состоянии, но оставить иконки видимыми */
.sidebar.active .menu-text {
    display: none;
}

/* Контейнер для списка элементов меню */
.sidebar ul {
    padding: 0;
    list-style: none;
    margin: 0;    
    flex-grow: 1; /* Заставляем список занимать всё доступное пространство */
}

.sidebar li {
    padding: 10px;
    border-bottom: 1px solid #444;
}

.sidebar li:last-child {
    border-bottom: none;
}

.sidebar.active a {
    justify-content: right; /* Центрируем иконки */
}

/* Стиль для иконок в закрытом состоянии */
.sidebar.active a i {
    display: inline; /* Иконки должны быть видимыми */
}

/* Стиль для активного состояния бокового меню */
.sidebar.active a .menu-text {
    display: none; /* Скрыть текст */
}

/* Поддержка для ссылок в закрытом состоянии */
.sidebar.active a i {
    display: inline-block; /* Иконки должны быть видимыми */
    opacity: 1; /* Сделайте их полностью видимыми */
    width: 10px; /* Выравнивание иконок */
    text-align: center; /* Центрирование иконок внутри ссылки */
}

/* Стили для ссылок в боковом меню */
.sidebar a {
    padding: 15px 20px; /* Отступы для ссылок */
    text-decoration: none;
    color: white;
    display: flex; /* Flexbox для размещения иконок и текста */
    align-items: center; /* Вертикальное выравнивание иконок */
}



/* Футер */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: white;
}






.foreign-agent {
    background-color: #ffcccc; /* Красный фон */
}

/* manage_songs */
/* Общий контейнер для фильтров */
.filters-container {
    display: flex; /* Размещаем элементы в одну строку */
    gap: 1px; /* Отступ между фильтрами */
    align-items: center; /* Выравниваем элементы по вертикали */
    margin: 10px 0; /* Отступы сверху и снизу */
}

.filter-item {
    white-space: nowrap;
    margin: 0;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Стили для блока поиска */
/* .search-filter {
    display: flex;
    gap: 10px;
    align-items: center;
} */


/* Стили для фильтра по дате */
.date-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Стили для input */
input[type="text"], input[type="date"] {
    padding: 8px;
    font-size: 14px;
    border: 2px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
    
}

input[type="text"]:focus, input[type="date"]:focus {
    border-color: #007bff;
}

/* Стили для кнопки */
.date-filter button {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.date-filter input {
    padding: 6px;
    margin: 0 10px 0 5px;
}

.date-filter button:hover {
    background-color: #0056b3;
}


/* Стили для labels */
label {
    font-weight: bold;
}


/* для мобильного */
@media (max-width: 768px) {
    .filters-container {
        flex-direction: column; /* Располагаем элементы друг под другом */
        align-items: stretch; /* Растягиваем элементы на всю ширину */
        gap: 10px; /* Уменьшаем отступы */
    }

    .search-filter, .date-filter {
        width: 100%; /* Растягиваем фильтры на всю ширину */
    }
}

/* стили чекбоксов для фильтров */
.filters {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Отступ между группами фильтров */
}

.tags-filter, .movies-filter {
    display: flex;
    flex-wrap: wrap; /* Перенос элементов на следующую строку */
    gap: 2px; /* Отступ между элементами */
}

.tags-filter h4, .movies-filter h4 {
    margin-bottom: 5px;
}

.tags-filter label, .movies-filter label {
    display: block;
    margin: 20px 0;
}

.filters button {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filters button:hover {
    background-color: #0056b3;
}


.select-all-button {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* margin-bottom: 8px; */
    margin: 15px;
    height: 36px;
    line-height: 18px;
    /* display: flex;
    align-items: center;
    display: flex; */
}

.select-all-button:hover {
    background-color: #0056b3;
}

/* pagination */
.pagination a {
    color: #007bff;
    text-decoration: none;
    margin: 0 5px;
}
.pagination .disabled {
    color: #6c757d;
    margin: 0 5px;
}
.pagination .current {
    margin: 0 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}



/* Стили для manage_artists */
/* Форма добавления исполнителей */
.add-artists {
    margin-bottom: 20px;
}

.add-artists textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

.add-artists button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add-artists button:hover {
    background-color: #0056b3;
}



.search-filter input {
    width: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-filter button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-filter button:hover {
    background-color: #0056b3;
}

/* Таблица исполнителей */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #007BFF;
    color: white;
}

/* Иконки действий */
button i {
    font-size: 16px;
}

















/* Стили для upload_music */
/* Кнопка загрузки шаблона */
.template-download {
    margin-bottom: 20px;
}

.template-download button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.template-download button:hover {
    background-color: #0056b3;
}

/* Форма загрузки файла */
.upload-form {
    margin-bottom: 20px;
}

.upload-form input[type="file"] {
    margin-bottom: 10px;
}

.upload-form button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.upload-form button:hover {
    background-color: #218838;
}

/* Сообщения о статусе загрузки */
#upload-status {
    margin-top: 20px;
    font-weight: bold;
    color: #333;
}


/* drag-n-drop зона загрузки музыки */
#drop-zone {
    width: 95%;
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin: 10px 0;
}

#drop-zone.drag-over {
    border-color: #007bff;
    background-color: #f0f8ff;
}

#file-list {
    margin-top: 10px;
}

.file-item {
    margin: 5px 0;
    font-size: 14px;
}

#upload-progress {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

#progress-bar {
    width: 100%;
    height: 20px;
    margin-top: 10px;
}

#progress-text {
    display: block;
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
}




















/* Стили для manage_tags */
/* Вкладки */
.tabs {
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.tab-button.active {
    background-color: #0056b3;
}

.tab-content {
    /* display: none; */
}

.tab-content.active {
    display: block;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #007BFF;
    color: white;
}

/* Формы добавления тегов - мб старые */
.add-tag, .add-movie {
    margin-bottom: 20px;
}

.add-tag input, .add-movie input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
}

.add-tag button, .add-movie button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add-tag button:hover, .add-movie button:hover {
    background-color: #218838;
}

/* Иконки действий */
button i {
    font-size: 16px;
}



/* Контейнер для строки поиска и кнопок */
.search-and-add-bar {
    display: flex;
    justify-content: space-between; /* Распределяем элементы по ширине */
    align-items: center;
    margin-bottom: 20px;
}

/* Блок поиска */
.search-bar {
    display: flex;
    gap: 10px;
}

.search-bar input {
    padding: 8px;
    font-size: 14px;
    border: 2px solid #ccc;
    border-radius: 5px;
    outline: none;
    width: 300px; /* Ширина поля поиска */
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: #007bff;
}

.search-bar button {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #0056b3;
}

/* Блок кнопок добавления */
.add-buttons {
    display: flex;
    gap: 10px;
}

.add-buttons button {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #28a745; /* Зелёный цвет для кнопок добавления */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-buttons button:hover {
    background-color: #218838;
}













/* управление играми старая */
/* Стили для вкладок редактирования игры */
.round-tab {
    display: none;
    margin-bottom: 20px;
}

.round-tab.active {
    display: block;
}

/* Стили для таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #007BFF;
    color: white;
}

/* Кнопки */
.game-button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.game-button:hover {
    background-color: #0056b3;
}

/* Иконки */
.fas {
    font-size: 16px;
}

.green-button {
    padding: 10px 20px;
    background-color: green;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.green-button:hover {
    background-color: darkgreen; /* Цвет фона при наведении */
}

.red-button {
    padding: 10px 20px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.red-button:hover {
    background-color: darkred; /* Цвет фона при наведении */
}








/* generate_game */
.round-link {
    display: inline-block;
    margin: 0 4px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.round-link:hover {
    background-color: #f0f0f0;
}


/* Стили для страницы "Формирование игры" */
.create-game {
    margin-bottom: 20px;
}

.create-game button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.create-game button:hover {
    background-color: #0056b3;
}

/* Стили для страницы "Создание игры" */
.game-settings {
    /* width: 95%; */
    margin-bottom: 20px;
}

/* Стили для группы элементов формы */
.form-group {
    display: flex; /* Используем flexbox для выравнивания */
    align-items: center; /* Выравниваем элементы по центру вертикально */
    margin-bottom: 10px; /* Отступ между группами */
}

.form-group label {
    margin-right: 10px; /* Расстояние между label и input */
    min-width: 150px; /* Фиксированная ширина для label */
}

.form-group input, .form-group select  {
    flex: 1; /* Растягиваем input/select на оставшееся пространство */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group textarea {
    width: 100%;
    height: 50px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Стили для кнопки */
.game-settings button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.game-settings button:hover {
    background-color: #218838;
}


/* Стили для контейнера с настройками туров */
#round-settings-container {
    width: 100%;
    margin-bottom: 20px;
}

.round-setting {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.warning {
    color: red;
    font-weight: bold;
}
.warning-tooltip {
    background-color: #fff3cd;
    padding: 5px 10px;
    border-radius: 4px;
    margin: 5px 0;
    font-size: 0.9em;
}
.btn-refresh {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-download {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.round-setting h3 {
    margin-top: 0;
}

.round-setting label {
    display: block;
    margin-bottom: 5px;
}

.round-setting select, .round-setting input {
    width: 95%;
    padding: 10px;
    margin-bottom: 0px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


/* Основной контейнер для настроек командного тура */
#team-round-settings {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Заголовок блока */
#team-round-settings h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* Контейнер для галочек выбора туров */
#team-round-tours {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Стили для каждой галочки и её текста */
#team-round-tours div {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Стили для текста галочки */
#team-round-tours label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

/* Стили для самой галочки */
#team-round-tours input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #007bff; /* Цвет галочки */
}

/* Эффект при наведении на галочку */
#team-round-tours input[type="checkbox"]:hover {
    opacity: 0.8;
}

.team-round-tours select {
    width: 95%;
    padding: 10px;
    margin-bottom: 0px;
    border: 1px solid #ccc;
    border-radius: 4px;
}




/* Стили для страницы "Редактирование тура" */
#selected-songs-table-body {
    margin-top: 20px;
}

.artist-column {
    cursor: pointer;
    color: #2c3e50;
    /* font-size: 1.1em; */
    text-decoration: underline;
  }

.artist-column:hover {
    color: #3498db;
  }

/* выделение дубликатов авторов при создании игры */
.repeat {
    background-color: #faa;
}




/* Стили для страницы "Подтверждение игры" */
.game-stats {
    margin-bottom: 20px;
}

.game-stats ul {
    list-style-type: none;
    padding: 0;
}

.game-stats li {
    margin-bottom: 10px;
}


.drag-handle {
    cursor: grab; /* Указатель в виде руки */
    font-size: 1.2em; /* Размер иконки */
}

.drag-handle:active {
    cursor: grabbing; /* Указатель в виде руки при активном перетаскивании */
}



/* finish_game */
.game-info {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.round-section {
    margin-bottom: 30px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.round-section h2 {
    margin-top: 0;
}

.round-section ul {
    list-style-type: none;
    padding-left: 0;
}

.round-section ul li {
    margin: 10px 0;
}

.round-section ul li a {
    text-decoration: none;
    color: #007bff;
}

.round-section ul li a:hover {
    text-decoration: underline;
}


.finish-game {
    padding: 10px 20px;
    /* padding: 12px 24px; Внутренние отступы */
    background-color: #007bff;
    /* background-color: #28a745; */
    color: white; /* Белый текст */
    border: none; /* Без границы */
    border-radius: 5px; /* Закруглённые углы */
    font-size: 16px; /* Размер текста */
    cursor: pointer; /* Курсор в виде руки */
    transition: background-color 0.3s ease; /* Плавный переход */
    margin: 5px 0; /* Отступы сверху и снизу */
}

.finish-game:hover {
    background-color: #218838; /* Темно-зелёный цвет при наведении */
}

.finish-game:active {
    background-color: #1e7e34; /* Ещё более тёмный зелёный при нажатии */
}

button:hover {
    background-color: #0056b3;
}
