.active-games-root {
    position: fixed;
    --active-games-header-offset: 88px;
    --active-games-tab-height: 66px;
    inset: 0 0 auto;
    z-index: 29;
    pointer-events: none;
}

.active-games-root[hidden] {
    display: none;
}

.active-games-widget {
    position: absolute;
    top: var(--active-games-header-offset);
    left: 50%;
    width: min(760px, calc(100vw - 32px));
    pointer-events: none;
    transform: translateX(-50%);
}

.active-games-panel {
    position: relative;
    pointer-events: none;
    transform: translateY(calc(-100% - 1px));
    transition: transform 0.42s cubic-bezier(0.2, 0.85, 0.24, 1);
}

.active-games-widget.is-open .active-games-panel {
    pointer-events: auto;
    transform: translateY(0);
}

.active-games-panel__surface {
    padding: 22px;
    border: 1px solid rgba(225, 178, 79, 0.34);
    border-radius: 0 0 30px 30px;
    background:
        linear-gradient(180deg, rgba(21, 15, 8, 0.98), rgba(8, 6, 4, 0.98)),
        #0b0805;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 235, 183, 0.08);
}

.active-games-panel__head,
.active-games-panel__meta,
.active-game-card__top,
.active-game-card__versus,
.active-game-team {
    display: flex;
    align-items: center;
}

.active-games-panel__head {
    justify-content: flex-start;
    gap: 18px;
}

.active-games-kicker,
.active-game-card__stage,
.active-game-card__series {
    color: #d9ae58;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.active-game-card__stage {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(225, 178, 79, 0.22);
    background: rgba(225, 178, 79, 0.08);
}

.active-games-panel h2 {
    margin: 6px 0 0;
    color: #f7efd9;
    font-family: "Rajdhani", sans-serif;
    font-size: 2.05rem;
    line-height: 1;
}

.active-games-panel__meta {
    justify-content: flex-start;
    gap: 14px;
    margin-top: 10px;
    color: rgba(247, 239, 217, 0.68);
    font-size: 0.9rem;
}

.active-games-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.active-game-card {
    padding: 16px;
    border: 1px solid rgba(225, 178, 79, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(225, 178, 79, 0.08), transparent 34%),
        rgba(255, 255, 255, 0.025);
}

.active-game-card__top {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.active-game-card__series {
    color: rgba(247, 239, 217, 0.66);
    letter-spacing: 0.1em;
}

.active-game-card__versus {
    display: grid;
    grid-template-columns: minmax(0, 220px) auto minmax(0, 220px);
    justify-content: center;
    gap: 20px;
}

.active-game-card--no-score .active-game-card__versus {
    grid-template-columns: minmax(0, 260px) minmax(0, 260px);
    gap: 18px;
}

.active-game-team {
    min-width: 0;
    gap: 12px;
}

.active-game-team:first-child {
    justify-content: flex-end;
}

.active-game-team:first-child .active-game-team__logo {
    order: 2;
}

.active-game-team:first-child .active-game-team__name {
    order: 1;
    text-align: right;
}

.active-game-team:last-child {
    justify-content: flex-start;
}

.active-game-team__logo {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid rgba(225, 178, 79, 0.24);
    background: rgba(225, 178, 79, 0.08);
    color: #f7efd9;
    font-weight: 900;
}

.active-game-team__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.active-game-team__name {
    min-width: 0;
    max-width: 210px;
    color: #f7efd9;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-game-card__score {
    min-width: 92px;
    display: inline-grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 18px;
    border: 1px solid rgba(225, 178, 79, 0.28);
    color: #f7efd9;
    background: rgba(0, 0, 0, 0.18);
    font-family: "Rajdhani", sans-serif;
}

.active-game-card__score strong {
    font-size: 1.6rem;
    line-height: 1;
    text-align: center;
}

.active-game-card__score span {
    color: #d9ae58;
    font-size: 1.2rem;
}

.active-games-trigger {
    position: absolute;
    left: 50%;
    bottom: -66px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 18px;
    border: 1px solid rgba(225, 178, 79, 0.34);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    background:
        linear-gradient(180deg, rgba(19, 13, 7, 0.98), rgba(9, 7, 4, 0.98)),
        #0b0805;
    color: #f7efd9;
    cursor: pointer;
    pointer-events: auto;
    font-weight: 800;
    transform: translateX(-50%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.active-games-trigger:hover {
    border-color: rgba(255, 215, 128, 0.7);
}

.active-games-trigger__live {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #41d36b;
    box-shadow: 0 0 0 0 rgba(65, 211, 107, 0.48);
    animation: active-games-pulse 1.55s infinite;
}

.active-games-trigger strong {
    min-width: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(225, 178, 79, 0.14);
    color: #e4b75d;
}

@keyframes active-games-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(65, 211, 107, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(65, 211, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(65, 211, 107, 0);
    }
}

@media (max-width: 760px) {
    .active-games-root {
        --active-games-header-offset: 76px;
        --active-games-tab-height: 60px;
    }

    .active-games-widget {
        width: 100%;
    }

    .active-games-panel__surface {
        max-height: min(78vh, 680px);
        overflow-y: auto;
        padding: 18px 14px 20px;
        border-radius: 0 0 24px 24px;
        border-left: 0;
        border-right: 0;
    }

    .active-games-panel__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .active-game-card__versus {
        grid-template-columns: 1fr;
        gap: 12px;
        justify-content: stretch;
    }

    .active-game-team:first-child {
        justify-content: flex-start;
    }

    .active-game-team:first-child .active-game-team__logo,
    .active-game-team:first-child .active-game-team__name {
        order: initial;
        text-align: left;
    }

    .active-game-team:last-child {
        justify-content: flex-start;
    }

    .active-game-team__name {
        max-width: none;
    }

    .active-game-card__score {
        width: fit-content;
        min-width: 116px;
    }

    .active-games-trigger {
        bottom: -60px;
        min-height: 54px;
        width: min(calc(100% - 32px), 260px);
        justify-content: center;
    }
}
