/* ==========================
   Вызов на дуэль
========================== */

.challenge-page {
    position: relative;
    padding: 34px 0 70px;
    background: #f7f8fa;
    overflow: hidden;
}

.challenge-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(247,248,250,.92), rgba(247,248,250,.98)),
        url("/assets/img/duel-court-bg.jpg") center / cover no-repeat;
    opacity: .9;
}

.challenge-page .site-container {
    position: relative;
    z-index: 2;
}

.challenge-head {
    text-align: center;
    margin-bottom: 30px;
}

.challenge-head h1 {
    margin: 0;
    font-size: 48px;
    line-height: 1;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    color: #151515;
}

.challenge-head p {
    margin: 12px 0 0;
    font-size: 18px;
    color: #6b7280;
}

.challenge-head::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin: 18px auto 0;
    background: #ff5a00;
    border-radius: 10px;
}

.challenge-arena {
    display: grid;
    grid-template-columns: 360px 1fr 430px;
    gap: 34px;
    align-items: start;
}

.challenge-side {
    align-self: start;
}

.challenge-center {
    padding-top: 80px; /* опускаем только VS и кнопку */
}




.challenge-side__label {
    margin-bottom: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    color: #ff5a00;
}

.challenge-card,
.challenge-opponent {
    background: rgba(255,255,255,.94);
    border: 1px solid #ededed;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0,0,0,.08);
    overflow: hidden;
}

.challenge-card {
    position: relative;
}

.challenge-card__photo {
    height: 330px;
    background: #f3f4f6;
    overflow: hidden;
}

.challenge-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.challenge-card__body {
    padding: 22px 24px 24px;
}

.challenge-card__name {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    color: #111827;
}

.challenge-card__rating {
    margin-top: 12px;
    font-size: 18px;
    color: #6b7280;
}

.challenge-card__rating b {
    color: #ff5a00;
}

.challenge-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #ededed;
}

.challenge-card__stats div {
    text-align: center;
    border-right: 1px solid #ededed;
}

.challenge-card__stats div:last-child {
    border-right: 0;
}

.challenge-card__stats span {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    color: #6b7280;
}

.challenge-card__stats strong {
    font-size: 22px;
    font-weight: 900;
    color: #111827;
}

.challenge-card__remove {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #777;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.challenge-card__remove:hover {
    color: #ff5a00;
    border-color: #ff5a00;
}

.challenge-center {
    text-align: center;
}

.challenge-message {
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
color: #ff5a00;
font-size: 30px;
padding-bottom: 40px;
}


.challenge-vs {
    margin-bottom: 44px;
    font-size: 118px;
    line-height: .8;
    font-weight: 900;
    font-style: italic;
    color: rgba(17,24,39,.16);
}

.challenge-limit__text {
    font-size: 18px;
    color: #6b7280;
}

.challenge-limit__text b {
    color: #ff5a00;
}

.challenge-limit__bar {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 14px 0 20px;
}

.challenge-limit__bar span {
    width: 48px;
    height: 10px;
    border-radius: 999px;
    background: #d9dde5;
}

.challenge-limit__bar span.is-active {
    background: #ff5a00;
}

.challenge-limit__note {
    max-width: 360px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.45;
    color: #6b7280;
}

.challenge-form {
    margin-top: 28px;
}

.challenge-submit {
    width: 100%;
    max-width: 360px;
    height: 58px;
    border: 0;
    border-radius: 10px;
    background: #ff5a00;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(255,90,0,.25);
}

.challenge-submit:disabled {
    background: #cfd3da;
    box-shadow: none;
    cursor: not-allowed;
}

.challenge-opponent {
    padding: 18px;
}

.challenge-opponent__empty {
    padding: 16px;
    border: 1px dashed #d7dce8;
    border-radius: 14px;
    text-align: center;
    background: rgba(247,248,250,.75);
}

.challenge-opponent__silhouette {
    height: 110px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: .35;
}

.challenge-opponent__silhouette img {
    max-height: 100%;
    max-width: 80%;
    object-fit: contain;
}

.challenge-opponent__empty-title {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    color: #111827;
}

.challenge-opponent__empty-text {
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

.challenge-search {
    margin-top: 16px;
}

.challenge-search__input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #d7dce8;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
}

.challenge-search__input:focus {
    border-color: #ff5a00;
    box-shadow: 0 0 0 4px rgba(255,90,0,.1);
}

.challenge-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 10px;
    font-size: 13px;
}

.challenge-sort span {
    margin-right: auto;
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
    color: #6b7280;
}

.challenge-sort a {
    color: #6b7280;
    text-decoration: none;
}

.challenge-sort a.active,
.challenge-sort a:hover {
    color: #ff5a00;
    font-weight: 800;
}

.challenge-players-list {
    max-height: 286px;
    overflow-y: auto;
    padding-right: 4px;
}

.challenge-player-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    border-bottom: 1px solid #ededed;
}

.challenge-player-row__photo img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
}

.challenge-player-row__name {
    font-size: 14px;
    font-weight: 900;
    color: #111827;
}

.challenge-player-row__rating {
    margin-top: 3px;
    font-size: 13px;
    color: #6b7280;
}

.challenge-player-row__rating b {
    color: #ff5a00;
}

.challenge-player-row__btn {
    height: 36px;
    padding: 0 14px;
    border: 1px solid #ff5a00;
    border-radius: 8px;
    background: #fff;
    color: #ff5a00;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.challenge-player-row__btn:hover {
    background: #ff5a00;
    color: #fff;
}

.challenge-active {
    margin-top: 34px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0,0,0,.06);
}

.challenge-active h2 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    color: #111827;
}

.challenge-active h2 span {
    color: #6b7280;
    font-weight: 700;
}

.challenge-active__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.is-hidden {
    display: none !important;
}





/* ===========  
Активные вызовы 
=============== */
.challenge-active-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;

    padding: 18px;

    border: 1px solid #ededed;
    border-radius: 12px;

    margin-bottom: 12px;
}

.challenge-active-row__player {
    display: flex;
    align-items: center;
    gap: 14px;
}

.challenge-active-row__player img {
    width: 60px;
    height: 60px;

    border-radius: 50%;
    object-fit: cover;
}

.challenge-active-row__name {
    font-size: 16px;
    font-weight: 900;
}

.challenge-active-row__rating {
    margin-top: 4px;
    color: #666;
}

.challenge-active-row__date {
    font-size: 14px;
    color: #666;
}

.challenge-cancel-btn {
    width: 100%;
    height: 42px;

    border: 1px solid #ff5a00;
    background: #fff;

    color: #ff5a00;

    border-radius: 8px;

    font-weight: 800;
    cursor: pointer;
}

.challenge-cancel-btn:hover {
    background: #ff5a00;
    color: #fff;
}











/* ==================================
   Принятые дуэли
================================== */

.challenge-accepted {
    margin-top: 32px;
}

.challenge-match-row {
    display: grid;
    grid-template-columns: 1fr 160px 160px;
    gap: 24px;

    align-items: center;

    padding: 20px;

    background: #fff;

    border: 1px solid #ececec;
    border-radius: 20px;

    margin-bottom: 14px;

    transition: .2s;
}

.challenge-match-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.challenge-match-row__players {
    display: flex;
    align-items: center;
    gap: 24px;
}

.challenge-match-row__player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.challenge-match-row__player img {
    width: 64px;
    height: 64px;

    border-radius: 50%;
    object-fit: cover;

    border: 3px solid #f2f2f2;
}

.challenge-match-row__name {
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

.challenge-match-row__rating {
    margin-top: 4px;

    font-size: 13px;
    color: #777;
}

.challenge-match-row__vs {
    font-size: 24px;
    font-weight: 900;
    color: #ff5a00;

    min-width: 40px;
    text-align: center;
}

.challenge-match-row__status {
    text-align: center;

    font-size: 14px;
    color: #666;
}

.challenge-match-row__status span {
    display: block;
    margin-top: 6px;

    color: #999;
    font-size: 12px;
}

.challenge-result-btn {
    display: flex;
    align-items: center;
    justify-content: center;
text-align: center;
    height: 52px;

    background: #ff5a00;
    color: #fff;

    border-radius: 12px;

    text-decoration: none;
    font-weight: 800;

    transition: .2s;
}

.challenge-result-btn:hover {
    background: #e24e00;
    color: #fff;
}

/* ==================================
   Мобильная версия
================================== */

@media (max-width: 991px) {

    .challenge-match-row {
        grid-template-columns: 1fr;
        gap: 16px;

        text-align: center;
    }

    .challenge-match-row__players {
        flex-direction: column;
        gap: 14px;
    }

    .challenge-match-row__player {
        justify-content: center;
    }

    .challenge-match-row__vs {
        font-size: 20px;
    }

    .challenge-result-btn {
        width: 100%;
    }

}







@media (max-width: 991px) {
    .challenge-arena {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .challenge-center {
        order: 2;
    }

    .challenge-side:first-child {
        order: 1;
    }

    .challenge-side:last-child {
        order: 3;
    }

    .challenge-vs {
        margin: 0 0 20px;
        font-size: 72px;
    }

    .challenge-active__list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .challenge-page {
        padding: 24px 0 44px;
    }

    .challenge-page .site-container {
        width: 95%;
        max-width: 95%;
    }

    .challenge-head h1 {
        font-size: 36px;
    }

    .challenge-head p {
        font-size: 15px;
    }

    .challenge-card__photo {
        height: 300px;
    }

    .challenge-card__name {
        font-size: 26px;
    }


    .challenge-sort {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .challenge-sort span {
        width: 100%;
    }

    .challenge-submit {
        max-width: none;
    }

    .challenge-active {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .challenge-head h1 {
        font-size: 32px;
    }

    .challenge-card__photo {
        height: 260px;
    }

    .challenge-card__body {
        padding: 18px;
    }

    .challenge-card__stats strong {
        font-size: 18px;
    }

    .challenge-limit__bar span {
        width: 38px;
    }

    .challenge-player-row {
        grid-template-columns: 40px 1fr auto;
        gap: 9px;
    }

    .challenge-player-row__photo img {
        width: 40px;
        height: 40px;
    }

    .challenge-player-row__btn {
        padding: 0 10px;
        font-size: 11px;
    }
}




/* ==================================
   История дуэлей
================================== */

.challenge-history {
    margin-top: 32px;
}

.challenge-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 14px 18px;

    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;

    margin-bottom: 10px;

    transition: .2s;
}


.challenge-history-row__player {
    display: flex;
    align-items: center;
    gap: 12px;

    flex: 1;
    min-width: 0;
}

.challenge-history-row__player img {
    width: 48px;
    height: 48px;

    border-radius: 50%;
    object-fit: cover;

    flex-shrink: 0;
}

.challenge-history-row__name {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
}

.challenge-history-row__rating {
    margin-top: 2px;

    font-size: 12px;
    color: #888;
}

.challenge-history-row__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 4px;

    min-width: 110px;
}

.challenge-history-row__status {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.challenge-history-row__date {
    font-size: 11px;
    color: #999;
    text-align: right;
}




/* Завершена */

.challenge-history-row.is-completed {
    border-left: 4px solid #22c55e;
}

.challenge-history-row.is-completed .challenge-history-row__status {
    color: #22c55e;
}

/* Отклонена */

.challenge-history-row.is-declined {
    border-left: 4px solid #ef4444;
}

.challenge-history-row.is-declined .challenge-history-row__status {
    color: #ef4444;
}

/* Отменена */

.challenge-history-row.is-cancelled {
    border-left: 4px solid #f59e0b;
}

.challenge-history-row.is-cancelled .challenge-history-row__status {
    color: #f59e0b;
}

/* ==================================
   Mobile
================================== */

@media (max-width: 991px) {

    .challenge-history-row {
        grid-template-columns: 1fr;
        gap: 12px;

        text-align: center;
    }

    .challenge-history-row__player {
        justify-content: center;
    }

    .challenge-history-row__date,
    .challenge-history-row__status {
        text-align: center;
    }

}


@media (max-width: 767px) {

    .challenge-history-row {
        padding: 12px;
        gap: 12px;
    }

    .challenge-history-row__player img {
        width: 40px;
        height: 40px;
    }

    .challenge-history-row__meta {
        min-width: 90px;
    }

    .challenge-history-row__status {
        font-size: 12px;
    }

    .challenge-history-row__date {
        font-size: 10px;
    }

}









/* ==================================
   История дуэлей — исправленный компактный вид
================================== */

.challenge-history .challenge-active__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.challenge-history-row {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 12px 14px;

    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;

    margin: 0;
    transition: .2s;
}

.challenge-history-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.challenge-history-row__player {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
    flex: 1;
}

.challenge-history-row__player img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    border-radius: 50%;
    object-fit: cover;
}

.challenge-history-row__name {
    font-size: 16px;
    line-height: 1.15;
    font-weight: 900;
    color: #111;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.challenge-history-row__rating {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.2;
    color: #777;
}

.challenge-history-row__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;

    flex: 0 0 92px;
    min-width: 92px;
}

.challenge-history-row__status {
    font-size: 16px;
    line-height: 1.1;
    font-weight: 900;
    text-align: right;
}

.challenge-history-row__date {
    font-size: 10px;
    line-height: 1.2;
    color: #999;
    text-align: right;
}

/* Цвета статусов */

.challenge-history-row.is-completed {
    border-left: 4px solid #22c55e;
}

.challenge-history-row.is-completed .challenge-history-row__status {
    color: #22c55e;
}

.challenge-history-row.is-declined {
    border-left: 4px solid #ef4444;
}

.challenge-history-row.is-declined .challenge-history-row__status {
    color: #ef4444;
}

.challenge-history-row.is-cancelled {
    border-left: 4px solid #f59e0b;
}

.challenge-history-row.is-cancelled .challenge-history-row__status {
    color: #f59e0b;
}

/* Адаптация */

@media (max-width: 1200px) {
    .challenge-history .challenge-active__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .challenge-history .challenge-active__list {
        grid-template-columns: 1fr;
    }

    .challenge-history-row {
        padding: 12px;
    }

    .challenge-history-row__meta {
        flex-basis: 86px;
        min-width: 86px;
    }
}






/* ==================================
   Входящие вызовы
================================== */

.challenge-accept-btn,
.challenge-decline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 110px;
    height: 42px;

    border-radius: 10px;
    border: none;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    transition: .2s;
}

.challenge-accept-btn {
    background: #ff6b00;
    color: #fff;
}

.challenge-accept-btn:hover {
    background: #e65f00;
    transform: translateY(-1px);
}

.challenge-decline-btn {
    background: #fff;
    color: #ff6b00;
    border: 2px solid #ff6b00;
}

.challenge-decline-btn:hover {
    background: #fff3eb;
    transform: translateY(-1px);
}

.challenge-incoming-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}




.challenge-card--current,
.challenge-card--opponent {
    min-height: 640px;
}

.challenge-card__stats--extra {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #ececec;
}



/* ==================================
   Mobile: страница вызова на дуэль
================================== */

@media (max-width: 768px) {

    /* скрываем левую карточку авторизованного игрока */
    .challenge-arena > .challenge-side:first-child {
        display: none;
    }

    /* скрываем VS */
    .challenge-vs {
        display: none;
    }

    /* перестраиваем центральный блок */
    .challenge-center {
        order: 3;
        padding-top: 0;
        display: flex;
        flex-direction: column;
    }

    /* карточка соперника выше */
    .challenge-arena > .challenge-side:last-child {
        order: 1;
    }

    /* форма с кнопкой сразу под карточкой соперника */
    .challenge-form {
        order: 1;
        margin-top: 18px;
    }

    .challenge-submit {
        width: 100%;
        max-width: none;
        height: 56px;
    }

    /* блок активных вызовов под кнопкой */
    .challenge-limit {
        order: 2;
        margin-top: 18px;
        padding: 18px 14px;
        background: rgba(255,255,255,.75);
        border-radius: 16px;
    }

    .challenge-limit__text {
        font-size: 15px;
    }

    .challenge-limit__bar {
        margin: 12px 0 14px;
    }

    .challenge-limit__bar span {
        width: 38px;
        height: 8px;
    }

    .challenge-limit__note {
        font-size: 13px;
        line-height: 1.4;
    }

    /* сама сетка */
    .challenge-arena {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }
}





@media (max-width: 768px) {

    /* скрываем карточку игрока */
    .challenge-arena > .challenge-side:first-child {
        display: none;
    }

    /* скрываем VS */
    .challenge-vs {
        display: none;
    }

    /* контейнер */
    .challenge-page .site-container {
        width: 95%;
        max-width: 95%;
    }

    .challenge-arena {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    /* блок соперника */
    .challenge-arena > .challenge-side:last-child {
        order: 1;
        width: 100%;
    }

    .challenge-opponent {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        width: 100%;
    }

    .challenge-card--opponent {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .challenge-card--opponent .challenge-card__photo {
        height: 320px;
    }

    /* центр */
    .challenge-center {
        order: 2;
        padding-top: 0;
        display: flex;
        flex-direction: column;
    }

    /* кнопка */
    .challenge-form {
        order: 1;
        margin-top: 0;
    }

    .challenge-submit {
        width: 100%;
        max-width: none;
        height: 56px;
    }

    /* активные вызовы */
    .challenge-limit {
        order: 2;
        margin-top: 16px;
        padding: 20px;
        background: #fff;
        border-radius: 18px;
        border: 1px solid #ededed;
        box-shadow: 0 10px 25px rgba(0,0,0,.04);
    }

    .challenge-limit__text {
        font-size: 16px;
    }

    .challenge-limit__note {
        font-size: 13px;
        line-height: 1.4;
    }
}




/* ==================================
   Mobile: принятые дуэли горизонтально
================================== */

@media (max-width: 768px) {

    .challenge-accepted .challenge-active__list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .challenge-accepted .challenge-match-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px 14px;
        text-align: center;
    }

    .challenge-accepted .challenge-match-row__players {
        display: grid;
        grid-template-columns: 1fr 70px 1fr;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .challenge-accepted .challenge-match-row__player {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        min-width: 0;
    }

    .challenge-accepted .challenge-match-row__player img {
        width: 72px;
        height: 72px;
        margin: 0 auto;
    }

    .challenge-accepted .challenge-match-row__name {
        font-size: 18px;
        line-height: 1.15;
    }

    .challenge-accepted .challenge-match-row__rating {
        font-size: 13px;
    }

    .challenge-accepted .challenge-match-row__vs {
        min-width: auto;
        font-size: 28px;
        line-height: 1;
        color: #ff5a00;
    }

    .challenge-accepted .challenge-match-row__status {
        font-size: 14px;
        line-height: 1.4;
        color: #6b7280;
    }

    .challenge-accepted .challenge-result-btn {
        width: 100%;
        height: 54px;
        border-radius: 12px;
        font-size: 16px;
    }
}



@media (max-width: 768px) {

    .challenge-incoming .challenge-active-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
        text-align: center;
    }

    .challenge-incoming .challenge-active-row__player {
        justify-content: center;
    }

    .challenge-incoming .challenge-active-row__date {
        text-align: center;
        font-size: 14px;
    }

    .challenge-incoming .challenge-incoming-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .challenge-incoming .challenge-incoming-actions form {
        width: 100%;
    }

    .challenge-incoming .challenge-accept-btn,
    .challenge-incoming .challenge-decline-btn {
        width: 100%;
        min-width: 0;
        height: 44px;
    }
}



@media (max-width: 768px) {

    .challenge-active-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        min-height: 90px;
    }

    /* скрываем дату */
    .challenge-active-row__date,
    .challenge-active-row__time,
    .challenge-active-row__status-date {
        display: none !important;
    }

    /* информация об игроке */
    .challenge-active-row__player {
        flex: 1;
        min-width: 0;
    }

    /* кнопка справа */
    .challenge-active-row__actions,
    .challenge-cancel-wrap {
        flex-shrink: 0;
        width: auto;
        margin: 0;
    }

    .challenge-cancel-btn {
        width: 100px;
        height: 40px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 700;
        padding: 0;
    }
}



.challenge-active-row__player {
    color: inherit;
    text-decoration: none;
}

.challenge-active-row__player:hover .challenge-active-row__name {
    color: #ff5a00;
}


.challenge-active-row__player,
.challenge-match-row__player {
    color: inherit;
    text-decoration: none;
}

.challenge-active-row__player:hover .challenge-active-row__name,
.challenge-match-row__player:hover .challenge-match-row__name {
    color: #ff5a00;
}

.challenge-history-row__player {
    color: inherit;
    text-decoration: none;
}

.challenge-history-row__player:hover .challenge-history-row__name {
    color: #ff5a00;
}


.challenge-player-row__link{
    display:flex;
    align-items:center;
    gap:12px;
    flex:1;
    text-decoration:none;
    color:inherit;
}

.challenge-player-row__link:hover .challenge-player-row__name{
    color:#ff5a00;
}

.challenge-player-row__link:hover{
    text-decoration:none;
}





/* ==================================
   Список игроков в выборе соперника
================================== */

.challenge-player-row {
    display: grid;
    grid-template-columns: 1fr 116px;
    align-items: center;
    gap: 10px;

    min-height: 64px;
    padding: 8px 0;

    border-bottom: 1px solid #ededed;
}

.challenge-player-row__link {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 12px;

    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.challenge-player-row__link:hover {
    text-decoration: none;
}

.challenge-player-row__link:hover .challenge-player-row__name {
    color: #ff5a00;
}

.challenge-player-row__photo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.challenge-player-row__photo img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
}

.challenge-player-row__info {
    min-width: 0;
}

.challenge-player-row__name {
    font-size: 14px;
    font-weight: 900;
    color: #111827;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.challenge-player-row__rating {
    margin-top: 3px;
    font-size: 13px;
    color: #6b7280;
}

.challenge-player-row__rating b {
    color: #ff5a00;
}

.challenge-player-row__btn {
    width: 116px;
    height: 36px;

    padding: 0 10px;

    border: 1px solid #ff5a00;
    border-radius: 8px;

    background: #fff;
    color: #ff5a00;

    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;

    cursor: pointer;
}

.challenge-player-row__btn:hover {
    background: #ff5a00;
    color: #fff;
}



@media (max-width: 480px) {

    .challenge-player-row {
        grid-template-columns: 1fr 96px;
        gap: 8px;
    }

    .challenge-player-row__link {
        grid-template-columns: 40px 1fr;
        gap: 9px;
    }

    .challenge-player-row__photo,
    .challenge-player-row__photo img {
        width: 40px;
        height: 40px;
    }

    .challenge-player-row__btn {
        width: 96px;
        height: 34px;
        font-size: 11px;
    }
}











/* ==================================
   Profile: принятые дуэли компактно на мобильной
================================== */

@media (max-width: 768px) {

    .profile-accepted-duels {
        padding: 16px 0 8px;
    }

    .profile-accepted-duels .site-container {
        width: 95%;
        max-width: 95%;
        padding-left: 0;
        padding-right: 0;
    }

    .profile-accepted-duels__card {
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .profile-accepted-duels__title {
        margin: 0 0 12px;
        font-size: 24px;
        line-height: 1.15;
        font-weight: 500;
        color: #111;
    }

    .profile-accepted-duels .challenge-active__list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-accepted-duels .challenge-match-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;

        padding: 16px 14px 18px;
        margin: 0;

        background: #fff;
        border: 1px solid #ececec;
        border-radius: 18px;
        box-shadow: none;

        text-align: center;
    }

    .profile-accepted-duels .challenge-match-row:hover {
        transform: none;
        box-shadow: none;
    }

    .profile-accepted-duels .challenge-match-row__players {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
        align-items: start;
        gap: 6px;
        width: 100%;
    }

    .profile-accepted-duels .challenge-match-row__player {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        min-width: 0;

        color: inherit;
        text-decoration: none;
    }

    .profile-accepted-duels .challenge-match-row__player img {
        width: 62px;
        height: 62px;
        margin: 0 auto 8px;

        border-radius: 50%;
        border: 3px solid #f2f2f2;

        object-fit: cover;
        object-position: top center;
        flex: 0 0 62px;
    }

    .profile-accepted-duels .challenge-match-row__name {
        width: 100%;
        margin: 0 0 4px;

        font-size: 16px;
        line-height: 1.15;
        font-weight: 900;
        color: #000;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .profile-accepted-duels .challenge-match-row__rating {
        width: 100%;
        margin: 0;

        font-size: 12px;
        line-height: 1.2;
        color: #6f7680;

        white-space: nowrap;
        text-align: center;
    }

    .profile-accepted-duels .challenge-match-row__vs {
        display: flex !important;
        align-items: center;
        justify-content: center;

        min-width: 0;
        min-height: 62px;
        padding-top: 20px;

        font-size: 22px;
        line-height: 1;
        font-weight: 900;
        color: #ff4b00;
        text-align: center;
    }

    .profile-accepted-duels .challenge-match-row__status {
        margin-top: 2px;

        font-size: 14px;
        line-height: 1.35;
        color: #555;
        text-align: center;
    }

    .profile-accepted-duels .challenge-match-row__status span {
        display: block;
        margin-top: 4px;

        font-size: 12px;
        line-height: 1.2;
        color: #999;
    }

    .profile-accepted-duels .challenge-result-btn {
        width: 100%;
        height: 52px;
        margin-top: 4px;

        border-radius: 12px;

        font-size: 16px;
        line-height: 1;
        font-weight: 900;
        text-align: center;
    }
}