/* ====== ПОДКЛЮЧЕНИЕ ШРИФТОВ ACTAY ====== */
@font-face {
    font-family: 'Actay Wide';
    src: url('/static/deps/fonts/ActayWide-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Actay';
    src: url('/static/deps/fonts/Actay-Regular.otf') format('opentype');
    font-weight: 500; /* Полужирный для лучшей читаемости */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Actay';
    src: url('/static/deps/fonts/ActayCondensed-Thin.otf') format('opentype');
    font-weight: 400; /* Обычный, но чуть заметнее */
    font-style: normal;
    font-display: swap;
}

/* Actay Wide для заголовков и акцентов */
.team-name,
.game-name,
.modal-section-divider span,
.stat-value,
.main-tab,
.data-table th,
.filter-box label,
.game-meta span,
.team-meta span {
    font-family: 'Actay Wide', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Actay SemiBold для кнопок и интерфейса */
.search-button,
.apply-button,
.reset-button,
.stat-label,
.tournament-name,
.nav-course,
.nav-link {
    font-family: 'Actay', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Actay Regular для основного текста - чуть жирнее */
.data-table td,
.filter-box select,
.search-field input,
.period-toggle,
.tournament-stats span,
.history-table td,
.game-info p,
.detailed-results td,
.excel-style-table td {
    font-family: 'Actay', Arial, sans-serif;
    font-weight: 500; /* Чуть жирнее обычного */
    letter-spacing: 0.2px;
}

/* Делаем информацию об игре и данные в таблице более заметными */
.game-info p {
    font-weight: 500; /* Полужирный для информации об игре */
    color: #e6ddff;
    margin-bottom: 8px;
}

.detailed-results td,
.excel-style-table td {
    font-weight: 500; /* Полужирный для данных в таблице */
    color: #ffffff;
}

/* Особо выделяем важные числа и результаты */
.stat-value {
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(124, 77, 255, 0.3);
}

/* Улучшаем читаемость таблиц */
.data-table th {
    background: linear-gradient(135deg, #3d2a5e, #2a1745);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.data-table td {
    color: #f0f0f0;
    border-bottom: 1px solid rgba(124, 77, 255, 0.2);
}

/* Кнопки становятся более выразительными */
.search-button,
.apply-button {
    background: linear-gradient(135deg, #7c4dff, #6a3ddf);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.reset-button {
    background: linear-gradient(135deg, #5a3f8b, #4a336e);
    font-weight: 600;
}


/* Сброс*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    transition: all 0.3s;
}

/* Базовые настройки шрифтов */
body {
    font-size: 62.5%;
    font-family: 'Actay', Arial, sans-serif;
    font-weight: normal;
    color: white;
    padding-top: 6rem;
}

/* Фон и затемнение */
.background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/deps/img/qwiz.jpg') no-repeat center center/cover;
    z-index: -2;
    background-size: 170% ;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 21, 41, 0.65);
    z-index: -1;
}


/* ====== HEADER ====== */
header {
    position: absolute;
    top:1rem;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.nav {
    width: 100%;
}

.nav__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Логотип */
.nav__logo {
    font-family: 'Actay Wide', Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    z-index: 1001;
}

/* Основное меню */
.nav__menu {
    display: flex;
    align-items: center;
    gap: .3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    font-family: 'Actay', Arial, sans-serif;
    color: white;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.4rem .8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav__link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #e0a0ff;
}

/* Соцсети */
.nav__social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0 10px;
}

.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: white;
    color: black;
    font-size: 1.3rem;
    transition: all 0.3s;
    font-size: 1.5rem;
}

.icon-circle:hover {
    transform: scale(1.1);;
    background: rgba(255, 255, 255, 0.15);
}

.inst:hover {
    color: #E4405F;
}

.whatsapp:hover {
    color: #25D366;
}

/* Кнопка "Записаться на курс" */
.nav-course {
    font-family: 'Actay', Arial, sans-serif;
    font-size: .9rem;
    background: white;
    color: black;
    border-radius: 25px;
    padding: 0.6rem 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.nav-course:hover {
    background: #2a1745;
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Бургер меню (скрыт на десктопе) */
.nav__burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
}

.nav__burger span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ====== АДАПТИВНОСТЬ ====== */
/* ===== Перенос лишних пунктов меню при ширине меньше 1100px ===== */
@media (max-width: 1100px) {
    .nav__container {
        display: flex;
        align-items: flex-start;
    }

    .nav__logo {
        flex: 0 0 auto;
        margin-right: 2rem;
    }

    .nav__menu {
        display: flex;
        flex-wrap: wrap;
        flex: 1;
        gap: 0.6rem;
        justify-content: flex-start;
    }

    /* Чтобы соцсети и кнопка не ломали сетку */
    .nav__social,
    .nav-course {
        flex-shrink: 0;
    }
}


/* Мобильные (включаем бургер) */
@media (max-width: 768px) {
    /* Фон */
    .background {
        background-repeat: repeat-y;
    }

    .nav__burger {
        display: flex;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(31, 15, 58, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1.5rem;
        padding-top: 6rem;
        transition: left 0.3s ease;
    }
    
    .nav__menu.active {
        left: 0;
    }
    
    .nav__link {
        font-size: 1.2rem;
        padding: 1rem 2rem;
    }
    
    .nav-course {
        font-size: 1.1rem;
        padding: 0.9rem 1.6rem;
        margin-top: 2rem;
    }
    
    .nav__social {
        margin: 0; 
    }
    
    /* Анимация бургера */
    .nav__burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .nav__burger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav__burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

@media (max-width: 480px) {
    .nav__container {
        padding: 0 15px;
    }
    
    .nav__logo {
        font-size: 1.5rem;
    }
    
    .nav__link {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* ====== MAIN CONTENT ====== */


/* Основные стили */
.main-content {
    max-width: 1200px;
    margin: 50px auto 20px;
}

/* Вкладки "Команды" "Игры"*/
.main-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.main-tab {
    padding: 18px 40px;
    background: #2a1745;
    color: #b39ddb;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid #3d2a5e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.main-tab.active {
    background: #7c4dff;
    color: white;
    border-color: #9575cd;
    box-shadow: 0 6px 16px rgba(124, 77, 255, 0.4);
    transform: translateY(-3px);
}

.main-tab:hover {
    background: #5e35b1;
    color: white;
}

.main-tab i {
    font-size: 1.2rem;
}

/* Панель управления */
.control-panel {
    background: #1f0f3a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid #3d2a5e;
}

.search-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    background: #2a1745;
    border-radius: 8px;
    padding: 0 15px;
    border: 1px solid rgba(124, 77, 255, 0.2);
}

.search-field i {
    color: #7c4dff;
    margin-right: 1rem;
}

.search-field input {
    flex: 1;
    padding: 12px 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
}

.search-field input::placeholder {
    color: #7a6f8a;
}

.clear-search {
    background: none;
    border: none;
    color: #7a6f8a;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.search-button {
    padding: 0 25px;
    background: #7c4dff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-button:hover {
    background: #6a3ddf;
}

.search-button:active{
    background: #5e35b1;
}

.search-field input:focus{
    outline: none;
}

/* фильтры */
.filter-container {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

.filter-box {
    flex: 1;
    min-width: 150px;
}

.filter-box label {
    margin-bottom: 8px;
    color: #b39ddb;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-box select {
    width: 100%;
    padding: 12px 15px;              
    background: #2a1745;  
    border: 1px solid rgba(124, 77, 255, 0.2);
    color: white;
    border-radius: 8px;           
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-box select:hover {
    background: #3d2a5e;
    border-color: #7c4dff;
}

/* Состояние фокуса */
.filter-box select:focus {
    border-color: #7c4dff;
    outline: none;
}



/* Стилизация при наведении на option */
.filter-box select option:hover,
.filter-box select option:focus,
.filter-box select option:checked {
    background: #7c4dff !important;
    color: white !important;
}



/* Контейнер для кнопок */
.filter-buttons-container {
    flex: 0 0 auto;
    min-width: 220px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* Стили для кнопки Применить */
.apply-button {
    padding: 10px 16px;
    background: #7c4dff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 100px;
    height: 44px;
}

.apply-button:hover {
    background: #6a3ddf;
    transform: translateY(-1px);
}

.apply-button:active {
    background: #5e35b1;
    transform: translateY(0);
}

/* Стили для кнопки Сбросить */
.reset-button {
    padding: 10px 16px;
    background: #5a3f8b;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 100px;
    height: 44px;
}

.reset-button:hover {
    background: #4a336e;
    transform: translateY(-1px);
}

.reset-button:active {
    background: #3d2a5e;
    transform: translateY(0);
}


/* по умолчанию скрываем 2 фильтра*/
.team-only,
.game-only {
  display: none; 
}


/* Стили для фильтра периода */
.period-filter {
    position: relative;
}

.period-toggle {
    width: 100%;
    padding: 12px 15px;
    background: #2a1745;
    border: 1px solid rgba(124, 77, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: left;
    transition: all 0.3s ease;
}

.period-toggle:hover {
    background: #3d2a5e;
    border-color: #7c4dff;
}

.period-fields {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a1745;
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 5px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    min-width: 200px;
}

.period-fields.show {
    display: block;
}

.date-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.date-input-group:last-child {
    margin-bottom: 0;
}

.date-label {
    color: #b39ddb;
    font-weight: 500;
    min-width: 20px;
    font-size: 1rem;
}

.period-fields input[type="date"] {
    flex: 1;
    padding: 10px 12px;
    background: #1f0f3a;
    border: 1px solid rgba(124, 77, 255, 0.2);
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 100px;
}

.period-fields input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.period-fields input[type="date"]:focus {
    border-color: #7c4dff;
    outline: none;
}

/* Адаптация вкладок и фильтров с поиском */
@media (max-width: 768px) {
    /* Основные настройки */
    body {
        margin-top: 1rem;
        padding-top: 5rem;
        overflow-x: hidden;
    }
    
    .main-content {
        margin: 10px auto 10px;
        max-width: 100%;
    }
    
    /* Компактные вкладки команды и игры */
    .main-tabs {
        display: flex;
        flex-direction: column;
        margin-bottom: 10px;
        width: 100%;
        gap: 4px;
    }
    
    .main-tab {
        padding: 12px 10px;
        font-size: 1rem;
        margin: 0;
        width: 100%;
    }
    

    /* Строка поиска и фильтров */
    .control-panel {
        padding: 15px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .search-container {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .search-field input {
        padding: 10px 12px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .search-button {
        padding: 10px 16px;
        font-size: 0.8rem;
        white-space: nowrap;
        min-width: 80px;
    }
    
    /* Компактные фильтры */
    .filter-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        width: 100%;
    }
    
    .filter-box {
        margin-bottom: 0;
    }
    
    .filter-box label {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    .filter-box select {
        padding: 10px 12px;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .period-toggle {
        padding: 10px 12px;
        font-size: 0.85rem;
        width: 100%;
    }
    
    /* Кнопки Применить/Сбросить */
    .filter-buttons-container {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
    }
    
    .apply-button, .reset-button {
        height: 38px;
        font-size: 0.8rem;
        padding: 0 12px;
        width: 100%;
    }
}


@media (max-width: 480px) {
    /* Основные настройки */
    body {
        padding-top: 4rem;
    }
    
    /* Вкладки Команды и Игры*/
    .main-tabs {
        margin-bottom: 20px;
    }
    
    .main-tab {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
    
    .main-tab i {
        font-size: 1rem;
        margin-bottom: 3px;
    }
    
    /* Панель управления Поиск и фильтры */
    .control-panel {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    /* Уменьшаем размер поиска*/
    .search-container {
        gap: 6px;
        margin-bottom: 15px;
    }
    
    .search-field {
        padding: 0 10px;
    }
    
    .search-field input {
        padding: 10px 0;
        font-size: 0.75rem;
    }
    
    .clear-search {
        padding: 4px;
        margin-left: 6px;
        font-size: 0.8rem;
    }
    
    .search-button {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    /* Фильтры */
    
    .filter-box label {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .filter-box select {
        font-size: 0.8rem;
        height: 40px;
        text-indent: 8px; /*Отступ текста внутри фильтров*/
    }
    
    .period-toggle {
        padding: 10px 12px;
        font-size: 0.8rem;
        height: 40px;
    }
}



/* ====== ТАБЛИЦЫ ====== */
.table-content {
    background: #1f0f3a;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(124, 77, 255, 0.2);
}

.table-wrapper {
    display: none;
}

.table-wrapper.active {
    display: block;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    padding: 20px;
}

.data-table th {
    padding: 16px 20px;
    background: #2a1745;
    color: #d1c4e9;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #3d2a5e;
    font-size: 1rem;
}

.data-table thead {
    position: sticky;
    top: 0px;
    z-index: 50;
    background: #2a1745;
}

.data-table td {
    padding: 14px 20px;
    color: white;
    border-bottom: 1px solid #3d2a5e;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: rgba(124, 77, 255, 0.1);
}


 /* Убираю центрирование у команды в таблице*/ 
#teams-table .data-table th:nth-child(2), #teams-table .data-table td:nth-child(2) {
    text-align: left;
}

#games-table .data-table th:nth-child(5), #games-table .data-table td:nth-child(5){
    text-align: left;
}


/* Адаптация таблиц */
@media (max-width: 768px) {    
    .data-table {
        table-layout: fixed; /* Фиксированная ширина колонок */
    }
    
    .data-table th {
        padding: 15px 5px;
        font-size: 0.9rem;
    }
    
    .data-table td {
        padding: 15px 5px;
        font-size: 0.85rem;
        word-wrap:normal;
    }

    /* Ширина колонок для таблицы команд */
    /* Место */
    #teams-table .data-table th:nth-child(1),
    #teams-table .data-table td:nth-child(1) {
        width: 13%;
    }
    /* Команда */
    #teams-table .data-table th:nth-child(2),
    #teams-table .data-table td:nth-child(2) {
        width: 30%;
        text-align: left;
    }

    /* Пояс */
    #teams-table .data-table th:nth-child(3),
    #teams-table .data-table td:nth-child(3) {
        width: 15%;
    }

    /* Баллы */
    #teams-table .data-table th:nth-child(4),
    #teams-table .data-table td:nth-child(4) {
        width: 15%;
    }

    /* ср.балл */
    #teams-table .data-table th:nth-child(5),
    #teams-table .data-table td:nth-child(5) {
        width: 13%;
    }

    /* Игр сыграно */
    #teams-table .data-table th:nth-child(6),
    #teams-table .data-table td:nth-child(6) {
        width: 10%;
    }
    
    /* Побед */
    #teams-table .data-table th:nth-child(7),
    #teams-table .data-table td:nth-child(7) {
        width: 10%;
    }
    
    
    /* Ширина колонок для таблицы игр */
    /* Дата */
    #games-table .data-table th:nth-child(1),
    #games-table .data-table td:nth-child(1) {
        width: 10%;
    }

    /* Город */
    #games-table .data-table th:nth-child(2),
    #games-table .data-table td:nth-child(2) {
        width: 15%;
    }

    /* Турнир */
    #games-table .data-table th:nth-child(3),
    #games-table .data-table td:nth-child(3) {
        width: 35%;
        text-align: left;
        padding-left: 50px;
    }

    /* Число команд */
    #games-table .data-table th:nth-child(4),
    #games-table .data-table td:nth-child(4) {
        width: 15%;
    }

    /* Победитель */
    #games-table .data-table th:nth-child(5),
    #games-table .data-table td:nth-child(5) {
        width: 30%;
    }
}

@media (max-width: 480px){

    .data-table{
        padding: 15px;
    }

    #teams-table .data-table th:nth-child(3),
    #teams-table .data-table td:nth-child(3),
    #teams-table .data-table th:nth-child(5),
    #teams-table .data-table td:nth-child(5),
    #teams-table .data-table th:nth-child(6),
    #teams-table .data-table td:nth-child(6),
    #teams-table .data-table th:nth-child(7),
    #teams-table .data-table td:nth-child(7) {
        display: none;
    }

    /* ПЕРЕРАСПРЕДЕЛЯЕМ ШИРИНУ оставшихся колонок */
    #teams-table .data-table th:nth-child(1),
    #teams-table .data-table td:nth-child(1) {
        width: 20%; /* Было 13% */
    }
    
    #teams-table .data-table th:nth-child(2),
    #teams-table .data-table td:nth-child(2) {
        width: 50%; /* Было 30% - увеличиваем */
    }
    
    #teams-table .data-table th:nth-child(4),
    #teams-table .data-table td:nth-child(4) {
        width: 25%; /* Было 15% - увеличиваем */
    }
    
    
    #games-table .data-table th:nth-child(2),
    #games-table .data-table td:nth-child(2),
    #games-table .data-table th:nth-child(4),
    #games-table .data-table td:nth-child(4){
        display: none;
    }

    /* ПЕРЕРАСПРЕДЕЛЯЕМ ШИРИНУ оставшихся колонок */
    #games-table .data-table th:nth-child(1),
    #games-table .data-table td:nth-child(1) {
        width: 15%;
    }
    
    #games-table .data-table th:nth-child(3),
    #games-table .data-table td:nth-child(3) {
        width: 48%;
        padding-left: 30px;
    }
    
    #games-table .data-table th:nth-child(5),
    #games-table .data-table td:nth-child(5) {
        width: 35%;
    }
}


/* ====== МОДАЛЬНЫЕ ОКНА ====== */
.team-modal, .game-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.team-modal.active, .game-modal.active {
    display: block;
}
/* Затемнение фона */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: linear-gradient(145deg, #1f0f3a, #241047);
    border-radius: 16px;
    padding: 30px;
    overflow-y: auto;
    border: 1px solid rgba(124, 77, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    color: white;
    animation: modalAppear 0.3s ease-out;
}

.modal-content.game {
    max-width: 1000px;
    border: 1px solid #3d2a5e;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Кнопка закрытия */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #b39ddb;
    font-size: 2.2rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.close-modal:hover {
    color: #e0a0ff;
}
/* Заголовки модалок */
/* Заголовок Игр */
.game-name {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(124,77,255,0.3);
    margin-bottom: 8px;
}


.game-meta span {
    font-size: 1.05rem;
    color: #d1c4e9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-meta i {
    color: #7c4dff;
    width: 16px;
}

.team-header {
    margin-bottom: 25px;
}

.game-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(124, 77, 255, 0.2);
}

/* Метаданные игры в одну строку */
.game-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* Заголовок Команды */
.team-header {
    margin-bottom: 25px;
    text-align: center;
}

.team-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 0 15px rgba(124, 77, 255, 0.3);
    padding: 0 20px;
}

.team-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.team-meta span {
    font-size: 1.05rem;
    color: #d1c4e9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-meta i {
    color: #7c4dff;
    width: 16px;
}

/* Разделитель секций в модалках */
.modal-section-divider {
    position: relative;
    text-align: center;
    margin: 40px 0px 25px 0px;
    padding: 0 20px;
}

.modal-section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(124, 77, 255, 0.4) 20%, rgba(124, 77, 255, 0.4) 80%, transparent 100%);
    z-index: 1;
}

.modal-section-divider span {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    background: linear-gradient(145deg, #1f0f3a, #241047);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}
/* ====== СТИЛИ ДЛЯ МОДАЛКИ КОМАНДЫ ====== */

/* Статистика */
.team-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

.stat-card {
    padding: 20px 15px;
    background: rgba(42, 23, 69, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(124, 77, 255, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    line-height: 1;
    text-shadow: 0 0 10px rgba(124, 77, 255, 0.3);
}

.stat-label {
    font-size: 0.8rem;
    color: #b39ddb;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    background: rgba(124, 77, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(124, 77, 255, 0.2);
}

/* ===== Контейнер для пояса и радара ===== */
.belt-radar-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}
/* Пояс */
.belt-section {
    background: rgba(42, 23, 69, 0.6);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(124, 77, 255, 0.25);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.belt-title {
    color: #e6ddff;
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Основной контейнер пояса с информацией */
.belt-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}


/* Визуальная часть пояса */
.belt-visual {
    display: flex;
    min-width: 220px;
    margin-bottom: 15px;
}

.clean-belt {
    --belt-light: #f4f4f4;
    --belt-dark: #d9d9d9;
    --stripe-color: #000;

    height: 40px;
    width: 250px;
    max-width: 250px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    transform: skew(-20deg);
    background: linear-gradient(135deg, var(--belt-light) 0%, var(--belt-dark) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
/* Полосы на поясе */
.clean-vertical-lines {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3;
}

.clean-line {
    width: 18px;
    height: 100%;
    background: var(--stripe-color);
    transform: skew(-10deg);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Управление видимостью полосок */
.clean-belt.s-0 .clean-line { display: none; }
.clean-belt.s-1 .clean-line:nth-child(n+2) { display: none; }
.clean-belt.s-2 .clean-line:nth-child(n+3) { display: none; }
.clean-belt.s-3 .clean-line:nth-child(n+4) { display: none; }
.clean-belt.s-4 .clean-line:nth-child(n+5) { display: none; }

/* Цвета поясов*/
.clean-belt.white { --belt-light: #FFFFFF; --belt-dark: #F0F0F0; --stripe-color: #2D3748; }
.clean-belt.blue { --belt-light: #1E90FF; --belt-dark: #0066CC; --stripe-color: #FFFFFF; }
.clean-belt.purple { --belt-light: #800080; --belt-dark: #600060; --stripe-color: #FFFFFF; }
.clean-belt.brown { --belt-light: #8B4513; --belt-dark: #6B3410; --stripe-color: #FFFFFF; }
.clean-belt.black { --belt-light: #000000; --belt-dark: #000000; --stripe-color: #FFFFFF; }
.clean-belt.red { --belt-light: #FF0000; --belt-dark: #CC0000; --stripe-color: #FFFFFF; }

/* Информация о поясе*/
.belt-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 100%;
}

.belt-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(124, 77, 255, 0.1);
}

.belt-info-item:last-child {
    border-bottom: none;
}

.belt-info-label {
    color: #b39ddb;
    font-size: 0.85rem;
    font-weight: 500;
}

.belt-info-value {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Прогресс-бар уровня */
.belt-progress-section {
    margin-top: 15px;
    background: rgba(124, 77, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.belt-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.belt-progress-label {
    color: #d1c4e9;
    font-size: 0.85rem;
    font-weight: 500;
}

.belt-progress-percent {
    font-size: 0.85rem;
    font-weight: 700;
}

.belt-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.belt-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    width: 0%;
    display: block;
}

/* Мини-пояс для таблицы */
.clean-belt.mini {
    height: 22px;
    width: 90px;
    max-width: 100px;
    border-radius: 4px;
    margin: 0 auto;
}

.clean-belt.mini .clean-line {
    width: 6px;
    height: 100%;
    background: var(--stripe-color);
    transform: skew(-10deg);
    border-radius: 0;
    margin-right: 2px;
}

.clean-belt.mini .clean-vertical-lines {
    right: 6px;
    gap: 3px;
}

/* ===== СТИЛИ ДЛЯ РАДАРА ===== */

.stats-radar {
    background: rgba(42, 23, 69, 0.6);
    border: 1px solid rgba(124, 77, 255, 0.25);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stats-radar h3 {
    font-size: 1.1rem;
    color: #e0d7f5;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.chart-container {
    flex: 1;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Секция достижений */
.tournament-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(42, 23, 69, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(124, 77, 255, 0.15);
}

.tournament-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e0d7f5;
    flex: 1;
}

.tournament-stats {
    display: flex;
    gap: 12px;
}

.tournament-stats span {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
}

/* Цвета для наград в достижениях */
.achievements-section .cup {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
}

.achievements-section .gold {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
}

.achievements-section .silver {
    color: #C0C0C0;
    background: rgba(192, 192, 192, 0.1);
}

.achievements-section .bronze {
    color: #CD7F32;
    background: rgba(205, 127, 50, 0.1);
}

.tournament-stats span {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* История последних игр */
.history-table table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    background: #2a1745;
    color: #e0d7f5;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.95rem;
}

.history-table td {
    color: #fff;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(124, 77, 255, 0.2);

}
/* ===== Модалка команды ===== */
@media (max-width: 768px) {
    /* Методанные команды */
    .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
        overflow-x: hidden;
    }

    .team-header {
        margin-bottom: 0px;
    }

    .team-name {
        font-size: 1.7;
        margin-bottom: 10px;
    }

    .team-met span{
        font-size: 0.9rem ;
    }
    
    /* 4 статистических параметра в одну строку */
    .team-stats-row {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 12px 8px;
        min-height: 80px;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Пояс и радар на одном уровне */
    .belt-radar-container {
        gap: 15px;
        margin-bottom: 20px;
        max-width: 100%;
    }

    .belt-section {
        padding: 15px;
        min-height: auto;
    }

    /* Пояс */
    .clean-belt {
        height: 35px;
        width: 200px;
        margin: 0 auto;
    }
    
    .clean-vertical-lines{
        right: 15px;
        gap: 8px;
    }

    .clean-line{
        width: 14px;
    }

    /* Мини пояс */
    .clean-belt.mini {
        height: 18px;
        width: 80px;
        margin: 0 auto;
        border: 1px solid rgba(0, 0, 0, 0.3);
    }

    .clean-belt.mini .clean-line {
        width: 6px;
        height: 100%;
        margin-right: 0;
    }

    .clean-belt.mini .clean-vertical-lines {
        right: 7px;
    }


    .stats-radar {
        padding: 15px;
        min-height: 250px;
    }
    
    .chart-container {
        min-height: 200px;
    }
    
    /* Компактные достижения */
    .tournament-row {
        padding: 10px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .tournament-name {
        font-size: 0.85rem;
        flex: 1;
    }
    
    .tournament-stats {
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    /* Компактная история игр */
    .history-table {
        font-size: 0.8rem;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 5px;
    }
}

@media (max-width: 460px) {
    /* ===== ФИКС ЗАГОЛОВКА ===== */
    .modal-header-bar {
        position: sticky;
        top: 0;
        z-index: 50;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        padding: 15px 20px 10px;
        margin: 10px -20px 15px -20px;

    }

    .team-name {
        flex: 1;
        font-size: 1.3rem;
        line-height: 1.2;
        margin: 0;
        word-break: break-word;
        padding-right: 25px;
        color: #fff;
        max-height: 2.4rem;
        overflow: hidden;
        -webkit-box-orient: vertical;
    }

    .close-modal {
        font-size: 1.8rem;
        color: #b39ddb;
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        position: absolute;
        top: 6px;
        right: 10px;
    }

    .close-modal:hover {
        color: #e0a0ff;
    }

    .team-meta {
        margin-top: 15px;
        gap: 10px;
        flex-direction: row;
        align-items: center;
        padding: 0;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }

    .team-meta span {
        font-size: 0.8rem;
    }

    /* ===== РАЗДЕЛИТЕЛИ ===== */
    .modal-section-divider span {
        font-size: 1.1rem;
    }

    /* ===== СТАТИСТИЧЕСКИЕ БЛОКИ ===== */
    .team-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 12px 8px;
        min-height: 70px;
        background: rgba(42, 23, 69, 0.4);
        border: 1px solid rgba(124, 77, 255, 0.2);
        border-radius: 8px;
    }
    
    .stat-value {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.7rem;
        background: rgba(124, 77, 255, 0.1);
        border: 1px solid rgba(124, 77, 255, 0.15);
        padding: 3px 6px;
    }

    /* ===== ПОЯС И РАДАР ===== */
    .belt-radar-container {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }

    /* Уменьшенный блок прогресса */
    .belt-section {
        padding: 12px; /* Уменьшили padding */
        border-radius: 10px;
        min-height: auto;
    }
    
    .belt-title {
        font-size: 1rem;
        margin-bottom: 8px; /* Уменьшили отступ */
    }
    
    .clean-belt {
        height: 32px;
        max-width: 180px;
        margin: 0 auto 8px auto;
    }
    
    .belt-info {
        gap: 4px; 
    }
    
    .belt-info-item {
        padding: 4px 0;
    }
    
    .belt-info-label { 
        font-size: 0.75rem; 
    }
    
    .belt-info-value { 
        font-size: 0.8rem; 
    }
    
    .belt-progress-section {
        margin-top: 14px; 
        padding: 14px;
    }
    
    .belt-progress-label,
    .belt-progress-percent { 
        font-size: 0.75rem; 
    }
    
    .belt-progress-bar { 
        height: 5px; 
    }

    /* Радар */
    .stats-radar {
        padding: 10px 0 0 0;
        min-height: 260px;
    }
    
    .stats-radar h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .chart-container {
        min-height: 210px;
    }

    /* ===== ДОСТИЖЕНИЯ ===== */
    .achievements-section {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .tournament-row {
        padding: 8px 10px;
        margin-bottom: 0;
        background: rgba(42, 23, 69, 0.3);
        border-radius: 6px;
        border: 1px solid rgba(124, 77, 255, 0.15);
        align-items: center;
    }
    
    .tournament-name {
        font-size: 0.85rem;
        flex: 1;
        color: #e0d7f5;
    }
    
    .tournament-stats {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .tournament-stats span {
        font-size: 0.75rem;
        padding: 2px 6px;
        border-radius: 4px;
    }

    /* ===== ИСТОРИЯ ИГР ===== */
    .history-table table {
        width: 100%;
        font-size: 0.8rem;
    }
    
    .history-table th {
        font-size: 0.8rem;
        padding: 8px 4px;
        background: #2a1745;
        color: #d1c4e9;
        border-bottom: 2px solid #3d2a5e;
        white-space: nowrap;
    }
    
    .history-table td {
        font-size: 0.8rem;
        padding: 6px 4px;
        border-bottom: 1px solid rgba(124, 77, 255, 0.1);
        color: #f0f0f0;
    }
    
    .history-table tr:last-child td {
        border-bottom: none;
    }
    
    .history-table tr:hover {
        background: rgba(124, 77, 255, 0.05);
    }

    /* Ширина колонок */
    .history-table th:nth-child(1),
    .history-table td:nth-child(1) {
        width: 30%;
    }
    
    .history-table th:nth-child(2),
    .history-table td:nth-child(2) {
        width: 50%;
    }
    
    .history-table th:nth-child(3),
    .history-table td:nth-child(3) {
        width: 15%;
        text-align: center;
    }
    
    .history-table th:nth-child(4),
    .history-table td:nth-child(4) {
        width: 15%;
        text-align: center;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .close-modal {
        top: 8px;
        right: 12px;
        font-size: 1.6rem;
    }
    
    .team-name {
        font-size: 1.1rem;
        padding-right: 25px;
    }
    
    .belt-section {
        padding: 10px; /* Еще меньше на маленьких экранах */
    }
}

/* ====== СТИЛИ ДЛЯ МОДАЛКИ ИГРЫ ====== */
.detailed-results {
    margin: 25px 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.detailed-results h3 {
    margin-bottom: 15px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.4rem;
    flex-shrink: 0; 
}


.excel-style-table-container {
    margin: 0 auto 20px auto;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 8px;
    background: rgba(42, 23, 69, 0.3);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.excel-style-table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 0;
    flex: 1; 
}

.excel-style-table th {
    background: #2a1745;
    padding: 8px 6px;
    text-align: center;
    color: #d1c4e9;
    border: 1px solid #4a376b;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.85rem;
}

.excel-style-table th.result {
    border: 2px solid #5a3f8b;
    background: rgba(90, 63, 139, 0.15);
}

.excel-style-table td {
    padding: 5px 6px;
    text-align: center;
    border: 1px solid #4a376b;
    color: white;
}


.excel-style-table td.result {
    border: 2px solid #5a3f8b;
    background: rgba(90, 63, 139, 0.1);
    font-weight: 600;
}

.excel-style-table tr:hover {
    background: rgba(124, 77, 255, 0.1);
}

/* Информация об игре */
.game-info {
    background: rgba(42, 23, 69, 0.6);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #3d2a5e;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.game-info h3 {
    margin-bottom: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.game-info p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #e6ddff;
    line-height: 1.4;
}

/* ===== Модалка игры ===== */
@media (max-width: 768px) {
    .game-modal .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }

    .game-header {
        margin-bottom: 20px;
    }

    .game-name {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .game-meta {
        gap: 15px;
        flex-wrap: wrap;
    }

    .game-meta span {
        font-size: 0.9rem;
    }

    /* Таблица результатов */
    .detailed-results {
        margin: 20px 0;
    }

    .excel-style-table-container {
        margin: 0 auto 15px auto;
        border-radius: 6px;
    }

    .excel-style-table {
        font-size: 0.75rem;
    }

    .excel-style-table th {
        padding: 8px 6px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .excel-style-table td {
        padding: 6px 4px;
    }

    /* Информация об игре */
    .game-info {
        padding: 15px;
        margin-top: 15px;
    }

    .game-info h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .game-info p {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
}

/* ===== Модалка игры - ТЕЛЕФОН ===== */
@media (max-width: 460px) {
    .game-modal .modal-content {
        width: 100%;
        padding: 3px;
    }

    .game-header{
        padding: 10px;
    }

    /* Таблица */
    .detailed-results {
        margin: 15px 0;
        flex: 1;
    }

    .detailed-results h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .excel-style-table-container {
        padding: 0;
        margin: 0;
        flex: 1;
        overflow-y: hidden;
    }

    .excel-style-table {
        table-layout: fixed;
        white-space: nowrap;
    }

    .excel-style-table th {
        padding: 8px 4px;
        font-size: 0.55rem;
        line-height: 1;
    }

    .excel-style-table td {
        padding: 4px 4px;
        font-size: 0.55rem;
        line-height: 1;
    }

    /* Ширины колонок */
    .excel-style-table th:nth-child(1),
    .excel-style-table td:nth-child(1) { width: 6%; }
    .excel-style-table th:nth-child(2),
    .excel-style-table td:nth-child(2) { width: 18%; }
    .excel-style-table th:nth-child(3),
    .excel-style-table td:nth-child(3) { width: 5%; }
    .excel-style-table th:nth-child(4),
    .excel-style-table td:nth-child(4) { width: 5%; }
    .excel-style-table th:nth-child(5),
    .excel-style-table td:nth-child(5) { width: 5%; }
    .excel-style-table th:nth-child(6),
    .excel-style-table td:nth-child(6) { width: 6%; }
    .excel-style-table th:nth-child(7),
    .excel-style-table td:nth-child(7) { width: 5%; }
    .excel-style-table th:nth-child(8),
    .excel-style-table td:nth-child(8) { width: 5%; }
    .excel-style-table th:nth-child(9),
    .excel-style-table td:nth-child(9) { width: 5%; }
    .excel-style-table th:nth-child(10),
    .excel-style-table td:nth-child(10) { width: 7%; }
    .excel-style-table th:nth-child(11),
    .excel-style-table td:nth-child(11) { width: 10%; }
    .excel-style-table th:nth-child(12),
    .excel-style-table td:nth-child(12) { display: none;}
    .excel-style-table th:nth-child(13),
    .excel-style-table td:nth-child(13) { width: 5%; }
    .excel-style-table th:nth-child(14),
    .excel-style-table td:nth-child(14) { width: 10%; }

    /* Информация об игре */
    .game-info {
        margin: 15px 0px 15px 0px;
    }

    .game-info h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .game-info p {
        font-size: 0.7rem;
        margin-bottom: 3px;
    }
}

@media (max-width: 390px) {
    .excel-style-table th {
        padding: 8px 2px;
        font-size: 0.5rem;
        line-height: 1;
    }

    .excel-style-table td {
        padding: 4px 2px;
        font-size: 0.5rem;
        line-height: 1;
    }

}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 15px 0;
    border-top: 1px solid #3d2a5e;
}

.pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2a1745;
    color: #b39ddb;
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 600;
}

.pagination-arrow:hover {
    background: #3d2a5e;
    color: white;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2a1745;
    color: #b39ddb;
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: #3d2a5e;
    color: white;
}

.pagination-btn.active {
    background: #7c4dff;
    color: white;
    border-color: #9575cd;
}

/* Компактный блок фильтров */
.compact-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 12px 16px;
    background: rgba(42, 23, 69, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(124, 77, 255, 0.2);
    font-size: 0.9rem;
}

.filters-label {
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-item {
    color: #d1c4e9;
    padding: 6px 12px;
    background: rgba(124, 77, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(124, 77, 255, 0.15);
    font-size: 0.85rem;
}

/* Стили для состояния загрузки и ошибок */
.loading {
    text-align: center;
    padding: 8rem 2rem;
    color: #d1c4e9;
    font-size: 2.2rem;
    font-family: 'Actay Wide', Arial, sans-serif;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: rgba(31, 15, 58, 0.8);
    border-radius: 16px;
    border: 2px solid rgba(124, 77, 255, 0.2);
    margin: 20px;
}

.loading::before {
    content: "";
    width: 60px;
    height: 60px;
    border: 3px solid rgba(124, 77, 255, 0.3);
    border-top: 3px solid #7c4dff;
    border-radius: 50%;
    margin-bottom: 25px;
    animation: spin 1s linear infinite;
}

.error {
    text-align: center;
    padding: 6rem 2rem;
    color: #ff8a8a;
    font-size: 1rem;
    font-family: 'Actay Wide', Arial, sans-serif;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    background: rgba(31, 15, 58, 0.8);
    border-radius: 16px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    margin: 20px;
}

.error::before {
    content: "✕";
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    display: block;
    font-weight: bold;
}

/* Анимация круга */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Простая анимация пульсации текста */
@keyframes pulseText {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.loading {
    animation: pulseText 2s ease-in-out infinite;
}




/* Стили для скроллбара */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(31, 15, 58, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4a376b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c4dff;
}

/* Для Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #4a376b rgba(31, 15, 58, 0.8);
}

/* Стили для скроллбара внутри модальных окон */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(31, 15, 58, 0.6);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #5a3f8b;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #7c4dff;
}

/* Для Firefox модальных окон */
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: #5a3f8b rgba(31, 15, 58, 0.6);
}


