body {
    font-family: 'Inter', sans-serif;
}

/* Анимация движения неонового градиента по контуру */
@keyframes neonFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Синяя неоновая линия для набора игроков */
.neon-border-enrollment,
.neon-border-active {
    position: relative;
    background-clip: padding-box;
    border: 2px solid transparent !important;
}

.neon-border-enrollment::before,
.neon-border-active::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    /* Толщина светящейся линии */
    background: linear-gradient(90deg, #1e40af, #3b82f6, #1d4ed8, #60a5fa, #1e40af);
    background-size: 200% auto;
    animation: neonFlow 3s linear infinite;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
}

/* Оранжевая неоновая линия для активного турнира */
.neon-border-active::before {
    background: linear-gradient(90deg, #9a3412, #f97316, #c2410c, #fdba74, #9a3412);
    background-size: 200% auto;
    animation: neonFlow 3s linear infinite;
}

/* Эффекты анимированного логотипа KHLMANIA */
@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 8px #3b82f6, 0 0 20px #3b82f6, 0 0 35px #1d4ed8;
        color: #60a5fa;
    }
    50% {
        text-shadow: 0 0 3px #2563eb, 0 0 10px #2563eb, 0 0 20px #1e40af;
        color: #93c5fd;
    }
}
.neon-pulse-active {
    animation: neonPulse 1.5s ease-in-out infinite;
}

@keyframes neonScoreboardFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 8px #3b82f6, 0 0 20px #3b82f6, 0 0 35px #1d4ed8;
        color: #60a5fa;
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: none;
        color: #18181b;
        opacity: 0.25;
    }
}
.neon-flicker-active {
    animation: neonScoreboardFlicker 3s linear infinite;
}

@keyframes marqueeMove {
    0% { transform: translateX(50%); } 
    100% { transform: translateX(-100%); }
}
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    position: relative;
    mask-image: linear-gradient(to right, transparent, block 15%, block 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, block 15%, block 85%, transparent);
}
.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marqueeMove 13s linear infinite; 
}

/* Мерцающий курсор хоккейного табло */
@keyframes blinkCursor {
    50% { border-color: transparent; }
}
.typewriter-cursor {
    border-right: 4px solid #3b82f6;
    animation: blinkCursor 0.75s step-end infinite;
    padding-right: 4px;
}

/* Плавный уход перед сменой анимации */
.title-fade-out {
    opacity: 0 !important;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Наклонный шрифт для печатной машинки */
.logo-typewriter {
    font-style: italic;
}

/* Авторская 4-я анимация: Киберспортивный RGB Глитч */
@keyframes cyberGlitch {
    0%, 100% {
        text-shadow: 0.04em 0 0 #ef4444, -0.04em -0.03em 0 #3b82f6, -0.02em 0.04em 0 #10b981;
    }
    14% {
        text-shadow: 0.04em 0 0 #ef4444, -0.04em -0.03em 0 #3b82f6, -0.02em 0.04em 0 #10b981;
    }
    15% {
        text-shadow: -0.04em -0.03em 0 #ef4444, 0.02em 0.03em 0 #3b82f6, -0.04em -0.04em 0 #10b981;
    }
    49% {
        text-shadow: -0.04em -0.03em 0 #ef4444, 0.02em 0.03em 0 #3b82f6, -0.04em -0.04em 0 #10b981;
    }
    50% {
        text-shadow: 0.02em 0.04em 0 #ef4444, 0.04em 0 0 #3b82f6, 0 -0.04em 0 #10b981;
    }
    99% {
        text-shadow: 0.02em 0.04em 0 #ef4444, 0.04em 0 0 #3b82f6, 0 -0.04em 0 #10b981;
    }
}
.cyber-glitch-active {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.2em;
    color: #ffffff;
    animation: cyberGlitch 1.2s steps(2, start) infinite;
    opacity: 0.95;
}

/* Восстановление крупного шрифта и овала со счетом */
.calendar-match-card {
    background-color: rgba(24, 24, 27, 0.35);
    border: 1px solid rgba(63, 63, 70, 0.4);
    padding: 1.5rem 2rem !important;
    border-radius: 2rem !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.calendar-match-card:hover {
    border-color: rgba(82, 82, 91, 0.7);
    background-color: rgba(24, 24, 27, 0.55);
}
.calendar-match-team-name {
    font-size: 1.25rem !important; 
    font-weight: 800 !important;
    color: #f4f4f5 !important;
}
.calendar-match-score-pill {
    background-color: #09090b !important;
    border: 1px solid rgba(39, 39, 42, 0.8);
    border-radius: 9999px !important;
    padding: 0.5rem 1.75rem !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 1.25rem !important; 
    font-weight: 900 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 7rem;
}
.calendar-match-vs-badge {
    background-color: #09090b !important;
    border: 1px solid rgba(39, 39, 42, 0.8);
    border-radius: 9999px !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #a1a1aa !important;
    letter-spacing: 0.05em;
}
.calendar-match-logo-img {
    width: 2.5rem !important; 
    height: 2.5rem !important;
    border-radius: 9999px;
    border: 1px solid rgba(63, 63, 70, 0.8);
    object-fit: cover;
}
.calendar-match-badge-ot,
.calendar-match-badge-so,
.calendar-match-badge-tl {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.375rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
}

/* Выделение исходов и счетов победителя и проигравшего */
.score-winner {
    color: #10b981 !important; /* Зеленый */
    font-weight: 900 !important;
}
.score-loser {
    color: #ef4444 !important; /* Красный */
    font-weight: 700 !important;
}
.name-loser {
    color: #71717a !important; /* Темный сероватый никнейм */
    font-weight: 500 !important;
    opacity: 0.65;
}

/* Оптимизация списка участников: Крупные логотипы и ники (Скриншот 3) */
.participant-card-logo {
    width: 3.5rem !important; /* Крупный логотип 56px */
    height: 3.5rem !important;
    border-radius: 9999px;
    border: 2px solid rgba(59, 130, 246, 0.4);
    object-fit: cover;
}
.participant-card-name {
    font-size: 1.35rem !important; /* Крупный шрифт */
    font-weight: 800 !important;
    color: #f4f4f5 !important;
}

/* Увеличение ников и логотипов в списке истории матчей (Скриншот 4) */
.history-match-team-logo {
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 9999px;
    border: 1px solid rgba(63, 63, 70, 0.6);
    object-fit: cover;
}
.history-match-team-name {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
}

/* Красивые бейджи для стадий в списке истории матчей профилей */
.stage-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stage-badge-group {
    background-color: rgba(39, 39, 42, 0.45);
    color: #a1a1aa;
    border: 1px solid rgba(63, 63, 70, 0.4);
}
.stage-badge-qf {
    background-color: rgba(30, 58, 138, 0.4);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}
.stage-badge-sf {
    background-color: rgba(88, 28, 135, 0.4);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.stage-badge-final {
    background-color: rgba(120, 53, 4, 0.45);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}
.stage-badge-third {
    background-color: rgba(124, 45, 18, 0.4);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.35);
}

/* Исправление отступов перед никами в карточках матчей и увеличение под длинные имена */
.flex.space-x-2\.5.w-32.shrink-0 {
    display: flex !important;
    justify-content: space-between !important;
    width: 10.5rem !important; /* Увеличенная колонка на мобильных */
}
.flex.space-x-2\.5.w-32.shrink-0 > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.history-match-team-name {
    max-width: 7.25rem !important; /* Лимит длины имени на мобильных */
}

/* Адаптивные стили под экраны ПК и планшетов (sm: от 640px) */
@media (min-width: 640px) {
    .flex.space-x-2\.5.w-32.shrink-0 {
        width: 16.5rem !important; /* Фиксированная колонка на ПК, вмещающая логотип + длинный никнейм */
    }
    .history-match-team-name {
        max-width: 13rem !important; /* Ники длиной до 18-20 символов теперь выводятся без сокращений */
    }
}