@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);
    --bf-footer-h: clamp(40px, 5vh, 42px);
    --btn-w: clamp(60px, 20vw, 78px);
    --btn-h: clamp(40px, 5vh, 42px);
    --r: clamp(20px, 10vw, 55.452px);
}

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

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);
}

/* ======================================================
   Everything below is scoped to #featurebuy-overlay
   ====================================================== */

#featurebuy-overlay .buy-feature {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(1, 2, 16, 0.80);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: clamp(1vh, 2vh, 7vh);
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

#featurebuy-overlay .buy-feature::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.001);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

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

@supports (height: 100lvh) {
    #featurebuy-overlay .buy-feature {
        height: 100lvh;
    }
}

/* ---- Scroll container ---- */
#featurebuy-overlay .scroll-container {
    max-height: calc(100vh - var(--bet-wrapper-height));
    overflow-y: auto;
}

/* ---- ERROR ---- */
.card-wrapper {
    position: relative;
}

.card-wrapper .card.disabled {
    pointer-events: none;
}

.card-error-bf {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: #ff1515;
    font-size: clamp(14px, 2.2vw, 18px);
    font-family: "Noto Sans", sans-serif;
    font-weight: 700;
    text-align: center;
    white-space: normal;
    max-width: 80%;
    pointer-events: none;
    line-height: 1.3;
    width: max-content;
}

.card-error-bf.enabled {
    display: block;
}

.exceeds-label.enabled {
    display: flex;
}

.exceeds-label {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 10;
    border-radius: 20px 20px 0 0;

    background: radial-gradient(100% 100% at 50% 0%,
    rgba(148, 187, 255, 0.23) 0%,
    rgba(21, 56, 213, 0.23) 67.57%,
    rgba(0, 25, 142, 0.23) 100%);
    box-shadow: inset 0px 0.7px 0px rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    justify-content: center;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.label-text {
    color: #FFEB3B;
    font-weight: 800;
    font-size: clamp(14px, 2.2vw, 18px);
    font-family: "Noto Sans", sans-serif;
    line-height: 18px;
    text-transform: none;

    justify-content: center;
    align-items: center;

    background: linear-gradient(to right, #FFEB3B 40%, #fff7db 50%, #FFEB3B 60%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: shine 3s linear infinite;
}
@keyframes shine {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

.buy-arrow {
    color: #FFEB3B;
    font-size: clamp(14px, 2.2vw, 18px);
    font-family: "Noto Sans", sans-serif;
    margin-top: -2px;

    display: inline-block;
    animation: bounce-down 1.6s ease-in-out infinite;
}

@keyframes bounce-down {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

/* ---- Title ---- */
#featurebuy-overlay .title-container {
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
}

#featurebuy-overlay .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;
}

#featurebuy-overlay .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) {
    #featurebuy-overlay .title-underline {
        height: 2px;
    }
}

/* ---- BUTTON BUY CLOSE ---- */
#featurebuy-overlay #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;
    z-index: 2;
}

/* ---- Balance ---- */
#featurebuy-overlay .balance-amount {
    text-transform: none;
}

#featurebuy-overlay .balance-bf {
    text-transform: uppercase;
}

/* ---- LANDSCAPE BET Section ---- */
@media (orientation: landscape) {
    #featurebuy-overlay .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%;
    }

    #featurebuy-overlay .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;
    }

    #featurebuy-overlay .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;
    }

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

    #featurebuy-overlay #button-minus-bf,
    #featurebuy-overlay #button-plus-bf {
        border-radius: 50%;
        transition: transform 0.1s ease;
        flex-shrink: 0;
        cursor: pointer;
        clip-path: circle(50%);
    }

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

    #featurebuy-overlay #button-minus-bf:disabled,
    #featurebuy-overlay #button-minus-bf:disabled:hover,
    #featurebuy-overlay #button-plus-bf:disabled,
    #featurebuy-overlay #button-plus-bf:disabled:hover,
    #featurebuy-overlay .card-check:disabled,
    #featurebuy-overlay .card-check:disabled:hover {
        pointer-events: none;
        transform: none !important;
        filter: none !important;
        cursor: default;
    }

    #featurebuy-overlay .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) {
            #featurebuy-overlay #block-wrapper {
                transform: scale(0.9);
                transform-origin: top center;
            }
            #featurebuy-overlay .bet-control-wrapper-bf {
                transform: scale(0.8);
                transform-origin: bottom center;
            }

            #featurebuy-overlay .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) {
    #featurebuy-overlay .bet-control-wrapper-bf {
        transform: scale(0.85);
        transform-origin: bottom center;
    }
}

/* ---- PORTRAIT BET Section ---- */
@media (orientation: portrait) {
    #featurebuy-overlay .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%;
    }

    #featurebuy-overlay .bet-control-wrapper-bf {
        font-family: var(--main-font);
        position: fixed;
        inset-inline: 0;
        bottom: max(env(safe-area-inset-bottom), 2vh);
        left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        z-index: 1001;
    }

    #featurebuy-overlay .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;
    }

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

    #featurebuy-overlay #button-minus-bf,
    #featurebuy-overlay #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%);
    }

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

    #featurebuy-overlay .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;
    }
}

/* ---- POPUP ---- */
#featurebuy-overlay .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;
}

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

#featurebuy-overlay .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);
}

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

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

#featurebuy-overlay .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;
}

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

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

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

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

/* ---- BUTTON "Buy Confirm" ---- */
#featurebuy-overlay .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%;
}

#featurebuy-overlay .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));
}

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

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

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

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

/* ---- BUY PLUS/MINUS BUTTONS ---- */
#featurebuy-overlay .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;
}

#featurebuy-overlay .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;
}

#featurebuy-overlay .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;
}

#featurebuy-overlay .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;
}

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

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

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

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

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

/* ---- TOGGLE ---- */
#featurebuy-overlay .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;
}

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

#featurebuy-overlay .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;
}

#featurebuy-overlay .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: 4%;
    transform: translateY(-50%);
}

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

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

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

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

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