/* --- ФУТБОЛЬНОЕ ПОЛЕ (TACTICAL PITCH) --- */
.ry-pitch-wrapper {
    width: 100%;
    max-width: 100%; 
    margin: 0 auto 35px auto;
    padding: 0; 
    box-sizing: border-box;
}
.ry-pitch-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    height: auto;
    background: linear-gradient(180deg, #090909 0%, #111111 100%); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 0px; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9); 
    overflow: visible; 
    transform: translateZ(0);
    will-change: transform;
}

/* Водяные знаки команд на поле */
.ry-pitch-team-badge {
    position: absolute;
    top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0.12; 
    transition: opacity 0.3s;
    z-index: 2;
}
.ry-pitch-team-badge.home-badge {
    left: 35px;
}
.ry-pitch-team-badge.away-badge {
    right: 35px;
}
.ry-pitch-team-logo {
    width: 75px;
    height: 75px;
    object-fit: contain;
}
.ry-pitch-team-name {
    font-family: "Unbounded", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}
@media (max-width: 768px) {
    .ry-pitch-wrapper {
        display: none !important;
    }
    .ry-pitch-team-logo {
        width: 35px;
        height: 35px;
    }
    .ry-pitch-team-name {
        font-size: 8px;
    }
    .ry-pitch-team-badge {
        top: 10px;
    }
    .ry-pitch-team-badge.home-badge {
        left: 15px;
    }
    .ry-pitch-team-badge.away-badge {
        right: 15px;
    }
}

/* Разметка футбольного поля */
.ry-pitch-grid-line-h1 {
    position: absolute;
    top: 33.33%;
    left: 0;
    right: 0;
    height: 1px;
    border-top: 1.5px dashed rgba(255, 255, 255, 0.05);
    pointer-events: none;
}
.ry-pitch-grid-line-h2 {
    position: absolute;
    top: 66.66%;
    left: 0;
    right: 0;
    height: 1px;
    border-top: 1.5px dashed rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

/* Ворота */
.ry-pitch-goal-post-left {
    position: absolute;
    top: 45%;
    height: 10%;
    left: -5px;
    width: 5px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-right: none;
    pointer-events: none;
}
.ry-pitch-goal-post-right {
    position: absolute;
    top: 45%;
    height: 10%;
    right: -5px;
    width: 5px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-left: none;
    pointer-events: none;
}

/* Центральная линия */
.ry-pitch-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1.5px;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-50%);
    pointer-events: none;
}
.ry-pitch-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18%;
    height: 32%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.ry-pitch-center-spot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
/* Штрафные площади */
.ry-pitch-penalty-left {
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 0;
    width: 16.5%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    pointer-events: none;
}
.ry-pitch-goal-left {
    position: absolute;
    top: 36%;
    bottom: 36%;
    left: 0;
    width: 5.5%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    pointer-events: none;
}
.ry-pitch-arc-left {
    position: absolute;
    top: 37%;
    height: 26%;
    left: 11%;
    width: 11%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
    pointer-events: none;
}
.ry-pitch-spot-left {
    position: absolute;
    top: 50%;
    left: 11%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.ry-pitch-penalty-right {
    position: absolute;
    top: 20%;
    bottom: 20%;
    right: 0;
    width: 16.5%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    pointer-events: none;
}
.ry-pitch-goal-right {
    position: absolute;
    top: 36%;
    bottom: 36%;
    right: 0;
    width: 5.5%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    pointer-events: none;
}
.ry-pitch-arc-right {
    position: absolute;
    top: 37%;
    height: 26%;
    right: 11%;
    width: 11%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    clip-path: polygon(0% 0%, 50% 0%, 50% 100%, 0% 100%);
    pointer-events: none;
}
.ry-pitch-spot-right {
    position: absolute;
    top: 50%;
    right: 11%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(50%, -50%);
    pointer-events: none;
}
/* Карточки игроков (фишки) */
.ry-pitch-player {
    position: absolute;
    width: 58px; 
    height: 58px; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.65);
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}
.ry-pitch-player.our-team {
    background: linear-gradient(135deg, #d82e40 0%, #a61a29 100%); 
    border: 2px solid #ffffff;
}
.ry-pitch-player.opponent-team {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%); 
    border: 2px solid #ffffff;
}
.ry-pitch-player:hover {
    transform: translate(-50%, -50%) scale(1.12);
    z-index: 50;
}
.ry-pitch-player.our-team:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.75), 0 0 18px rgba(216,46,64,0.65);
}
.ry-pitch-player.opponent-team:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.75), 0 0 18px rgba(255,255,255,0.45);
}

.ry-pitch-player-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #111;
}

.ry-pitch-player-num {
    font-family: "Unbounded", sans-serif;
    font-size: 18px; 
    font-weight: 700;
    color: #ffffff;
    pointer-events: none;
}
.ry-pitch-player-num.overlay-badge {
    position: absolute;
    top: -5px; 
    left: -5px; 
    min-width: 22px; 
    height: 22px; 
    padding: 0 3px;
    border-radius: 0px; 
    background: #ffffff;
    color: #000000;
    font-size: 10px; 
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    z-index: 12;
    box-sizing: border-box;
}
.ry-pitch-player.our-team .ry-pitch-player-num.overlay-badge {
    border: 1.5px solid #d82e40;
}
.ry-pitch-player.opponent-team .ry-pitch-player-num.overlay-badge {
    border: 1.5px solid #374151;
}

/* Имя под карточкой игрока */
.ry-pitch-player-name {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Unbounded", sans-serif;
    font-size: 11px; 
    font-weight: 500; 
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    max-width: 85px; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.95), -1px -1px 3px rgba(0, 0, 0, 0.95);
    pointer-events: none;
    letter-spacing: 0.3px;
}
@media (max-width: 1200px) {
    .ry-pitch-player {
        width: 44px; 
        height: 44px;
    }
    .ry-pitch-player-num {
        font-size: 13px;
    }
    .ry-pitch-player-num.overlay-badge {
        top: -3px;
        left: -3px;
        min-width: 17px;
        height: 17px;
        font-size: 8px;
    }
    .ry-pitch-player-captain {
        bottom: -3px;
        right: -3px;
        width: 14px;
        height: 14px;
        font-size: 8px;
        line-height: 11px;
    }
    .ry-pitch-player-name {
        display: none !important; 
    }
}

/* Значок капитана */
.ry-pitch-player-captain {
    position: absolute;
    bottom: -5px; 
    right: -5px; 
    width: 18px; 
    height: 18px; 
    border-radius: 0px; 
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    border: 1.5px solid #ffffff;
    color: #000000;
    font-family: "Unbounded", sans-serif;
    font-size: 9px; 
    font-weight: 900;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 15;
}

.ry-pitch-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #000000;
    border: 1px solid #444; 
    border-radius: 0px; 
    padding: 10px;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8); 
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: max-content;
    min-width: 140px;
    max-width: 250px;
    text-align: center; 
}
.ry-pitch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--arrow-left, 50%); 
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #444 transparent transparent transparent; 
}
.ry-pitch-player:hover .ry-pitch-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.ry-pitch-tooltip-name {
    font-family: "Unbounded", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #d82e40; 
    margin-bottom: 6px;
    border-bottom: 1px solid #333; 
    padding-bottom: 4px;
    white-space: normal; 
    text-align: center; 
}
.ry-pitch-tooltip-pos {
    font-family: "Unbounded", sans-serif;
    font-size: 11px;
    color: #ffffff;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0px;
    text-align: center; 
}
@media (max-width: 600px) {
    .ry-pitch-player {
        width: 32px; 
        height: 32px;
    }
    .ry-pitch-player-num {
        font-size: 10px;
    }
    .ry-pitch-player-num.overlay-badge {
        min-width: 14px;
        height: 14px;
        font-size: 7px;
        top: -3px;
        left: -3px;
        padding: 0 1px;
    }
    .ry-pitch-player-name {
        display: none !important; 
    }
    .ry-pitch-player-captain {
        width: 11px;
        height: 11px;
        font-size: 6px;
        line-height: 9px;
        bottom: -2px;
        right: -2px;
    }
    .ry-pitch-tooltip-name {
        font-size: 9px;
    }
    .ry-pitch-tooltip-pos {
        font-size: 8px;
    }
}

/* --- ОСНОВНОЙ КОНТЕЙНЕР --- */
.ry-mc-wrapper { 
    font-family: "Unbounded", sans-serif; 
    color: #fff; 
    background: rgba(15, 15, 15, 0.95); 
    /* Эффект стекла отключим для производительности, оставим просто темный фон */
    border-radius: 0px; 
    margin-top: 20px; 
    position: relative; 
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- ШАПКА МАТЧА --- */
.ry-mc-header { 
    background: transparent; 
    padding: 40px 20px; 
    text-align: center; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}
.ry-mc-season { 
    font-family: "Unbounded", sans-serif;
    color: #888; 
    font-weight: 500; 
    text-transform: uppercase; 
    font-size: 10px; 
    letter-spacing: 1px; 
    margin-bottom: 10px; 
}
.ry-mc-meta { 
    font-family: "Unbounded", sans-serif;
    font-size: 12px; 
    color: #ccc; 
    font-weight: 600; 
    margin-bottom: 30px; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ry-mc-scoreboard { display: flex; align-items: center; justify-content: center; gap: 40px; margin-bottom: 30px; }
.ry-mc-team { width: 35%; text-align: center; }
.ry-mc-logo { width: 100px; height: 100px; object-fit: contain; margin-bottom: 15px; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4)); }

.ry-mc-name { 
    font-family: "Onder", sans-serif;
    font-size: 16px; 
    font-weight: 400; 
    line-height: 1.7; 
    text-transform: uppercase; 
    color: #fff; 
}
.ry-mc-city { 
    font-family: "Unbounded", sans-serif;
    font-size: 12px; 
    color: #888; 
    text-transform: uppercase; 
    margin-top: 5px; 
    letter-spacing: 1px;
    font-weight: 600;
}

.ry-mc-score { 
    font-family: "Onder", sans-serif;
    font-size: 56px; 
    font-weight: 400; 
    color: #fff; 
    letter-spacing: 1px; 
    white-space: nowrap; 
    line-height: 1; 
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.ry-mc-live { 
    font-family: "Unbounded", sans-serif;
    color: #d82e40; 
    font-size: 11px; 
    font-weight: 800; 
    display: block; 
    animation: ryPulse 1.5s infinite; 
    margin-top: 8px; 
    text-transform: uppercase;
}

.ry-mc-info { 
    font-family: "Unbounded", sans-serif;
    font-size: 11px; 
    color: #666; 
    margin-top: 25px; 
    line-height: 1.6; 
}
.ry-mc-stadium {
    font-size: 11px;
    color: #ccc;
}
.ry-mc-stadium strong {
    font-weight: 600;
}
.ry-mc-viewers {
    margin-top: 5px;
    opacity: 0.7;
    font-size: 10px;
}
.ry-season-icon { width: 14px; height: 14px; object-fit: contain; vertical-align: middle; margin-right: 4px; opacity: 0.7; }

/* --- СУДЬИ В ШАПКЕ --- */
.ry-mc-judges-wrap {
    margin: 15px auto 0;
    padding-top: 15px;
    border-top: 1px dashed rgba(255,255,255,0.08);
    font-family: "Unbounded", sans-serif;
    max-width: 600px; 
    text-align: center;
    line-height: 1.6;
}
.ry-mc-judge-main {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 5px;
}
.ry-mc-judge-main strong { 
    color: #fff; 
    font-weight: 500; 
}
.ry-mc-judge-city { 
    color: #777; 
    font-size: 10px; 
}
.ry-mc-judge-assistants {
    font-size: 10px;
    color: #aaa;
}
.ry-judge-role { 
    color: #777; 
}
.ry-mc-dot {
    display: inline-block;
    transform: translateY(-1px);
}

.ry-btn-tickets{ 
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    min-height: 30px;
    box-sizing: border-box;
    font-size: 8px;
    text-transform: uppercase;
    border-radius: 0px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 2;
    letter-spacing: 0.5px;
    font-family: "Onder", sans-serif;
    text-align: center;
    background: #d82e40; color: #fff !important; border: 1px solid #d63638; 
    box-shadow: 0 4px 10px rgba(214, 54, 56, 0.3);
}
.ry-btn-tickets:hover { background: transparent; border-color: #ffffff; box-shadow: 0 4px 10px rgb(255, 255, 255);}

/* --- ТАБЫ --- */
.ry-mc-tabs-wrapper { position: relative; border-bottom: 1px solid rgba(255,255,255,0.05); background: transparent; }
.ry-main-tabs { display: flex; background: transparent; }
.ry-tabs-scroll-hint { display: none; }
.ry-main-tab { 
    flex: 1; padding: 18px; 
    background: transparent; border: none; 
    color: #666; 
    font-family: "Onder", sans-serif;
    font-size: 10px;
    text-transform: uppercase; 
    cursor: pointer; transition: 0.3s; 
    text-align: center; 
    letter-spacing: 0.5px;
}
.ry-main-tab:hover { color: #aaa; }
.ry-main-tab.active { 
    color: #fff; 
    border-bottom: 2px solid #d82e40; 
    background: rgba(255,255,255,0.02); 
    margin-bottom: -1px; 
}
.ry-main-tab-content {
    display: none;
    opacity: 0;
}

.ry-main-tab-content.active {
    display: block;
    animation: ryTabFadeIn 0.25s ease-out;
    opacity: 1;
}

@keyframes ryTabFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* --- ТАЙМЛАЙН --- */
.ry-timeline-block { background: rgba(0,0,0,0.2); padding: 40px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); position: relative; z-index: 10; }
.ry-timeline-flex { display: flex; align-items: center; gap: 20px; }
.ry-timeline-logos { display: flex; flex-direction: column; justify-content: space-between; height: 100px; width: 40px; flex-shrink: 0; align-items: center; }
.ry-timeline-logos img { width: 30px; height: 30px; object-fit: contain; opacity: 0.8; }
.ry-timeline-track-wrapper { flex-grow: 1; position: relative; height: 100px; display: flex; align-items: center; }
.ry-timeline-line { height: 1px; background: #444; width: 100%; position: relative; }

.ry-time-label { 
    position: absolute; top: 17px; 
    font-family: "Unbounded", sans-serif;
    font-size: 12px; font-weight: 700; color: #777; 
    transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; 
}
.ry-time-label::after { content: ''; display: block; width: 1px; height: 10px; background: #444; margin-top: 4.5px; }

.ry-marker { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; z-index: 20; height: 50px; justify-content: flex-end; }
.ry-marker:hover { z-index: 100; }
.ry-marker.home { bottom: 50%; padding-bottom: 0; } 
.ry-marker.away { top: 50%; padding-top: 0; flex-direction: column-reverse; justify-content: flex-end; } 

.ry-marker-icon { 
    width: 24px; height: 24px; 
    background: #1a1a1a; border: 1px solid #555; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.5); color: #fff; 
    flex-shrink: 0; z-index: 2; transition: transform 0.2s; position: relative; 
}
.ry-marker:hover .ry-marker-icon { transform: scale(1.1); border-color: #fff; background: #333; }
.ry-marker-line { width: 1px; height: 100%; background: #555; min-height: 15px; }
.ry-event-count { position: absolute; top: -5px; right: -8px; background: #d82e40; color: #fff; font-size: 8px; font-weight: bold; padding: 1px 4px; border-radius: 4px; border: 1px solid #1a1a1a; z-index: 3; }

.ry-tooltip { position: absolute; width: max-content; min-width: 140px; max-width: 300px; background: #000; color: #fff; padding: 10px; border-radius: 0px; font-size: 11px; line-height: 1.3; text-align: left; opacity: 0; pointer-events: none; transition: opacity 0.2s; border: 1px solid #444; box-shadow: 0 5px 15px rgba(0,0,0,0.8); z-index: 999; left: 50%; transform: translateX(-50%); bottom: 100%; margin-bottom: 8px; white-space: normal; font-family: "Unbounded", sans-serif; }
.ry-marker.away .ry-tooltip { bottom: auto; top: 100%; margin-top: 8px; }
.ry-marker:hover .ry-tooltip { opacity: 1; pointer-events: auto; }
.ry-tooltip-header { border-bottom: 1px solid #333; margin-bottom: 6px; padding-bottom: 4px; color: #d82e40; font-weight: 700; font-size: 12px; text-align: center; }
.ry-tooltip-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ry-tt-icon { display: flex; align-items: center; justify-content: center; width: 20px; flex-shrink: 0;}

/* --- ТРАНСЛЯЦИЯ --- */
.ry-broadcast-section {
    padding: 40px 20px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ry-broadcast-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    font-family: "Unbounded", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ry-live-indicator {
    width: 10px;
    height: 10px;
    background-color: #d82e40;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(216, 46, 64, 0.6);
    animation: ryPulse 1.5s infinite;
}
.ry-broadcast-frame {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px;
    background: rgba(0,0,0,0.4);
}

/* --- ЗАГЛУШКА ВИДЕОПЛЕЕРА (ОБНОВЛЕННАЯ) --- */
.ry-video-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000; 
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Эффект превью: из темного в светлое + увеличение */
.ry-video-placeholder img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.25; 
    transition: opacity 0.4s ease, transform 0.6s ease;
}
.ry-video-placeholder:hover img {
    opacity: 0.6; 
    transform: scale(1.06); 
}

/* Контурная Кнопка Play в стиле минимализма */
.ry-play-btn-wrap {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Используем currentColor для SVG, чтобы менять цвет одной строкой */
    color: #fff; 
    transition: color 0.25s ease, transform 0.2s ease;
}

/* При наведении кнопка целиком краснеет */
.ry-video-placeholder:hover .ry-play-btn-wrap {
    color: #d82e40; 
    transform: scale(1.08); 
}

/* --- СЕКЦИИ --- */
.ry-mc-section { padding: 30px 20px; background: transparent; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* --- СОСТАВЫ --- */
.ry-mobile-tabs-nav { display: none; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
#ry-match-container .ry-tab-btn { flex: 1; background: transparent; border: none; color: #666; padding: 15px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: "Unbounded", sans-serif; }
#ry-match-container .ry-tab-btn img { width: 20px; height: 20px; object-fit: contain; filter: grayscale(1); opacity: 0.5; }
#ry-match-container .ry-tab-btn.active { color: #fff; border-bottom: 2px solid #d82e40; margin-bottom: -1px; }
#ry-match-container .ry-tab-btn.active img { filter: none; opacity: 1; }

.ry-lineups-flex { display: flex; flex-wrap: wrap; gap: 40px; }
.ry-lineup-col { flex: 1; min-width: 300px; }

.ry-team-sub-title { 
    color: #fff; font-family: "Unbounded", sans-serif; font-weight:700; margin-bottom:20px; 
    text-transform: uppercase; font-size: 12px; display: flex; align-items: center; gap: 10px; 
    border-bottom: 1px solid #d82e40; padding-bottom: 10px; display: inline-flex; letter-spacing: 0.5px;
}
.ry-team-sub-title img { width: 24px; height: 24px; object-fit: contain; }

.ry-squad-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 10px; color: #ccc; transition: background 0.2s; min-height: 45px; }
.ry-squad-item:hover { background: rgba(255,255,255,0.02); }

.ry-sq-num { 
    width: 30px; min-width: 30px; flex-shrink: 0; font-family: "Unbounded", sans-serif;
    font-weight: 700; color: #d82e40; text-align: center; margin-right: 10px; font-size: 12px;
}
.ry-sq-photo { width: 36px; height: 36px; min-width: 36px;flex-shrink: 0; border-radius: 9999px; object-fit: cover; background: #222; margin-right: 12px; border: 1px solid #333; }
.ry-sq-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden }

.ry-sq-name { 
    font-family: "Unbounded", sans-serif;
    font-weight: 400; color: #eee; line-height: 1.2; font-size: 14px; 
}
.ry-sq-name-link {
    color: #ffffff !important;
    text-decoration: none !important;
    border: none !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.4) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    outline: none !important;
    box-shadow: none !important;
    display: inline-block;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.ry-sq-name-link:hover {
    color: #d82e40 !important;
    border-bottom-color: #d82e40 !important;
}
.ry-sq-name-link::before,
.ry-sq-name-link::after {
    content: none !important;
    display: none !important;
}
.ry-sq-pos { font-family: "Unbounded", sans-serif; font-size: 9px; color: #666; text-transform: uppercase; margin-top: 3px; }

.ry-sub-header { 
    font-family: "Unbounded", sans-serif;
    font-size: 10px; color: #777; text-transform: uppercase; margin: 30px 0 10px; 
    font-weight: 700; border-bottom: 1px dashed #333; padding-bottom: 5px; 
}

/* --- Обертка для сложных HTML-тултипов в составах --- */
.ry-has-html-tooltip {
    position: relative;
    cursor: help;
}
.ry-has-html-tooltip:hover .ry-tooltip {
    opacity: 1;
    pointer-events: auto;
}

/* --- ПРОТОКОЛ (События матча) --- */
.ry-prot-row { display: flex; align-items: center; margin-bottom: 8px; padding: 12px; border-radius: 0px; background: rgba(255,255,255,0.02); border-left: 2px solid #444; }
.ry-prot-row.home { border-left-color: #d82e40; }
.ry-prot-row.away { border-left-color: #aaa; }

.ry-prot-min { 
    width: 40px; font-family: "Unbounded", sans-serif; font-weight: 700; color: #fff; 
    text-align: center; font-size: 12px; flex-shrink: 0; 
}
.ry-prot-desc { padding: 0 15px; font-size: 14px; color: #ccc; flex-grow: 1; line-height: 1.4; font-family: "Unbounded", sans-serif; }
.ry-prot-desc b { color: #fff; font-weight: 400; }

/* --- ГЛОБАЛЬНЫЕ СТИЛИ ДЛЯ ИКОНОК --- */
.ry-ev-svg { vertical-align: middle; }
.ry-card-yc, .ry-card-rc { display: inline-block; vertical-align: middle; transform: rotate(10deg); border: 1px solid rgba(0,0,0,0.2); border-radius: 2px; }
.ry-card-yc { background-color: #ffe500; box-shadow: inset 0 0 4px rgba(255,100,0,0.5); }
.ry-card-rc { background-color: #ff2222; box-shadow: inset 0 0 4px rgba(100,0,0,0.8); }

/* 1. Вкладка "События" (Главный протокол - КРУПНЫЕ ИКОНКИ) */
.ry-prot-icon { 
    width: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
    line-height: 0; 
}
.ry-prot-icon .ry-ev-svg { width: 22px; height: 22px; }
.ry-prot-icon .ry-card-yc, .ry-prot-icon .ry-card-rc { width: 14px; height: 20px; border-radius: 3px; }

/* 2. Таймлайн и Тултипы (Стандартные) */
.ry-marker-icon .ry-ev-svg, .ry-tt-icon .ry-ev-svg { width: 14px; height: 14px; }
.ry-marker-icon .ry-card-yc, .ry-marker-icon .ry-card-rc, .ry-tt-icon .ry-card-yc, .ry-tt-icon .ry-card-rc { width: 10px; height: 14px; }
.ry-tooltip-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ry-tt-icon { display: flex; align-items: center; justify-content: center; width: 16px; flex-shrink: 0;}

/* 3. Вкладка "Составы" (Мелкие иконки под именами) */
.ry-sq-ev-icon { display: flex; align-items: center; justify-content: center; height: 14px; margin-bottom: 2px; }
.ry-sq-ev-icon .ry-ev-svg { width: 12px; height: 12px; }
.ry-sq-ev-icon .ry-card-yc, .ry-sq-ev-icon .ry-card-rc { width: 9px; height: 13px; }

.ry-sq-events { display: flex; flex-direction: row; align-items: center; gap: 6px; margin-left: auto; padding-left: 10px; }
.ry-sq-ev { display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(30, 30, 30, 0.6); border: 1px solid #444; border-radius: 0px; min-width: 32px; padding: 3px 0; }

.ry-captain-badge { display: inline-block; background: transparent; color: #666; border: 1px solid #444; font-size: 8px; font-weight: 700; text-transform: uppercase; border-radius: 0px; padding: 1px 4px; margin-left: 8px; vertical-align: middle; line-height: 1; font-family: "Unbounded", sans-serif; }

/* --- АДАПТИВ --- */
@media (max-width: 768px) {
    .ry-mc-scoreboard { gap: 5px; align-items: flex-start; }
    .ry-mc-team { flex: 1; width: 0; min-width: 0; }
    .ry-mc-logo { width: 60px; height: 60px; }
    .ry-mc-name { font-size: 12px; display: block; font-family: "Unbounded"; line-height: 1.2; font-weight: 700;}
    .ry-mc-city { font-size: 8px; margin-top: 2px; }
    .ry-mc-score { font-size: 16px; margin-top: 15px; }

    .ry-timeline-block { display: block; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 30px 0 40px 0; scrollbar-width: none; -ms-overflow-style: none; }
    .ry-timeline-block::-webkit-scrollbar { display: none; }
    .ry-marker .ry-tooltip { display: none !important; }
    .ry-marker { pointer-events: none; }
    .ry-timeline-flex { min-width: 800px; padding: 0 15px; }

    .ry-mobile-tabs-nav { display: flex; }
    .ry-lineups-flex { display: block; }
    .ry-lineup-col { display: none; }
    .ry-lineup-col.active { display: block; }
    .ry-team-sub-title { display: none; }

    .ry-captain-badge { font-size: 0; padding: 0; border: none; background: #d82e40; color: #fff; width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-left: 5px; }
    .ry-captain-badge::after { content: 'К'; font-size: 8px; font-weight: 700; }
}
@keyframes ryPulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Сброс стилей темы */
button.ry-main-tab:hover, button.ry-main-tab:focus, 
#ry-match-container button.ry-tab-btn:hover, #ry-match-container button.ry-tab-btn:focus {
    background: transparent !important; box-shadow: none !important; outline: none !important; border: none !important;
}
button.ry-main-tab.active {
    border-bottom: 2px solid #d82e40 !important; color: #fff !important;
}
#ry-match-container button.ry-tab-btn.active {
    background: rgba(255,255,255,0.05) !important; color: #fff !important;
}

/* --- СТАТИСТИКА МАТЧА --- */
.ry-stats-custom-board {
    padding: 10px 0;
    width: 100%; 
}
.ry-stat-custom-row {
    margin-bottom: 25px;
}
.ry-stat-custom-row:last-child {
    margin-bottom: 0;
}
.ry-stat-custom-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}
.ry-st-val-big {
    font-family: "Onder", sans-serif;
    font-size: 18px;
    line-height: 1.7;
    width: 90px;
}
.ry-st-val-big.home {
    text-align: left;
    color: #d82e40;
}
.ry-st-val-big.away {
    text-align: right;
    color: #fff;
}
.ry-st-title {
    font-family: "Unbounded", sans-serif;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    text-align: center;
    flex-grow: 1;
    padding-bottom: 2px;
}
.ry-stat-custom-bars {
    display: flex;
    height: 6px;
    gap: 4px; 
}
.ry-st-bar-bg {
    flex: 1;
    background: rgba(255,255,255,0.05); 
    position: relative;
}
.ry-st-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    /* Плавная анимация загрузки */
    transition: width 1.2s cubic-bezier(0.1, 0.7, 0.1, 1);
}
.ry-st-bar-fill.home {
    right: 0; 
    background: #d82e40;
    box-shadow: 0 0 10px rgba(216, 46, 64, 0.5); 
}
.ry-st-bar-fill.away {
    left: 0; 
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.ry-st-val-big.home { text-align: left; }
.ry-st-val-big.away { text-align: right; }

/* Динамические цвета для цифр */
.ry-color-red { color: #d82e40 !important; }
.ry-color-white { color: #fff !important; }

.ry-st-bar-fill.home { right: 0; }
.ry-st-bar-fill.away { left: 0; }

/* Динамические цвета для полос загрузки */
.ry-bg-red { background: #d82e40 !important; box-shadow: 0 0 10px rgba(216, 46, 64, 0.5) !important; }
.ry-bg-white { background: #fff !important; box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important; }

/* Шапка с командами */
.ry-stats-teams {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ry-st-team { display: flex; align-items: center; gap: 15px; width: 45%; }
.ry-st-team.home { justify-content: flex-start; }
.ry-st-team.away { justify-content: flex-end; text-align: right; }
.ry-st-team img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)); }
.ry-st-name { font-family: "Onder", sans-serif; font-size: 16px; color: #fff; text-transform: uppercase; }

/* Мобильные */
@media (max-width: 768px) {
    .ry-stat-custom-row { margin-bottom: 20px; }
    .ry-st-val-big { font-size: 12px; width: 60px; }
    .ry-st-title { font-size: 8px; letter-spacing: 0.5px; }
    .ry-stat-custom-bars { height: 4px; }
    .ry-stats-teams { margin-bottom: 15px; padding-bottom: 10px; }
    .ry-st-team { gap: 8px; }
    .ry-st-team img { width: 24px; height: 24px; }
    .ry-st-name { font-size: 11px; font-family: "Unbounded", sans-serif; font-weight: 700; line-height: 1.2; }
}

/* --- ИСТОРИЯ ВСТРЕЧ (H2H) --- */
.ry-h2h-section { width: 100%; margin: 0 auto; }
.ry-h2h-title {
    font-family: "Unbounded", sans-serif;
    font-size: 14px; color: #fff; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 20px; text-align: center; font-weight: 700;
}
.ry-h2h-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}
.ry-h2h-card {
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0px;
    padding: 18px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    box-sizing: border-box;
}
.ry-h2h-card-value {
    font-family: "Onder", sans-serif;
    font-size: 18px;
    line-height: 1.7;
}
.ry-h2h-card-title {
    font-family: "Unbounded", sans-serif;
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    line-height: 1.2;
}
.ry-h2h-card.wins .ry-h2h-card-value {
    color: #10b981;
}
.ry-h2h-card.draws .ry-h2h-card-value {
    color: #fff;
}
.ry-h2h-card.losses .ry-h2h-card-value {
    color: #d82e40;
}

.ry-h2h-list { background: rgba(20, 20, 20, 0.6); border: 1px solid rgba(255,255,255,0.05); }
.ry-h2h-row { 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); 
    text-decoration: none !important; color: inherit; transition: background 0.3s;
}
.ry-h2h-row:hover { background: rgba(255,255,255,0.05); }
.ry-h2h-row:last-child { border-bottom: none; }

/* Левый блок с датой и туром */
.ry-h2h-meta { width: 100px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.ry-h2h-date { font-family: "Unbounded", sans-serif; font-size: 11px; color: #aaa; font-weight: 600; }
.ry-h2h-tour { font-family: "Unbounded", sans-serif; font-size: 9px; color: #666; text-transform: uppercase; }

/* Правый пустой блок-распорка для идеальной центровки команд */
.ry-h2h-spacer { width: 100px; flex-shrink: 0; }

/* Команды */
.ry-h2h-teams { flex-grow: 1; display: flex; align-items: center; justify-content: center; gap: 20px; }
.ry-h2h-team { display: flex; align-items: center; gap: 15px; flex: 1; }
.ry-h2h-team.home { justify-content: flex-end; text-align: right; }
.ry-h2h-team.away { justify-content: flex-start; text-align: left; }
.ry-h2h-team img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }

.ry-h2h-tname { 
    font-family: "Onder", sans-serif; font-size: 10px; color: #eee; 
    text-transform: uppercase; line-height: 1.7; 
    white-space: normal; word-wrap: break-word; 
}

.ry-h2h-score { 
    font-family: "Onder", sans-serif; font-size: 10px; color: #fff; 
    background: #000; border: 1px solid #333; 
    min-width: 90px;
    width: 90px; height: 34px; 
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums; 
}

/* Мобильные */
@media (max-width: 768px) {
    .ry-h2h-cards {
        gap: 8px;
        margin-bottom: 20px;
    }
    .ry-h2h-card {
        padding: 12px 5px;
        gap: 4px;
    }
    .ry-h2h-card-value {
        font-size: 18px;
    }
    .ry-h2h-card-title {
        font-size: 8px;
        letter-spacing: 0.5px;
    }
    .ry-h2h-row { 
        display: block; 
        padding: 15px; 
    }

    /* Дата и тур сверху в строчку */
    .ry-h2h-meta { 
        width: 100%; flex-direction: row; gap: 10px; margin-bottom: 12px; 
    }
    .ry-h2h-spacer { display: none; }
    .ry-h2h-date { font-size: 9px; }
    .ry-h2h-tour { font-size: 9px; text-align: left; }

    /* Сетка: команды слева, счет справа */
    .ry-h2h-teams { 
        display: grid; 
        grid-template-columns: 1fr auto; 
        grid-template-rows: auto auto; 
        gap: 10px 15px; 
        width: 100%; 
    }

    /* Настройка колонок команд */
    .ry-h2h-team { width: 100%; gap: 10px; }
    .ry-h2h-team.home { grid-column: 1; grid-row: 1; justify-content: flex-start; text-align: left; }
    .ry-h2h-team.away { grid-column: 1; grid-row: 2; justify-content: flex-start; text-align: left; }

    /* Меняем местами лого и текст для хозяев (чтобы логотип всегда был слева) */
    .ry-h2h-team.home .ry-h2h-tname { order: 2; }
    .ry-h2h-team.home img { order: 1; }
    .ry-h2h-team img { width: 22px; height: 22px; }

    /* Названия команд (Переключаем шрифт на Unbounded) */
    .ry-h2h-tname { 
        font-family: "Unbounded", sans-serif; 
        font-size: 11px; 
        font-weight: 700; 
        white-space: nowrap; 
        overflow: hidden; 
        text-overflow: ellipsis; 
    }

    /* Плашка счета (Центрируем по вертикали) */
    .ry-h2h-score { 
        grid-column: 2; grid-row: 1 / 3; 
        align-self: center; 
        margin: 0;
        font-size: 8px; line-height: 1.7;
        min-width: 60px;
        width: 60px; height: 24px; 
    }
}

/* --- МОБИЛЬНЫЙ СКРОЛЛ ДЛЯ ОСНОВНЫХ ВКЛАДОК --- */
@media (max-width: 768px) {
    .ry-tabs-scroll-hint {
        display: flex;
        position: absolute; right: 0; top: 0; bottom: 0; width: 45px;
        background: linear-gradient(to right, rgba(15,15,15,0) 0%, rgba(15,15,15,1) 70%);
        align-items: center; justify-content: flex-end; padding-right: 10px;
        pointer-events: none; 
        color: #fff;
        opacity: 1; transition: opacity 0.3s ease;
    }
    .ry-tabs-scroll-hint svg {
        width: 16px; height: 16px;
        animation: rySwipeHint 1.5s infinite;
    }
    @keyframes rySwipeHint {
        0% { transform: translateX(0); opacity: 0.3; }
        50% { transform: translateX(4px); opacity: 1; }
        100% { transform: translateX(0); opacity: 0.3; }
    }
    .ry-main-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }
    .ry-main-tabs::-webkit-scrollbar { display: none; }
    .ry-main-tab {
        flex: 0 0 max-content;
        padding: 15px 20px;
        white-space: nowrap;
        font-size: 11px;
    }
    .ry-main-tab:last-child {
        padding-right: 40px; 
    }
}

/* --- ПУСТЫЕ СОСТОЯНИЯ (EMPTY STATES) --- */
.ry-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0,0,0,0.2);
    border: 1px dashed rgba(255,255,255,0.05);
    border-radius: 0px;
    margin: 15px 0;
}
.ry-empty-state svg {
    width: 42px;
    height: 42px;
    margin: 0 auto 15px;
    opacity: 0.9;
    display: block;
    stroke: #d82e40; 
}
.ry-empty-text {
    font-family: "Onder", sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ry-empty-subtext {
    font-family: "Unbounded", sans-serif;
    font-size: 10px;
    color: #888;
    line-height: 1.5;
}
@media(max-width: 768px){
    .ry-empty-text{font-size:10px;}
    .ry-mc-info {
        margin-top: 15px;
    }
    .ry-mc-stadium {
        font-size: 9px;
    }
    .ry-mc-viewers {
        font-size: 8px;
    }
    .ry-mc-judges-wrap {
        margin-top: 10px;
        padding-top: 10px;
    }
    .ry-mc-judge-main {
        font-size: 9px;
        margin-bottom: 3px;
    }
    .ry-mc-judge-assistants {
        font-size: 8.5px;
        line-height: 1.4;
    }
    .ry-mc-judge-city {
        font-size: 8px;
    }
}

@keyframes rySpin { to { transform: rotate(360deg); } }

/* Обложки материалов: при обрезке сохраняем в кадре верхнюю центральную часть. */
.ry-media-thumb-wrap .ry-media-card-img {
    object-position: center top;
}

/* У Onder увеличенная высота строки нужна для корректной вертикальной геометрии глифов. */
.ry-mc-name,
.ry-mc-score,
.ry-btn-tickets,
.ry-main-tab,
.ry-st-val-big,
.ry-st-name,
.ry-h2h-card-value,
.ry-h2h-tname,
.ry-h2h-score,
.ry-empty-text {
    line-height: 1.7 !important;
}

/* Отключение hover-эффектов при скролле для оптимизации производительности (Scroll Jank) */
body.ry-is-scrolling * {
    pointer-events: none !important;
}
