/**
 * Стили для главной страницы (index.html)
 * Вынесено из inline стилей для оптимизации производительности
 * Версия: 1.0.0
 */

/* Адаптивное отображение кнопки "Состав на игру" */
.lineup-button-mobile {
    display: block;
    margin-bottom: 1rem;
}

.lineup-button-desktop {
    display: none;
}

@media (min-width: 640px) {
    .lineup-button-mobile {
        display: none;
    }
    
    .lineup-button-desktop {
        display: block;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1 0 auto;
    width: 100%;
}

footer {
    flex-shrink: 0;
}

/* ==================== Стили для недельного календаря ==================== */
.match-day {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: white !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    position: relative;
    transition: all 0.3s ease;
}

.match-day:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    z-index: 20;
}

/* Стили для прошедших матчей */
.match-day.past-match {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.match-day.past-match::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.match-day.past-match:hover {
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 50%, #2563EB 100%) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: scale(1.08) !important;
}

.match-score {
    font-size: 0.85rem;
    font-weight: 900;
    margin-top: 2px;
    line-height: 1;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
}

/* Улучшенные стили для счета в прошедших матчах */
.match-day.past-match .match-score {
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    border: none;
}

/* Стили для логотипа команды в прошедших матчах */
.match-day.past-match .match-team-logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
}

/* Убираем любые трансформации для обычных дней */
.calendar-day {
    height: 50px !important;
    width: 100% !important;
    min-height: 50px !important;
    max-height: 50px !important;
    transform: none !important;
    transition: all 0.2s ease;
    font-size: 14px;
}

.calendar-day:hover {
    transform: none !important;
    background-color: rgba(59, 130, 246, 0.05);
}

#calendarSection {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.calendar-header {
    margin-bottom: 0.75rem !important;
}

.current-day {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    transform: none !important;
}

.current-day:hover {
    transform: none !important;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
}

/* Стили для контейнера календаря */
#weekCalendar {
    align-items: center;
    min-height: 110px;
}

.match-day-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 4px;
}

.match-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 3px;
    filter: brightness(1.1);
}

/* Увеличить логотип соперника и контейнер дня матча в мобильной версии календаря */
@media (max-width: 640px) {
    .match-team-logo {
        width: 32px !important;
        height: 32px !important;
    }
    
    .match-day {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        transform: none !important;
        padding: 0 !important;
    }
    
    .match-day:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .match-day.past-match {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .match-day.past-match:hover {
        background: transparent !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .match-day-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
    }
}

.match-time {
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Скрыть время матча в мобильной версии календаря */
@media (max-width: 640px) {
    .match-time {
        display: none !important;
    }
}

/* Стили для компактного заголовка месяца */
#currentMonthDisplay {
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

#currentMonthDisplay:hover {
    color: #3B82F6;
    background-color: rgba(59, 130, 246, 0.08);
}

.calendar-expanded {
    max-height: 600px;
    transition: max-height 0.5s ease-in-out;
}

.calendar-collapsed {
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

/* ==================== Стили для статистики ==================== */
.stats-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.stats-title {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #6B7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.stats-icon {
    width: 0.875rem;
    height: 0.875rem;
    margin-right: 0.5rem;
    color: #3B82F6;
    flex-shrink: 0;
}

.leader-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.leader-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.leader-details {
    min-width: 0;
    flex: 1;
}

.leader-name {
    font-weight: 700 !important;
    color: #111827 !important;
    font-size: 0.95rem !important;
    margin: 0 0 0.25rem 0 !important;
    line-height: 1.2 !important;
}

.leader-team {
    color: #6B7280 !important;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.team-mini-logo {
    width: 0.875rem;
    height: 0.875rem;
    margin-right: 0.25rem;
    flex-shrink: 0;
}

.leader-stats {
    text-align: center;
    margin-left: 1rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    line-height: 1 !important;
    margin-bottom: 0.25rem !important;
}

.stat-label {
    font-size: 0.625rem !important;
    color: #9CA3AF !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

/* Обновление иконок после рендера */
.stats-card [data-feather] {
    stroke-width: 2;
}

/* Мобильная адаптация статистики */
@media (max-width: 640px) {
    .stat-value {
        font-size: 1.75rem !important;
    }

    .leader-info {
        gap: 0.5rem;
    }

    .leader-stats {
        margin-left: 0.75rem;
    }

    .stats-title {
        font-size: 0.75rem !important;
    }
}

/* Компактные стили для секции статистики */
section.py-8 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Компактный переключатель */
#skatersTab, #goaliesTab {
    font-size: 0.875rem;
    padding: 0.375rem 1rem;
    min-width: 70px;
    text-align: center;
}

/* Уменьшенные отступы для карточек статистики */
.stats-card .p-6 {
    padding: 1.25rem !important;
}

/* Компактный заголовок статистики в карточках */
.stats-card h3 {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 1rem !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
}

.stats-card h3 i {
    margin-right: 0.5rem;
    color: #3B82F6;
    flex-shrink: 0;
}

.stats-card h3.text-center {
    text-align: left !important;
}

/* Обеспечиваем правильные отступы в карточке */
.stats-card .p-6 > div:first-child {
    margin-bottom: 1rem;
}

/* Оптимизация для мобильных */
@media (max-width: 640px) {
    .stats-card .p-6 {
        padding: 1rem !important;
    }

    h2.text-2xl {
        font-size: 1.5rem !important;
    }

    .gap-4 {
        gap: 0.75rem !important;
    }
}

.leader-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
}

.player-list-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
}

.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.player-row {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.player-row:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.leader-card {
    transition: all 0.3s ease;
}

.leader-card:hover {
    transform: scale(1.02);
}

/* ==================== Мобильное меню ==================== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: black;
    border-top: 2px solid #3B82F6;
    z-index: 40;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu a {
    display: flex;
    align-items: center;
    padding: 15px 24px;
    border-bottom: 1px solid #1F2937;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    padding-left: 28px;
}

.mobile-menu a.text-blue-400 {
    background-color: rgba(59, 130, 246, 0.05);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ==================== Модальное окно состава ==================== */
.lineup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 60;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.lineup-modal.active {
    display: flex;
}

/* ==================== Новый дизайн состава команды ==================== */
.team-roster {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

.team-roster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Информация о матче с логотипами */
.match-info-with-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0 1rem;
}

.team-logo-left,
.team-logo-right {
    display: flex;
    align-items: center;
}

.team-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

/* Компактная информация о матче */
.match-info-compact {
    text-align: center;
    color: white;
    flex: 1;
    margin: 0 0.75rem;
}

.match-date {
    font-size: 0.85rem;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 0.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.match-info-compact .match-time {
    font-size: 1.1rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.15rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
}

.match-location {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.05rem;
}

.match-stage {
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.roster-lines {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.roster-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 90px;
    position: relative;
}

.line-number {
    font-size: 1.2rem;
    font-weight: 900;
    color: white;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    background: #dc2626;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000000;
}

.line-players {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    padding-bottom: 0.5rem;
}

.players-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.defenders-row {
    margin-bottom: 0;
}

.forwards-row {
    margin-top: -1.5rem;
}

.player-card {
    position: relative;
}

.player-card .pos-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #ffffff;
    z-index: 2;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
}

.player-card.empty .player-avatar {
    display: none;
}

.player-card.empty {
    opacity: 0.7;
}

.player-card.empty .player-info {
    background: rgba(255, 255, 255, 0.18) !important;
}

@media (max-width: 640px) {
    .players-row {
        gap: 0.6rem;
    }
    .player-card .pos-badge {
        top: -4px;
        left: -4px;
        font-size: 9px;
        padding: 2px 5px;
    }
}

/* Защитники и нападающие теперь в отдельных строках */
.players-row .player-card {
    flex: 0 0 auto;
}

.line-players::-webkit-scrollbar {
    height: 4px;
}

.line-players::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.line-players::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.line-players::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ==================== Карточки игроков ==================== */
.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
    height: 100px;
}

/* Стили для защитников */
.player-card.defender .player-info {
    background: #2563eb;
}

.player-card.defender .player-number {
    background: rgba(255, 255, 255, 0.3);
}

/* Стили для нападающих */
.player-card.forward .player-info {
    background: #dc2626;
}

.player-card.forward .player-number {
    background: rgba(255, 255, 255, 0.3);
}

.player-card:hover .player-avatar {
    transform: scale(1.1);
}

.player-avatar {
    width: 50px;
    height: 60px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow: visible;
    margin-bottom: -15px;
    position: relative;
    display: flex;
    align-items: flex-end;
    z-index: 1;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
}

.player-info {
    background: #dc2626;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    text-align: center;
    width: 95px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
    position: relative;
    z-index: 2;
}

.player-name {
    font-family: 'Roboto Condensed', 'Arial Narrow', 'Arial', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62px;
    line-height: 1.2;
}

.player-number {
    font-size: 0.7rem;
    font-weight: 900;
    color: #fef2f2;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.05rem 0.1rem;
    border-radius: 2px;
    min-width: 16px;
    text-align: center;
    margin-right: 0;
}

/* ==================== Карточки вратарей ==================== */
.goalkeepers-section {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.goalkeeper-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 110px;
}

.goalkeeper-card:hover .goalkeeper-avatar {
    transform: scale(1.1);
}

.goalkeeper-avatar {
    width: 60px;
    height: 70px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow: visible;
    margin-bottom: -20px;
    position: relative;
    display: flex;
    align-items: flex-end;
    z-index: 1;
}

.goalkeeper-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
}

.goalkeeper-info {
    background: #fbbf24;
    color: #92400e;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    text-align: center;
    width: 105px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
    position: relative;
    z-index: 2;
}

.goalkeeper-name {
    font-family: 'Roboto Condensed', 'Arial Narrow', 'Arial', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 72px;
    line-height: 1.2;
}

.goalkeeper-number {
    font-size: 0.7rem;
    font-weight: 900;
    color: #451a03;
    background: rgba(255, 255, 255, 0.3);
    padding: 0.05rem 0.1rem;
    border-radius: 2px;
    min-width: 16px;
    text-align: center;
    margin-right: 0;
}

/* ==================== Мобильная адаптация для состава ==================== */
@media (max-width: 640px) {
    .team-roster {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .match-info-with-logos {
        padding: 0 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .team-logo {
        width: 80px;
        height: 80px;
    }
    
    .match-info-compact {
        margin: 0 0.5rem;
    }
    
    .match-date {
        font-size: 0.75rem;
    }
    
    .match-info-compact .match-time {
        font-size: 0.95rem;
    }
    
    .match-location {
        font-size: 0.6rem;
    }
    
    .match-stage {
        font-size: 0.55rem;
    }

    .roster-line {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.4rem;
        min-height: 75px;
    }
    
    .line-number {
        font-size: 1rem;
        width: 28px;
        height: 28px;
        top: 6px;
        left: 6px;
        border-radius: 5px;
    }
    
    .line-players {
        gap: 0.4rem;
    }
    
    .players-row {
        gap: 0.8rem;
    }
    
    .player-card {
        height: 90px;
    }
    
    .player-avatar {
        width: 45px;
        height: 55px;
        margin-bottom: -12px;
    }
    
    .goalkeeper-card {
        height: 100px;
    }
    
    .goalkeeper-avatar {
        width: 55px;
        height: 65px;
        margin-bottom: -15px;
    }
    
    .player-info {
        width: 85px;
        padding: 0.15rem 0.3rem;
    }
    
    .player-name {
        font-size: 0.55rem;
        letter-spacing: -0.2px;
        max-width: 56px;
    }
    
    .player-number {
        font-size: 0.6rem;
    }
    
    .goalkeepers-section {
        gap: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .goalkeeper-avatar {
        width: 50px;
        height: 50px;
    }
    
    .goalkeeper-info {
        width: 95px;
        padding: 0.15rem 0.3rem;
    }
    
    .goalkeeper-name {
        font-size: 0.55rem;
        letter-spacing: -0.2px;
        max-width: 66px;
    }
    
    .goalkeeper-number {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .team-roster {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .match-info-with-logos {
        padding: 0 0.3rem;
        margin-bottom: 1.2rem;
    }
    
    .team-logo {
        width: 70px;
        height: 70px;
    }
    
    .match-info {
        margin: 0 0.3rem;
    }
    
    .match-date {
        font-size: 0.85rem;
    }
    
    .match-info-compact .match-time {
        font-size: 1rem;
    }
    
    .match-location {
        font-size: 0.65rem;
    }
    
    .match-stage {
        font-size: 0.55rem;
    }
    
    .roster-line {
        min-height: 70px;
    }
    
    .line-number {
        font-size: 0.9rem;
        width: 24px;
        height: 24px;
        top: 4px;
        left: 4px;
        border-radius: 4px;
    }
    
    .line-players {
        gap: 0.3rem;
    }
    
    .players-row {
        gap: 0.6rem;
    }
    
    .player-card {
        height: 80px;
    }
    
    .player-avatar {
        width: 40px;
        height: 50px;
        margin-bottom: -10px;
    }
    
    .goalkeeper-card {
        height: 90px;
    }
    
    .goalkeeper-avatar {
        width: 50px;
        height: 60px;
        margin-bottom: -12px;
    }
    
    .player-info {
        width: 75px;
        padding: 0.1rem 0.25rem;
    }
    
    .player-name {
        font-size: 0.52rem;
        letter-spacing: -0.1px;
        max-width: 52px;
    }
    
    .player-number {
        font-size: 0.55rem;
    }
    
    .goalkeepers-section {
        gap: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .goalkeeper-avatar {
        width: 45px;
        height: 45px;
    }
    
    .goalkeeper-info {
        width: 85px;
        padding: 0.1rem 0.25rem;
    }
    
    .goalkeeper-name {
        font-size: 0.52rem;
        letter-spacing: -0.1px;
        max-width: 62px;
    }
    
    .goalkeeper-number {
        font-size: 0.55rem;
    }
}

/* Стили для отдельного блока иконок ролей */
.lineup-modal .player-role, 
.lineup-modal .goalkeeper-role {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2px 0 !important;
    height: 20px !important;
}

.lineup-modal .player-role img, 
.lineup-modal .goalkeeper-role img {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    filter: brightness(0) invert(1) !important;
    margin: 0 !important;
}

/* Возвращаем обычные стили для номеров */
.lineup-modal .player-number, 
.lineup-modal .goalkeeper-number {
    display: block !important;
    text-align: center !important;
    font-size: 0.7rem !important;
    font-weight: 900 !important;
}

/* Стили для canvas снега */
.winter-snow {
  background: none !important;
  animation: none !important;
  opacity: 1;
}
.winter-snow::before,
.winter-snow::after,
.winter-snow-extra-1,
.winter-snow-extra-2,
.winter-snow-extra-3,
.winter-snow-extra-4,
.winter-snow-extra-5 {
  display: none !important;
}
.winter-snow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

/* ==================== Зимнее оформление главного блока ==================== */
.winter-hero {
    position: relative;
    overflow: hidden;
}

.winter-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.12) 0, transparent 55%),
                radial-gradient(circle at top right, rgba(255, 255, 255, 0.14) 0, transparent 55%);
    opacity: 0.9;
    pointer-events: none;
}

/* Новогодние шапки на логотипах команд */
.winter-logo-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.winter-logo {
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.8));
    position: relative;
    z-index: 1;
}

/* Новогодняя шапка из изображения */
.winter-logo-wrapper::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    width: 50px;
    height: 50px;
    transform: translateX(-50%) rotate(-12deg);
    background-image: url('/images/santa_hat.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    z-index: 2;
    animation: santa-hat-sway 3.5s ease-in-out infinite;
}

/* Убираем помпон, так как он уже в изображении */
.winter-logo-wrapper::after {
    display: none;
}

/* Анимация покачивания шапки (как от ветра) */
@keyframes santa-hat-sway {
    0%, 100% {
        transform: translateX(-50%) rotate(-12deg);
    }
    25% {
        transform: translateX(-50%) rotate(-8deg);
    }
    50% {
        transform: translateX(-50%) rotate(-14deg);
    }
    75% {
        transform: translateX(-50%) rotate(-10deg);
    }
}


/* Контейнер снега в блоке ближайшего матча */
.winter-snow {
    position: absolute;
    inset: -40px 0 0;
    pointer-events: none;
    z-index: 5;
    opacity: 0.8;
    background-size: 220px 220px, 320px 320px;
    background-position: 0 0, 0 0;
    animation: winter-snow-fall 32s linear infinite;
}

/* Множественные слои снега для эффекта глубины и разнообразия */
.winter-snow,
.winter-snow::before,
.winter-snow::after,
.winter-snow-extra-1,
.winter-snow-extra-2,
.winter-snow-extra-3,
.winter-snow-extra-4,
.winter-snow-extra-5 {
    content: '';
    position: absolute;
    inset: 0;
    background-repeat: repeat;
}

/* Основной слой - крупные снежинки */
.winter-snow {
    background-image:
        radial-gradient(circle, rgba(248, 250, 252, 0.95) 0, rgba(248, 250, 252, 0.95) 3px, transparent 4px),
        radial-gradient(circle, rgba(248, 250, 252, 0.85) 0, rgba(248, 250, 252, 0.85) 2px, transparent 3px),
        radial-gradient(circle, rgba(248, 250, 252, 0.75) 0, rgba(248, 250, 252, 0.75) 1px, transparent 2px);
    background-size: 280px 280px, 340px 340px, 180px 180px;
    animation: winter-snow-fall-slow 45s linear infinite;
}

/* Второй слой - средние снежинки */
.winter-snow::before {
    opacity: 0.8;
    filter: blur(0.3px);
    background-image:
        radial-gradient(circle, rgba(248, 250, 252, 0.9) 0, rgba(248, 250, 252, 0.9) 2px, transparent 3px),
        radial-gradient(circle, rgba(248, 250, 252, 0.7) 0, rgba(248, 250, 252, 0.7) 1px, transparent 2px),
        radial-gradient(circle, rgba(248, 250, 252, 0.6) 0, rgba(248, 250, 252, 0.6) 1px, transparent 2px);
    background-size: 220px 220px, 280px 280px, 160px 160px;
    background-position: 0 -60px, 0 -30px, 0 -90px;
    animation: winter-snow-fall-medium 35s linear infinite;
}

/* Третий слой - мелкие снежинки */
.winter-snow::after {
    opacity: 0.6;
    filter: blur(0.8px);
    background-image:
        radial-gradient(circle, rgba(248, 250, 252, 0.8) 0, rgba(248, 250, 252, 0.8) 1px, transparent 2px),
        radial-gradient(circle, rgba(248, 250, 252, 0.6) 0, rgba(248, 250, 252, 0.6) 1px, transparent 2px),
        radial-gradient(circle, rgba(248, 250, 252, 0.4) 0, rgba(248, 250, 252, 0.4) 1px, transparent 2px);
    background-size: 140px 140px, 200px 200px, 120px 120px;
    background-position: 0 -80px, 0 -40px, 0 -120px;
    animation: winter-snow-fall-fast 25s linear infinite;
}

/* Дополнительные слои для праздничного эффекта */
.winter-snow-extra-1 {
    opacity: 0.4;
    filter: blur(1px);
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 0, rgba(255, 255, 255, 0.7) 2px, transparent 3px),
        radial-gradient(circle, rgba(248, 250, 252, 0.5) 0, rgba(248, 250, 252, 0.5) 1px, transparent 2px);
    background-size: 320px 320px, 180px 180px;
    background-position: 0 -100px, 0 -50px;
    animation: winter-snow-fall-slow 55s linear infinite reverse;
}

.winter-snow-extra-2 {
    opacity: 0.3;
    filter: blur(1.2px);
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.6) 0, rgba(255, 255, 255, 0.6) 1px, transparent 2px),
        radial-gradient(circle, rgba(248, 250, 252, 0.4) 0, rgba(248, 250, 252, 0.4) 1px, transparent 2px);
    background-size: 160px 160px, 240px 240px;
    background-position: 0 -70px, 0 -35px;
    animation: winter-snow-fall-medium 40s linear infinite;
}

.winter-snow-extra-3 {
    opacity: 0.5;
    filter: blur(0.5px);
    background-image:
        radial-gradient(circle, rgba(248, 250, 252, 0.85) 0, rgba(248, 250, 252, 0.85) 2px, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.6) 0, rgba(255, 255, 255, 0.6) 1px, transparent 2px);
    background-size: 260px 260px, 140px 140px;
    background-position: 0 -45px, 0 -90px;
    animation: winter-snow-fall-fast 30s linear infinite reverse;
}

.winter-snow-extra-4 {
    opacity: 0.35;
    filter: blur(0.7px);
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 0, rgba(255, 255, 255, 0.7) 1px, transparent 2px),
        radial-gradient(circle, rgba(248, 250, 252, 0.5) 0, rgba(248, 250, 252, 0.5) 1px, transparent 2px);
    background-size: 200px 200px, 300px 300px;
    background-position: 0 -110px, 0 -55px;
    animation: winter-snow-fall-slow 50s linear infinite;
}

.winter-snow-extra-5 {
    opacity: 0.25;
    filter: blur(1.5px);
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.5) 0, rgba(255, 255, 255, 0.5) 1px, transparent 2px),
        radial-gradient(circle, rgba(248, 250, 252, 0.3) 0, rgba(248, 250, 252, 0.3) 1px, transparent 2px);
    background-size: 120px 120px, 280px 280px;
    background-position: 0 -130px, 0 -65px;
    animation: winter-snow-fall-medium 38s linear infinite reverse;
}

/* Разнообразные анимации для разных слоев */
@keyframes winter-snow-fall-slow {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    100% {
        background-position: -60px 160px, 40px 180px, -80px 200px;
    }
}

@keyframes winter-snow-fall-medium {
    0% {
        background-position: 0 -60px, 0 -30px, 0 -90px;
    }
    100% {
        background-position: -80px 200px, 60px 160px, -100px 240px;
    }
}

@keyframes winter-snow-fall-fast {
    0% {
        background-position: 0 -80px, 0 -40px, 0 -120px;
    }
    100% {
        background-position: -120px 280px, 100px 220px, -140px 320px;
    }
}

/* Базовые анимации для совместимости */
@keyframes winter-snow-fall {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: -80px 180px, 80px 200px;
    }
}

/* Адаптация зимних эффектов под мобильные экраны */
@media (max-width: 640px) {
    .winter-snow {
        opacity: 0.7;
    }

    .winter-logo-wrapper::before {
        width: 40px;
        height: 40px;
        top: -14px;
        animation: santa-hat-sway-mobile 3.5s ease-in-out infinite;
    }
}

/* Мобильная анимация шапки (более мягкая) */
@keyframes santa-hat-sway-mobile {
    0%, 100% {
        transform: translateX(-50%) rotate(-10deg);
    }
    25% {
        transform: translateX(-50%) rotate(-7deg);
    }
    50% {
        transform: translateX(-50%) rotate(-12deg);
    }
    75% {
        transform: translateX(-50%) rotate(-9deg);
    }
}


/* ==================== Стили для опросника "Кто победит?" - Минималистичный дизайн ==================== */

/* Контейнер опросника - компактный */
.match-voting-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(30, 58, 138, 0.15) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.625rem 1rem;
    position: relative;
}

.match-voting-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.4), transparent);
    border-radius: 1px;
}

#matchVotingContainer {
    max-width: 520px;
    margin: 0 auto;
}

/* Загрузка */
.voting-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
}

.voting-loader-icon {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    color: rgba(96, 165, 250, 0.7);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Обертка для кнопок голосования */
.voting-buttons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Обертка для результатов */
.voting-results-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

/* Заголовок голосования */
.voting-question,
.voting-results-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.voting-header-icon {
    width: 14px;
    height: 14px;
    color: #60A5FA;
    flex-shrink: 0;
}

.voting-text {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Кнопки голосования */
.voting-buttons {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
}

.vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    flex: 1;
    max-width: 130px;
    min-height: 40px;
    position: relative;
    overflow: hidden;
}

.vote-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.vote-btn-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.9;
}

.vote-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.vote-btn:active:not(:disabled) {
    transform: translateY(0);
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vote-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Кнопка домашней команды */
.vote-home {
    background: linear-gradient(145deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.vote-home:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Кнопка ничьей */
.vote-draw {
    background: linear-gradient(145deg, #64748B 0%, #475569 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(100, 116, 139, 0.25);
}

.vote-draw:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4);
    border-color: rgba(100, 116, 139, 0.3);
}

/* Кнопка гостевой команды */
.vote-away {
    background: linear-gradient(145deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.vote-away:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.3);
}

.vote-team-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    text-align: center;
    line-height: 1.1;
}

/* Подсказка */
.voting-hint {
    display: none;
}

.voting-hint-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ==================== Стили результатов голосования ==================== */

.voting-total {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-left: 0.5rem;
}

.voting-closed-badge {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Результаты */
.voting-results {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
}

.vote-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.4rem 0.625rem;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 130px;
    min-height: 44px;
    position: relative;
}

.vote-result-item.user-voted {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.vote-result-item.user-voted::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.5rem;
    color: #60A5FA;
    font-weight: 700;
}

.vote-result-item.leading {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
}

.vote-result-item.leading.user-voted {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.12));
    border-color: rgba(59, 130, 246, 0.35);
}

.vote-result-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.vote-result-team {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.65rem;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.vote-result-percent {
    font-weight: 800;
    color: white;
    font-size: 1rem;
    line-height: 1;
}

/* Скрыть бары в компактном режиме */
.vote-result-bar-wrapper {
    display: none;
}

.vote-result-bar {
    display: none;
}

.vote-result-count {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
}

.your-vote-badge {
    display: none;
}

.voting-footer {
    display: none;
}

.voting-thanks-icon {
    display: none;
}

.voting-thanks {
    display: none;
}

.voting-total-footer {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
}

.your-vote-icon {
    width: 12px;
    height: 12px;
}

.error-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Анимация успеха */
.vote-success {
    animation: vote-success-pulse 0.4s ease;
}

@keyframes vote-success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Ошибка */
.voting-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #FCA5A5;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Мобильная адаптация опросника */
@media (max-width: 640px) {
    .match-voting-section {
        padding: 0.5rem 0.75rem;
    }

    .match-voting-section::before {
        width: 30px;
    }

    #matchVotingContainer {
        max-width: 100%;
    }
    
    .voting-buttons-wrapper,
    .voting-results-wrapper {
        gap: 0.4rem;
    }
    
    .voting-text {
        font-size: 0.6rem;
    }

    .voting-buttons {
        gap: 0.25rem;
    }
    
    .vote-btn {
        padding: 0.4rem 0.375rem;
        border-radius: 8px;
        min-height: 36px;
        max-width: none;
    }
    
    .vote-team-name {
        font-size: 0.625rem;
        max-width: 80px;
    }
    
    .voting-results {
        gap: 0.25rem;
    }
    
    .vote-result-item {
        padding: 0.35rem 0.375rem;
        border-radius: 8px;
        min-height: 40px;
        max-width: none;
    }

    .vote-result-team {
        font-size: 0.6rem;
        max-width: 75px;
    }
    
    .vote-result-percent {
        font-size: 0.9rem;
    }
    
    .vote-result-item.user-voted::after {
        font-size: 0.45rem;
        top: 2px;
        right: 3px;
    }
    
    .voting-total {
        font-size: 0.5rem;
        padding: 0.1rem 0.3rem;
        margin-left: 0.375rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
    .match-voting-section {
        padding: 0.4rem 0.5rem;
    }
    
    .vote-btn {
        padding: 0.35rem 0.25rem;
        min-height: 34px;
    }
    
    .vote-team-name {
        font-size: 0.575rem;
        max-width: 65px;
    }
    
    .vote-result-item {
        padding: 0.3rem 0.25rem;
        min-height: 38px;
    }
    
    .vote-result-team {
        font-size: 0.55rem;
        max-width: 60px;
    }
    
    .vote-result-percent {
        font-size: 0.85rem;
    }
}

/* ========================================
   СТИЛИ ДЛЯ НЕСКОЛЬКИХ МАТЧЕЙ В ДЕНЬ
======================================== */

/* Контейнер для нескольких матчей */
.match-day-content-multi {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    padding: 4px;
}

/* Контейнер логотипов - горизонтальный ряд */
.match-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Маленькие логотипы команд */
.match-team-logo-small {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
    filter: brightness(1.1);
    border: 1px solid rgba(255,255,255,0.2);
    background: white;
}

/* Контейнер времени - горизонтальный ряд */
.match-times-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Маленький текст времени */
.match-time-small {
    font-size: 9px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
}

/* Маленький текст счета */
.match-score-small {
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 3px;
    text-shadow: none;
}

.multi-matches-grid {
    grid-template-columns: 1fr;
    justify-items: center;
}

/* Разделитель между матчами */
.match-separator {
    width: 1px;
    height: 12px;
    background: rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
    .match-team-logo-small {
        width: 20px;
        height: 20px;
    }
    
    .match-time-small,
    .match-score-small {
        font-size: 9px;
    }
    
    .match-day-content-multi {
        gap: 2px;
        padding: 2px;
        align-items: center;
    }
    
    .match-logos-row,
    .match-times-row {
        gap: 2px;
        flex-direction: column;
    }

    .match-day.past-match .match-day-content-multi .match-logos-row {
        display: none;
    }

    .match-day.past-match .match-day-content-multi .match-times-row {
        gap: 4px;
    }

    .match-day.past-match .match-score-small {
        padding: 0;
        background: transparent;
        border-radius: 0;
        font-weight: 900;
        font-size: 12px;
        letter-spacing: 0.02em;
        text-shadow: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}
