.sf-match-lineup {
    --sf-match-lineup-home: #3DC18D;
    --sf-match-lineup-away: #4E5054;
    --sf-match-lineup-red: #AB1A39;
    --sf-match-lineup-ink: #101010;
    margin: 0;
    padding: 18px;
    border: 1px solid #E3E7EC;
    border-radius: 8px;
    background: #f4f5f6;
    color: #22252A;
}

.sf-match-lineup__head {
    margin-bottom: 14px;
}

.sf-match-lineup__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.sf-match-lineup__formations {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.35;
}

.sf-match-lineup__formation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4E5054;
}

.sf-match-lineup__formation strong {
    color: var(--sf-match-lineup-red);
    font-weight: 700;
}

.sf-match-lineup__field {
    position: relative;
    height: 520px;
    min-height: 420px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 8px;
    background:
        linear-gradient(0deg, rgba(255, 255, 255, .07) 50%, transparent 50%) 0 0 / 100% 96px,
        linear-gradient(90deg, #447E62 0%, #3F765D 50%, #447E62 100%);
    box-shadow: inset 0 0 0 1px rgba(16, 16, 16, .12);
}

.sf-match-lineup__field::before,
.sf-match-lineup__field::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 92px;
    height: 44%;
    border: 2px solid rgba(255, 255, 255, .38);
    transform: translateY(-50%);
}

.sf-match-lineup__field::before {
    left: -2px;
    border-left: 0;
}

.sf-match-lineup__field::after {
    right: -2px;
    border-right: 0;
}

.sf-match-lineup__field-half {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
}

.sf-match-lineup__field-half_away {
    right: 0;
    background: linear-gradient(270deg, rgba(78, 80, 84, .18), transparent);
}

.sf-match-lineup__field-half_home {
    left: 0;
    background: linear-gradient(90deg, rgba(61, 193, 141, .16), transparent);
}

.sf-match-lineup__field-line_center {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, .42);
}

.sf-match-lineup__field-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 118px;
    height: 118px;
    border: 2px solid rgba(255, 255, 255, .42);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.sf-match-lineup__goal {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 86px;
    border: 2px solid rgba(255, 255, 255, .5);
    transform: translateY(-50%);
}

.sf-match-lineup__goal_away {
    right: 0;
    border-right: 0;
}

.sf-match-lineup__goal_home {
    left: 0;
    border-left: 0;
}

.sf-match-lineup__player {
    position: absolute;
    z-index: 2;
    left: var(--sf-match-lineup-compact-x);
    top: var(--sf-match-lineup-compact-y);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 116px;
    color: #FFFFFF;
    text-align: center;
    text-shadow: 0 1px 2px rgba(16, 16, 16, .45);
    transform: translate(-50%, -23px);
}

.sf-match-lineup__avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    background: #101010;
    box-shadow: 0 8px 18px rgba(16, 16, 16, .28);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.sf-match-lineup__player_home .sf-match-lineup__avatar {
    background: var(--sf-match-lineup-home);
}

.sf-match-lineup__player_away .sf-match-lineup__avatar {
    background: #4E5054;
}

.sf-match-lineup__avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-match-lineup__avatar_has-image .sf-match-lineup__avatar-fallback {
    display: none;
}

.sf-match-lineup__avatar_image-failed img {
    display: none;
}

.sf-match-lineup__avatar_image-failed .sf-match-lineup__avatar-fallback {
    display: inline;
}

.sf-match-lineup__player-name {
    display: -webkit-box;
    max-width: 116px;
    min-height: 30px;
    margin-top: 5px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.sf-match-lineup__number {
    position: absolute;
    top: 30px;
    left: 50%;
    min-width: 20px;
    padding: 3px 5px;
    border-radius: 999px;
    background: var(--sf-match-lineup-red);
    box-shadow: 0 3px 8px rgba(16, 16, 16, .18);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.sf-match-lineup__bench-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.sf-match-lineup__bench {
    min-width: 0;
    padding: 12px;
    border: 1px solid #E3E7EC;
    border-radius: 8px;
    background: #FAFBFC;
}

.sf-match-lineup__bench-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #4E5054;
    font-size: 13px;
    line-height: 1.3;
}

.sf-match-lineup__bench-head strong {
    margin-left: auto;
    color: #101010;
}

.sf-match-lineup__team-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.sf-match-lineup__bench-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}

.sf-match-lineup__bench-player {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    color: #22252A;
    font-size: 13px;
    line-height: 1.25;
}

.sf-match-lineup__bench-number {
    flex: 0 0 28px;
    color: #AB1A39;
    font-weight: 700;
    text-align: right;
}

.sf-match-lineup__bench-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-match-lineup__bench-empty,
.sf-match-lineup__state {
    color: #6F7680;
    font-size: 14px;
    line-height: 1.4;
}

.sf-match-lineup__state {
    padding: 18px;
    border: 1px dashed #D8DEE6;
    border-radius: 8px;
    background: #FAFBFC;
}

@media (max-width: 760px) {
    .sf-match-lineup {
        padding: 14px;
    }

    .sf-match-lineup__formations {
        gap: 6px 8px;
    }

    .sf-match-lineup__field {
        height: auto;
        min-height: 560px;
        background:
            linear-gradient(90deg, rgba(255, 255, 255, .07) 50%, transparent 50%) 0 0 / 128px 100%,
            linear-gradient(180deg, #447E62 0%, #3F765D 50%, #447E62 100%);
    }

    .sf-match-lineup__field::before,
    .sf-match-lineup__field::after {
        top: auto;
        bottom: auto;
        left: 50%;
        right: auto;
        width: 44%;
        height: 92px;
        border: 2px solid rgba(255, 255, 255, .38);
        transform: translateX(-50%);
    }

    .sf-match-lineup__field::before {
        top: -2px;
        border-top: 0;
    }

    .sf-match-lineup__field::after {
        bottom: -2px;
        border-bottom: 0;
    }

    .sf-match-lineup__field-half {
        top: auto;
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        height: 50%;
    }

    .sf-match-lineup__field-half_away {
        top: 0;
        background: linear-gradient(180deg, rgba(78, 80, 84, .18), transparent);
    }

    .sf-match-lineup__field-half_home {
        bottom: 0;
        background: linear-gradient(0deg, rgba(61, 193, 141, .16), transparent);
    }

    .sf-match-lineup__field-line_center {
        top: 50%;
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        height: 2px;
    }

    .sf-match-lineup__goal {
        top: auto;
        left: 50%;
        width: 86px;
        height: 22px;
        border: 2px solid rgba(255, 255, 255, .5);
        transform: translateX(-50%);
    }

    .sf-match-lineup__goal_away {
        top: 0;
        right: auto;
        border-top: 0;
    }

    .sf-match-lineup__goal_home {
        bottom: 0;
        border-bottom: 0;
    }

    .sf-match-lineup__player {
        left: var(--sf-match-lineup-x);
        top: var(--sf-match-lineup-y);
        width: 76px;
        transform: translate(-50%, -18px);
    }

    .sf-match-lineup__avatar {
        width: 36px;
        height: 36px;
        font-size: 11px;
    }

    .sf-match-lineup__player-name {
        display: none;
    }

    .sf-match-lineup__number {
        top: 25px;
        min-width: 18px;
        padding: 2px 4px;
        font-size: 10px;
    }

    .sf-match-lineup__bench-grid,
    .sf-match-lineup__bench-list {
        grid-template-columns: 1fr;
    }
}
