/* Основной фон страницы */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #eee;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: flex-start;
    padding: 10px;
    padding-top: 90px;
    margin: 0;
}

.hidden {
    display: none !important;
}

/* Контейнер страницы */
.content-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    background-color: #eee;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff; /* Белый фон */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Тень */
}

/* Верхний ярус */
.top-bar {
    position: relative; /* Для позиционирования внутренних элементов */
    display: flex;
    justify-content: center; /* Центрируем логотип */
    align-items: center;
    padding: 8px 15px;
    background-color: #ff4500; /* Оранжевый цвет */
    color: #ffffff; /* Белый текст */
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
}

.logo {
    display: flex;
    justify-content: center; /* Центрируем логотип */
    align-items: center; /* Центрируем логотип по вертикали */
    height: 100%; /* Задаём высоту, чтобы логотип вписывался в полосу */
}

.logo img {
    max-height: 34px; /* Устанавливаем максимальную высоту логотипа */
    max-width: 150px; /* Устанавливаем максимальную ширину, чтобы логотип не выходил за пределы */
    object-fit: contain; /* Сохраняем пропорции логотипа */
}

/* Меню-иконка */
.menu-icon {
    position: absolute; /* Абсолютное позиционирование внутри родителя */
    right: 15px; /* Справа от края */
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 21px; /* Размер иконки меню */
    cursor: pointer;
    line-height: 1;
    padding: 6px;
}

/* Нижний ярус */
.bottom-bar {
    display: flex;
    justify-content: center; /* Центрируем меню выбора */
    align-items: center; /* Центрируем текст по вертикали */
    padding: 5px 0; /* Уменьшаем внутренний отступ сверху и снизу */
    background-color: #ffffff; /* Белый фон */
    border-top: 1px solid #ddd; /* Разделительная линия */
    height: 30px; /* Явная высота, если требуется */
    box-sizing: border-box; /* Учитываем отступы */
}

/* Меню выбора лиги */
.league-menu {
    display: flex;
    gap: 4px; /* Расстояние между пунктами меню */
    font-size: 10px;
    font-weight: bold;
    color: #225475; /* Цвет текста */
    align-items: center; 
    width: 100%;
    overflow-x: auto;
    padding: 0 8px;
    box-sizing: border-box;
    scrollbar-width: none;
}

.league-menu::-webkit-scrollbar {
    display: none;
}

/* При наведении на лигу */
.league-menu span,
.league-menu a {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    color: #225475;
    text-decoration: none;
    white-space: nowrap;
}
.league-menu img {
    width: 14px; /* Ширина иконки */
    height: 14px; /* Высота иконки */
    object-fit: contain; /* Сохраняем пропорции иконки */
}

.league-menu span:hover,
.league-menu a:hover {
    background-color: #ff4500; /* Заливка при наведении */
    color: #ffffff; /* Белый текст */
}

.mobile-menu-open {
    overflow: hidden;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1600;
    background: rgba(10, 23, 35, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1700;
    width: min(82vw, 310px);
    height: 100vh;
    padding: 14px;
    box-sizing: border-box;
    background: rgba(24, 56, 79, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    overflow-y: auto;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mobile-drawer-head strong {
    color: #ff8000;
    font-size: 19px;
}

.mobile-drawer-head button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

.mobile-drawer-search {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 11px;
}

.mobile-drawer-search label {
    display: block;
    margin-bottom: 8px;
    color: #cfe2ee;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.mobile-drawer-search div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.mobile-drawer-search input {
    min-width: 0;
    border: 0;
    border-radius: 7px;
    padding: 8px 9px;
    font: inherit;
}

.mobile-drawer-search button,
.mobile-drawer-nav button,
.mobile-drawer-grid button {
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.mobile-drawer-search button {
    padding: 0 9px;
    background: #ff8000;
    color: #fff;
}

.mobile-drawer-nav,
.mobile-drawer-links {
    display: grid;
    gap: 7px;
    margin-bottom: 11px;
}

.mobile-drawer-nav button,
.mobile-drawer-nav a,
.mobile-drawer-links a {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.11);
    color: #fff;
    text-decoration: none;
    box-sizing: border-box;
}

.mobile-drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 11px;
}

.mobile-drawer-grid button {
    min-height: 34px;
    padding: 7px;
    background: #225475;
    color: #fff;
}

.mobile-drawer-links a {
    background: rgba(255, 128, 0, 0.14);
    color: #ffe2bf;
}
/* Контейнер матчей */
.match-container {
    width: 100%;
    background-color: #fff;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* Заголовок лиги */
.league-header {
    background-color: #225475;
    color: #fff;
    padding: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    margin-top: 2px;
    border-radius: 8px 8px 0 0;
}

.league-title {
    display: flex;
    align-items: center;
    padding-left: 5px !important;
}

.league-header img {
    width: 16px;
    height: 12px;
    margin-right: 8px;
    margin-left: 10px;
}

.sponsor-logo {
    font-size: 10px;
    color: #FF8000;
    font-weight: normal;
    padding-right: 10px !important;
}

/* Таблица матчей */
.match-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    font-size: 8px;
    border-radius: 0 0 8px 8px; /* Закругляем только нижние углы таблицы */
    overflow: hidden; /* Обрезаем содержимое, чтобы избежать выхода элементов за границы */
}

.match-table td, .match-table th {
    padding: 3px 2px;
    border: 1px solid #ddd;
    text-align: center;
}

.match-table tbody tr {
    cursor: pointer;
}

.time, .score, .ht_score, .status {
    text-align: center;
    padding: 0;
    margin: 0;
}

.team1 {
    text-align: right !important;
    padding-right: 5px !important;
    width: 30%;
}

.team2 {
    text-align: left !important;
    padding-left: 5px !important;
    width: 30%;
}

.status {
    width: 11%;
    text-align: center;
    white-space: nowrap;
}

.time {
    width: 10%;
}

.score {
    width: 10%;
}

.match-table .score a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.ht_score {
    width: 10%;
    color: #808080;
}

/* Детали матча */
.match-details {
    background-color: #67c6f2;
    color: #00008b;
}

.match-details.open {
    display: table-row;
}

/* Содержимое деталей */
.details-content {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font: 'Courier New', monospace;
}

/* Колонки событий */
.event-columns {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: flex-start;
}

.team-column {
    width: 45%;
    text-align: center;
}

.event-row {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 0;
    border-top: 1px solid #e0e0e0;
}

.team1-events .event-row {
    justify-content: flex-end;
    padding-right: 5px;
}

.team2-events .event-row {
    justify-content: flex-start;
    padding-left: 5px;
}

.no-actions {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 5px;
}

/* Таблица событий */
.event-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 7px;
}

.event-table td {
    padding: 3px 2px;
    border: 1px solid #ddd;
    text-align: center;
}

.event-table .minute {
    width: 9%;
}

.event-table .event-icon {
    width: 9%;
}

.event-table .player {
    width: 32%%;
}

.event-table .score {
    width: 10%;
}

/* Чередование цветов строк */
.event-table tr:nth-child(odd) {
    background-color: #f2f2f2;
}

.event-table tr:nth-child(even) {
    background-color: #ffffff;
}

/* Ховер-эффекты */
.match-table tr.odd:not(.match-details) {
    background-color: #f2f2f2;
}

.match-table tr.even:not(.match-details) {
    background-color: #ffffff;
}

/* Контейнер обратного отсчета */
.countdown-container {
    text-align: center;
    padding: 5px 0;
}

.countdown-text {
    font-weight: bold;
    font-size: 1em;
    color: #ffffff;
}

.countdown-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    color: #ffffff;
}

.postponed-message {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    padding: 10px 0;
}

.gray-time {
    color: #808080;
}

.score-live {
    font-weight: bold;
    color: red;
}

.score-finished {
    font-weight: bold;
    color: black;
}
.red-minute {
    color: red;
    font-weight: bold;
    font-size: 0.9em;
}

.live-minute-blink {
    display: inline-block;
    animation: liveMinuteBlink 1.1s ease-in-out infinite;
}

.status {
    color: inherit; /* Базовый цвет для всех статусов */
    font-weight: normal;
}

.status.active {
    color: red;
    font-weight: bold;
    font-size: 0.9em;
}

.status.active::after {
    content: "'";
    animation: blink 1s step-start infinite;
}

/* 1. Мигающий апостроф */
.blinking-apostrophe {
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes liveMinuteBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

/* 2. Статус HT красного цвета и жирным шрифтом */
.ht-status {
    color: red;
    font-weight: bold;
}

/* 3. Черное тире для неактивных матчей */
.score-inactive {
    color: black;
}


.goal-highlight {
    color: red !important;
    font-weight: bold !important;
    transition: color 0.5s ease, font-weight 0.5s ease;
}

.goal-text {
    color: red !important;
    font-weight: bold !important;
    transition: color 0.5s ease, font-weight 0.5s ease;
}
/* 6. Дополнительные стили для завершенных матчей */
.finished {
    background-color: #d3ffd3;
}

/* 7. Стиль для красного мигающего апострофа внутри статуса */
.red-minute {
    color: red;
    font-weight: bold;
    font-size: 0.9em;
}
.winner {
    font-weight: bold !important;
}
.bottom-status-bar {
    position: fixed; /* Фиксируем блок внизу */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px; /* Высота блока */
    display: flex; /* Используем flexbox для равномерного деления на секции */
    z-index: 1000; /* Поверх всего контента */
}

/* Секции внутри блока */
.status-section {
    flex: 1; /* Все секции занимают равное пространство */
    display: flex;
    justify-content: center; /* Центрируем текст по горизонтали */
    align-items: center; /* Центрируем текст по вертикали */
    font-size: 10px;
    font-weight: bold;
    color: white; /* Белый текст */
    text-transform: uppercase; /* Верхний регистр текста */
}

/* Стили для каждой секции */
.status-section.not-started {
    background-color: #333; /* Тёмно-серый */
}

.status-section.finished {
    background-color: #225475; /* Тёмно-синий */
}

.status-section.in-play {
    background-color: #ff4500; /* Оранжевый в тон верхней полосы */
}

.status-section.all {
    background-color: black; /* Чёрный */
}

.status-section.active {
    border-bottom: 3px solid white; /* Подчёркивание активного фильтра */
    opacity: 1; /* Подчёркиваем выделение */
}

.status-section:not(.active) {
    opacity: 0.7; /* Делает неактивные элементы более приглушёнными */
    cursor: pointer;
}

.footer {
    background-color: #333; /* Тёмно-серый фон */
    color: #ffffff; /* Белый текст */
    text-align: center; /* Центрирование содержимого */
    padding: 10px 0; /* Отступы сверху и снизу */
    margin-top: 10px; /* Расстояние до таблицы */
    width: 100%; /* Занимает всю ширину экрана */
    display: flex;
    justify-content: center; /* Центрируем содержимое */
}

.mobile-page-panel {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.mobile-page-panel h1 {
    margin: 0 0 10px;
    color: #225475;
    font-size: 20px;
    line-height: 1.2;
}

.mobile-standings-grid {
    display: grid;
    gap: 12px;
}

.mobile-page-panel .league-container {
    margin-bottom: 0;
}

.mobile-page-panel .sidelig {
    margin: 0 0 7px;
    padding: 0;
}

.mobile-page-panel .titlig,
.mobile-page-panel .titlige {
    color: #1d2a33;
}

.mobile-page-panel #news-container {
    display: grid;
    gap: 12px;
}

.mobile-page-panel .news-item {
    display: grid;
    gap: 5px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e4ebf0;
}

.mobile-page-panel .news-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mobile-page-panel .news-item img {
    width: 100%;
    max-height: 170px;
    object-fit: cover;
    border-radius: 7px;
}

.mobile-page-panel .news-title {
    margin: 0;
    color: #ff8000;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
}

.mobile-page-panel .news-description,
.mobile-page-panel .news-link {
    margin: 0;
    font-size: 12px;
}

.mobile-page-panel .news-link {
    color: #225475;
    font-weight: 900;
    text-decoration: none;
}

.footer-content {
    width: 100%; /* Ширина footer равна родительскому контейнеру */
    max-width: 1200px; /* Соответствует ширине .content-wrapper */
    margin: 0 auto; /* Центрируем содержимое */
    padding: 0 10px; /* Внутренние отступы */
    box-sizing: border-box; /* Учитываем padding в ширине */
    padding-bottom: 50px;
}

.footer-first-row {
    background-color: #444; /* Темно-серый фон */
    padding: 5px 10px; /* Внутренние отступы */
    font-size: 12px; /* Размер текста */
    color: #808080; /* Светло-серый текст */
    text-align: justify; /* Центрирование текста */
    line-height: 1.5; /* Межстрочный интервал */
    margin-bottom: 10px; /* Отступ до второго яруса */
}

/* Второй ярус - Логотипы */
.footer-second-row {
    background-color: #333; /* Тёмно-серый фон */
    display: flex;
    justify-content: center; /* Центрируем логотипы */
    align-items: center; /* Выравниваем логотипы по вертикали */
    gap: 12px; /* Расстояние между логотипами */
    flex-wrap: wrap;
    padding: 10px 0; /* Отступы сверху и снизу */
    box-sizing: border-box;
    margin-bottom: 10px; /* Отступ до третьего яруса */
}

.footer-icons img {
    width: 26px; /* Размер логотипов */
    height: 26px;
    object-fit: contain; /* Сохраняем пропорции */
    transition: transform 0.3s ease; /* Анимация при наведении */
}

/* Третий ярус - Копирайт */
.footer-third-row {
    background-color: #222; /* Ещё более тёмный фон */
    padding: 10px 20px; /* Внутренние отступы */
    font-size: 11px; /* Мелкий текст */
    color: #aaa; /* Светло-серый */
    text-align: center; /* Центрирование текста */
}
.team-logo {
    width: 10px;
    height: 10px;
    margin-left: 5px; /* Для team1 */
    margin-right: 5px; /* Для team2 */
    vertical-align: middle;
}

/* Если нужно различать отступы для team1 и team2 */
.team1 .team-logo {
    margin-left: 1px;
}

.team2 .team-logo {
    margin-right: 5px;
}
.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.back-button:hover {
    background-color: #45a049;
}

.error {
    color: red;
    text-align: center;
    font-size: 1.2em;
    margin-top: 20px;
}

.match-details-container {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.match-details-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.match-details-container p {
    font-size: 1.1em;
    margin: 5px 0;
}

.match-details-container h3 {
    font-size: 0.9em; /* Уменьшение размера шрифта */
    text-align: center; /* Центрирование текста */
    margin-top: 10px; /* Регулировка верхнего отступа */
    margin-bottom: 10px; /* Регулировка нижнего отступа */
}

.match-details-container ul {
    list-style-type: none;
    padding: 0;
}

.match-details-container li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 1em;
}

.match-details-container li:last-child {
    border-bottom: none;
}
.match-date-time {
    text-align: center;
    font-size: 14px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.match-info {
    display: flex;
    justify-content: space-between; /* Равное расстояние между элементами */
    align-items: center; /* Выравнивание по вертикали */
    text-align: center;
    width: 100%; /* Занимает всю ширину контейнера */
    max-width: 600px; /* Ограничение максимальной ширины для ПК */
    margin: 0 auto; /* Центрирование на странице */
}

.match-info .team,
.match-info .score {
    flex: 1; /* Каждый элемент занимает равное пространство */
    text-align: center;
    white-space: nowrap; /* Запрет на перенос текста */
}

.match-info .team img {
    max-width: 80px; /* Размер логотипов */
    max-height: 80px;
    display: block;
    margin: 0 auto; /* Центрирование логотипов */
}

.match-info .team div {
    margin-top: 5px; /* Отступ для названия команды */
    font-size: 14px; /* Размер текста для мобильных устройств */
}

.match-info .score {
    font-size: 36px; /* Размер шрифта для счёта */
    color: #d32f2f; /* Цвет счёта */
    font-weight: bold;
}

.match-info .score span {
    display: block; /* Отображение минут под счётом */
    font-size: 8px;
    margin-top: 10px;
}
.match-minute {
    display: block; /* Отображение минут под счётом */
    font-size: 14px;
    margin-top: 10px;
}


@media (max-width: 768px) {
    .match-info {
        max-width: 100%; /* Снимаем ограничение ширины */
        padding: 0 10px; /* Отступы для небольших экранов */
    }

    .match-info .score {
        font-size: 35px; /* Уменьшаем размер шрифта для счёта */
    }

    .match-info .team img {
        max-width: 70px; /* Уменьшаем размер логотипов */
        max-height: 70px;
    }
    .match-details-container h3 {
        font-size: 0.9em; /* Уменьшение размера шрифта */
        text-align: center; /* Центрирование текста */
        margin: 10px auto; /* Центрирование с отступами */
        line-height: 1.2; /* Регулировка межстрочного расстояния */
    }
}
/* Общие стили для списка событий */
.match-events {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.event-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 1em;
}

/* События команды 1 */
.team1-event {
    justify-content: flex-start; /* Левое выравнивание */
    text-align: left;
}

/* События команды 2 */
.team2-event {
    justify-content: flex-end; /* Правое выравнивание */
    text-align: right;
}

/* Общие стили для иконок, минут и игроков */
.event-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

.event-minute {
    margin: 0 8px;
    font-weight: bold;
}

.event-player {
    font-size: 1em;
}
