:root { --bf-footer-h: clamp(40px, 5vh, 42px); }
.card-error-bf {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 600;
    color: #ff6b6b;
    padding-top: 0.5vh;
    margin: auto;
    text-align: center;
    display: none;
}

.card-footer.hidden {
    display: none;
}

.card-error-bf.active {
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding-top: 0.5vh;
    margin: auto;
    z-index: 9999 !important;
    position: relative !important;
    min-height: var(--bf-footer-h);
}

.card--regular.cyan > .texture {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
        mix-blend-mode: lighten;
        opacity: 0.9;
        z-index: 0; /* below content, above gradient */
        border-radius: 20px;
    }

.card--regular.cyan .card-content {
        position: relative;
        z-index: 1;
    }

.card {
    font-family: var(--main-font);
    position: relative;
    border-radius: 20px;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1;
}
.card::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -8px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(147, 154, 187, 0.00) 0%, #939ABB 47.5%, rgba(147, 154, 187, 0.00) 97.81%);
    box-shadow: 0 6px 12px rgba(0,0,0,0.35);
    z-index: -1;
}

.card--ultra::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -8px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(
            90deg,
            rgba(119, 139, 253, 0) 0%,
            rgb(255, 169, 3) 47.5%,
            rgba(119, 139, 253, 0) 97.81%
    );
    box-shadow: 0 6px 12px rgba(119, 139, 253, 0.5);
    z-index: -1;
}

.card-image img {
    image-rendering: smooth;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.card-title {
    text-align: center;
    font-family: var(--main-font);
    font-size: var(--card-title);
    font-weight: 800;
    background: linear-gradient(270deg, #EDE2C1 0%, #EECC96 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.card-description {
    font-size: var(--card-description);
    color: white;
    margin: 0;
    font-weight: 500;
}

.card-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}
.card-price {
    font-size: clamp(20px, 2vw, 22px);
    font-weight: 700;
    color: #ffffff;
}

.card-check {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.card.disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
    cursor: not-allowed;
    transform: none !important;
    transition: all 0.2s ease;
}

.card:hover:not(.disabled) {
    transform: scale(1.01);
    filter: brightness(1.2);
    cursor: pointer;
}

.card { cursor: default; }

.card:hover:not(.disabled) {
    transform: scale(1.01);
    filter: brightness(1.2);
    cursor: default;
}

.card .confirm-btn,
.card .card-check,
.card .card-check button { cursor: pointer; }

.scroll-arrow,
.pagination-bf {
    display: none;
}

@media (orientation: landscape) {
    #block-wrapper { --cards-gap: clamp(1vw, 1.6vh, 1.8vw); }
    .scroll-container { --arrows-space: clamp(24px, 4vw, 48px); }
    html, body {
        overflow-y: hidden;
        height: 100dvh;
        max-height: 100dvh;
    }
    .scroll-arrow,
    .pagination-bf {
        display: flex;
    }

    .scroll-container {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 95vw;
        padding: 0;
        max-height: calc(100dvh - var(--bet-wrapper-height));
        overflow-y: auto;
    }

    .scroll {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 0;
        padding: 0;
        margin-inline: var(--arrows-space);
        max-width: min(96vw, 1000px);
        scrollbar-width: none;
        overflow-y: hidden;
    }

    #block-wrapper {
        display: flex;
        align-items: stretch;

        max-height: 100%;
        flex-direction: row;
        gap: var(--cards-gap);
        justify-content: flex-start;
        overflow-x: auto;
        box-sizing: border-box;
        margin: 0 auto;
        width: 100%;
        min-width: 100%;
        padding: clamp(1vh, 2vh, 2.5vh) 0;
        padding-top: clamp(1vh, 3vh, 5vh);
        scrollbar-width: none;

        scroll-padding-inline: clamp(24px, 5vw, 40px);

        overflow-y: hidden;
    }

    .card {
        flex: 0 0 auto;

        width: calc((100% - 2 * var(--cards-gap)) / 3);
        height: auto;
        align-self: stretch;
        margin-bottom: clamp(0.3vh, 0.8vh, 1vh);
        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        border-radius: 20px;
        box-shadow: 0px 1.57514px 1.57514px rgba(0, 0, 0, 0.8);
        box-sizing: border-box;
    }

    .card--ultra {
        height: auto;
        align-self: stretch;
        z-index: 1;
        border-radius: 20px;
        /*ТУТ МІНЯТИ КОЛІР*/
        background: radial-gradient(circle at top center,
        rgba(124, 12, 72, 0.4) 0%,
        rgba(60, 44, 91, 0.4) 100%
        );
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        border: 1.5px solid #ffa903;

        box-shadow:
                0 4px 20px rgba(0, 0, 0, 0.3),
                inset 0 0 8px rgba(255, 255, 255, 0.05);
    }
    .card--ultra .card-badge {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 4px 0;
        z-index: 3;
        font-family: var(--main-font);
        text-transform: uppercase;
    }

    .card--regular.green {
        background: linear-gradient(180deg, #287401 0%, #274B29 27.88%, #262D46 58.18%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
        /*background-color: #4C5278;*/
        height: inherit;
        border-radius: 15px;
        z-index: 1;
    }

    .card--regular.blue {
        background: linear-gradient(180deg, #2754C3 5.52%, #2754C3 8.55%, #274083 30.52%, #262D46 61.57%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
        height: inherit;
        border-radius: 15px;
        z-index: 1;
    }

    .card--regular.violet {
        background: linear-gradient(180deg, #6B009E 5.91%, #411466 37.99%, #262D46 67.27%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
        height: inherit;
        border-radius: 15px;
        z-index: 1;
    }

    .card--regular.red {
        background: linear-gradient(180deg, #B61201 0%, #701F23 33.55%, #262D46 85.05%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
        height: inherit;
        border-radius: 15px;
        z-index: 1;
        position: relative;
    }

    .card--regular.cyan {
        background: linear-gradient(180deg, #075763 0%, #6139c2 45%, #262D46 85.05%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
        height: inherit;
        border-radius: 15px;
        z-index: 1;
    }

    .card--regular .card-badge {
        visibility: hidden;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: #A9B4D2;
        color: #51587A;
        font-weight: 700;
        text-align: center;
        font-size: clamp(12px, 2vw, 14px);
        padding: 4px 0;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        z-index: 3;
        font-family: var(--main-font);
        text-transform: uppercase;
    }

    .card-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(0.5vh, calc(1vh + 1vw), 2vh);
        text-align: justify;
        justify-content: space-between;
        flex-grow: 1;
        height: 100%;
        min-height: 0;
    }

    .card-main {
        /*flex-grow: 1;*/
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
        /*height: 100%;*/
        padding-inline: clamp(0.5vw, 1vw, 1.5vw);
        min-height: 0;
    }

    .card-title {
        font-size: clamp(13px, 1.2vw + 1vh, 18px);
        text-align: center;
        line-height: 1.1;
        display: flex;
        justify-content: center;
        margin: 0 0 4px clamp(20px, 3vw, 40px);
        padding-right: clamp(18px, 2.5vw, 32px);
        min-height: clamp(1.5em, 1.8em, 2em);
        align-items: flex-start;
    }

    .card-title,
    .card-footer { flex: 0 0 auto; }

    .card-icon {
        position: absolute;
        top: clamp(8px, 1vh, 10px);
        left: clamp(8px, 1vh, 10px);
        width: clamp(18px, 3.2vw, 40px);
        height: clamp(18px, 3.2vw, 40px);
        transition: transform 0.2s ease, filter 0.2s ease;
        z-index: 5;
    }

    .card-description {
        font-size: clamp(14px, 1.8vw, 18px);
        text-align: left;
        padding: 0 1.5%;
        margin-top: 1%;
        line-height: 1.3;
        flex: 1 1 auto;
        min-height: 0;
        justify-content: center;
        align-items: flex-start;
        display: block;
    }

    /*.card-image {*/
    /*    flex: 0 0 clamp(10vh, 15vh, 17vh);*/
    /*    min-height: clamp(10vh, 15vh, 17vh);*/
    /*    max-height: clamp(10vh, 20vh, 25vh);*/
    /*    display: flex;*/
    /*    align-items: center;*/
    /*    justify-content: center;*/
    /*    overflow: visible;*/
    /*}*/

    .card-image img {
        image-rendering: smooth;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .card-footer {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        margin-top: auto;
        /*padding-top: clamp(6px, 1vh, 12px);*/
    }

    .card-price {
        font-size: clamp(14px, 2.5vw, 22px);
    }

    .card-check img {
        image-rendering: smooth;
        width: auto;
        height: clamp(2rem, 5vw, 3.5rem);
    }

    .scroll::-webkit-scrollbar {
        display: none;
    }

    .scroll {
        scrollbar-width: none;
    }

    .scroll-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10;

        width: clamp(20px, 4vw, 32px);
        height: clamp(32px, 6vh, 48px);
        padding: 0;

        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .scroll-arrow.left {
        left: 0;
    }

    .scroll-arrow.right {
        right: 0;
    }

    .scroll-arrow.disabled {
        opacity: 0.3;
        pointer-events: none;
    }

    .pagination-bf {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: clamp(0.4vw, 0.8vw, 1.2vw);
        margin-bottom: clamp(1vh, 2vh, 2.5vh);
        z-index: 10;
        position: relative;
    }

    .dot {
        width: clamp(6px, 1.2vw, 10px);
        height: clamp(6px, 1.2vw, 10px);
        background: white;
        border-radius: 50%;
        opacity: 0.3;
        transition: all 0.2s ease;
    }

    .dot.active {
        opacity: 1;
        background: white;
    }

    /* BOOST CARD - VISIBLE IMAGE */
    .buy.card .card-image {
        position: relative;
        pointer-events: none;
        height: auto;
    }

    .buy.card .hidden-img {
        visibility: hidden;
    }

    .buy.card .pulse-img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1);
        z-index: -5;
        object-fit: contain;
        pointer-events: none;
        animation: pulse 4s infinite ease-in-out;
        box-shadow: none !important;
        filter: none !important;
        text-shadow: none !important;
        drop-shadow: none !important;
        width: clamp(65%, 22vw, 85%);
        max-width: 90%;
        max-height: 100%;
        height: auto;
    }

    @keyframes pulse {
        0%, 100% {
            transform: translate(-50%, -50%) scale(1.3);
        }
        50% {
            transform: translate(-50%, -50%) scale(1.4);
        }
    }

    @keyframes pulse-compact {
        0%, 100% {
            transform: translate(-50%, -50%) scale(1.55);
        }
        50% {
            transform: translate(-50%, -50%) scale(1.7);
        }
    }
}

/*  scroll  */

    .card-fill {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    @media (orientation: landscape) {
        /*.buy.card.card--regular.cyan .card-image {*/
        /*    width: clamp(80px, 10vw, 100px);*/
        /*}*/
        .buy.card.card--regular.cyan .card-fill {
            margin-top: auto;
            margin-bottom: auto;
        }
    }

@media screen and (orientation: landscape) and (max-height: 430px) {
    .card {
        max-width: 48%;
        height: auto;
        padding: 8px;
    }

    .card--ultra .card-badge,
    .card--regular .card-badge {
        font-size: clamp(10px, 1.6vw, 12px);
        padding: 2px 0;
        letter-spacing: 0.15em;
    }

    .card-image {
        max-height: clamp(8vh, 15vh, 20vh);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .card-check img {
        image-rendering: smooth;
        width: auto;
        height: clamp(35px, 5vh, 36px);
    }

    .card-footer {
        align-items: end;
    }

    .card-description {
        font-size: clamp(12px, 1.5vw, 14px);
        display: inline-table;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: scroll;
        text-overflow: ellipsis;
        line-height: 1.2;
        height: calc(1.3em * 3);
    }

    .buy.card .pulse-img {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: -2;
        object-fit: contain;
        pointer-events: none;
        animation: pulse-compact 4s infinite ease-in-out;
        width: clamp(78%, 30vw, 120%);
        max-width: 110%;
        height: auto;
    }

    .pagination-bf {
        margin-top: -1%;
        margin-bottom: 2%;
        gap: clamp(0.3vw, 1vw, 0.6vw);
        position: relative;
        z-index: 10;
        transform: translateY(1.5vh);
    }

    .dot {
        width: clamp(6px, 1.2vw, 6px);
        height: clamp(6px, 1.2vw, 6px);
        background: white;
        border-radius: 50%;
        opacity: 0.3;
    }

    .dot.active {
        opacity: 1;
        background: white;
    }
}

@media screen and (orientation: landscape) and (max-height: 450px) {
    .card {
        max-height: calc(100dvh - clamp(20vh, 28vh, 34vh));
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .card-price {
        font-size: clamp(14px, 2vw, 20px);
    }

    .card-description {
        overflow-y: auto;
        text-overflow: ellipsis;

        display: block;
        line-height: 1.2;

        padding-right: 4px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.2) transparent;
    }

    .card-footer {
        align-items: end;
    }

    .buy.card .pulse-img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1.6);
        z-index: -2;
        object-fit: contain;
        pointer-events: none;
        animation: pulse-compact 4s infinite ease-in-out;
        width: clamp(78%, 30vw, 120%);
        max-width: 110%;
        height: auto;
    }
}

@media screen and (max-height: 280px) and (orientation: landscape) {
    .card {
        padding: 8px;
        max-height: 100dvh;
    }

    /*.card-image {*/
    /*    display: none;*/
    /*}*/

    /*.buy.card .pulse-img {*/
    /*    display: none;*/
    /*}*/

    .card-description {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: scroll;
        text-overflow: ellipsis;

        line-height: 1.2;
        height: calc(1.3em * 2);
    }

    card-footer {
        align-items: end;
    }
}

@media (orientation: landscape) {
    .bet-control-wrapper-bf {
        grid-area: bet;
        align-self: end;
        justify-self: center;

        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
    }
    .balance-bf {
        position: unset !important;
        margin-top: 0;
        margin-bottom: 2vh;
        font-size: clamp(0.7rem, calc(1.5vw + 0.8vh), 1.1rem) !important;
    }
    .bet-control-wrapper-bf {
        position: unset !important;
    }
}


/* region PORTRAIT */
@media (orientation: portrait) {
    .card-content.landscape {
        display: none;
    }

    #block-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
        padding-top: 15px;
        padding-bottom: 15%;
        max-width: 100%;
    }

    .card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: auto;
        min-height: 180px;
        padding: 10px;
        width: 100%;
        max-width: clamp(280px, 85vw, 360px);
    }

    .card--ultra {
        height: auto;
        max-height: calc(100dvh - clamp(22vh, 27vh, 33vh));
        z-index: 2;
        border-radius: 20px;

        background: radial-gradient(circle at top center,
        rgba(124, 12, 72, 0.4) 0%,
        rgba(60, 44, 91, 0.4) 100%
        );
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        border: 1.5px solid #ffa903;

        box-shadow:
                0 4px 20px rgba(0, 0, 0, 0.3),
                inset 0 0 8px rgba(255, 255, 255, 0.05);
    }

    /* REGULAR CARD */
    .card--regular {
        height: auto;
        border-radius: 20px;
        z-index: 1;
    }

    .card--regular.green {
        background: linear-gradient(180deg, #287401 0%, #274B29 27.88%, #262D46 58.18%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
    }

    .card--regular.blue {
        background: linear-gradient(180deg, #2754C3 5.52%, #2754C3 8.55%, #274083 30.52%, #262D46 61.57%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
    }

    .card--regular.violet {
        background: linear-gradient(180deg, #6B009E 5.91%, #411466 37.99%, #262D46 67.27%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
    }

    .card--regular.red {
        background: linear-gradient(180deg, #B61201 0%, #701F23 33.55%, #262D46 85.05%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
    }
    .card--regular.cyan {
        background: linear-gradient(180deg, #075763 0%, #6139c2 45%, #262D46 85.05%);
        box-shadow: 0 1px 3px 0 rgba(255, 255, 255, 0.50) inset, 0 4px 4px 0 rgba(0, 0, 0, 0.80);
    }

    .card,
    .card--ultra,
    .card--regular {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: auto;
        border-radius: 20px;
        overflow: hidden;
        box-sizing: border-box;
    }

    .card-content {
        height: 100%;
        align-items: center;
        flex: 1;
    }

    .card-title {
        margin-bottom: 4px;
        margin-top: 0;
        text-align: center;
        grid-column: 2;
        z-index: 5;
    }

    .card-icon {
        position: absolute;
        top: 10px;
        left: 10px;
        width: clamp(18px, 3.5vh, 40px);
        height: clamp(18px, 3.5vh, 40px);
        z-index: 5;
    }

    .card-image {
        margin-top: 8%;
        margin-bottom: 5%;
        justify-content: center;
        width:100%;
        align-self: center;
        box-sizing: border-box;
        position: relative;
        transform: scale(1.6);
    }

    .card-image img {
        image-rendering: smooth;
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

    .card-main {
        display: flex;
        width: 100%;
        flex-wrap: nowrap;
        min-width: 0;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        position: relative;
        z-index: 1;
    }

    .card-description {
        display: block;
        font-size: clamp(0.9rem, 1.5vw, 1rem);
        height: auto;
        position: relative;
        z-index: 2;
        font-weight: 500;
    }

    .buy.card .hidden-img {
        visibility: hidden;
        width: clamp(100px, 20vw, 140px);
        height: auto;
    }

    .buy.card .pulse-img {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        width: 90%;
        max-width: 90%;
        height: auto;
        pointer-events: none;
        object-fit: contain;
        animation: pulse-portrait 4s infinite ease-in-out;
        z-index: -5;
    }

    @keyframes pulse-portrait {
        0%, 100% {
            transform: scale(1.2);
        }
        50% {
            transform: scale(1.3);
        }
    }

    .card.card--regular.cyan .pulse-img {
        width: 70%;
        max-width: 70%;
        animation: pulse-portrait-2 4s infinite ease-in-out;
    }
    .card.card--regular.cyan .card-title {
        position: relative;
        z-index: 10;
    }

    @keyframes pulse-portrait-2 {
        0%, 100% {
            transform: scale(0.9);
        }
        50% {
            transform: scale(1);
        }
    }

    .card.card--regular.cyan .card-content {
        /*display: grid;*/
        height: auto;
        grid-template-columns: auto 1fr;
        gap: 8px;
        align-items: center;
        flex: 1;
    }

    .card.card--regular.cyan .card-image {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        width: clamp(100px, 20vw, 140px);
        align-self: center;
        box-sizing: border-box;
        position: relative;
        transform: translateY(calc(-15% - ((100% - 200px) / 100 * 0.1)));
        z-index: -5;
    }

    .card.card--regular.cyan .pulse-img {
        left: -12%;
        right: 0;
        max-width: none;
        max-height: none;
        width: min(125%, clamp(180px, 42vw, 280px));
        height: auto;
        animation: pulse-portrait-2 4s infinite ease-in-out;
    }

    .card-text {
        margin-bottom: 5%;
        padding-right: 1%;
    }

    .card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        flex-wrap: nowrap;
        min-width: 0;
        position: relative;
        z-index: 2;
    }

    .card-price {
        display: block;
        font-size: clamp(1rem, 5vw, 1.6rem);
        font-weight: 700;
        color: #ffffff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 1;
        min-width: 0;
    }

    .scroll-container {
        position: relative;
        width: 100%;
        height: calc(100dvh - 30vh);
        overflow: hidden;
        box-sizing: border-box;
        justify-content: center;
        padding-left: 8px;
        padding-right: 0;
    }

    .scroll {
        height: 100%;
        overflow-y: auto;
        box-sizing: content-box;
        padding-right: 10px;
        scrollbar-width: thin;
        scrollbar-color: #ffffff80 transparent;

        -webkit-mask-image: -webkit-linear-gradient(top, rgba(0,0,0,1) 88%, rgba(0,0,0,0));
        mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 88%, rgba(0,0,0,0));
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
    }

    .scroll::-webkit-scrollbar {
        width: 8px;
        right: 0;
    }

    .scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .scroll::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.4);
        transition: background 0.3s ease;
    }

    .scroll::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.6);
    }

    .bet-control-wrapper-bf {
        bottom: 0.3vh;
    }

    .balance-bf {
        position: unset !important;
        margin-top: 0;
        margin-bottom: 2vh;
    }
}
/* endregion */

.popup-box, .popup-text {
    font-family: "Noto Sans", sans-serif !important;
}

.popup-btn.confirm {
    font-family: "Noto Sans", sans-serif !important;
}

.popup-btn.cancel {
    font-family: "Noto Sans", sans-serif !important;
}


@media (orientation: landscape) and (max-height: 500px) and (max-width: 1400px) {
        .bet-control-wrapper-bf {
            transform: scale(0.7) !important;
            transform-origin: bottom center;
        }
    }

@media (orientation: landscape) and (max-height: 300px) {
    .bet-control-wrapper-bf {
            transform: scale(0.65) !important;
            transform-origin: bottom center;
    }
}

@media (orientation: landscape) and (max-height: 280px) {
        .title-container {
            transform: scale(0.8) !important;
        }
        #buy-close {
            transform: scale(0.8) !important;
        }
        .scroll-container {
            transform: scale(0.95) !important;
        }
        .card-check {
            transform: scale(0.85) !important;
        }
        .card {
            transform: scale(0.85) !important;
        }
    }

/* region PORTRAIT Not enough balance */
@media (orientation: portrait) {

    :root { --bf-footer-h: clamp(40px, 5vh, 42px); }

    .card-footer {
        margin-top: auto;
        min-height: var(--bf-footer-h);
        align-items: center;
    }

    .card-footer.hidden { display: none; }
    .card-error-bf { display: none; }

    .card-error-bf.active {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        margin-top: auto;
        min-height: var(--bf-footer-h);
        width: 100%;
        text-align: left;
        color: #ff6b6b;
        z-index: 9999 !important;
        position: relative !important;
    }
}
/* endregion */

/* region LEGACY FALLBACK (iOS 14.x / older WebViews) */
@supports not (height: 1dvh) {
    /* plus/minus buttons */
    .bet-btn {
        width: var(--btn-size, 44px) !important;
        height: var(--btn-size, 44px) !important;
    }
    .bet-btn,
    .bet-btn .disc,
    .bet-btn .ring {
        border-radius: var(--btn-radius, 999px) !important;
    }
    .bet-btn,
    .bet-btn .symbol {
        filter: none !important;
    }
    #button-minus-bf,
    #button-plus-bf {
        cursor: default !important;
    }
    @media (orientation: portrait) {
        #featurebuy-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(1, 2, 16, 0.50);
            /*backdrop-filter: blur(clamp(5px, 2vh, 20px));*/
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding-top: clamp(1vh, 2vh, 7vh);
            /*box-sizing: border-box;*/
            overflow-y: auto;
            overflow-x: hidden;
            opacity: 1;
            transition: opacity 0.3s ease;
            z-index: 1000;
        }

        #featurebuy-overlay::after {
            content: "";
            position: fixed; /* щоб не залежати від scroll контейнера */
            left: 0;
            right: 0;
            bottom: 0;
            top: auto !important; /* на всяк випадок */
            height: 390px;
            pointer-events: none;

            /* ТЕМНО ВНИЗУ, прозоро вгору */
            background: linear-gradient(
                    to top,
                    rgba(1, 2, 16, 100) 0%,
                    rgba(1, 2, 16, 0.85) 50%,
                    rgba(1, 2, 16, 0) 100%
            );
        }

        /* бет-контрол поверх фейду (у тебе реальний клас саме цей) */
        .bet-control-wrapper-bf {
            position: relative;
            z-index: 1002;
        }

        /* 1) Бет-контролер прибити до низу overlay */
        .bet-control-wrapper-bf {
            position: sticky !important;
            bottom: 140px;
            left: 0;
            right: 0;

            /* щоб його не ховав скрол-контент */
            margin-top: auto !important;

            z-index: 1010 !important;
        }

        /* 2) якщо всередині є обгортка кнопок — піднімаємо і її */
        .bet-control-wrapper-bf * {
            position: relative;
            z-index: 1003;
        }
    }
    @media (orientation: landscape) {
        /* title (card-title) — щоб не був прозорий на iOS14 */
        .card-title{
            color: #EDE2C1 !important;
            background: none !important;
            -webkit-text-fill-color: initial !important;
            -webkit-background-clip: initial !important;
        }
    }
    .bet-label-bf {
        margin-bottom: -1px;
    }
}
/* endregion */