@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;700;900&display=swap');

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

#featurebuy-overlay::before {
    background: rgba(0, 4, 60, 0.2);
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: scale(1.02) translateZ(0);
        z-index: 3;
    }
}

.card:focus-visible {
    outline: 2px solid rgba(255,255,255,.9);
    outline-offset: 2px;
    transform: scale(1.02);
    z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
    .card {
        transition: none;
    }
}
.card {
    font-family: Nunito, sans-serif;
    position: relative;
    border-radius: 20px;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 150ms ease, box-shadow 150ms ease, z-index 0s;
    will-change: transform;
    transform-origin: center;
}
.card::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -8px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(147, 154, 187, 0.00) 0%, #98a5e2 47.5%, rgba(147, 154, 187, 0.00) 97.81%);
    z-index: -1;
}

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

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

.card-title {
    font-size: var(--card-title);
    font-weight: 900;
    letter-spacing: -0.05em;
    color: #ffffff;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    z-index: 3;
}

.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-check.disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
    cursor: not-allowed;
    transform: none !important;
    transition: all 0.2s ease;
}

.card-check:hover:not(.disabled) {
    transform: scale(1.05);
    filter: brightness(1.1);
    cursor: pointer;
}

.buy.card.card--ultra .card-image img#bf-image4.pulse-img {
    filter:
            drop-shadow(0 0 2px  rgba(0,156,237,0.65))
            drop-shadow(0 0 7px rgba(0,156,237,0.2))
            drop-shadow(0 0 10px rgba(0,156,237,0.2)) !important;
    -webkit-filter:
            drop-shadow(0 0 2px  rgba(0,156,237,0.65))
            drop-shadow(0 0 7px rgba(0,156,237,0.2))
            drop-shadow(0 0 10px rgba(0,156,237,0.2)) !important;
}
.buy.card.card--regular .card-image img#bf-image2.pulse-img {
    filter:
            drop-shadow(0 0 2px  rgba(255, 61, 222, 0.65))
            drop-shadow(0 0 7px  rgba(255, 61, 222, 0.2))
            drop-shadow(0 0 10px rgba(255, 61, 222, 0.2)) !important;
    -webkit-filter:
            drop-shadow(0 0 2px  rgba(255, 61, 222, 0.65))
            drop-shadow(0 0 7px  rgba(255, 61, 222, 0.2))
            drop-shadow(0 0 10px rgba(255, 61, 222, 0.2)) !important;
}
.card--ultra {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 20px;

    background-color: hsl(225, 61%, 10%);
    background-image: radial-gradient(
            at 68% 20%,
            hsl(224, 57%, 9%) 0px,
            transparent 85%
    ),
    radial-gradient(at 49% 30%, hsl(209, 72%, 15%) 0px, transparent 85%),
    radial-gradient(at 14% 26%, hsl(210, 78%, 14%) 0px, transparent 85%),
    radial-gradient(at 0% 64%, hsla(200, 80%, 55%, 1) 0px, transparent 85%),
    radial-gradient(at 41% 94%, hsla(210, 90%, 70%, 1) 0px, transparent 85%),
    radial-gradient(at 100% 99%, hsla(220, 100%, 65%, 1) 0px, transparent 85%);

    border: 1.7px solid rgba(0, 156, 237, 0.5);
}
.card--regular {
    background-color: hsl(233, 22%, 38%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid hsla(232, 22%, 100%, 0.1);
    border-radius: 20px;
    z-index: 1;
}

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

@media (orientation: landscape) {
    html, body {
        overflow-y: hidden;
        height: 100dvh;
        max-height: 100dvh;
    }
    .scroll {
        overflow-x: visible;
    }

    .scroll-arrow {
        display: none !important;
    }

    .pagination-bf {
        display: none !important;
    }

    .scroll-track {
        display: none !important;
    }
    .scroll-thumb {
        display: none !important;
    }

    .title {
        font-size: clamp(11px, calc(1.7vw + 1vh), 32px);;
    }

    #featurebuy-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;

        align-items: start;
        justify-items: center;
        padding: clamp(1.5%, 2vh, 3%);
        box-sizing: border-box;
        overflow: hidden;
        opacity: 1;
        transition: opacity 0.3s ease;
        z-index: 1000;
        row-gap: clamp(0.8vh, 1.5vh, 2vh);

        display: grid;
        grid-template-rows: auto 1fr auto;
        grid-template-columns: 1fr;
        grid-template-areas:
      "title"
      "scroll"
      "bet";
    }

    .title-container {
        grid-area: title;
        align-self: start;
        justify-self: center;
        flex: 1;
        text-align: center;

        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        /*padding: 0.8rem 0;*/
    }

    .scroll-container {
        grid-area: scroll;
        align-self: start;

        width: 100%;
        max-height: 100%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        transform-origin: top center;
        max-width: clamp(900px, 95vw, 1200px);
        margin: 0 auto;
    }

    .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;
    }
    .bet-control-wrapper-bf {
        position: unset !important;
    }

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

        max-height: 100%;
        flex-direction: row;
        gap: clamp(1.2vw, 2vw, 30px);
        justify-content: center;
        overflow-x: auto;
        box-sizing: border-box;
        margin: 0 auto;
        padding-top: clamp(1vh, calc(1vw + 1vh), 2vh);
        scrollbar-width: none;
        scroll-padding-inline: clamp(24px, 5vw, 40px);

        overflow-y: hidden;
    }

    .card {
        flex: 0 0 clamp(17rem, 30vw, 22rem);
        margin-bottom: clamp(0.3vh, 0.8vh, 1vh);

        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        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 {
        position: relative;
        overflow: hidden;
        border-radius: 20px;
        z-index: 1;
    }

    .card-content, .card-main, .card-image, .card-footer {
        position: relative;
        z-index: 3;
    }

    .card-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5vh;
        text-align: justify;
        justify-content: space-between;
        flex-grow: 1;
        height: 100%;
    }

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

    .card-title {
        font-size: clamp(13px, calc(1.2vw + 1vh), 20px);
        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(2em, 2.2em, 2.5em);
        align-items: flex-start;
        z-index: 3;
    }

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

    .card-text {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .card-description {
        font-size: clamp(14px, 1.8vw, 18px);
        text-align: justify;
        padding: 0 2%;
        margin-top: 1%;
        line-height: 1.3;
        flex-grow: 1;
        justify-content: center;
        align-items: flex-start;

        display: block;
    }

    .buy.card .pulse-img {
        position: absolute;
        top: clamp(25%, calc(50vh - 18%), 47%);
        left: 50%;
        transform: translate(-50%, -50%) scale(1.3);
        width: min(160%, clamp(24vh, 32vh, 40vh));
        height: auto;

        max-width: none;
        max-height: none;

        z-index: 0;
        pointer-events: none;
        object-fit: contain;
        animation: pulse 3.5s infinite ease-in-out;
    }

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

    .card-image {
        max-height: clamp(10vh, 20vh, 25vh);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible;
        width: auto;
    }

    .card-image img {
        image-rendering: smooth;
        height: clamp(10vh, 15vh, 17vh);
        object-fit: contain;
    }

    .card-footer {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.5vh;
        flex-wrap: nowrap;
        margin-top: auto;
    }

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

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

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

    .scroll {
        width: 100%;
        height: auto;
        scrollbar-width: none;
    }

    .buy.card .card-image {
        height: clamp(120px, 12vh, 160px);
        position: relative;
        pointer-events: none;
        z-index: 0;
    }

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


:root {
    /*--bet-wrapper-height: 80px;*/
    --grid-base-height: 420px;
}

@media (orientation: landscape) and (max-height: 620px) {
    #featurebuy-overlay {
        grid-template-rows: auto 1fr auto;
    }

    .scroll-container {
        grid-area: scroll;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        width: 100%;
        max-height: calc(100dvh - var(--bet-wrapper-height));
        overflow: hidden;
        transform-origin: top center;
    }

    #block-wrapper {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

        gap: clamp(1vh, 2vh, 2.5vh) clamp(1vw, 2vw, 2.5vw);
        align-content: start;
        justify-content: center;
        width: 90%;
        height: 100%;
        box-sizing: border-box;
    }

    .card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border-radius: 16px;
        padding: clamp(6px, 1vw, 12px);
        height: auto;
        max-height: none;
        /*height: 100%;*/
        /*max-height: calc(100dvh - var(--bet-wrapper-height) - 60px);*/
    }
    .card {
        flex: unset !important;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
    }

    .card-description {
        font-size: clamp(0.5rem, calc(1rem + 1vw), 0.8rem);
        line-height: 1.2;
    }

    .bet-control-wrapper-bf {
        transform: scale(0.9) !important;
        transform-origin: bottom center;
    }
    .bet-value-bf { font-size: 18px;}
}

@media (orientation: landscape) and (max-height: 500px) {
    .scroll-container {
        width: 100% !important;
    }

    #block-wrapper {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: clamp(1vw, 2vw, 3vw);
        width: 100%;
    }

    .card {
        flex: unset !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
    }
    .card-title {
        min-height: 1.2em;
    }
}

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

@media (orientation: landscape) and (max-height: 300px) {
    .card-title {
        min-height: clamp(1.6em, 1.8em, 2em);
    }
    .buy.card .card-image {
        height: clamp(13vh, 14vh, 15vh);
    }
    #featurebuy-overlay .scroll-container {
        transform: scale(0.70) !important;
        transform-origin: top center;
    }
    .bet-control-wrapper-bf {
        transform: scale(0.65) !important;
        transform-origin: bottom center;
    }
}

@media (orientation: landscape) and (max-height: 200px) {
    #featurebuy-overlay .scroll-container {
        transform: scale(0.5) !important;
        transform-origin: top center;
    }
}

@media (orientation: landscape) and (min-width: 450px) and (max-width: 950px) {
    #block-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        align-items: stretch;
        overflow-x: auto;
        gap: clamp(1.2vw, 2vw, 30px);
        width: 100%;
        max-width: 95vw;
    }

    .scroll-container {
        transform: scale(0.9);
        transform-origin: top center;
    }

    .bet-control-wrapper-bf {
        transform: scale(0.85);
        transform-origin: bottom center;
    }

    .bet-value-bf { font-size: 18px;}

}

/* ---------------------- PORTRAIT ---------------------- */
@media (orientation: portrait) {
    #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: 30px;
        max-width: 100%;
    }

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

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

    .card-title {
        margin-bottom: 4px;
        margin-top: 0;
        text-align: left;
        grid-column: 2;
    }

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

    .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: 0;
    }

    .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 {
        text-align: left;
        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: -24%;
        right: 0;
        bottom: 0;
        margin: auto;

        max-width: none;
        max-height: none;

        height: auto;
        pointer-events: none;
        object-fit: contain;
        animation: pulse-portrait 4s infinite ease-in-out;
        z-index: 0;

        width: min(145%, clamp(180px, 42vw, 280px));
        height: auto;
    }


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

    .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(0.6rem, calc(2vw + 1.2vh), 1.2rem);
        flex: 0 1 auto;
        max-width: calc(100% - 60px);
        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);
    }
    .card-hex-grid {
        position: absolute;
        z-index: 0;
        opacity: 0.6;
        pointer-events: none;
        mix-blend-mode: screen;
        width: 100%;
        height: auto;
        max-width: none;
    }

    .card-hex-grid svg {
        display: block;
        width: auto;
        height: auto;
        max-width: none;
    }

    .card-hex-grid.top-right {
        top:0;
        right: -200px;
        transform: translate(20%, -20%) scale(1.1);
    }

    .card-hex-grid.bottom-left {
        bottom: 0;
        left: 20px;
        transform: translate(-20%, 20%) scale(1.1);
    }
}

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

/* ---- 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;
    }
}