@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700;800;900&display=swap');
:root {
    --main-font: 'Noto Sans', sans-serif;
    --bf-title-font: clamp(11px, calc(2vw + 2vh), 32px);
    --adaptive-font: clamp(16px, calc(1.5vw + 0.5vh), 26px);
    --card-title: clamp(14px, 1.6vw + 1.2vh, 20px);
    --card-description: clamp(0.8rem, 1.3vw + 0.8vh, 16px);
    --card-price: clamp(16px, 1.8vw + 1.4vh, 22px);
    --bet-wrapper-height: clamp(13vh, 17vh, 18vh);
}

html, body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    height: 100%;
}

.scroll-container {
    max-height: calc(100vh - var(--bet-wrapper-height));
    overflow-y: auto;
}

img, svg {
    shape-rendering: geometricPrecision;
    image-rendering: smooth;
}
svg {
    shape-rendering: geometricPrecision;
    text-rendering: geometricPrecision;
    image-rendering: smooth;
}

img {
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
}

/* ---- LANDSCAPE Not enough balance ---- */
: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 ;
    justify-content: center;
    align-items: center;
    padding-top: 0.5vh;
    margin: auto;
    z-index: 9999;
    position: relative ;
    min-height: var(--bf-footer-h);
}

/* ---- PORTRAIT Not enough balance ---- */
@media (orientation: portrait) {
    .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;
        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 ;
        position: relative ;
    }
}

#featurebuy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    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::before{
    content:"";
    position: fixed;
    inset: 0;
    /*background: rgba(1, 2, 16, 0.50);*/
    background: rgb(0 0 0 / 0.001);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

#featurebuy-overlay::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background: transparent;
    z-index: 0;
}

@supports (height: 100lvh) {
    height: 100lvh;
}

.title-container {
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.title {
    font-family: var(--main-font);
    font-size: var(--bf-title-font);
    color: #FFCB02;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
    margin: 0;
}

.title-underline {
    width: clamp(300px, 50vw, 800px);
    height: clamp(2px, calc(0.5vw + 0.5vh), 3px);
    background: linear-gradient(90deg, rgba(147, 154, 187, 0.00) 0%, #E03B2A 47.5%, rgba(147, 154, 187, 0.00) 97.81%);
    margin-top: 1%;
}

@media (orientation: portrait) {
    .title-underline {
        height: 2px;
    }
}

/* region BUTTON BUY CLOSE */
#buy-close {
    --size: 25px;
    width: var(--size);
    height: var(--size);
    position: absolute;
    top: clamp(3vh, calc(2vw + 2vh), 4vh);
    right: clamp(2vw, calc(3vw + 3vh), 5vw);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}
/* endregion */

.balance-amount,
.balance-bf {
    text-transform: uppercase;
}

@media (orientation: landscape) {
    /* BET Section */
    .balance-bf {
        position: relative;
        bottom: max(env(safe-area-inset-bottom), 0.5vh);
        font-size: clamp(0.5rem, 1.2rem, 1.3rem);
        font-weight: 600;
        color: white;
        text-align: center;
        font-family: var(--main-font);
        margin-top: 1vh;
        z-index: 1002;
        width: 100%;
    }

    .bet-control-wrapper-bf {
        min-height: var(--bet-wrapper-height);
        font-family: var(--main-font);
        position: fixed;
        inset-inline: 0;
        bottom: calc((clamp(13vh, 17vh, 18vh) / 2) - 0.9em);
        left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        z-index: 1001;
    }

    .bet-label-bf {
        font-family: var(--main-font);
        font-size: clamp(14px, 2vw, 16px);
        font-weight: 500;
        display: flex;
        color: white;
        align-items: center;
        justify-content: center;
        margin-bottom: -12px;
    }

    .bet-control-bf {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 5px;
    }

    #button-minus-bf,
    #button-plus-bf {
        /*width: clamp(30px, 10vw, 60px);*/
        /*height: clamp(30px, 10vw, 60px);*/
        border-radius: 50%;
        transition: transform 0.1s ease;
        flex-shrink: 0;
        cursor: pointer;
        clip-path: circle(50%);
    }

    #button-minus-bf:active,
    #button-plus-bf:active {
        transform: scale(0.9);
        cursor: pointer;
        clip-path: circle(50%);
        transition: transform 0.1s ease;
    }

    /*#button-minus-bf:hover,*/
    /*#button-plus-bf:hover,*/
    /*.card-check:hover {*/
    /*    pointer-events: auto;*/
    /*    transform: scale(1.05);*/
    /*    filter: brightness(1.15);*/
    /*    cursor: pointer;*/
    /*}*/
    #button-minus-bf:disabled,
    #button-minus-bf:disabled:hover,
    #button-plus-bf:disabled,
    #button-plus-bf:disabled:hover,
    .card-check:disabled,
    .card-check:disabled:hover {
        pointer-events: none;
        transform: none !important;
        filter: none !important;
        cursor: default;
    }

    .bet-value-bf {
        width: clamp(180px, 50vw, 197px);
        height: 44px;
        border-radius: 13.13px;
        background: rgba(93, 102, 143, 0.76);
        box-shadow: 0px 1.591px 1.591px 0px rgba(0, 0, 0, 0.80);
        color: white;
        font-family: var(--main-font);
        font-size: 20px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    @supports (width: 100vw) {
        @media screen and (orientation: landscape) and (max-width: 934px) {
            #block-wrapper {
                transform: scale(0.9);
                transform-origin: top center;
            }
            .bet-control-wrapper-bf {
                transform: scale(0.8);
                transform-origin: bottom center;
            }

            .bet-value-bf {
                font-size: clamp(18px, 1.3vw, 20px);
                width: clamp(140px, 45vw, 180px);
                height: clamp(36px, 4.5vh, 44px);
            }
        }
    }
}

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

@media (orientation: portrait) {
    .balance-bf {
        position: relative;
        bottom: max(env(safe-area-inset-bottom), 0.5vh);
        font-size: clamp(0.5rem, 1.2rem, 1.3rem);
        font-weight: 600;
        color: white;
        text-align: center;
        font-family: var(--main-font);
        margin-top: 1.8vh;
        z-index: 1002;
        width: 100%;
    }

    .bet-control-wrapper-bf {
        font-family: var(--main-font);
        position: fixed;
        inset-inline: 0;
        bottom: max(env(safe-area-inset-bottom), 2vh);
        /*bottom: calc((clamp(13vh, 17vh, 18vh) / 2) - 0.9em);*/
        left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        z-index: 1001;
    }

    .bet-label-bf {
        font-family: var(--main-font);
        font-size: clamp(14px, 2vw, 16px);
        font-weight: 500;
        display: flex;
        color: white;
        align-items: center;
        justify-content: center;
    }

    .bet-control-bf {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 5px;
    }

    #button-minus-bf,
    #button-plus-bf {
        width: clamp(40px, 15vw, 64px);
        height: clamp(40px, 15vw, 64px);
        border-radius: 50%;
        transition: transform 0.1s ease;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        clip-path: circle(50%);
    }

    #button-minus-bf:active,
    #button-plus-bf:active {
        transform: scale(0.9);
        cursor: pointer;
        clip-path: circle(50%);
        transition: transform 0.1s ease;
    }

    .bet-value-bf {
        width: clamp(180px, 50vw, 197px);
        height: 44px;
        border-radius: 13.13px;
        background: rgba(93, 102, 143, 0.76);
        box-shadow: 0px 1.591px 1.591px 0px rgba(0, 0, 0, 0.80);
        color: white;
        font-family: var(--main-font);
        font-size: 20px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
}

    /* region POPUP */
    .popup-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(6px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
        transition: opacity 0.3s ease;
    }

    .popup-overlay.hidden {
        display: none;
    }

    .popup-box {
        background: #1e1e2f;
        padding: clamp(16px, 4vw, 32px);
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        width: clamp(260px, 80vw, 400px);
        max-width: 90vw;
        text-align: center;
        font-family: var(--main-font);
    }

    .popup-text {
        padding-top: 8px;
        display: block;
        align-items: center;
        font-size: clamp(16px, 2vw, 20px);
        color: white;
        margin-bottom: 24px;
    }

    .popup-actions {
        display: flex;
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .popup-btn {
        padding: 10px 20px;
        border: none;
        border-radius: 12px;
        font-size: clamp(14px, 1.5vw, 18px);
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .popup-btn.confirm {
        background: #28c76f;
        color: white;
    }

    .popup-btn.cancel {
        background: #e74c3c;
        color: white;
    }

    .popup-btn:hover {
        transform: scale(1.05);
    }

    .popup-btn:active {
        transform: scale(0.95);
    }


    /* endregion */
    /*:root {*/
    /*    --r: 55.452px;*/
    /*    --btn-w: 78px;*/
    /*    --btn-h: 42px;*/
    /*}*/

    :root {
    --btn-w: clamp(60px, 20vw, 78px);
    --btn-h: clamp(40px, 5vh, 42px);
    --r: clamp(20px, 10vw, 55.452px);
}

    /* region BUTTON "Buy Confirm" */
    .confirm-btn {
        --w: var(--btn-w);
        --h: var(--btn-h);
        width: var(--w);
        height: var(--h);

        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        border: 1.5px solid #fff;
        background: radial-gradient(50% 50% at 50% 50%,
        #35F866 32%, #41497D 100%);

        box-shadow: inset 0 2px 8px -2px rgba(255, 255, 255, .95),
        inset 0 -2px 8px -2px rgba(0, 0, 0, .65),
        0 2px 2px rgba(0, 0, 0, .5);

        padding: 0;
        outline: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;

        position: relative;
        --icon-w: 42%;
    }

    .confirm-btn .tick {
        --w: calc(var(--h) * 1);
        --t: 5px;
        --angle: 45deg;
        --color: #ffffff;
        position: relative;
        width: var(--w);
        height: calc(var(--w) * 0.42);
        display: block;
        filter: drop-shadow(0 1.6px 1.6px rgba(0, 0, 0, .5));
    }

    .confirm-btn .tick::before,
    .confirm-btn .tick::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 100%;
        height: var(--t);
        background: var(--color);
        border-radius: 999px;
    }

    .confirm-btn .tick::before {
        left: 25%;
        width: 35%;
        transform-origin: right center;
        transform: translate(-5px, -3%) rotate(var(--angle));
    }

    .confirm-btn .tick::after {
        left: 27%;
        width: 70%;
        transform-origin: left center;
        transform: translate(6px, -20%) rotate(calc(-1 * var(--angle)));
    }

    .confirm-btn:active {
        transform: translateY(1px);
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, .22);
    }

    /* endregion */
    /* region BUY PLUS/MINUS BUTTONS */
    .bet-btn {
        position: relative;
        width: clamp(55px, 8dvw, 65px);
        height: clamp(55px, 8dvw, 65px);
        border: none;
        padding: 0;
        background: transparent;
        clip-path: circle(50%);
        cursor: pointer;
    }

    .bet-btn .disc {
        position: absolute;
        inset: 0;
        border-radius: var(--btn-radius);
        background: rgba(0, 0, 0, 0.3);
        box-shadow: 0 2.195px 1.646px rgba(0, 0, 0, 0.50);
        z-index: 0;
    }

    .bet-btn .ring {
        position: absolute;
        inset: 0;
        border-radius: var(--btn-radius);
        opacity: 0.9;
        background: radial-gradient(50% 50% at 50% 50%,
        rgba(255, 255, 255, 0.00) 0%,
        rgba(255, 255, 255, 0.00) 85.31%,
        rgba(255, 255, 255, 0.70) 100%);
        box-shadow: 0 2.195px 1.646px rgba(0, 0, 0, 0.50);
        pointer-events: none;
        z-index: 1;
    }

    .bet-btn .symbol {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        background: white;
        border-radius: 999px;
        filter: drop-shadow(0 2.195px 1.646px rgba(0, 0, 0, 0.50));
        z-index: 2;
    }

    .bet-btn.minus .symbol {
        width: 44%;
        height: 8%;
    }

    .bet-btn.plus .h,
    .bet-btn.plus .v {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        background: #fff;
        border-radius: 999px;
        z-index: 2;
    }

    .bet-btn.plus {
        filter: drop-shadow(0 2.195px 1.646px rgba(0, 0, 0, .5));
    }

    .bet-btn.plus .h {
        width: 44%;
        height: 8%;
    }

    .bet-btn.plus .v {
        width: 8%;
        height: 44%;
    }

    /* endregion */
    /* region TOGGLE */
    /* TOGGLE */
    .toggle-switch-bf {
        width: var(--btn-w);
        height: var(--btn-h);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        box-sizing: border-box;
    }

    .toggle-switch-bf input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .slider-bf {
        width: 100%;
        height: 100%;
        border-radius: 999px;
        border: 1.5px solid #fff;
        background: rgba(130, 138, 174, 1);
        box-shadow: inset -2px 2px 12px rgba(0, 0, 0, 0.6);
        transition: background 0.4s;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 6%;
        box-sizing: border-box;
        position: absolute;
        inset: 0;
        margin: auto;
        cursor: pointer;
        overflow: hidden;
    }

    .knob-bf {
        width: calc(var(--btn-h) * 0.8);
        height: calc(var(--btn-h) * 0.8);
        background: #CDD3F4;
        border-radius: 50%;
        box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.4s;
        position: absolute;
        top: 50%;
        left: 6%;
        transform: translateY(-50%);
    }

    .knob-bf svg {
        width: 60%;
        height: auto;
        display: block;
    }

    .toggle-switch-bf input:checked + .slider-bf {
        background: radial-gradient(circle at center, #2BE155, #3D4193);
        justify-content: flex-end;
    }

    .toggle-switch-bf input:checked + .slider-bf .knob-bf {
        left: auto;
        right: 6%;
        background: white;
    }

    /* endregion */
    .card-check {
        --btn-scale: 1;
        transform: scale(var(--btn-scale));
        transform-origin: center;
        transition: transform 0.2s ease, filter 0.2s ease;
    }

.popup-box, .popup-text, .popup-btn.confirm, .popup-btn.cancel {
    font-family: "Noto Sans", sans-serif;
}