/* --- Общие стили --- */
body {
    margin: 0; 
    font-family: "Inter", sans-serif;
    font-weight: 500;
    background-color: #e4e4e4; /* <-- ВАШ СТАРЫЙ СЕРЫЙ ФОН */
    color: #525252;
}
/* --- Шрифты для заголовков --- */
h1, h2, h3, h4, h5, h6, .section-title, .champion-discipline {
    font-family: 'Montserrat', sans-serif; /* <-- Шрифт для всех заголовков */
}

a {
    text-decoration: none; 
    color: inherit; 
}

/* --- Контейнер --- */
.container {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 15px; 
}

/* --- Шапка сайта --- */
.site-header {
    padding: 20px 0 15px; 
    background-color: transparent;
    border-bottom: 2px solid #ffffff;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Логотип --- */
.logo a {
    /* Ваши стили шрифта */
    font-family: "Rubik Lines", system-ui;
    font-size: 40px;
    font-style: normal;
    font-weight: 400;
    color: #525252;
    
}

.logo .accent {
    color: #ff7122; 
    text-shadow: 0 0 1px #ff7122;
}


/* --- Навигация --- */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none; 
    display: flex; 
    gap: 18px;
}

.main-nav a {
    font-family: "Inter", sans-serif;
    font-size: 20px;
    padding: 2px 0;
    font-weight: 500;
    position: relative;
    color: #525252;
    transition: color 0.2s ease;
}

.main-nav a.active, .main-nav a:hover {
    color: #444;
}

.main-nav a#tournaments-modal-trigger {
    cursor: pointer;
}

.main-nav a::after {
    content: '';
    position: absolute; 
    bottom: -5px;
    left: 0;
    width: 0; 
    height: 2px;
    background-color: #ff7122; 
    transition: width 0.3s ease-in-out; 
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

/* --- Основной контент --- */
#main-content-area h2.tournament-title {
    font-size: 24px;
    font-weight: bold;
    color: #444;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.ratings-page-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding-top: 15px;
}

.table-section {
    flex: 6.8;
}

.card-section {
    flex: 3.2;
    position: sticky;
    top: 30px;
}

/* --- Фильтры --- */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* --- Стили для кнопок фильтров на странице Рейтингов (Уменьшенная версия) --- */

/* --- Стили для контейнера кнопок-фильтров --- */
.filter-buttons {
    display: flex;
    flex-grow: 1; /* Заставляет контейнер занять все свободное место */
    justify-content: space-between; /* Равномерно распределяет кнопки по ширине */
    margin-right: 20px; /* Небольшой отступ от блока с цифрами справа */
}

.filter-buttons button {
    width: 6.8em; 
    height: 2.3em; 
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 6px 6px 12px #c5c5c5;
    cursor: pointer;
    transition: color 0.4s ease-in-out;
}

/* Слой с градиентом */
.filter-buttons button::before {
    content: '';
    width: 0;
    height: 3em;
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    background-image: linear-gradient(to right, #0fd850 0%, #f9f047 100%);
    transition: .5s ease;
    display: block;
    z-index: -1;
}

/* Анимация при наведении */
.filter-buttons button:hover::before {
    width: 6.8em; 
}

.filter-buttons button:hover {
    color: #333;
}

/* Стиль для активной кнопки */
.filter-buttons button.active::before {
    width: 6.8em; 
}

.filter-buttons button.active {
    color: #333;
    font-weight: bold;
}

.info-block {
    color: #ff7122;
    font-size: 24px;      
    font-weight: 700;    
    font-style: normal;
}

/* --- Таблица --- */
.player-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #edf1eb; /* <-- Новый фон */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 2px #ffffff;
}

/* Добавьте это новое правило */
.player-table tbody tr:nth-child(even) {
    background-color: #fff; /* Белый цвет для четных строк */
}

.player-table th, .player-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.player-table th:last-child, .player-table td:last-child {
    text-align: right;
    padding-right: 25px;
}

.player-table thead tr {
    background-color: #f8f8f8;
    color: #444;
    font-weight: bold;
    text-align: center;
}

.player-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.player-table tbody tr:hover {
    background-color: #fff8f5;
}

.rating-gain {
    color: #28a745;
    font-weight: bold;
}

.rating-loss {
    color: #dc3545;
    font-weight: bold;
}


/* --- Пагинация --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}
.pagination button {
    background: #fff;
    border: 1px solid #ccc;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 3px;
}
.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}
.pagination button.active {
    background-color: #ff7122;
    color: white;
    border-color: #525252;
}

/* --- Карточка игрока (Рейтинги) и поиск --- */
.search-bar {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.player-card {
    background-color: #edf1eb;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 2px solid #ffffff;
}

.player-card-placeholder {
    text-align: center;
    color: #888;
}

.player-card-name-block {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000000;
}
.player-card h3 {
    margin: 0;
    font-size: 24px;
    text-align: center;
    line-height: 1.3;
    color: #ff7122;
}
.player-card .player-patronymic {
    font-size: 0.8em;
    font-weight: 600;
    color: #ff7122 !important; 
    margin-top: 4px;
}

.player-card .rating-block {
    margin-top: 20px;
}

.player-card .id-header {
    font-size: 18px;
    font-weight: bold;
    color: #ff7122;
    margin-bottom: 10px;
    display: block;
    text-align: center;
}
.player-card .id-header span {
    color: #444;
    font-weight: normal;
}

.player-card .data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
    border-bottom: 1px dotted #eee;
    padding-bottom: 10px;
}

.player-card .data-row span, .player-card .rating-values span {
    font-weight: bold;
    color: #444;
}

.player-card .rating-values p {
    margin: 8px 0 8px 10px; 
    font-size: 16px;
}


/* --- Модальное окно для турниров --- */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Найдите и замените этот блок */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fefefe;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    width: 90%;
    max-width: 800px;
    height: 65vh;
    max-height: 65vh;
    flex-direction: column;
}

.modal-overlay.visible, .modal.visible {
    display: flex; 
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #444;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    padding: 0 5px;
}
.modal-close-btn:hover {
    color: #333;
}

.tournaments-list {
    overflow-y: auto;
    padding: 10px;
}

.tournament-list-item {
    display: block;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #444;
}
.tournament-list-item strong {
    font-size: 17px;
    font-weight: 500;
}
.tournament-list-item small {
    font-size: 14px;
    color: #777;
}

.tournament-list-item:hover {
    background-color: #f5f5f5;
}

.tournament-list-item.active {
    background-color: #fff8f5;
    color: #ff7122;
}
.tournament-list-item.active strong {
    font-weight: 600;
}

/* --- Карточка-саммари турнира --- */
.summary-card {
    background-color: #fff;
    color: #444;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Roboto', sans-serif;
    border: 1px solid #ddd;
}

.summary-card h3 {
    text-align: center;
    color: #444;
    margin: 0 0 8px 0;
    font-size: 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.summary-card .summary-section {
    margin-bottom: 15px;
}

.summary-card .summary-section h5 {
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 15px;
    min-height: 24px;
    border-bottom: 1px dotted #f0f0f0;
}

.summary-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    flex-shrink: 0;
    margin-right: 10px;
}

.summary-label .fas {
    width: 20px;
    text-align: center;
    color: #888;
}

.summary-value {
    text-align: right;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.prizer-row .summary-label .fas {
    font-size: 18px;
}
.prizer-row .fa-trophy.gold { color: #FFC300; }
.prizer-row .fa-trophy.silver { color: #A8A8A8; }
.prizer-row .fa-trophy.bronze { color: #CD7F32; }

.white-knight { color: #ffbf3f; }
.black-pawn { color: #000000; }
/* --- Стили для страницы Чемпионов --- */

.page-header {
    text-align: center;
    padding: 10px 0;      /* Уменьшаем верхний/нижний паддинг */
    margin-bottom: 10px;  /* Уменьшаем нижний отступ */
    
}

.page-header h1 {
    margin: 0;
    font-size: 36px;
    color: #333;
}

.page-header p {
    margin: 5px 0 0 0;
    font-size: 18px;
    color: #777;
}

#reigning-champions-section, #champions-history-section {
    margin-bottom: 40px;
}

#reigning-champions-section h2, #champions-history-section h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #444;
}
/* --- Стили для карточек действующих чемпионов --- */

.champions-grid {
    display: grid;
    /* Создаем отзывчивую сетку: колонки от 250px до 1fr */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.champion-card {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 25px 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.champion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px burdensome rgba(0,0,0,0.1);
}

.champion-card .champion-icon .fas {
    font-size: 40px;
    color: #ffc107; /* Золотой цвет для иконок */
}

.champion-card .champion-discipline {
    font-size: 16px;
    color: #777;
    margin: 15px 0 5px 0;
    text-transform: uppercase;
}

.champion-card .champion-name {
    font-size: 22px;
    font-weight: bold;
    color: #444;
    margin: 0 0 10px 0;
}

.champion-card .champion-rating {
    font-size: 18px;
    color: #555;
    margin: 0;
}

/* Стиль для пустой карточки, если чемпион не найден */
.champion-card.vacant .champion-icon .fas {
    color: #ccc;
}
.champion-card.vacant .champion-name {
    font-style: italic;
    color: #999;
    font-weight: normal;
}
/* --- Стили для истории чемпионов --- */

.history-filters {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    border: 1px solid #ddd;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group strong {
    font-size: 16px;
    color: #444;
}

.filter-group button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-group button:hover {
    border-color: #999;
    background-color: #e9e9e9;
}

.filter-group button.active {
    background-color: #ff7122;
    color: white;
    border-color: #ff7122;
    font-weight: bold;
}

/* Новые стили для отображения истории в 2 колонки */
#history-list-container {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 30px;                
}

.history-year-block {
    background-color: #edf1eb; /* <-- Новый фон */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 0;
}

.history-year-header {
    font-size: 24px;
    color: #444;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff7122;
    margin-bottom: 15px;
}

.history-item {
    display: flex;
    align-items: baseline;
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

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

.history-item:hover {
    background-color: #f9f9f9;
}

.history-item-discipline {
    font-weight: bold;
    color: #444;
    width: 120px; /* Фиксированная ширина для колонки дисциплины */
    flex-shrink: 0;
}

.history-item-champion {
    font-weight: 500;
    color: #444;
    flex-grow: 1; /* Чемпион занимает все оставшееся место */
}

.history-item-details {
    font-size: 14px;
    color: #888;
    margin-left: 15px;
    white-space: nowrap;
}
/* --- Стили для таблицы Общего зачета --- */
.medals-cell {
    display: flex;
    align-items: center;
    gap: 20px; 
    justify-content: flex-end; 
}

.medals-cell .medal-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: 40px;
    justify-content: flex-start; 
}

.medals-cell .fa-trophy {
    font-size: 1.1em;
}
/* Выравниваем заголовок колонки "Медали" */
.player-table th.medals-header {
    text-align: right;
    padding-right: 25px;
}

.medals-cell .gold { color: #FFC300; }
.medals-cell .silver { color: #A8A8A8; }
.medals-cell .bronze { color: #CD7F32; }
/* --- Стили для виджетов на главной странице --- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px; /* <-- ЭТОТ ОТСТУП СОЗДАСТ ПРОСТРАНСТВО СВЕРХУ */
}

.dashboard-widget {
    background-color: #edf1eb;
    border: 6px solid #ffffff;
    border-radius: 16px;
    padding: 20px;
}

/* Центрируем заголовок виджета */
.dashboard-widget h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    color: #ff7122;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    opacity: 0.8;
    align-items: center;
    gap: 10px;
    justify-content: center; /* <-- ДОБАВЛЕНО ЭТО СВОЙСТВО */
}

.dashboard-widget h3 .fas {
    color: #ff7122; /* Оранжевый цвет для иконок */
}

.widget-content {
    font-size: 16px;
    line-height: 1.6;
}
/* --- Новые тени для виджетов для создания общего баланса --- */

/* Для виджетов в ЛЕВОЙ колонке (1-й, 4-й и т.д.) */
.dashboard-widget:nth-child(3n + 1) {
    box-shadow: -12px 12px 25px #cadafe, /* Голубая тень слева-снизу */
                 12px -12px 25px #ffffff; /* Белая тень справа-сверху */
}

/* Для виджетов в ЦЕНТРАЛЬНОЙ колонке (2-й, 5-й и т.д.) */
.dashboard-widget:nth-child(3n + 2) {
    box-shadow: 0px 12px 25px #cadafe,   /* Голубая тень ровно снизу */
                 0px -12px 25px #ffffff;  /* Белая тень ровно сверху */
}

/* Для виджетов в ПРАВОЙ колонке (3-й, 6-й и т.д.) */
.dashboard-widget:nth-child(3n) {
    box-shadow: 12px 12px 25px #cadafe, /* Голубая тень справа-снизу */
                -12px -12px 25px #ffffff;/* Белая тень слева-сверху */
}

/* Адаптивность: на средних экранах - 2 колонки */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* На маленьких экранах - 1 колонка */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Стили для списков внутри виджетов --- */

.flag-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Создаем сетку из 3-х колонок, как у виджетов */
    gap: 25px; /* Такое же расстояние, как между виджетами */
    margin-bottom: 25px; /* Отступ до виджетов снизу */
    margin-top: 50px;
}

.flag-block {
    height: 30px; /* Высота каждого цветного блока */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Легкая тень, как у виджетов */
    border: 1px solid #ddd;
    box-shadow: 12px 12px 25px #cadafe, -12px -12px 25px #ffffff;
}
.flag-block.white {
    border: 1px solid #d3d3d3 !important;
}

.widget-content .widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-content .widget-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget-content .widget-list li:last-child {
    border-bottom: none;
}

.widget-content .widget-list li strong {
    font-weight: bold;
    color: #444;
}


.widget-content .prizers-list span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-content .widget-list li span:first-child {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
    color: #333; /* Мы просто добавляем нужный цвет сюда */
}
.widget-content .champions-list strong {
    text-align: right;
}

.widget-subtitle {
    font-weight: bold;
    text-align: center;
    font-size: 18px; /* Можно сделать шрифт чуть меньше, чтобы он отличался от списка */
    color: #555;
    /* Управляем отступами: 5px сверху, 15px снизу */
    margin: 2px 0 2px 0;
}
/* Стиль для сообщения "нет данных" в виджетах */
.widget-list .no-data {
    justify-content: center;
    color: #888;
    font-style: italic;
}


.widget-content .widget-list li strong {
    flex-shrink: 0; /* Запрещаем значению сжиматься */
}

/* Отдельный стиль для списка чемпионов, чтобы имя могло занимать больше места */
.widget-content .champions-list li span {
    max-width: 50%;
}
/* --- Стили для Футера --- */

/* Добавляем отступ для основного контента, чтобы футер его не перекрывал */
#main-content-area {
    padding-bottom: 50px; 
}


footer {
    background-color: transparent;
    color: #666;
    padding: 25px 0;
    margin-top: 30px;
    font-size: 14px;
    line-height: 1.6;
    border-top: 2px solid #ffffff;
}

/* Новый flex-контейнер для содержимого футера */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Добавим перенос на маленьких экранах */
    gap: 20px;
}

/* Блок с копирайтом (левая сторона) */
.footer-copyright {
    text-align: left;
    font-size: 20px;
    flex-grow: 1; 
}

.footer-copyright p {
    margin: 2px 0;
    font-family: "Inter", sans-serif;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 20px; /* Расстояние между ссылками */
}

.footer-links a {
    color: #888; /* Серый цвет для иконок */
    text-decoration: none;
    font-size: 22px; /* Увеличиваем размер для иконок */
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
    color: inherit;
    transform: translateY(-2px);
}
.footer-links a.adm:hover, .footer-links a.adm:focus {
    color: #ff7122;
}
.footer-links a.vk:hover, .footer-links a.vk:focus {
    color: #0077ff;
}
.footer-links a.yt:hover, .footer-links a.yt:focus {
    color: #ff0000;
}
.footer-links a.team:hover, .footer-links a.team:focus {
    color: #0fd850;
}
.footer-links a.fed:hover, .footer-links a.fed:focus {
    color: #000;
    .footer-links a.fed:hover, .footer-links a.fed:focus {
         color: #4684cb; /* Простой черный цвет при наведении */
        }
}
/* Подсказки — только белый фон и чёрный текст, без text-fill-color и background-clip */
.footer-links a:hover::after {
    content: attr(data-tooltip);
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ddd;
    white-space: pre-line !important;
    max-width: 420px;
    text-align: center;
    line-height: 1.2;
    display: block;
    overflow: visible;
    text-overflow: unset;
}
.custom-footer-tooltip {
    position: absolute;
    background: #fff;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 10px 18px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    max-width: 340px;
    min-width: 180px;
    z-index: 9999;
    pointer-events: none;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: break-word;
}
/* --- Стили для страницы "Поединок" --- */

.duel-selection-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.player-selector-wrapper {
    width: 40%;
}

.player-selector-wrapper label {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    display: block;
    color: #444;
}

.vs-icon {
    font-size: 24px;
    font-weight: bold;
    color: #ff7122;
    padding-top: 40px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.search-results {
    display: none; /* Скрыт по умолчанию */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
}
.search-result-item:hover {
    background-color: #f0f0f0;
}

.duel-actions {
    text-align: center;
    padding: 20px;
}

.compare-button {
    background-color: #ff7122;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.compare-button:hover {
    background-color: #e66017;
}

/* Адаптивность для блока выбора */
@media (max-width: 768px) {
    .duel-selection-area {
        flex-direction: column;
        align-items: center;
    }
    .player-selector-wrapper {
        width: 100%;
    }
    .vs-icon {
        padding-top: 0;
    }
}
/* --- Стили для страницы "Поединок" (ИСПРАВЛЕННАЯ ВЕРСИЯ) --- */

/* Блок выбора игроков */
.duel-selection-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.player-selector-wrapper {
    width: 40%;
}
.player-selector-wrapper label {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    display: block;
    color: #444;
}
.vs-icon {
    font-size: 24px;
    font-weight: bold;
    color: #ff7122;
    padding-top: 40px;
}
.duel-actions {
    text-align: center;
    padding: 20px;
}
.compare-button {
    background-color: #ff7122;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.compare-button:hover {
    background-color: #e66017;
}

/* Карточка с результатами */
.duel-results-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 30px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Блок 1: Интегральный рейтинг */
.integral-rating-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 25px;
}
.player-column {
    width: 45%;
    text-align: center;
}
.player-column h3 {
    font-size: 22px;
    color: #333;
    margin: 0 0 15px 0;
    height: 50px; /* Фикс. высота для выравнивания имен */
}
.integral-rating-value {
    font-size: 68px;
    font-weight: bold;
    color: #333; /* Цвет по умолчанию */
}
.vs-separator-column {
    width: 10%;
    text-align: center;
    padding-top: 75px;
}
.vs-icon-big {
    font-size: 64px;
    color: #ccc;
    font-weight: bold;
    line-height: 1;
}

/* Блок 2: Личные встречи (H2H) */
.h2h-section {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-top: 20px;
}
.h2h-section h4 {
    margin: 0 0 10px 0;
    text-transform: uppercase;
    font-size: 14px;
    color: #888;
}
.h2h-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 28px;
    font-weight: bold;
}
.h2h-score .h2h-separator {
    color: #ccc;
}

/* Блок 3: Детализация */
.comparison-details {
    padding-top: 20px;
}
.comparison-details h4 {
    text-align: center;
    margin: 0 0 15px 0;
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
}
.comparison-stats .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comparison-stats .stat-row:last-child {
    border-bottom: none;
}
.comparison-stats .stat-label {
    font-size: 16px;
    color: #666;
    text-align: center;
}
.comparison-stats .stat-value {
    width: 35%;
    text-align: left;
    font-size: 18px;
    font-weight: normal; /* Обычная жирность для цифр */
}
.comparison-stats .stat-value:last-child {
    text-align: right;
}
.medals-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.medals-display.medals-right {
    align-items: flex-end;
}
.medals-display span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Цвета для победителя и проигравшего */
.winner {
    color: #28a745 !important; 
    font-weight: bold !important;
}
.loser {
    color: #dc3545 !important;
    font-weight: normal !important;
}
/* Стили для заголовков секций на страницах */
.section-title {
    font-size: 22px;
    font-weight: bold;
    color: #444;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.widget-medals {
    display: inline-flex;
    gap: 8px; 
    align-items: center;
}

.widget-medals .medal-group {
    display: inline-flex;
    align-items: center;
    gap: 5px; /* Расстояние между иконкой и цифрой */
}

.widget-medals .fa-trophy {
    font-size: 1em;
}

/* ИСПРАВЛЕНИЕ: Задаем фиксированную ширину для цифр */
.widget-medals .medal-count {
    display: inline-block;
    min-width: 18px; /* Ширина, достаточная для двух цифр */
    text-align: left;
}

.widget-medals .gold { color: #FFC300; }
.widget-medals .silver { color: #A8A8A8; }
.widget-medals .bronze { color: #CD7F32; }
/* Стили для цветных кубков в виджете чемпионов */
.champions-list .fa-trophy {
    font-size: 1.1em;
    margin-right: 2px;
}

.champions-list .fa-trophy.gold { color: #FFC300; }
.champions-list .fa-trophy.silver { color: #e29c2a; }
.champions-list .fa-trophy.bronze { color: #CD7F32; }
.champions-list .fa-trophy.fisher { color: #7564e2; } /* Фиолетовый для Фишера */
.champions-list .fa-trophy.cup { color: #b619b8; } /* Зеленый для Кубков */

/* Стили для тултипа */
.tooltip-trigger {
    position: relative; /* Для позиционирования тултипа относительно ссылки */
}

.tooltip-trigger:hover::after {
    content: attr(data-tooltip); /* Берет текст из атрибута data-tooltip */
    position: absolute;
    bottom: 100%; /* Располагаем тултип над ссылкой */
    left: 50%;
    transform: translateX(-50%); /* Центрируем по горизонтали */
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.tooltip-trigger::after {
    opacity: 0; /* Скрыт по умолчанию */
}

/* Опционально: добавьте стрелку для тултипа */
.tooltip-trigger:hover::before {
    content: '';
    position: absolute;
    bottom: 100%; /* Под тултипом */
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333; /* Цвет стрелки совпадает с фоном тултипа */
    margin-bottom: -12px; /* Отступ для стрелки */
}
/* Добавляем белый фон для секций на странице "Чемпионы" */

#reigning-champions-section,
#champions-history-section {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* --- Стили для заголовка на Главной странице --- */


.achievements-block {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.achievements-block h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #444;
}

.achievements-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 14px;
}

.achievements-list li {
    padding: 6px 0;
    color: #555;
}

.achievements-list li strong {
    color: #ff7122;
}


/* Скрываем кнопку гамбургера на больших экранах */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
}

/* Медиа-запрос: эти стили сработают ТОЛЬКО на экранах шириной 992px и меньше */
@media (max-width: 992px) {
    /* Показываем кнопку гамбургера */
    .hamburger-menu {
        display: block;
    }
    
    /* Прячем наше обычное меню */
    .main-nav {
        display: none;
    }

    /* Контейнер для выпадающего меню */
    .mobile-menu-wrapper {
        display: none; 
        position: absolute;
        top: 75px; /* Располагаем под шапкой */
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 999;
    }

    /* Когда меню активно, оно становится видимо */
    .mobile-menu-wrapper.active {
        display: block;
    }
    
    /* Перестраиваем список ссылок в колонку */
    .mobile-menu-wrapper .main-nav {
        display: block;
    }
    
    .mobile-menu-wrapper .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .mobile-menu-wrapper .main-nav li {
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-menu-wrapper .main-nav a {
        display: block;
        padding: 15px 20px;
    }

    /* Убираем подчеркивание у активной ссылки в мобильном меню */
    .mobile-menu-wrapper .main-nav a::after {
        display: none;
    }
    
    /* Подсветка активной ссылки в мобильном меню */
    .mobile-menu-wrapper .main-nav a.active {
        background-color: #f8f8f8;
        font-weight: bold;
        color: #ff7122;
    }
}
.pagination-dots {
    padding: 8px 4px;
    color: #888;
}
/* --- Новые цвета для иконок в саммари турнира --- */

/* Общий цвет для большинства иконок */
.summary-label .fas {
    color: #007bff; /* Приятный синий цвет */
}

/* Персональные цвета для некоторых иконок */
.summary-label .fa-chart-line { color: #28a745; } /* Зеленый */
.summary-label .fa-arrow-up { color: #17a2b8; }   /* Бирюзовый */
.summary-label .fa-bolt { color: #ffc107; }      /* Желтый */
.summary-label .fa-handshake { color: #6f42c1; } /* Фиолетовый */

/* Стили для иконок коней */
.summary-label .white-knight {
    color: #da8f17; /* Темно-серый */
}
.summary-label .black-knight {
    color: #000000; /* Почти черный */
}

/* Принудительно возвращаем цвета для призовых кубков */
.summary-label .fa-trophy.gold { color: #FFD700 !important; }
.summary-label .fa-trophy.silver { color: #A8A8A8 !important; }
.summary-label .fa-trophy.bronze { color: #CD7F32 !important; }
/* Новое соотношение колонок ТОЛЬКО для страницы просмотра турнира (60%/40%) */
.tournament-view-container .table-section {
    flex: 6;
}

.tournament-view-container .card-section {
    flex: 4;
}
/* --- Финальное исправление для выравнивания таблиц --- */

/* 1. Задаем выравнивание по умолчанию для всех ячеек данных */
.player-table tbody td {
    text-align: left;
}

/* 2. Задаем выравнивание по центру для всех заголовков */
.player-table thead th {
    text-align: center;
}

/* 3. Возвращаем выравнивание по правому краю для последней колонки (и заголовка, и ячеек) */
.player-table th:last-child,
.player-table td:last-child {
    text-align: right;
    padding-right: 25px;
}

/* 4. Возвращаем выравнивание по правому краю для колонки с медалями (и заголовка, и ячеек) */
.player-table th.medals-header,
.player-table td.medals-cell {
    text-align: right;
    padding-right: 25px;
}
/* --- Новые стили для выравнивания ячеек в таблицах --- */

/* 1. Центрируем ВСЕ ячейки с данными по умолчанию */
.player-table tbody td {
    text-align: center;
}

/* 2. Возвращаем выравнивание по левому краю ТОЛЬКО для второй колонки (Имя) */
.player-table tbody td:nth-child(2) {
    text-align: left;
}
/* --- Стили для страницы Чаво (FAQ) --- */

.faq-container {
    max-width: 800px;
    margin: 0 auto; /* Центрируем контейнер с вопросами */
}

.faq-item {
    background-color: #fff;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-question {
    background-color: transparent;
    border: none;
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    font-size: 18px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    color: #ff7122;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    overflow: hidden;
    max-height: 0; /* По умолчанию ответ скрыт */
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px 20px; /* Показываем паддинг при открытии */
}

.faq-answer p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}
/* --- Исправление цвета текста в карточке игрока --- */

/* Задаем единый темный цвет для всех "названий" в строках */
.player-card .data-row strong,
.player-card .rating-values p {
    color: #444;      /* <-- Наш стандартный темный цвет */
    font-weight: bold; /* Убедимся, что он жирный */
}

/* При этом для самих значений оставляем обычный вес шрифта, но темный цвет */
.player-card .data-row span {
    color: #444;
    font-weight: normal; 
}

.standings-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* <-- Две равные колонки */
    gap: 25px;
    padding-top: 15px;
}

/* Стили для адаптивности */
@media (max-width: 1100px) {
    .standings-grid-container {
        grid-template-columns: 1fr 1fr; /* На средних экранах 2 колонки */
    }
}

@media (max-width: 768px) {
    .standings-grid-container {
        grid-template-columns: 1fr; /* На мобильных одна колонка */
    }
}
/* --- Стили для трехколоночной страницы "Общий зачет" --- */

.standings-column h2.section-title {
    font-size: 20px; /* Немного уменьшим заголовки колонок */
}

/* Адаптивность */
@media (max-width: 1100px) {
    .standings-grid-container {
        grid-template-columns: 1fr 1fr;
    }
    .standings-grid-container .standings-column:last-child {
        grid-column: 1 / -1; /* Третья колонка уходит вниз на всю ширину */
    }
}
@media (max-width: 768px) {
    .standings-grid-container {
        grid-template-columns: 1fr;
    }
}
/* --- Стили для звезд турнира --- */

.tournament-stars {
    text-align: center;
    font-size: 20px;
    margin-bottom: 25px; /* Отступ до таблиц */
    color: #d0d0d0; /* Цвет неактивных звезд (серый) */
}

.tournament-stars .fa-star.active {
    color: #ffc107; /* Цвет активных звезд (золотой) */
}
/* --- Стили для мета-информации турнира (звезды и дата) --- */

.tournament-meta {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 20px; /* Расстояние между звездами и датой */
    margin-bottom: 25px; /* Отступ до таблицы */
}

.tournament-date {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

.tournament-stars {
    text-align: center;
    font-size: 20px;
    color: #d0d0d0;
}
/* --- Стили для "плавающей" метки (Floating Label) --- */

.floating-label-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: transparent; /* Может понадобиться для лучшего вида */
}

.floating-label {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 16px;
    color: #aaa;
    pointer-events: none; /* Позволяет кликать "сквозь" метку */
    transition: all 0.2s ease-out;
}

/* Это магия: когда в инпуте есть текст ИЛИ он в фокусе, метка "всплывает" */
.form-input:not(:placeholder-shown) + .floating-label,
.form-input:focus + .floating-label {
    top: -8px; /* Поднимаем над полем */
    left: 10px;
    font-size: 12px;
    color: #666; /* Ваш акцентный цвет */
    padding: 0 5px;
}
/* Задаем белый фон для метки на странице "Поединок" */
.duel-selection-area .floating-label-group .floating-label {
    background-color: #fff;
}

/* Задаем светло-серый фон для метки на странице "Рейтинги" */
.card-section .floating-label-group {
    /* Для выравнивания и отступа */
    margin-bottom: 20px;
}
.card-section .form-input {
    width: 100%;
    height: 2.3em;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    border: none;
    box-shadow: 6px 6px 12px #c5c5c5;
    background: #f0f0f0;
    color: #333;
    padding: 0 16px;
    transition: box-shadow 0.3s, background 0.3s;
    position: relative;
    z-index: 1;
}
.card-section .form-input:focus {
    outline: none;
    box-shadow: 6px 6px 12px #c5c5c5;
    background: #f0f0f0;
}
.card-section .floating-label {
    left: 16px;
    width: auto;
    text-align: left;
    color: #888;
    background: #f0f0f0;
    padding: 0 6px;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    transition: all 0.2s;
}
.card-section .form-input:focus + .floating-label,
.card-section .form-input:not(:placeholder-shown) + .floating-label {
    color: #222;
    background: #f0f0f0;
    top: -10px;
    left: 12px;
    width: auto;
    text-align: left;
    font-size: 12px;
    padding: 0 6px;
    transform: none;
}
.widget-content .widget-subtitle {
    font-size: 16px;
    line-height: 1.0;
    margin-bottom: 8px;
}
/* --- Стили для доски почета на странице Чемпионов --- */
#champions-leaderboard-section {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px; /* Отступ до следующего блока */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#champions-leaderboard-section h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #444;
}
/* Стили для кнопки "Показать всех" на странице Чемпионов */
#leaderboard-actions {
    text-align: center;
    padding: 20px 0 0 0; /* Отступ сверху от таблицы */
}
/* Цвета для иконок медалей в Поединке */
.medals-display .fa-medal.gold { color: #FFC300; }
.medals-display .fa-medal.silver { color: #A8A8A8; }
.medals-display .fa-medal.bronze { color: #CD7F32; }
/* Стили для переноса отчества в Поединке */
.player-main-name,
.player-patronymic {
    display: block; /* Заставляет каждый элемент занять свою строку */
    text-align: center;
}

.player-patronymic {
    font-size: 0.8em; /* Делаем отчество чуть меньше */
    font-weight: normal;
    color: #666;
    margin-top: 4px; /* Небольшой отступ сверху */
}
/* Стили для сортируемых заголовков таблицы */
.player-table th.sortable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.player-table th.sortable:hover {
    background-color: #e8e8e8;
}

.player-table th.active-sort {
    color: #ff7122;
}
/* Стили для ссылки на спонсора в футере */
.footer-links .sponsor-link {
    font-size: 16px;
    font-weight: 500;
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links .sponsor-link:hover {
    color: #ff7122; /* Акцентный цвет при наведении */
}
/* --- Стили для выпадающего меню (ИСПРАВЛЕННАЯ ВЕРСИЯ) --- */

/* Контейнер для элемента меню LI */
.main-nav li.dropdown {
    position: relative;
}

/* Убираем подчеркивание у основной кнопки */
.main-nav li.dropdown .dropdown-toggle::after {
    display: none !important;
}

/* Сам выпадающий список UL */
.main-nav li.dropdown .dropdown-menu {
    display: none; /* Скрыт по умолчанию */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    min-width: 220px;
    z-index: 100;
}

.main-nav li.dropdown.open .dropdown-menu {
    display: block;
}

/* Стили для ссылок внутри списка */
.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 16px;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
}
/* Выделяем цветом динамические цифры в Чаво */
.faq-answer strong {
    color: #ff7122;
}
/* Создаем эффект "полужирности" для имен в виджете чемпионов */
.widget-content .widget-list.champions-list li strong {
    font-weight: normal; /* Сначала убираем полную жирность */
    text-shadow: 0 0 0.5px #333; /* Добавляем легкое размытие того же цвета */
}

/* --- Стили для блока "Общая информация" о турнире --- */
.tournament-general-info {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px !important; /* Отступ до саммари */
    font-size: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
}

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

.info-key {
    color: #555;
    flex-shrink: 0;
    margin-right: 10px;
}

.info-value {
    color: #333;
    text-align: right;
}

/* Адаптивность: на мобильных устройствах возвращаем одну колонку */
@media (max-width: 768px) {
    .tournament-general-info {
        grid-template-columns: 1fr; /* Одна колонка */
        gap: 0;
    }
    /* Возвращаем рамку для всех, кроме последнего элемента */
    .info-row {
       border-bottom: 1px dotted #eee;
    }
    .info-row:last-child {
        border-bottom: none;
    }
}
/* --- Уменьшаем отступы на странице турнира для компактности --- */

/* Отступ под названием турнира */
#main-content-area h2.tournament-title {
    margin-bottom: 5px; 
}

/* Отступ под блоком со звездами */
.tournament-meta {
    margin-bottom: 5px;
}

/* --- Стили для модального окна с партиями игрока --- */
.player-games-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none; /* Скрыто по умолчанию */
    justify-content: center;
    align-items: center;
}

.player-games-modal-overlay.visible {
    display: flex; /* Показываем при клике */
}

.player-games-modal-content {
    background-color: #fefefe;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    width: 90%;
    max-width: 700px; /* Ширина окна */
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.player-games-modal-content .modal-body {
    overflow-y: auto;
    padding: 20px;
}

/* Делаем строки в основной таблице кликабельными */
.tournament-view-container .player-table tbody tr {
    cursor: pointer;
}

/* Стили для переноса отчества в карточке игрока */
.player-card .player-main-name,
.player-card .player-patronymic {
    display: block; /* Заставляет каждый элемент занять свою строку */
    text-align: center;
}

.player-card .player-patronymic {
    font-size: 0.8em; /* Делаем отчество чуть меньше */
    font-weight: normal;
    color: #666;
    margin-top: 4px; /* Небольшой отступ сверху */
}
/* --- Унификация стилей для блоков на странице турнира --- */

.tournament-general-info,
.summary-card {
    border-radius: 8px;
    box-shadow: 0 0 0 2px #ffffff; /* Применяем тот же "бордер", что и у таблицы */
    border: none; /* Убираем старый серый бордер */
}
/* --- Стили для кнопки и модального окна с графиком --- */

.player-card-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.history-button {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    color: #ff7122;
    background-color: transparent;
    border: 1px solid #525252;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-button:hover {
    background-color: #ff7122;
    color: white;
}

#show-progress-btn {
    width: auto;
}

.history-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.history-modal-overlay.visible {
    display: flex;
}

.history-modal-content {
    background-color: #fefefe;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.history-modal-content .modal-body {
    padding: 20px;
    overflow-y: auto;
}
/* --- Стили для блока "Прогресс игроков" на странице Рейтинги --- */
.progress-controls-wrapper {
    background-color: #fff;
    border: 1px solid #fdfdfd;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 8px;
}

.progress-controls {
    display: flex;
    gap: 20px;
    align-items: center; /* Выравниваем элементы по вертикали */
    justify-content: center; /* Центрируем всю группу */
    flex-wrap: wrap; /* Добавляем перенос на маленьких экранах */
}

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

.date-picker-group label {
    font-weight: bold;
    color: #555;
}

.date-picker-group input[type="date"] {
    padding: 8px;
    border: 1px solid #525252;
    border-radius: 5px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1.1rem;
    color: #ff7122;
}

#show-progress-btn {
    font-size: 1rem;
    font-family: inherit;
}

/* --- Стили для подсветки отсортированной колонки --- */

/* Делаем все заголовки, по которым можно сортировать, кликабельными */
.player-table th.sortable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Эффект при наведении на заголовок */
.player-table th.sortable:hover {
    background-color: #e8e8e8;
}

/* Подсвечиваем активный заголовок оранжевым */
.player-table th.active-sort {
    color: #ff7122;
}

/* Задаем оранжевый цвет и жирность для ячеек в активной колонке */
.player-table.sorting-by-rating td.rating,
.player-table.sorting-by-rapid_rating td.rapid_rating,
.player-table.sorting-by-blitz_rating td.blitz_rating,
.player-table.sorting-by-fide_rating td.fide_rating,
.player-table.sorting-by-fide_rapid td.fide_rapid,
.player-table.sorting-by-fide_blitz td.fide_blitz,
.player-table.sorting-by-age td.age,
.player-table.sorting-by-title td.title,
.player-table.sorting-by-name td.name {
    color: #ff7122;
    font-weight: bold;
}
/* Активная колонка: оранжевый цвет для активных рейтингов */
.player-table td.active-col span {
    color: #ff7122;
    font-weight: bold;
    font-style: normal;
}

/* Неактивные рейтинги в активной колонке: серый, курсив */
.player-table td.active-col span.inactive-rating {
    color: #999;
    font-weight: normal;
    font-style: italic;
}

/* Неактивные рейтинги вне активной колонки: серый, курсив */
.player-table span.inactive-rating {
    color: #999;
    font-style: italic;
}



