:root {
    --stroke: rgba(117, 128, 157, 0.22);
    --text: #f6f7ff;
    --muted: #a3a5b5;
    --violet-2: #d243ff;
    --radius-lg: 18px;

    --bg: #070a12;
    --panel: rgba(15, 19, 30, 0.94);
    --stroke: rgba(117, 128, 157, 0.22);
    --text: #f6f7ff;
    --muted: #a3a5b5;
    --orange: #ff6a12;
    --orange-2: #ff8c19;
    --violet: #8b3dff;
    --violet-2: #d243ff;
    --blue: #4b6dff;
    --success: #37e48d;
    --shadow-violet: 0 0 18px rgba(139, 61, 255, 0.38), inset 0 0 14px rgba(139, 61, 255, 0.18);
}

/*** containers ***/
.main-container{
    display: flex;
    flex-direction: column;
}
.filters-container{
    display: flex;
    flex-direction: row;
    gap: 20px;
}

@media (max-width: 700px) {
    .filters-container {
        flex-direction: column;
        gap: 8px;
    }
}
/*** containers ***/


/*** balance panel ***/
.balance-card,
.balance-card * {
    box-sizing: border-box;
}

.balance-card {
    display: grid;
    grid-template-columns: minmax(104px, 1fr) minmax(105px, 0.9fr) 1px minmax(115px, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 108px;
    padding: 12px 15px 13px;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(17, 21, 33, 0.96), rgba(9, 12, 21, 0.96));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 28px rgba(0, 0, 0, 0.26);
    color: var(--text);
    width: 250px;
    height: fit-content;
}
.balance-card__art {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    aspect-ratio: 1.25;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(162, 75, 255, 0.30), transparent 42%),
    radial-gradient(circle at 20% 20%, rgba(0, 195, 255, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(19, 29, 72, 0.75), rgba(12, 15, 31, 0.2));
}

.balance-card__art::before,
.balance-card__art::after {
    content: "";
    position: absolute;
    border: 2px solid rgba(110, 77, 255, 0.82);
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(111, 65, 255, 0.9));
}

.balance-card__art::before {
    width: 92px;
    height: 92px;
}

.balance-card__art::after {
    width: 110px;
    height: 110px;
    border-top-color: var(--violet-2);
    border-right-color: transparent;
    transform: rotate(-20deg);
}

.balance-card .big-coin {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 5px solid #8bc3ff;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.38), transparent 16%),
    radial-gradient(circle, #6968ff 0 35%, #2937d5 53%, #151b7c 76%);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.28), 0 0 24px rgba(75, 109, 255, 0.72);
    color: #e6eeff;
    font-size: 48px;
    font-weight: 950;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.balance-card .eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.balance-card .eyebrow--spaced {
    margin-top: 14px;
}

.balance-card .balance-value,
.balance-card .total-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.balance-card .balance-value {
    margin-top: 2px;
    font-size: 25px;
}

.balance-card .total-value {
    margin-top: 2px;
    font-size: 18px;
}

.balance-card .small-coin {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 2px solid #78afff;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #8fffff 0 3%, transparent 12%),
    radial-gradient(circle, #384bff 0 42%, #17228f 63%, #11175e 100%);
    box-shadow: 0 0 12px rgba(81, 98, 255, 0.70), inset 0 0 8px rgba(255, 255, 255, 0.35);
    color: #d7efff;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.balance-card .small-coin--tiny {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    border-width: 1.5px;
    font-size: 11px;
}

.balance-card__divider {
    width: 1px;
    height: 66px;
    background: linear-gradient(180deg, transparent, rgba(143, 151, 178, 0.36), transparent);
}

.balance-card__text {
    margin: 0;
    color: #b7bacb;
    font-size: 13px;
    line-height: 1.4;
}
@media (max-width: 450px) {
    .balance-card__text {
        font-size: 10px!important;
    }
}
@media (max-width: 699px) and (min-width: 0px) {
    .balance-card,
    .balance-card * {
        box-sizing: border-box;
    }

    .balance-card {
        display: grid;
        grid-template-columns: 93px 80px 1px minmax(0, 1fr);
        gap: 9px;
        align-items: center;

        width: 100%;
        max-width: 640px;
        height: auto;
        min-height: 72px;

        padding: 8px 10px 9px;
        border: 1px solid var(--stroke);
        border-radius: 12px;
        background: linear-gradient(180deg, rgba(17, 21, 33, 0.96), rgba(9, 12, 21, 0.96));
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 7px 18px rgba(0, 0, 0, 0.26);
        color: var(--text);
    }

    .balance-card__art {
        position: relative;
        display: grid;
        place-items: center;
        min-width: 0;
        aspect-ratio: 1.25;
        border-radius: 11px;
        overflow: hidden;
        background: radial-gradient(circle at center, rgba(162, 75, 255, 0.30), transparent 42%),
        radial-gradient(circle at 20% 20%, rgba(0, 195, 255, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(19, 29, 72, 0.75), rgba(12, 15, 31, 0.2));
    }

    .balance-card__art::before,
    .balance-card__art::after {
        content: "";
        position: absolute;
        border: 1.5px solid rgba(110, 77, 255, 0.82);
        border-radius: 50%;
        filter: drop-shadow(0 0 7px rgba(111, 65, 255, 0.9));
    }

    .balance-card__art::before {
        width: 61px;
        height: 61px;
    }

    .balance-card__art::after {
        width: 73px;
        height: 73px;
        border-top-color: var(--violet-2);
        border-right-color: transparent;
        transform: rotate(-20deg);
    }

    .balance-card .big-coin {
        position: relative;
        z-index: 1;
        display: grid;
        place-items: center;
        width: 55px;
        height: 55px;
        border: 3px solid #8bc3ff;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.38), transparent 16%),
        radial-gradient(circle, #6968ff 0 35%, #2937d5 53%, #151b7c 76%);
        box-shadow: inset 0 0 13px rgba(255, 255, 255, 0.28),
        0 0 16px rgba(75, 109, 255, 0.72);
        color: #e6eeff;
        font-size: 32px;
        font-weight: 950;
        text-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
    }

    .balance-card .eyebrow {
        margin: 0;
        color: var(--muted);
        font-size: 8px;
        font-weight: 850;
        line-height: 1.15;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .balance-card .eyebrow--spaced {
        margin-top: 9px;
    }

    .balance-card .balance-value,
    .balance-card .total-value {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-weight: 950;
        letter-spacing: -0.04em;
    }

    .balance-card .balance-value {
        margin-top: 1px;
        font-size: 17px;
    }

    .balance-card .total-value {
        margin-top: 1px;
        font-size: 12px;
    }

    .balance-card .small-coin {
        display: inline-grid;
        place-items: center;
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
        border: 1.5px solid #78afff;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 30%, #8fffff 0 3%, transparent 12%),
        radial-gradient(circle, #384bff 0 42%, #17228f 63%, #11175e 100%);
        box-shadow: 0 0 8px rgba(81, 98, 255, 0.70),
        inset 0 0 5px rgba(255, 255, 255, 0.35);
        color: #d7efff;
        font-size: 10px;
        font-weight: 950;
        letter-spacing: -0.04em;
    }

    .balance-card .small-coin--tiny {
        width: 11px;
        height: 11px;
        flex-basis: 11px;
        border-width: 1px;
        font-size: 7px;
    }

    .balance-card__divider {
        width: 1px;
        height: 44px;
        background: linear-gradient(180deg, transparent, rgba(143, 151, 178, 0.36), transparent);
    }

    .balance-card__text {
        margin: 0;
        color: #b7bacb;
        font-size: 12px;
        line-height: 1.3;
    }
}
@media (min-width: 700px) {
    .balance-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .balance-card__divider {
        display: none;
    }
}
/*** balance panel ***/

/*** filters panel ***/

section.controls-panel,
section.controls-panel *,
section.controls-panel *::before,
section.controls-panel *::after {
    box-sizing: border-box;
}

section.panel.controls-panel {
    --cp-stroke: rgba(117, 128, 157, 0.22);
    --cp-stroke-field: rgba(117, 128, 157, 0.25);
    --cp-text: #f6f7ff;
    --cp-muted: #a3a5b5;
    --cp-field-text: #b8bbcc;
    --cp-orange: #ff6a12;
    --cp-orange-2: #ff8c19;

    min-width: 0;
    padding: 12px 10px 9px;
    border: 1px solid var(--cp-stroke);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(17, 21, 33, 0.96), rgba(9, 12, 21, 0.96));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 28px rgba(0, 0, 0, 0.26);
    color: var(--cp-text);
    overflow: hidden;
    height: fit-content;
}

section.controls-panel .section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin-bottom: 10px;
}

section.controls-panel .section-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin: 0;
    color: var(--cp-text);
    font-size: 20px;
    font-weight: 950;
    line-height: 1.2;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

section.controls-panel .section-title__icon {
    flex: 0 0 auto;
    color: var(--cp-orange);
    font-size: 23px;
    line-height: 1;
    text-shadow: 0 0 12px rgba(255, 106, 18, 0.52);
}

section.controls-panel .receive-summary--top {
    display: grid;
    flex: 0 0 auto;
    justify-items: center;
    gap: 2px;
    color: var(--cp-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

section.controls-panel .receive-summary--top strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--cp-text);
    font-size: 20px;
    font-weight: 950;
    line-height: 1;
}

section.controls-panel .small-coin {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 2px solid #78afff;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #8fffff 0 3%, transparent 12%),
    radial-gradient(circle, #384bff 0 42%, #17228f 63%, #11175e 100%);
    box-shadow: 0 0 12px rgba(81, 98, 255, 0.70),
    inset 0 0 8px rgba(255, 255, 255, 0.35);
    color: #d7efff;
    font-size: 15px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.04em;
}

section.controls-panel .small-coin--tiny {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    border-width: 1.5px;
    font-size: 11px;
}

section.controls-panel .filters {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 7px;
    min-width: 0;
    margin: 0;
}

section.controls-panel .select-field,
section.controls-panel .tune-button {
    position: relative;
    min-width: 0;
    grid-column: span 2;
    height: 36px;
    border: 1px solid var(--cp-stroke-field);
    border-radius: 10px;
    background: rgba(9, 12, 22, 0.88);
    overflow: hidden;
}

section.controls-panel .select-field--wide {
    grid-column: span 3;
}


section.controls-panel .select-field select,
section.controls-panel .select-field input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 31px 0 12px;
    background: transparent;
    color: var(--cp-field-text);
    appearance: none;
    font-size: 14px;
    line-height: 1;
}

section.controls-panel .select-field input::placeholder {
    color: var(--cp-field-text);
    opacity: 1;
}

section.controls-panel .select-field select option {
    color: #111421;
}

section.controls-panel .tune-button {
    display: grid;
    grid-column: span 1;
    padding: 0;
    color: var(--cp-orange);
    font-size: 24px;
    line-height: 1;
    background: rgba(9, 12, 22, 0.88);
    cursor: pointer;
}

section.controls-panel .tune-button span {
    line-height: 1;
}

section.controls-panel .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 374px) {
    section.panel.controls-panel {
        padding: 11px 9px 9px;
    }

    section.controls-panel .section-head {
        gap: 8px;
    }

    section.controls-panel .section-title {
        font-size: 18px;
    }

    section.controls-panel .receive-summary--top {
        font-size: 10px;
    }

    section.controls-panel .receive-summary--top strong {
        font-size: 17px;
    }

    section.controls-panel .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    section.controls-panel .select-field,
    section.controls-panel .select-field--wide,
    section.controls-panel .tune-button {
        grid-column: span 1;
    }
}

@media (min-width: 960px) {
    section.panel.controls-panel {
        grid-column: 2;
    }

    section.controls-panel .filters {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }

    section.controls-panel .select-field {
        grid-column: span 2;
    }

    section.controls-panel .select-field--wide {
        grid-column: span 3;
    }

    section.controls-panel .tune-button {
        grid-column: span 1;
    }
}
/*** filters panel ***/


/*** exchange-bar panel ***/
.exchange-bar,
.exchange-bar *,
.exchange-bar *::before,
.exchange-bar *::after {
    box-sizing: border-box;
}
.exchange-bar {
    --exchange-stroke: var(--stroke, rgba(117, 128, 157, 0.22));
    --exchange-text: var(--text, #f6f7ff);
    --exchange-muted: var(--muted, #a3a5b5);
    --exchange-orange: var(--orange, #ff6a12);
    --exchange-orange-2: var(--orange-2, #ff8c19);
    --exchange-violet: var(--violet, #8b3dff);
    --exchange-blue: var(--blue, #4b6dff);
    --exchange-radius-lg: var(--radius-lg, 18px);
    --exchange-safe-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
    --exchange-max-mobile: var(--max-mobile, 430px);
    --exchange-shadow-orange: var(--shadow-orange, 0 0 22px rgba(255, 106, 18, 0.22));

    z-index: 30;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) minmax(168px, 1.25fr);
    gap: 10px;
    align-items: center;
    padding: 12px 10px;
    border: 1px solid var(--exchange-stroke);
    border-radius: var(--exchange-radius-lg);
    background: linear-gradient(180deg, rgba(17, 21, 33, 0.96), rgba(9, 12, 21, 0.96));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 28px rgba(0, 0, 0, 0.26);
    color: var(--exchange-text);
    backdrop-filter: blur(18px);
}
.exchange-bar__cards {
    position: relative;
    width: 70px;
    height: 50px;
}
.exchange-bar__cards span {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 34px;
    height: 46px;
    border: 1px solid rgba(255, 106, 18, 0.72);
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 106, 18, 0.86), rgba(85, 37, 196, 0.96));
    box-shadow: 0 0 12px rgba(139, 61, 255, 0.32);
}
.exchange-bar__cards span:nth-child(1) {
    transform: rotate(-16deg) translateX(-12px);
}
.exchange-bar__cards span:nth-child(2) {
    border-color: rgba(139, 61, 255, 0.90);
    transform: rotate(-2deg);
}
.exchange-bar__cards span:nth-child(3) {
    border-color: rgba(75, 109, 255, 0.90);
    transform: rotate(16deg) translateX(12px);
}
.exchange-bar__info {
    min-width: 0;
}
.exchange-bar__info p {
    margin: 0;
    color: #aaaec0;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}
.exchange-bar__info .receive-summary {
    margin-top: 2px;
    color: var(--exchange-text);
    font-size: 14px;
}
.exchange-bar__info .receive-summary strong {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--exchange-text);
    font-weight: 950;
}
.exchange-bar__info small {
    display: block;
    margin-top: 6px;
    color: #c5c7d3;
    font-size: 11px;
    line-height: 1.2;
}
.exchange-button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 55px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--exchange-orange-2), #ff4d0b);
    box-shadow: var(--exchange-shadow-orange),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
    color: #fff;
    font: inherit;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
}
.exchange-button span {
    font-size: 15px;
    font-weight: 950;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.exchange-button small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    text-transform: none;
}
.exchange-button:disabled {
    filter: grayscale(0.15) brightness(0.82);
    opacity: 0.86;
    cursor: not-allowed;
}
@media (max-width: 500px) {
    .exchange-bar {
        grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr);;
    }
    .exchange-bar__cards{
        display: none;
    }
    .exchange-bar__info p{
        font-size: 10px;
    }
    .exchange-bar__info .receive-summary{
        font-size: 12px;
    }
    .exchange-bar__info small{
        font-size: 10px;
    }
    .exchange-button span{
        font-size: 12px;
    }
    /*.exchange-button {*/
    /*    grid-column: 1 / -1;*/
    /*}*/
}
/*** exchange-bar panel ***/


/*** panel cards ***/
section.panel.cards-panel,
section.panel.cards-panel *,
section.panel.cards-panel *::before,
section.panel.cards-panel *::after {
    box-sizing: border-box;
}
section.panel.cards-panel {
    overflow: hidden;
    border: 1px solid var(--stroke, rgba(117, 128, 157, 0.22));
    border-radius: var(--radius-lg, 18px);
    background: linear-gradient(
            180deg,
            rgba(17, 21, 33, 0.96),
            rgba(9, 12, 21, 0.96)
    );
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 28px rgba(0, 0, 0, 0.26);
}
section.panel.cards-panel .cards-panel__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(117, 128, 157, 0.14);
}
section.panel.cards-panel .check-line {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--muted, #a3a5b5);
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}
section.panel.cards-panel .check-line input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}
section.panel.cards-panel .fake-checkbox {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 1.5px solid rgba(183, 188, 210, 0.46);
    border-radius: 5px;
    background: rgba(9, 12, 22, 0.72);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.02);
    transition: border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}
section.panel.cards-panel .check-line input:checked + .fake-checkbox {
    border-color: rgba(255, 106, 18, 0.9);
    background: linear-gradient(180deg, #ff8c19, #ff4b0b);
    box-shadow: 0 0 12px rgba(255, 106, 18, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
section.panel.cards-panel .check-line input:checked + .fake-checkbox::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: 950;
    line-height: 1;
    transform: translateY(-1px);
}
section.panel.cards-panel .check-line input:focus-visible + .fake-checkbox {
    outline: 2px solid rgba(255, 140, 25, 0.8);
    outline-offset: 2px;
}
section.panel.cards-panel .found-count {
    margin: 0;
    flex: 0 0 auto;
    color: var(--muted, #a3a5b5);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
section.panel.cards-panel .found-count span {
    color: var(--text, #f6f7ff);
    font-weight: 950;
}
section.panel.cards-panel > .cards-grid-break {
    padding: 9px 7px 10px;
}

@media (max-width: 374px) {
    section.panel.cards-panel .cards-panel__bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    section.panel.cards-panel .found-count {
        padding-left: 29px;
    }
}
@media (min-width: 960px) {
    section.panel.cards-panel {
        grid-column: 2;
    }

    section.panel.cards-panel .cards-panel__bar {
        padding-inline: 12px;
    }

    section.panel.cards-panel > .cards-grid-break {
        padding: 11px 10px 12px;
    }
}
/*** panel cards ***/



/*** cards ***/
.cards-grid-break {
    align-items: stretch;
    display: grid;
}
.game-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 3 / 4;
    min-height: 148px;

    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(162, 75, 255, 0.72);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(36, 17, 69, 0.88), rgba(7, 10, 18, 0.98));
    box-shadow: var(--shadow-violet);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}
.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        145deg,
        rgba(178, 68, 255, 0.96),
        rgba(255, 106, 18, 0.52),
        rgba(75, 109, 255, 0.74)
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0.86;
}
.game-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 106, 18, 0.82);
    box-shadow:
        0 0 22px rgba(255, 106, 18, 0.24),
        0 0 18px rgba(139, 61, 255, 0.38),
        inset 0 0 14px rgba(139, 61, 255, 0.18);
}
.game-card.is-selected,
.game-card:has(.card-check__input:checked) {
    transform: translateY(-1px);
    border-color: rgba(255, 106, 18, 0.96);
    box-shadow:
        0 0 22px rgba(255, 106, 18, 0.36),
        0 0 18px rgba(139, 61, 255, 0.38),
        inset 0 0 14px rgba(139, 61, 255, 0.18);
}

/* Чекбокс */
.card-check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 6;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}
.card-check__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}
.card-check__box {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid rgba(214, 218, 240, 0.62);
    border-radius: 6px;
    background: rgba(8, 10, 18, 0.76);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.03),
        0 4px 12px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}
.card-check__input:checked + .card-check__box {
    border-color: rgba(255, 106, 18, 0.95);
    background: linear-gradient(180deg, #ff8c19, #ff4b0b);
    box-shadow:
        0 0 14px rgba(255, 106, 18, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.card-check__input:checked + .card-check__box::after {
    content: "✓";
    color: #fff;
    font-size: 15px;
    font-weight: 950;
    line-height: 1;
    transform: translateY(-1px);
}
.card-check__input:focus-visible + .card-check__box {
    outline: 2px solid rgba(255, 140, 25, 0.8);
    outline-offset: 2px;
}

/* Изображение */
.game-card__image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 148px;
    overflow: hidden;
    border-radius: inherit;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 106, 18, 0.16), transparent 28%),
        radial-gradient(circle at 80% 16%, rgba(139, 61, 255, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(28, 18, 56, 0.98), rgba(8, 10, 18, 0.98));
}
.game-card__image::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(6, 8, 15, 0.18) 34%,
        rgba(6, 8, 15, 0.72) 100%
    );
}


.game-card__image img {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 148px;
    object-fit: fill;
    object-position: center top;
    opacity: 0;
    transition: opacity 0.28s ease;
}


.game-card__image img.is-ready {
    opacity: 1;
}

.game-card__image img.is-hidden {
    display: none;
}
.fallback-portrait {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.12), transparent 10%),
        linear-gradient(145deg, rgba(255, 106, 18, 0.22), rgba(139, 61, 255, 0.26) 55%, rgba(75, 109, 255, 0.18)),
        linear-gradient(180deg, rgba(24, 14, 42, 0.92), rgba(8, 10, 18, 0.98));
}
.fallback-portrait::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            110deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 35%,
            rgba(255, 255, 255, 0.16) 50%,
            rgba(255, 255, 255, 0.05) 65%,
            transparent 100%
        );
    transform: translateX(-100%);
    animation: card-placeholder-shimmer 1.8s ease-in-out infinite;
}
.fallback-portrait::after {
    content: "ANICARD";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(10, 12, 22, 0.42);
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 0 18px rgba(139, 61, 255, 0.12);
    backdrop-filter: blur(3px);
}
@keyframes card-placeholder-shimmer {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}
.game-card__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 0;
    padding: 12px 8px 14px;
    pointer-events: none;
}

/* Цена */
.card-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(9, 10, 22, 0.34);
    color: #d8daf0;
    font-size: clamp(18px, 5.3vw, 24px);
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}
.card-price strong {
    color: #f6f7ff;
    letter-spacing: -0.02em;
}
.small-coin {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.85), transparent 18%),
        linear-gradient(180deg, #7b8dff, #3544d8 58%, #2432a8);
    border: 2px solid rgba(198, 210, 255, 0.88);
    color: #fff;
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 0 9px rgba(83, 103, 255, 0.68);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}
.small-coin--tiny {
    width: 17px;
    height: 17px;
    border-width: 1.5px;
    font-size: 10px;
}

@media (max-width: 374px) {
    .cards-grid-break {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .game-card {
        border-radius: 10px;
    }

    .card-price {
        font-size: 18px;
        padding: 3px 7px;
    }
}

@media (min-width: 700px) {
    .cards-grid-break {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}
@media (max-width: 699px) and (min-width: 0px){
    .cards-grid-break {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .card-price {
        font-size: clamp(12px, 2vw, 22px);
    }
}

@media (min-width: 960px) {
    .cards-grid-break {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
    }

    .card-price {
        font-size: 22px;
    }
}
/*** cards ***/


/*** loader ***/
.load-more-button {
	display: block;
	width: 100%;
	margin-top: 12px;
	padding: 14px 16px;
	border: 1px solid rgba(255, 150, 64, 0.45);
	border-radius: 14px;
	background: rgba(255, 150, 64, 0.12);
	color: #ffd9b0;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.load-more-button:hover:not(:disabled) {
	background: rgba(255, 150, 64, 0.2);
	border-color: rgba(255, 150, 64, 0.75);
}
.load-more-button:disabled {
	cursor: wait;
	opacity: 0.7;
}
.load-more-button[hidden] {
	display: none;
}

.cards-loader {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 80px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 14px;
}
.cards-loader[hidden] {
	display: none;
}
.cards-loader__spinner {
	width: 22px;
	height: 22px;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-top-color: rgba(255, 150, 64, 0.95);
	border-radius: 50%;
	animation: cards-loader-spin 0.75s linear infinite;
}
@keyframes cards-loader-spin {
	to {
		transform: rotate(360deg);
	}
}
.tune-button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
	pointer-events: none;
}
/*** loader ***/

/*** modals ***/
.exchange-bar__cards span {
	display: block;
	width: 34px;
	height: 46px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	border: 1px solid rgba(255, 255, 255, 0.12);
}
.exchange-bar__cards span.is-filled {
	border-color: rgba(255, 150, 64, 0.85);
	box-shadow: 0 0 14px rgba(255, 150, 64, 0.25);
}
.exchange-button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}
.exchange-modal[hidden] {
	display: none;
}
.exchange-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.exchange-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.68);
	backdrop-filter: blur(8px);
}
.exchange-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(420px, 100%);
	padding: 22px;
	border-radius: 24px;
	background: rgba(21, 21, 28, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
	color: #fff;
}
.exchange-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}
.exchange-modal__title {
	margin: 0 34px 12px 0;
	font-size: 20px;
	font-weight: 800;
}
.exchange-modal__message {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.82);
	line-height: 1.45;
}
.exchange-modal__cards {
	margin: 0 0 16px;
	padding: 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.06);
}
.exchange-modal__cards p {
	margin: 0 0 8px;
	color: rgba(255, 255, 255, 0.68);
	font-size: 13px;
}
.exchange-modal__cards ul {
	margin: 0;
	padding-left: 18px;
	max-height: 150px;
	overflow: auto;
}
.exchange-modal__cards li {
	margin: 4px 0;
}
.exchange-modal__total {
	margin: 0 0 18px;
	font-size: 16px;
}
.exchange-modal__actions {
	display: flex;
	gap: 10px;
}
.exchange-modal__button {
	flex: 1;
	min-height: 42px;
	border: 0;
	border-radius: 14px;
	font-weight: 700;
	cursor: pointer;
}
.exchange-modal__button--ghost {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}
.exchange-modal__button--primary {
	background: linear-gradient(135deg, #ff8a3d, #ffb347);
	color: #1d1208;
}
body.is-exchange-modal-open {
	overflow: hidden;
}


.exchange-modal.is-busy .exchange-modal__backdrop,
.exchange-modal.is-busy .exchange-modal__close,
.exchange-modal.is-busy [data-exchange-modal-close] {
	pointer-events: none;
}
.exchange-modal__loader {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
}
.exchange-modal__loader[hidden] {
	display: none;
}
.exchange-modal__spinner {
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-top-color: rgba(255, 150, 64, 0.95);
	border-radius: 50%;
	animation: exchange-modal-spin 0.75s linear infinite;
}
@keyframes exchange-modal-spin {
	to {
		transform: rotate(360deg);
	}
}
.exchange-modal__error {
	margin: 14px 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(255, 70, 70, 0.12);
	border: 1px solid rgba(255, 70, 70, 0.28);
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	line-height: 1.45;
}
.exchange-modal__error[hidden] {
	display: none;
}
.exchange-modal__error p {
	margin: 0 0 8px;
}
.exchange-modal__error p:last-child {
	margin-bottom: 0;
}
.exchange-modal__error ul {
	margin: 6px 0 10px;
	padding-left: 18px;
}
.exchange-modal__button:disabled,
.exchange-modal__close:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}
/*** modals ***/


/*** pagination ***/
.cards-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 10px 14px;
    border-top: 1px solid rgba(117, 128, 157, 0.14);
}

.cards-pagination[hidden] {
    display: none;
}

.cards-pagination__button {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 106, 18, 0.28);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 106, 18, 0.08), rgba(255, 106, 18, 0.02)),
        rgba(9, 12, 22, 0.88);
    color: #ffd9b0;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.cards-pagination__button:hover:not(:disabled):not(.is-active) {
    transform: translateY(-1px);
    border-color: rgba(255, 150, 64, 0.72);
    background: rgba(255, 150, 64, 0.14);
    box-shadow: 0 0 14px rgba(255, 106, 18, 0.16);
}

.cards-pagination__button.is-active {
    color: #fff;
    border-color: rgba(255, 106, 18, 0.9);
    background: linear-gradient(180deg, #ff8c19, #ff4b0b);
    box-shadow:
        0 0 18px rgba(255, 106, 18, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    cursor: default;
}

.cards-pagination__button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.cards-pagination__button--arrow {
    min-width: 44px;
    font-size: 22px;
    line-height: 1;
}

.cards-pagination__dots {
    min-width: 24px;
    color: var(--muted, #a3a5b5);
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

@media (max-width: 500px) {
    .cards-pagination {
        gap: 6px;
        padding: 10px 8px 12px;
    }

    .cards-pagination__button {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        border-radius: 10px;
        font-size: 13px;
    }

    .cards-pagination__button--arrow {
        min-width: 38px;
        font-size: 20px;
    }
}
/*** pagination ***/

.card-owner-button {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 6;
	display: grid;
	place-items: center;
	width: 25px;
	height: 25px;
	padding: 0;
	border: 1.5px solid rgba(214, 218, 240, 0.62);
	border-radius: 50%;
	background: white;
	box-shadow:
		inset 0 0 12px rgba(255, 255, 255, 0.03),
		0 4px 12px rgba(0, 0, 0, 0.28);
	color: #f6f7ff;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur(4px);
	transition:
		border-color 160ms ease,
		background 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease;
}

.card-owner-button:focus-visible {
	outline: 2px solid rgba(255, 140, 25, 0.8);
	outline-offset: 2px;
}

.card-owner-popover {
	position: absolute;
	top: 36px;
	right: 8px;
	z-index: 8;
	min-width: 130px;
	max-width: calc(100% - 16px);
	padding: 8px 10px;
	border: 1px solid rgba(255, 106, 18, 0.42);
	border-radius: 10px;
	background: rgba(9, 10, 22, 0.92);
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.38),
		0 0 16px rgba(255, 106, 18, 0.18);
	color: #f6f7ff;
	text-align: right;
	backdrop-filter: blur(8px);
}

.card-owner-popover[hidden] {
	display: none;
}

.card-owner-popover::before {
	content: "";
	position: absolute;
	top: -5px;
	right: 8px;
	width: 9px;
	height: 9px;
	border-left: 1px solid rgba(255, 106, 18, 0.42);
	border-top: 1px solid rgba(255, 106, 18, 0.42);
	background: rgba(9, 10, 22, 0.92);
	transform: rotate(45deg);
}

.card-owner-popover__label {
	display: block;
	margin-bottom: 2px;
	color: rgba(246, 247, 255, 0.62);
	font-size: 9px;
	font-weight: 800;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.card-owner-popover__name {
	display: block;
	overflow: hidden;
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 699px) {
	.card-owner-popover {
		top: 8px;
		left: 8px;
		right: 36px;
		min-width: 0;
		max-width: none;
		padding: 5px 7px;
		border-radius: 8px;
		text-align: left;
    }
    .card-owner-button{
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
	.card-owner-popover::before {
		top: 7px;
		right: -5px;
		border-top: 1px solid rgba(255, 106, 18, 0.42);
		border-right: 1px solid rgba(255, 106, 18, 0.42);
		border-left: 0;
		transform: rotate(45deg);
	}

	.card-owner-popover__label {
		display: none;
	}

	.card-owner-popover__name {
		font-size: 10px;
		line-height: 1.1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}