/* ==========================
TOURNAMENT CREATE
========================== */

.tournament-create {
    padding: 70px 0;
    background: #f7f7f7;
}

.tournament-create .site-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.tournament-create__head {
    margin-bottom: 36px;
}

.tournament-create__label {
    color: #f05a00;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.tournament-create__title {
    margin: 0;
    font-size: 52px;
    line-height: 1;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-create__text {
    max-width: 560px;
    margin: 18px 0 0;
    font-size: 18px;
    line-height: 1.5;
    color: #555;
}

.tournament-create__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.tournament-create__main {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tournament-create-card,
.tournament-summary {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,.06);
}

.tournament-create-card {
    padding: 28px;
}

.tournament-create-card__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
}

.tournament-create-card__title {
    margin: 0 0 22px;
    font-size: 24px;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-create-card__head .tournament-create-card__title {
    margin-bottom: 0;
}

.tournament-create-card__counter {
    font-size: 15px;
    color: #777;
}

.tournament-create-card__counter span {
    color: #f05a00;
    font-weight: 900;
}

.tournament-field {
    display: block;
    margin-bottom: 18px;
}

.tournament-field span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #222;
}

.tournament-field input,
.tournament-field textarea,
.tournament-field select {
    width: 100%;
    border: 1px solid #dedede;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #111;
}

.tournament-field textarea {
    min-height: 110px;
    resize: vertical;
}

.tournament-field input:focus,
.tournament-field textarea:focus,
.tournament-field select:focus {
    border-color: #f05a00;
    box-shadow: 0 0 0 3px rgba(240,90,0,.12);
}

.tournament-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.tournament-players-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tournament-player {
    position: relative;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #ededed;
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    transition: .2s ease;
}

.tournament-player:hover {
    border-color: #f05a00;
    box-shadow: 0 10px 30px rgba(240,90,0,.08);
}

.tournament-player input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tournament-player:has(input:checked) {
    border-color: #f05a00;
    background: #fff7f2;
}

.tournament-player:has(input:checked)::after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f05a00;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tournament-player__photo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
}

.tournament-player__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tournament-player__info {
    min-width: 0;
}

.tournament-player__name {
    display: block;
    font-size: 15px;
    font-weight: 900;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-player__meta {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-player__rating {
    padding-right: 8px;
    font-size: 15px;
    font-weight: 900;
    color: #111;
}

.tournament-summary {
    position: sticky;
    top: 100px;
    padding: 26px;
}

.tournament-summary__title {
    margin-bottom: 22px;
    font-size: 22px;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-summary__item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: #555;
}

.tournament-summary__item strong {
    color: #111;
    font-size: 22px;
}

.tournament-summary__hint {
    margin: 22px 0;
    padding: 16px;
    border-radius: 16px;
    background: #fff7f2;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
}

.tournament-create__submit {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 16px;
    background: #f05a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: .2s ease;
}

.tournament-create__submit:hover {
    background: #d94f00;
    transform: translateY(-1px);
}

.tournament-create-error,
.tournament-create-success {
    width: 80%;
    max-width: 1600px;
    margin: 30px auto;
    padding: 18px 22px;
    border-radius: 16px;
    font-weight: 700;
}

.tournament-create-error {
    background: #fff1f1;
    color: #b00020;
    border: 1px solid #ffd1d1;
}

.tournament-create-success {
    background: #effaf1;
    color: #187a2f;
    border: 1px solid #ccefd3;
}

/* Mobile */
@media (max-width: 991px) {
    .tournament-create {
        padding: 40px 0;
    }

    .tournament-create .site-container {
        width: 94%;
    }

    .tournament-create__title {
        font-size: 34px;
    }

    .tournament-create__grid {
        grid-template-columns: 1fr;
    }

    .tournament-summary {
        position: relative;
        top: auto;
    }

    .tournament-players-list {
        grid-template-columns: 1fr;
    }

    .tournament-fields-row {
        grid-template-columns: 1fr;
    }
}






/* ==========================
TOURNAMENT GENERATE MATCHES
========================== */

.tournament-generate {
    padding: 50px 0;
    background: #f7f7f7;
}

.tournament-generate .site-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.tournament-generate-card {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.06);
}

.tournament-generate-card__label {
    color: #f05a00;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tournament-generate-card__title {
    margin: 0;
    font-size: 36px;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-generate-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0;
}

.tournament-generate-stat {
    padding: 20px;
    border-radius: 18px;
    background: #f7f7f7;
}

.tournament-generate-stat span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #777;
}

.tournament-generate-stat strong {
    font-size: 30px;
    font-weight: 900;
    color: #111;
}

.tournament-generate-btn {
    height: 56px;
    padding: 0 34px;
    border: none;
    border-radius: 16px;
    background: #f05a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.tournament-generate-btn:hover {
    background: #d94f00;
}

.tournament-generate-note {
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff7f2;
    color: #555;
    font-weight: 700;
}

.tournament-generate-error,
.tournament-generate-success {
    width: 80%;
    max-width: 1600px;
    margin: 30px auto;
    padding: 18px 22px;
    border-radius: 16px;
    font-weight: 800;
}

.tournament-generate-error {
    background: #fff1f1;
    color: #b00020;
    border: 1px solid #ffd1d1;
}

.tournament-generate-success {
    background: #effaf1;
    color: #187a2f;
    border: 1px solid #ccefd3;
}

.tournament-matches-preview {
    margin-top: 32px;
}

.tournament-matches-preview__round {
    margin: 28px 0 14px;
    font-size: 22px;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-matches-preview__list {
    display: grid;
    gap: 10px;
}

.tournament-match-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 16px;
}

.tournament-match-row__number {
    color: #f05a00;
    font-weight: 900;
}

.tournament-match-row__players {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 900;
    color: #111;
}

.tournament-match-row__players strong {
    color: #f05a00;
}

.tournament-match-row__status {
    text-align: right;
    color: #777;
    font-size: 14px;
}

/* Mobile */
@media (max-width: 991px) {
    .tournament-generate .site-container,
    .tournament-generate-error,
    .tournament-generate-success {
        width: 94%;
    }

    .tournament-generate-card__title {
        font-size: 28px;
    }

    .tournament-generate-stats {
        grid-template-columns: 1fr;
    }

    .tournament-match-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tournament-match-row__players {
        flex-wrap: wrap;
    }

    .tournament-match-row__status {
        text-align: left;
    }
}



/* ==========================
TOURNAMENT GENERATE MATCHES
========================== */

.tournament-generate {
    margin-top: 28px;
}

.tournament-generate__card {
    padding: 26px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0,0,0,.06);
}

.tournament-generate__card--error {
    color: #b00020;
    font-weight: 900;
}

.tournament-generate__head {
    margin-bottom: 20px;
}

.tournament-generate__label {
    margin-bottom: 6px;
    color: #f05a00;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tournament-generate__title {
    margin: 0 0 8px;
    color: #111;
    font-size: 26px;
    font-weight: 900;
}

.tournament-generate__text {
    color: #777;
    font-size: 15px;
    font-weight: 700;
}

.tournament-generate__message {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
}

.tournament-generate__message--error {
    background: #fff1f1;
    color: #b00020;
    border: 1px solid #ffd2d2;
}

.tournament-generate__message--success {
    background: #edfff4;
    color: #087a35;
    border: 1px solid #c8f5d8;
}

.tournament-generate__teams {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.tournament-generate-team {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f7f7f7;
}

.tournament-generate-team__name {
    margin-bottom: 5px;
    color: #111;
    font-size: 15px;
    font-weight: 900;
}

.tournament-generate-team__players {
    color: #777;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.tournament-generate__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border: none;
    border-radius: 999px;
    background: #f05a00;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 767px) {
    .tournament-generate__teams {
        grid-template-columns: 1fr;
    }

    .tournament-generate__card {
        padding: 20px;
        border-radius: 22px;
    }

    .tournament-generate__title {
        font-size: 22px;
    }

    .tournament-generate__button {
        width: 100%;
    }
}




/* ==========================
TOURNAMENT PAGE
========================== */

.tournament-page {
    background: #f7f7f7;
    padding-bottom: 30px;
}

.tournament-page .site-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.tournament-hero {
    position: relative;
    padding: 80px 0 70px;
    background:
        linear-gradient(90deg,
            #fff 0%,
            rgba(255,255,255,.98) 34%,
            rgba(255,255,255,.88) 54%,
            rgba(255,255,255,.45) 100%
        ),
        url('/assets/img/tournament-hero.jpg') center right / cover no-repeat;
}

.tournament-hero__label {
    margin-bottom: 14px;
    color: #f05a00;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-hero__title {
    max-width: 700px;
    margin: 0;
    font-size: 68px;
    line-height: .95;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 28px;
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.tournament-hero__text {
    max-width: 560px;
    margin-top: 26px;
    font-size: 18px;
    line-height: 1.5;
    color: #555;
}

.tournament-tabs {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0;
    margin-top: -32px;
    margin-bottom: 28px;
    padding: 0 22px;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.08);
    overflow-x: auto;
}

.tournament-tabs__item {
    position: relative;
    display: flex;
    align-items: center;
    height: 66px;
    padding: 0 26px;
    color: #222;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.tournament-tabs__item--active {
    color: #f05a00;
}

.tournament-tabs__item--active::after {
    content: "";
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 0;
    height: 3px;
    background: #f05a00;
}

.tournament-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.tournament-page__main,
.tournament-page__aside {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tournament-card {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.05);
}

.tournament-card--muted {
    background: #fafafa;
}

.tournament-card__head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
}

.tournament-card__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

/* Table */
.tournament-table {
    width: 100%;
}

.tournament-table__head,
.tournament-table__row {
    display: grid;
    grid-template-columns: 60px minmax(220px, 1fr) 60px 60px 60px 90px 90px;
    align-items: center;
    gap: 10px;
}

.tournament-table__head {
    min-height: 44px;
    padding: 0 16px;
    background: #f7f7f7;
    border-radius: 14px;
    color: #777;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.tournament-table__row {
    min-height: 74px;
    padding: 0 16px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    font-weight: 800;
    color: #111;
}

.tournament-table__row:last-child {
    border-bottom: none;
}

.tournament-table__place {
    color: #f05a00;
    font-size: 20px;
    font-weight: 900;
}

.tournament-table__player {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.tournament-table__photo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    flex: 0 0 auto;
}

.tournament-table__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
}

.tournament-table__name {
    font-size: 16px;
    font-weight: 900;
    color: #111;
}

.tournament-table__rating {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #777;
}

/* Matches */
.tournament-round-title {
    margin: 26px 0 14px;
    font-size: 18px;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-matches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tournament-match-card {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) 80px minmax(0, 1fr) 110px;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #ededed;
    border-radius: 18px;
    background: #fff;
}

.tournament-match-card__number {
    color: #f05a00;
    font-weight: 900;
}

.tournament-match-card__player {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 15px;
    font-weight: 900;
    color: #111;
}

.tournament-match-card__player img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.tournament-match-card__player span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-match-card__player--right {
    justify-content: flex-end;
}

.tournament-match-card__score {
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    color: #f05a00;
}

.tournament-match-card__status {
    text-align: right;
}

.tournament-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #777;
    font-size: 12px;
    font-weight: 900;
}

.tournament-status--confirmed {
    background: #effaf1;
    color: #187a2f;
}

.tournament-status--pending {
    background: #fff7f2;
    color: #f05a00;
}

.tournament-status--rejected,
.tournament-status--disputed {
    background: #fff1f1;
    color: #b00020;
}

/* Aside */
.tournament-players-mini {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tournament-player-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}

.tournament-player-mini:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tournament-player-mini img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.tournament-player-mini strong {
    display: block;
    font-size: 15px;
    color: #111;
}

.tournament-player-mini span {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    color: #777;
}

.tournament-empty {
    padding: 20px;
    border-radius: 16px;
    background: #f7f7f7;
    color: #777;
    font-weight: 700;
}

.tournament-page-error {
    width: 80%;
    max-width: 1600px;
    margin: 40px auto;
    padding: 18px 22px;
    border-radius: 16px;
    background: #fff1f1;
    border: 1px solid #ffd1d1;
    color: #b00020;
    font-weight: 800;
}

/* Mobile */
@media (max-width: 991px) {
    .tournament-page .site-container,
    .tournament-page-error {
        width: 94%;
    }

    .tournament-hero {
        padding: 48px 0 70px;
        background:
            linear-gradient(90deg,
                #fff 0%,
                rgba(255,255,255,.96) 10%,
                rgba(255,255,255,.4) 70%
            ),
            url('/assets/img/tournament-hero.jpg') center right / cover no-repeat;
    }

    .tournament-hero__title {
        font-size: 42px;
    }

    .tournament-page__grid {
        grid-template-columns: 1fr;
    }

    .tournament-table {
        overflow-x: auto;
    }

    .tournament-table__head,
    .tournament-table__row {
        min-width: 760px;
    }

    .tournament-match-card {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .tournament-match-card__player--right {
        justify-content: flex-start;
    }

    .tournament-match-card__score {
        text-align: left;
    }

    .tournament-match-card__status {
        text-align: left;
    }
}






/* ==========================
TOURNAMENT MATCH RESULT
========================== */

.tournament-result {
    padding: 70px 0;
    background: #f7f7f7;
}

.tournament-result .site-container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}

.tournament-result-card {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 26px;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.06);
}

.tournament-result-label {
    margin-bottom: 12px;
    color: #f05a00;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-result-title {
    margin: 0 0 34px;
    font-size: 44px;
    line-height: 1;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-result-vs {
    display: grid;
    grid-template-columns: 1fr 140px 1fr;
    align-items: center;
    gap: 24px;
    margin-bottom: 34px;
}

.tournament-result-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.tournament-result-player img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.tournament-result-player strong {
    font-size: 20px;
    font-weight: 900;
    color: #111;
}

.tournament-result-player span {
    font-size: 14px;
    color: #777;
}

.tournament-result-score {
    text-align: center;
    color: #f05a00;
    font-size: 42px;
    font-weight: 900;
}

.tournament-result-form {
    max-width: 680px;
    margin: 0 auto;
}

.tournament-result-form__scores {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

.tournament-result-form__scores label,
.tournament-result-field {
    display: block;
}

.tournament-result-form__scores span,
.tournament-result-field span {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-size: 14px;
    font-weight: 900;
}

.tournament-result-form__scores input,
.tournament-result-field input {
    width: 100%;
    height: 56px;
    border: 1px solid #dedede;
    border-radius: 16px;
    padding: 0 16px;
    background: #fff;
    color: #111;
    font-size: 20px;
    font-weight: 900;
    outline: none;
}

.tournament-result-form__scores input:focus,
.tournament-result-field input:focus {
    border-color: #f05a00;
    box-shadow: 0 0 0 3px rgba(240,90,0,.12);
}

.tournament-result-form__colon {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f05a00;
    font-size: 30px;
    font-weight: 900;
}

.tournament-result-hint {
    margin: 22px 0;
    padding: 16px;
    border-radius: 16px;
    background: #fff7f2;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
}

.tournament-result-submit {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 16px;
    background: #f05a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.tournament-result-submit:hover {
    background: #d94f00;
}

.tournament-result-back {
    display: inline-flex;
    margin-top: 18px;
    color: #f05a00;
    font-weight: 900;
    text-decoration: none;
}

.tournament-result-error,
.tournament-result-success {
    width: 80%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 18px 22px;
    border-radius: 16px;
    font-weight: 800;
}

.tournament-result-error {
    background: #fff1f1;
    color: #b00020;
    border: 1px solid #ffd1d1;
}

.tournament-result-success {
    background: #effaf1;
    color: #187a2f;
    border: 1px solid #ccefd3;
}

.tournament-match-result-link {
    display: inline-flex;
    margin-top: 8px;
    color: #f05a00;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.tournament-match-result-link:hover {
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 991px) {
    .tournament-result .site-container,
    .tournament-result-error,
    .tournament-result-success {
        width: 94%;
    }

    .tournament-result-card {
        padding: 24px;
    }

    .tournament-result-title {
        font-size: 30px;
    }

    .tournament-result-vs {
        grid-template-columns: 1fr;
    }

    .tournament-result-player img {
        width: 96px;
        height: 96px;
    }

    .tournament-result-score {
        font-size: 32px;
    }

    .tournament-result-form__scores {
        grid-template-columns: 1fr;
    }

    .tournament-result-form__colon {
        height: auto;
    }
}






/* ==========================
TOURNAMENT PLAYOFF GENERATOR
========================== */

.tournament-playoff-generator {
    padding: 0 0 70px;
    background: #f7f7f7;
}

.tournament-playoff-generator .site-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.tournament-playoff-card,
.tournament-playoff-list-card {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.05);
}

.tournament-playoff-card__label {
    margin-bottom: 8px;
    color: #f05a00;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-playoff-card__title,
.tournament-playoff-list-card__title {
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.tournament-playoff-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 26px 0;
}

.tournament-playoff-stat {
    padding: 18px;
    border-radius: 18px;
    background: #f7f7f7;
}

.tournament-playoff-stat span {
    display: block;
    margin-bottom: 6px;
    color: #777;
    font-size: 13px;
    font-weight: 700;
}

.tournament-playoff-stat strong {
    color: #111;
    font-size: 28px;
    font-weight: 900;
}

.tournament-playoff-btn {
    height: 56px;
    padding: 0 34px;
    border: none;
    border-radius: 16px;
    background: #f05a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.tournament-playoff-btn:hover {
    background: #d94f00;
}

.tournament-playoff-note {
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff7f2;
    color: #555;
    font-size: 14px;
    font-weight: 700;
}

.tournament-playoff-list-card {
    margin-top: 28px;
}

.tournament-playoff-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
}

.tournament-playoff-match {
    display: grid;
    grid-template-columns: 70px 1fr 150px;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #ededed;
    border-radius: 18px;
    background: #fff;
}

.tournament-playoff-match__number {
    color: #f05a00;
    font-size: 15px;
    font-weight: 900;
}

.tournament-playoff-match__players {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #111;
    font-size: 15px;
    font-weight: 900;
}

.tournament-playoff-match__players strong {
    color: #f05a00;
    font-size: 18px;
    font-weight: 900;
}

.tournament-playoff-match__actions {
    text-align: right;
}

.tournament-playoff-match__actions a {
    color: #f05a00;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.tournament-playoff-match__actions a:hover {
    text-decoration: underline;
}

.tournament-playoff-match__actions span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #effaf1;
    color: #187a2f;
    font-size: 12px;
    font-weight: 900;
}

.tournament-playoff-error,
.tournament-playoff-success {
    width: 80%;
    max-width: 1600px;
    margin: 30px auto;
    padding: 18px 22px;
    border-radius: 16px;
    font-weight: 800;
}

.tournament-playoff-error {
    background: #fff1f1;
    color: #b00020;
    border: 1px solid #ffd1d1;
}

.tournament-playoff-success {
    background: #effaf1;
    color: #187a2f;
    border: 1px solid #ccefd3;
}

/* Mobile */
@media (max-width: 991px) {
    .tournament-playoff-generator .site-container,
    .tournament-playoff-error,
    .tournament-playoff-success {
        width: 94%;
    }

    .tournament-playoff-stats {
        grid-template-columns: 1fr 1fr;
    }

    .tournament-playoff-match {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tournament-playoff-match__players {
        flex-wrap: wrap;
    }

    .tournament-playoff-match__actions {
        text-align: left;
    }
}



















/* ==========================
PLAYOFF BRACKET
========================== */

.playoff-bracket-section {
    padding: 0 0 80px;
    background: #f7f7f7;
}

.playoff-bracket-section .site-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.playoff-bracket-card {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,.05);
    overflow: hidden;
}

.playoff-bracket-card__head {
    margin-bottom: 30px;
}

.playoff-bracket-card__title {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.playoff-bracket-card__subtitle {
    margin-top: 8px;
    color: #777;
    font-size: 15px;
    font-weight: 700;
}

.playoff-bracket {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 48px;
    overflow-x: auto;
    padding: 4px 8px 20px;
}

.playoff-bracket__round {
    position: relative;
    min-width: 280px;
}

.playoff-bracket__round-title {
    margin-bottom: 20px;
    color: #111;
    font-size: 15px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.playoff-bracket__matches {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.playoff-bracket__round--2 .playoff-bracket__matches {
    padding-top: 115px;
    gap: 92px;
}

.playoff-bracket__round--3 .playoff-bracket__matches {
    padding-top: 165px;
    gap: 210px;
}

.playoff-bracket__round--4 .playoff-bracket__matches {
    padding-top: 375px;
}

.playoff-bracket-match {
    position: relative;
    min-height: 112px;
}

.playoff-bracket-match::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    width: 48px;
    height: 2px;
    background: #ffd4c0;
}

.playoff-bracket__round:last-child .playoff-bracket-match::after {
    display: none;
}

.playoff-bracket-match__body {
    position: relative;
    z-index: 2;
    background: #fff;
    border: 2px solid #ffd4c0;
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 12px 34px rgba(0,0,0,.04);
}

.playoff-bracket-player {
    display: grid;
    grid-template-columns: 28px 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 38px;
}

.playoff-bracket-player__seed {
    color: #f05a00;
    font-size: 16px;
    font-weight: 900;
}

.playoff-bracket-player__photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
}

.playoff-bracket-player__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playoff-bracket-player__name {
    min-width: 0;
    color: #111;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playoff-bracket-player--winner .playoff-bracket-player__name {
    color: #f05a00;
}

.playoff-bracket-player--winner .playoff-bracket-player__name::after {
    content: " ✓";
}

.playoff-bracket-match__center {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    color: #f05a00;
    font-size: 16px;
    font-weight: 900;
}

.playoff-bracket-match__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 0 4px;
    color: #777;
    font-size: 12px;
    font-weight: 700;
}

.playoff-bracket-match__footer a {
    color: #f05a00;
    font-weight: 900;
    text-decoration: none;
}

.playoff-bracket-match__footer a:hover {
    text-decoration: underline;
}

.playoff-bracket-match--empty .playoff-bracket-match__body {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    background: #fff;
}

.playoff-bracket-tbd {
    color: #111;
    font-size: 22px;
    font-weight: 900;
}

/* Mobile */
@media (max-width: 991px) {
    .playoff-bracket-section .site-container {
        width: 94%;
    }

    .playoff-bracket-card {
        padding: 22px;
        border-radius: 20px;
    }

    .playoff-bracket-card__title {
        font-size: 24px;
    }

    .playoff-bracket {
        grid-auto-columns: 280px;
        gap: 34px;
    }

    .playoff-bracket__round--2 .playoff-bracket__matches,
    .playoff-bracket__round--3 .playoff-bracket__matches,
    .playoff-bracket__round--4 .playoff-bracket__matches {
        padding-top: 0;
        gap: 22px;
    }

    .playoff-bracket-match::after {
        display: none;
    }
}



/* ==========================
FIX PLAYOFF BRACKET LINES
========================== */

/* Убираем старые линии от каждого матча */
.playoff-bracket-match::after {
    display: none !important;
}

/* Раунды */
.playoff-bracket__round {
    position: relative;
}

/* Контейнер матчей внутри раунда */
.playoff-bracket__matches {
    position: relative;
}

/* Горизонтальная линия от каждого матча вправо */
.playoff-bracket__round:not(:last-child) .playoff-bracket-match::before {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    width: 24px;
    height: 2px;
    background: #ffd4c0;
    transform: translateY(-50%);
    display: block;
}

/* Для первого раунда рисуем вертикальную соединительную линию */
.playoff-bracket__round--1 .playoff-bracket__matches::after {
    content: "";
    position: absolute;
    left: calc(100% + 24px);
    top: 56px;
    bottom: 56px;
    width: 2px;
    background: #ffd4c0;
}

/* Линия от вертикального соединителя к следующему раунду */
.playoff-bracket__round--1 .playoff-bracket__matches::before {
    content: "";
    position: absolute;
    left: calc(100% + 24px);
    top: 50%;
    width: 50px;
    height: 2px;
    background: #ffd4c0;
    transform: translateY(-50%);
}

/* Уточняем расстояние между колонками, чтобы линии не обрывались */
.playoff-bracket {
    gap: 72px;
}

/* Карточки должны быть поверх линий */
.playoff-bracket-match__body {
    position: relative;
    z-index: 2;
}

/* Для финального раунда линии не нужны */
.playoff-bracket__round:last-child .playoff-bracket-match::before,
.playoff-bracket__round:last-child .playoff-bracket__matches::before,
.playoff-bracket__round:last-child .playoff-bracket__matches::after {
    display: none !important;
}











/* ==========================
TOURNAMENT CHAMPION
========================== */

.tournament-champion-section {
    padding: 0 0 32px;
    background: #f7f7f7;
}

.tournament-champion-section .site-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.tournament-champion-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: center;
    overflow: hidden;
    padding: 34px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, #111 0%, #1f1f1f 45%, #f05a00 140%);
    box-shadow: 0 26px 70px rgba(0,0,0,.16);
    color: #fff;
}

.tournament-champion-card__bg {
    position: absolute;
    right: 40%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 180px;
    opacity: .08;
    pointer-events: none;
}

.tournament-champion-card__content {
    position: relative;
    z-index: 2;
}

.tournament-champion-card__label {
    margin-bottom: 12px;
    color: #f05a00;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-champion-card__title {
    margin: 0;
    font-size: 54px;
    line-height: .95;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-champion-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    color: rgba(255,255,255,.78);
    font-size: 16px;
    font-weight: 700;
}

.tournament-champion-card__meta span {
    color: rgba(255,255,255,.35);
}

.tournament-champion-card__players {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 56px 1fr;
    align-items: center;
    gap: 18px;
}

.tournament-champion-player {
    position: relative;
    min-height: 230px;
    padding: 26px 18px 22px;
    border-radius: 22px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    text-align: center;
}

.tournament-champion-player--winner {
    background: rgba(240,90,0,.22);
    border-color: rgba(240,90,0,.6);
}

.tournament-champion-player__place {
    position: absolute;
    left: 16px;
    top: 14px;
    color: #f05a00;
    font-size: 22px;
    font-weight: 900;
}

.tournament-champion-player img {
    width: 96px;
    height: 96px;
    margin-bottom: 14px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
    border: 3px solid rgba(255,255,255,.8);
}

.tournament-champion-player strong {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.tournament-champion-player span {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,.68);
    font-size: 13px;
    font-weight: 700;
}

.tournament-champion-vs {
    color: #f05a00;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

/* Mobile */
@media (max-width: 991px) {
    .tournament-champion-section .site-container {
        width: 94%;
    }

    .tournament-champion-card {
        grid-template-columns: 1fr;
        padding: 26px;
    }

    .tournament-champion-card__title {
        font-size: 34px;
    }

    .tournament-champion-card__players {
        grid-template-columns: 1fr;
    }

    .tournament-champion-vs {
        display: none;
    }

    .tournament-champion-player {
        min-height: auto;
    }
}








/* ==========================
TOURNAMENTS LIST PAGE
========================== */

.tournaments-page {
    background: #f7f7f7;
    padding-bottom: 80px;
}

.tournaments-page .site-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.tournaments-hero {
    position: relative;
    padding: 80px 0 74px;
    background:
        linear-gradient(90deg,
            #fff 0%,
            rgba(255,255,255,.98) 36%,
            rgba(255,255,255,.86) 58%,
            rgba(255,255,255,.45) 100%
        ),
        url('/assets/img/tournament-hero.jpg') center right / cover no-repeat;
}

.tournaments-hero__content {
    max-width: 680px;
}

.tournaments-hero__label {
    margin-bottom: 14px;
    color: #f05a00;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournaments-hero__title {
    margin: 0;
    color: #111;
    font-size: 72px;
    line-height: .95;
    font-weight: 900;
    text-transform: uppercase;
}

.tournaments-hero__text {
    max-width: 520px;
    margin: 22px 0 0;
    color: #555;
    font-size: 20px;
    line-height: 1.45;
}

.tournaments-hero__stats {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.tournaments-hero__stats div {
    min-width: 118px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 12px 34px rgba(0,0,0,.06);
}

.tournaments-hero__stats strong {
    display: block;
    color: #111;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.tournaments-hero__stats span {
    display: block;
    margin-top: 6px;
    color: #777;
    font-size: 13px;
    font-weight: 800;
}

.tournaments-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    height: 56px;
    margin-top: 32px;
    padding: 0 28px;
    border-radius: 16px;
    background: #f05a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    transition: .2s ease;
}

.tournaments-hero__btn:hover {
    background: #d94f00;
    color: #fff;
    transform: translateY(-1px);
}

.tournaments-filter {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 10px;
    margin-top: -30px;
    margin-bottom: 30px;
    padding: 12px;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 20px;
    box-shadow: 0 18px 60px rgba(0,0,0,.08);
    overflow-x: auto;
}

.tournaments-filter__btn {
    height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #222;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    transition: .2s ease;
}

.tournaments-filter__btn span {
    margin-left: 6px;
    color: #999;
}

.tournaments-filter__btn.active,
.tournaments-filter__btn:hover {
    background: #fff7f2;
    border-color: #ffd4c0;
    color: #f05a00;
}

.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.tournament-card-list {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #ededed;
    box-shadow: 0 20px 60px rgba(0,0,0,.05);
}

.tournament-card-list__top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
}

.tournament-card-list__badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.tournament-card-list__badge--draft {
    background: #f1f1f1;
    color: #777;
}

.tournament-card-list__badge--active {
    background: #fff7f2;
    color: #f05a00;
}

.tournament-card-list__badge--playoff {
    background: #111;
    color: #fff;
}

.tournament-card-list__badge--finished {
    background: #effaf1;
    color: #187a2f;
}

.tournament-card-list__badge--cancelled {
    background: #fff1f1;
    color: #b00020;
}

.tournament-card-list__type {
    color: #111;
    font-size: 13px;
    font-weight: 900;
}

.tournament-card-list__title {
    margin: 0;
    color: #111;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-card-list__text {
    margin: 14px 0 22px;
    color: #666;
    font-size: 15px;
    line-height: 1.45;
}

.tournament-card-list__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: auto;
}

.tournament-card-list__meta div {
    padding: 14px;
    border-radius: 16px;
    background: #f7f7f7;
}

.tournament-card-list__meta span {
    display: block;
    margin-bottom: 5px;
    color: #888;
    font-size: 12px;
    font-weight: 800;
}

.tournament-card-list__meta strong {
    display: block;
    color: #111;
    font-size: 14px;
    font-weight: 900;
}

.tournament-card-list__progress {
    margin-top: 20px;
}

.tournament-card-list__progress-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #777;
    font-size: 13px;
    font-weight: 800;
}

.tournament-card-list__progress-head strong {
    color: #f05a00;
}

.tournament-card-list__progress-line {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee;
}

.tournament-card-list__progress-line i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #f05a00;
}

.tournament-card-list__champion {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 18px;
    background: #111;
    color: #fff;
}

.tournament-card-list__champion img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.tournament-card-list__champion span {
    display: block;
    color: #f05a00;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-card-list__champion strong {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.tournament-card-list__actions {
    margin-top: 22px;
}

.tournament-card-list__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border-radius: 16px;
    border: 1px solid #f05a00;
    color: #f05a00;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    transition: .2s ease;
}

.tournament-card-list__btn:hover {
    background: #f05a00;
    color: #fff;
}

.tournaments-empty {
    padding: 34px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #ededed;
    color: #777;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}

/* Mobile */
@media (max-width: 1199px) {
    .tournaments-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .tournaments-page .site-container {
        width: 94%;
    }

    .tournaments-hero {
        padding: 50px 0 70px;
        background:
            linear-gradient(90deg,
                #fff 0%,
                rgba(255,255,255,.96) 52%,
                rgba(255,255,255,.75) 100%
            ),
            url('/assets/img/tournament-hero.jpg') center right / cover no-repeat;
    }

    .tournaments-hero__title {
        font-size: 42px;
    }

    .tournaments-hero__text {
        font-size: 16px;
    }

    .tournaments-hero__stats {
        flex-wrap: wrap;
    }

    .tournaments-grid {
        grid-template-columns: 1fr;
    }

    .tournament-card-list {
        min-height: auto;
    }

    .tournament-card-list__title {
        font-size: 24px;
    }
}











/* ==========================
TOURNAMENT MATCHES MOBILE LINE FIX
Фото – имя – счёт – фото – имя
========================== */

/* На десктопе сохраняем старую сетку */
.tournament-match-card__line {
    display: contents;
}

/* Только мобильная версия */
@media (max-width: 767px) {
    


    
    .tournament-card {
    border-radius: 22px;
    padding: 5px;
    
    }

    .tournament-match-card {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 18px 16px !important;
        border-radius: 18px;
    }

    .tournament-match-card__number {
        font-size: 18px;
        line-height: 1;
        color: #f05a00;
        font-weight: 900;
        margin-bottom: 2px;
    }

    .tournament-match-card__line {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .tournament-match-card__player {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0;
    }

    .tournament-match-card__player--right {
        justify-content: flex-start !important;
    }

    .tournament-match-card__player img {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px;
        border-radius: 50%;
        object-fit: cover;
        background: #eee;
    }

    .tournament-match-card__player span {
        display: block;
        min-width: 0;
        font-size: 15px;
        line-height: 1.2;
        font-weight: 900;
        color: #111;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tournament-match-card__score {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 54px;
        color: #f05a00;
        font-size: 22px !important;
        line-height: 1;
        font-weight: 900;
        text-align: center !important;
        white-space: nowrap;
    }

    .tournament-match-card__status {
        text-align: left !important;
        margin-top: 4px;
    }

    .tournament-status {
        min-height: 30px;
        padding: 0 14px;
        font-size: 13px;
    }

    .tournament-match-result-link {
        display: inline-flex;
        margin-left: 10px;
        margin-top: 0;
    }
}

/* Очень узкие экраны */
@media (max-width: 390px) {

    .tournament-match-card__line {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 7px;
    }

    .tournament-match-card__player img {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px;
    }

    .tournament-match-card__player span {
        font-size: 14px;
    }

    .tournament-match-card__score {
        min-width: 46px;
        font-size: 20px !important;
    }
}








/* ==========================
TOURNAMENT ROUNDS ACCORDION
========================== */

.tournament-round-accordion {
    margin-bottom: 14px;
    border: 1px solid #ededed;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

.tournament-round-accordion__summary {
    display: grid;
    grid-template-columns: 1fr auto 34px;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 0 18px;
    cursor: pointer;
    list-style: none;
    background: #fff;
    transition: .2s ease;
}

.tournament-round-accordion__summary::-webkit-details-marker {
    display: none;
}

.tournament-round-accordion__summary::marker {
    display: none;
    content: "";
}

.tournament-round-accordion__summary:hover {
    background: #fff7f2;
}

.tournament-round-accordion__title {
    color: #111;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-round-accordion__meta {
    color: #777;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.tournament-round-accordion__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f7f7f7;
    color: #f05a00;
    font-size: 20px;
    font-weight: 900;
    transition: .2s ease;
}

.tournament-round-accordion[open] .tournament-round-accordion__summary {
    border-bottom: 1px solid #ededed;
}

.tournament-round-accordion[open] .tournament-round-accordion__arrow {
    transform: rotate(180deg);
    background: #f05a00;
    color: #fff;
}

.tournament-round-accordion .tournament-matches-list {
    padding: 14px;
    gap: 12px;
}

.tournament-round-title {
    display: none;
}

/* Mobile */
@media (max-width: 767px) {
    .tournament-round-accordion__summary {
        grid-template-columns: 1fr auto 30px;
        min-height: 58px;
        padding: 0 14px;
        gap: 10px;
    }

    .tournament-round-accordion__title {
        font-size: 16px;
    }

    .tournament-round-accordion__meta {
        font-size: 12px;
    }

    .tournament-round-accordion__arrow {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .tournament-round-accordion .tournament-matches-list {
        padding: 12px;
    }
}






/* ==========================
TOURNAMENT PAGE FINAL LAYOUT
Матчи 45% + таблица 55%
========================== */

.tournament-page__grid,
.tournament-page__aside {
    display: none !important;
}

.tournament-page__top-grid {
    display: grid;
    grid-template-columns: minmax(0, 45%) minmax(0, 55%);
    gap: 28px;
    align-items: start;
}

.tournament-card--matches,
.tournament-card--table {
    min-width: 0;
}

.tournament-playoff-anchor {
    scroll-margin-top: 110px;
}

/* Таблица в правой колонке должна помещаться */
.tournament-card--table .tournament-table {
    overflow-x: auto;
}

.tournament-card--table .tournament-table__head,
.tournament-card--table .tournament-table__row {
    min-width: 620px;
}



.tournament-table__head,
.tournament-table__row {
    display: grid;
    grid-template-columns: 15px minmax(220px, 1fr) 40px 40px 40px 90px 90px;
    align-items: center;
    gap: 8px;
}






/* Аккордеон раундов */
.tournament-round-accordion {
    margin-bottom: 14px;
    border: 1px solid #ededed;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

.tournament-round-accordion__summary {
    display: grid;
    grid-template-columns: 1fr auto 34px;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 0 18px;
    cursor: pointer;
    list-style: none;
    background: #fff;
    transition: .2s ease;
}

.tournament-round-accordion__summary::-webkit-details-marker {
    display: none;
}

.tournament-round-accordion__summary::marker {
    content: "";
}

.tournament-round-accordion__summary:hover {
    background: #fff7f2;
}

.tournament-round-accordion__title {
    color: #111;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-round-accordion__meta {
    color: #777;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.tournament-round-accordion__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f7f7f7;
    color: #f05a00;
    font-size: 20px;
    font-weight: 900;
    transition: .2s ease;
}

.tournament-round-accordion[open] .tournament-round-accordion__summary {
    border-bottom: 1px solid #ededed;
}

.tournament-round-accordion[open] .tournament-round-accordion__arrow {
    transform: rotate(180deg);
    background: #f05a00;
    color: #fff;
}

.tournament-round-accordion .tournament-matches-list {
    padding: 14px;
    gap: 12px;
}

/* Строка матча */
.tournament-match-card__line {
    display: contents;
}

/* Планшет и мобильная версия */
@media (max-width: 1199px) {
    .tournament-page__top-grid {
        grid-template-columns: 1fr;
    }

    .tournament-card--matches {
        order: 1;
    }

    .tournament-card--table {
        order: 2;
    }
}

@media (max-width: 767px) {
    .tournament-page__top-grid {
        gap: 16px;
    }

    .tournament-round-accordion__summary {
        grid-template-columns: 1fr auto 30px;
        min-height: 58px;
        padding: 0 14px;
        gap: 10px;
    }

    .tournament-round-accordion__title {
        font-size: 16px;
    }

    .tournament-round-accordion__meta {
        font-size: 12px;
    }

    .tournament-round-accordion__arrow {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .tournament-round-accordion .tournament-matches-list {
        padding: 12px;
    }

    .tournament-match-card {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 5px 5px !important;
        border-radius: 18px;
    }

    .tournament-match-card__line {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 5px;
        width: 100%;
    }

    .tournament-match-card__player {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        min-width: 0;
    }

    .tournament-match-card__player--right {
        justify-content: flex-start !important;
    }

    .tournament-match-card__player img {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px;
        border-radius: 50%;
        object-fit: cover;
        background: #eee;
    }

    .tournament-match-card__player span {
        display: block;
        min-width: 0;
        font-size: 15px;
        line-height: 1.2;
        font-weight: 900;
        color: #111;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tournament-match-card__score {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 54px;
        color: #f05a00;
        font-size: 22px !important;
        line-height: 1;
        font-weight: 900;
        text-align: center !important;
        white-space: nowrap;
    }

    .tournament-match-card__status {
        text-align: left !important;
        margin-top: 4px;
    }
}





/* ==========================
TOURNAMENT ANCHORS FIX
========================== */

.tournament-tabs__item {
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

#tournament-matches,
#tournament-table,
#tournament-playoff,
.playoff-bracket-section,
.tournament-playoff-generator,
.tournament-champion-section {
    scroll-margin-top: 120px;
}



/* ==========================
TOURNAMENT MATCH MOBILE FIX
1. Статус по центру
2. Скрыть номер матча
========================== */

@media (max-width: 767px) {

    /* Скрываем номер матча #1, #2, #3 */
    .tournament-match-card__number {
        display: none !important;
    }

    /* Центруем статус "Сыгран" / "Ожидает" */
    .tournament-match-card__status {
        display: flex !important;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100%;
        margin-top: 0px;
    }

    .tournament-status {
        margin: 0 auto;
    }

    /* Ссылка "Внести результат" тоже по центру */
    .tournament-match-result-link {
        margin: 0px auto 0 !important;
        text-align: center;
    }
    
    
        .tournament-status--pending {
        display: none !important;
    }
}



.tournament-match-card__status .tournament-status--pending {
    display: none !important;
}


/* ==========================
TOURNAMENT CREATE TEAMS
========================== */

.tournament-create-page {
    padding: 40px 0 80px;
    background: #f7f7f7;
}

.tournament-create-hero {
    margin-bottom: 28px;
    padding: 34px;
    border-radius: 28px;
    background: #111;
    color: #fff;
}

.tournament-create-hero__label {
    margin-bottom: 8px;
    color: #f05a00;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tournament-create-hero__title {
    margin: 0 0 10px;
    font-size: 42px;
    line-height: 1;
    font-weight: 900;
}

.tournament-create-hero__text {
    max-width: 720px;
    color: rgba(255,255,255,.75);
    font-size: 16px;
    line-height: 1.5;
}

.tournament-create-message {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 800;
}

.tournament-create-message--error {
    background: #fff1f1;
    color: #b00020;
    border: 1px solid #ffd2d2;
}

.tournament-create-card {
    margin-bottom: 22px;
    padding: 26px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0,0,0,.06);
}

.tournament-create-card__head {
    margin-bottom: 20px;
}

.tournament-create-card__head h2 {
    margin: 0;
    color: #111;
    font-size: 24px;
    font-weight: 900;
}

.tournament-create-card__head p {
    margin: 6px 0 0;
    color: #777;
    font-size: 14px;
    font-weight: 700;
}

.tournament-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tournament-create-field {
    display: grid;
    gap: 8px;
}

.tournament-create-field--wide {
    grid-column: 1 / -1;
}

.tournament-create-field span {
    color: #111;
    font-size: 13px;
    font-weight: 900;
}

.tournament-create-field input,
.tournament-create-field select,
.tournament-create-field textarea,
.tournament-team-row input,
.tournament-team-row select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    background: #fff;
    color: #111;
    font-size: 15px;
    font-weight: 700;
    outline: none;
}

.tournament-create-field textarea {
    min-height: 96px;
    padding-top: 12px;
    resize: vertical;
}

.tournament-team-builder {
    display: grid;
    gap: 10px;
}

.tournament-team-builder__head,
.tournament-team-row {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.tournament-team-builder__head {
    padding: 0 4px;
    color: #777;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.tournament-team-row {
    padding: 10px;
    border-radius: 18px;
    background: #f7f7f7;
}

.tournament-create-note {
    margin-top: 16px;
    color: #777;
    font-size: 14px;
    font-weight: 700;
}

.tournament-create-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 28px;
    border: none;
    border-radius: 999px;
    background: #f05a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 991px) {
    .tournament-create-grid {
        grid-template-columns: 1fr;
    }

    .tournament-team-builder__head {
        display: none;
    }

    .tournament-team-row {
        grid-template-columns: 1fr;
    }

    .tournament-create-hero__title {
        font-size: 34px;
    }
}




/* ==========================
TOURNAMENT TEAMS DISPLAY
для 1x1 / 2x2 / 3x3
========================== */

.tournament-match-card__team {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tournament-match-card__team-name {
    color: #111;
    font-size: 15px;
    line-height: 1.15;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-match-card__team-players {
    margin-top: 3px;
    color: #777;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-card--table .tournament-table__head,
.tournament-card--table .tournament-table__row {
    min-width: 680px;
}

@media (max-width: 767px) {
    .tournament-match-card__team-name {
        font-size: 14px;
    }

    .tournament-match-card__team-players {
        font-size: 11px;
        max-width: 92px;
    }

    .tournament-card--table .tournament-table__head,
    .tournament-card--table .tournament-table__row {
        min-width: 640px;
    }
}









/* ==========================
TOURNAMENT MATCH RESULT
1x1 / 2x2 / 3x3
========================== */

.tournament-match-result-page {
    padding: 40px 0 80px;
    background: #f7f7f7;
}

.tournament-match-result-back {
    display: inline-flex;
    margin-bottom: 18px;
    color: #f05a00;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
}

.tournament-match-result-card {
    padding: 30px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0,0,0,.06);
}

.tournament-match-result-head {
    margin-bottom: 28px;
}

.tournament-match-result-label {
    margin-bottom: 8px;
    color: #f05a00;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tournament-match-result-title {
    margin: 0 0 8px;
    color: #111;
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
}

.tournament-match-result-subtitle {
    color: #777;
    font-size: 15px;
    font-weight: 800;
}

.tournament-match-result-vs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 28px;
}

.tournament-match-result-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 22px;
    border-radius: 24px;
    background: #f7f7f7;
    text-align: center;
}

.tournament-match-result-team img {
    width: 92px;
    height: 92px;
    margin-bottom: 14px;
    border-radius: 50%;
    object-fit: cover;
    background: #e9e9e9;
}

.tournament-match-result-team__name {
    max-width: 100%;
    color: #111;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 900;
}

.tournament-match-result-team__players {
    max-width: 100%;
    margin-top: 8px;
    color: #777;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
}

.tournament-match-result-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    border-radius: 22px;
    background: #111;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.tournament-match-result-message {
    margin-bottom: 18px;
    padding: 15px 17px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
}

.tournament-match-result-message--error {
    background: #fff1f1;
    color: #b00020;
    border: 1px solid #ffd2d2;
}

.tournament-match-result-message--success {
    background: #edfff4;
    color: #087a35;
    border: 1px solid #c8f5d8;
}

.tournament-match-result-form {
    margin-top: 24px;
}

.tournament-match-result-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.tournament-match-result-field {
    display: grid;
    gap: 8px;
}

.tournament-match-result-field--wide {
    grid-column: 1 / -1;
}

.tournament-match-result-field span {
    color: #111;
    font-size: 13px;
    font-weight: 900;
}

.tournament-match-result-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #e7e7e7;
    border-radius: 15px;
    background: #fff;
    color: #111;
    font-size: 18px;
    font-weight: 900;
    outline: none;
}

.tournament-match-result-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 28px;
    border: none;
    border-radius: 999px;
    background: #f05a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.tournament-match-result-submit:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .tournament-match-result-page {
        padding: 24px 0 60px;
    }

    .tournament-match-result-card {
        padding: 20px;
        border-radius: 24px;
    }

    .tournament-match-result-title {
        font-size: 30px;
    }

    .tournament-match-result-vs {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tournament-match-result-score {
        order: 2;
        min-height: 58px;
        font-size: 28px;
    }

    .tournament-match-result-team {
        padding: 18px;
    }

    .tournament-match-result-team img {
        width: 74px;
        height: 74px;
    }

    .tournament-match-result-form__grid {
        grid-template-columns: 1fr;
    }

    .tournament-match-result-submit {
        width: 100%;
    }
}





.tournament-create-field small {
    color: #888;
    font-size: 12px;
    font-weight: 700;
}

.tournament-create-card--open-note {
    border: 1px solid #ffe1d1;
    background: #fff7f2;
}

.tournament-create-card--open-note p {
    max-width: 760px;
    color: #777;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 700;
}












/* ==========================
TOURNAMENT TABLE FREE PLACE BUTTON
========================== */

.tournament-table__player--free-place {
    min-width: 0;
}

.tournament-table-free-form {
    margin: 0;
    width: 100%;
}

.tournament-table-free-action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.tournament-table-free-action__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 2px dashed #f05a00;
    border-radius: 50%;
    background: #fff7f2;
    color: #f05a00;
    font-size: 28px;
    line-height: 1;
    font-weight: 500;
    transition: .2s ease;
}

.tournament-table-free-action__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tournament-table-free-action__text strong {
    color: #111;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 900;
    white-space: nowrap;
}

.tournament-table-free-action__text small {
    margin-top: 4px;
    color: #777;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
}

.tournament-table-free-action:hover .tournament-table-free-action__icon {
    background: #f05a00;
    color: #fff;
    transform: scale(1.04);
}

.tournament-table-free-action:hover .tournament-table-free-action__text strong,
.tournament-table-free-action:hover .tournament-table-free-action__text small {
    color: #f05a00;
}

.tournament-table-free-action--disabled {
    cursor: default;
}

.tournament-table-free-action--disabled .tournament-table-free-action__icon {
    border-color: #14a84a;
    background: #edfff4;
    color: #14a84a;
}

.tournament-table-free-action--disabled:hover .tournament-table-free-action__icon {
    background: #edfff4;
    color: #14a84a;
    transform: none;
}

.tournament-table-free-action--disabled:hover .tournament-table-free-action__text strong,
.tournament-table-free-action--disabled:hover .tournament-table-free-action__text small {
    color: inherit;
}




/* ==========================
TOURNAMENT TABLE REMOVE PARTICIPANT
========================== */

.tournament-table__manage-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.tournament-table-remove-form {
    margin: 0;
}

.tournament-table-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.tournament-table-remove-btn:hover {
    background: #f05a00;
}

@media (max-width: 767px) {
    .tournament-table-remove-btn {
        min-height: 30px;
        padding: 0 10px;
        font-size: 11px;
    }
}





/* ==========================
TOURNAMENT TABLE ADMIN ADD PLAYER
========================== */

.tournament-table-admin-add {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.tournament-table-admin-add__title {
    margin-bottom: 12px;
    color: #111;
    font-size: 16px;
    font-weight: 900;
}

.tournament-table-admin-add__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.tournament-table-admin-add__form select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 800;
    outline: none;
}

.tournament-table-admin-add__form select:focus {
    border-color: #f05a00;
    box-shadow: 0 0 0 3px rgba(240,90,0,.12);
}

.tournament-table-admin-add__form button {
    min-height: 46px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    background: #f05a00;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.tournament-table-admin-add__form button:hover {
    background: #d94f00;
}

.tournament-table-admin-add--disabled {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f7f7f7;
    color: #777;
    font-size: 14px;
    font-weight: 800;
}

@media (max-width: 767px) {
    .tournament-table-admin-add__form {
        grid-template-columns: 1fr;
    }

    .tournament-table-admin-add__form button {
        width: 100%;
    }
}