@font-face {
    font-family: "ttm_hydishengyingxiongti";
    src: url("/assets/fonts/ttm_hydishengyingxiongti.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #ea4800;
    --main-font: "ttm_hydishengyingxiongti", sans-serif;
}

#gacha-wrapper {
    position: relative;
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    overflow: hidden;
}

.view-items {
    display: none !important;
}

#gacha-item-list {
    position: absolute;
}

/* Gacha */
#gacha {
    display: flex;
    justify-content: center;
    position: relative;
    width: 768px;
    height: 1280px;
    transform-origin: top left;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-image: url(/assets/web/gacha/images/main-frame.jpg);
    background-color: white;
    background-blend-mode: multiply;

    #background-frame {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-size: cover;
        background-position: center;
        z-index: -1;
        opacity: 1;
    }

    .badge-title {
        color: var(--primary-color);
        font-size: 2rem;
        font-family: var(--main-font);
        margin: 38px 0;
        font-weight: bold;
        user-select: none;
        text-shadow:
            0px 0px 0 #bb2900,
            0px -1px 0 #aa1800,
            0px -2px 0 #990700,
            0px -3px 0 #800,
            0px -4px 0 #700,
            0px -5px 4px #00000033,
            0px -5px 1px #00000080,
            0px 0px 4px #00000033;
    }

    .container {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px;
        padding-left: 55px;
        margin: 160px 66px 100px;
        flex-wrap: nowrap;

        .background {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-size: contain;
            background-position: center;
            background-image: url(/assets/web/gacha/images/dwhd_zycs_bg3.jpg);
            z-index: -1;
            opacity: 0;
        }

        .menu {
            width: 100%;
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            justify-content: space-between;
            align-items: center;

            .gacha-inventory-button {
                width: 40px;
                height: 40px;
                background-position: center;
                background-repeat: no-repeat;
                background-size: contain;
                background-image: url(/assets/web/gacha/images/310094.png);
                background-color: transparent;
                filter: drop-shadow(0 2px 6px black);
            }

            .num-rolls {
                padding: 0 16px 0 0;
                background-color: transparent;
                display: flex;
                gap: 10px;
                flex-direction: row;
                flex-wrap: nowrap;
                justify-content: flex-start;
                align-items: center;
                filter: drop-shadow(0 2px 6px black);

                .icon {
                    display: block;
                    width: 40px;
                    height: 40px;
                    background-image: url(/assets/web/gacha/images/700003.png);
                    background-size: contain;
                    background-position: center;
                    background-repeat: no-repeat;
                }

                .icon-free {
                    filter: hue-rotate(90deg);
                }

                .num {
                    font-family: var(--main-font);
                    font-weight: bold;
                    font-size: 1.1rem;
                }
            }
        }
    }

    button {
        border: none;
        color: white;
        padding: 15px 32px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 16px;
        margin: 4px 2px;
        cursor: pointer;
        border-radius: 5px;
        font-family: var(--main-font);
        transition:
            filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
            transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
    }

    button:hover {
        filter: brightness(1.2);
        transform: scale(1.06);
    }

    .button-group {
        margin-bottom: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }

    #open-all-button {
        width: 200px;
        height: 64px;
        text-align: center;
        font-size: 1.3rem;
        text-transform: capitalize;
        color: #fff2da;
        background-position: center;
        background-size: cover;
        user-select: none;
        background-image: url(/assets/images/img-bnt-two-hover.png);
        text-shadow: 2px 2px 2px #00000080;
    }

    #open-all-button:disabled {
        cursor: not-allowed;
        filter: grayscale(1);
    }

    .roll-button {
        color: white;
        text-decoration: none;
        font-size: 1rem;
        font-weight: bold;
        cursor: pointer;
        background: url(/assets/images/bg-type3.jpg);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100% 100%;
        height: 52px;
        display: flex;
        justify-content: center;
        align-items: center;
        text-transform: capitalize;
        min-width: 168px;
        text-shadow: 2px 2px 2px #00000080;
        transition: filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36), transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
    }

    .roll-button:disabled {
        cursor: not-allowed;
        filter: grayscale(1);
    }

    #item-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 60px;
        gap: 8px;
    }

    .animated-item {
        width: 100px;
        height: 100px;
        perspective: 1000px;
        cursor: pointer;
        border-radius: 2px;
        overflow: hidden;
    }

    .item-inner {
        display: flex;
        position: relative;
        width: 100%;
        height: 100%;
        text-align: center;
    }

    .item-front,
    .item-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        transition: transform 0.5s;

        .image-box {
            width: 100%;
            height: 100%;
        }

        canvas {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }

        .frame-hover {
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
            border-radius: 0;
            visibility: hidden;
            transition: visibility 0.1s;
        }

        &:hover {
            .frame-hover {
                visibility: visible;
            }
        }
    }

    .item-front {
        position: relative;

        p {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 2.6rem;
            font-weight: bold;
        }
    }

    .item-back {
        &.nine-rarity {
            .frame-back {
                position: absolute;
                width: 100px;
                height: 100px;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }
        }

        .item-image {
            position: absolute;
            width: 80px;
            height: 80px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .quantity {
            font-size: 1rem;
            font-weight: bold;
            position: absolute;
            bottom: 3px;
            right: 8px;
            color: white;
            text-shadow:
                0px -1px 2px black,
                1px 0px 2px black,
                0px 1px 2px black,
                -1px 0px 2px black,
                1px -1px 2px black,
                1px 1px 2px black,
                -1px 1px 2px black,
                -1px -1px 2px black;
        }
    }
}

.btn-gacha {
    position: fixed;
    bottom: 4rem;
    right: 50%;
    transform: translateX(50%);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    transition:
        filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
}

.btn-gacha::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 120px;
    width: 120px;
    background-size: contain;
    animation: playAnimation 0.6s steps(1) infinite;
}

.btn-gacha img {
    width: 60px;
    height: auto;
}

.btn-gacha:hover {
    filter: brightness(1.2);
    transform: translate(50%, 0) scale(1.2);
}

@keyframes playAnimation {
    0% {
        background-image: url("/assets/images/flash/images/_10010510001.png");
    }

    25% {
        background-image: url("/assets/images/flash/images/_10010510002.png");
    }

    50% {
        background-image: url("/assets/images/flash/images/_10010510003.png");
    }

    75% {
        background-image: url("/assets/images/flash/images/_10010510002.png");
    }

    100% {
        background-image: url("/assets/images/flash/images/_10010510001.png");
    }
}

/* Styles cho popup */
.rare-item-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.rare-item-popup {
    width: 768px;
    height: 1024px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: center center;
    z-index: 1000;
}

.rare-item-popup .popup-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
    color: wheat;
    width: 500px;
    height: 600px;
    padding: 0 50px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-shadow: 2px 2px 2px #000000;
    background-image: url(/assets/web/gacha/images/schl_zycs_bg.png);
}

.rare-item-popup .popup-content h1 {
    margin-top: 150px;
    font-size: 1.1rem;
    margin-bottom: 35px;
}

/* Styles cho vật phẩm hiếm */
.rare-item-popup .item-back {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 25px;
    transition: transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
}

.rare-item-popup .item-back:hover {
    transform: scale(1.2);
}

.rare-item-popup .item-back img,
.rare-item-popup .item-back canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rare-item-popup .item-back .image-box-back {
    z-index: 1;
}

.rare-item-popup .item-back .frame-back {
    z-index: 2;
}

.rare-item-popup .item-back canvas {
    z-index: 3;
}

.rare-item-popup .item-back .item-image {
    z-index: 4;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

.rare-item-popup .item-back .frame-hover {
    border-radius: 2px;
    z-index: 5;
}

.rare-item-popup .popup-content p {
    margin-bottom: 1.5rem;
}

/* Style cho nút Continue Opening */
.rare-item-popup .popup-content button {
    padding: 22px 26px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    color: wheat;
    border: none;
    border-radius: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url(/assets/web/gacha/images/public_mu_bossk1.png);
    background-color: transparent;
    cursor: pointer;
    text-shadow: 1px 1px 1px #000000;
    transition:
        filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
}

.rare-item-popup .popup-content button:hover {
    filter: brightness(1.2);
    transform: scale(1.06);
}

/* Thêm hiệu ứng lấp lánh cho vật phẩm hiếm nhất */
@keyframes sparkle {
    0% {
        box-shadow: 0 0 10px #ffd700;
    }

    50% {
        box-shadow:
            0 0 20px #ffd700,
            0 0 30px #ff1493;
    }

    100% {
        box-shadow: 0 0 10px #ffd700;
    }
}

.rare-item-popup .eight-rarity canvas,
.rare-item-popup .nine-rarity canvas {
    animation: sparkle 2s infinite;
}

/* inventory */
.gacha-inventory-popup {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
}

.gacha-inventory-tabs {
    display: flex;
    position: absolute;
    top: 98.3%;
    left: 68px;

    .tab-button {
        width: 81px;
        height: 80px;
        background-color: transparent;
        background-image: url(/assets/web/gacha/images/public_zycs_biaoqian02.png);
        background-position: bottom;
        background-size: contain;
        background-repeat: no-repeat;
        cursor: pointer;
        transition: filter 0.3s ease-in-out;

        &:hover {
            filter: brightness(1.2);
        }

        span {
            display: block;
            width: 100%;
            height: 50px;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            margin-bottom: 6px;
        }

        .tab-inventory {
            background-image: url(/assets/web/gacha/images/bqz_zycs_ck1.png);
        }

        .tab-award {
            background-image: url(/assets/web/gacha/images/bqz_zycs_jlyl1.png);
        }
    }

    .tab-button.active {
        background-image: url(/assets/web/gacha/images/public_zycs_biaoqian01.png);

        .tab-inventory {
            background-image: url(/assets/web/gacha/images/bqz_zycs_ck0.png);
        }

        .tab-award {
            background-image: url(/assets/web/gacha/images/bqz_zycs_jlyl0.png);
        }
    }

}

.gacha-inventory-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 768px;
    height: 1024px;
    overflow: auto;
}


.gacha-inventory-content {
    background-image: url(/assets/web/gacha/images/kfjjc_zycs_bg.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    height: 86%;
    width: 80%;
    position: relative;
    top: 50%;
    left: 50%;
    padding: 36px 36px;
    transform: translate(-50%, -50%);
}

#inventory-tab,
#item-list-tab {
    width: 100%;
    height: 100%;
    display: none;

    &.active {
        display: block;
    }
}

#item-list-tab {
    .gacha-inventory-scroll-container {
        height: 93%;
        max-height: 93%;
        margin-top: 50px;
    }
}

.gacha-inventory-scroll-container {
    height: 80%;
    max-height: 80%;
    margin-top: 50px;
}

/* Styling for Firefox */
.gacha-inventory-scroll-container {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* Styling for Webkit browsers (Chrome, Safari, newer versions of Opera) */
.gacha-inventory-scroll-container::-webkit-scrollbar {
    width: 10px;
}

.gacha-inventory-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gacha-inventory-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.gacha-inventory-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}


.gacha-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    justify-items: center;
    align-content: center;
    justify-content: center;
    align-items: center;
    gap: 8px;

    .box {
        width: 100px;
        height: 100px;
        background-image: url(/assets/web/gacha/images/public_zycs_daojukuang_02.png);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .inventory-item {
        position: relative;
        width: 100%;
        height: 100%;
        cursor: pointer;
        border-radius: 2px;
        transition: all 0.3s ease;
        border: 2px solid transparent;

        .frame-back {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
        }

        canvas {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
        }

        .item-image {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 80%;
            height: 80%;
            transform: translate(-50%, -50%);
        }

        .item-quantity {
            position: absolute;
            bottom: 0;
            right: 0;
            padding: 2px 6px;
            color: #ffffff;
            font-size: 0.9rem;
            font-weight: bold;
            text-align: center;
            text-shadow:
                0px -1px 2px black,
                1px 0px 2px black,
                0px 1px 2px black,
                -1px 0px 2px black,
                1px -1px 2px black,
                1px 1px 2px black,
                -1px 1px 2px black,
                -1px -1px 2px black;
        }

        .item-checked {
            visibility: hidden;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 50%;
            height: 50%;
        }
    }
}

.gacha-inventory-close {
    width: 60px;
    height: 60px;
    position: absolute;
    top: 0px;
    right: 20px;
    font-weight: bold;
    cursor: pointer;
    background-image: url(/assets/web/gacha/images/public_zycs_quxiao.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    transition:
        filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
}

.gacha-inventory-close:hover {
    filter: brightness(1.2);
    transform: scale(1.1);
}

.gacha-inventory-title {
    text-align: center;
    background-image: url(/assets/web/gacha/images/sc_zycs_k.png);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 102%;
    color: #f0ac38;
    font-size: 1.3rem;
    position: absolute;
    top: -5%;
    left: -1%;
    z-index: -1;
    line-height: 6.2;
    height: 12%;
    text-shadow:
        -2px 0 2px #3b2700,
        0 2px 2px #3b2700,
        5px 5px 10px #3b2700,
        -5px -5px 10px #3b2700;
    user-select: none;

    .title {
        position: absolute;
        top: 60%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 144px;
        height: 26px;
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
    }

    &.title-inventory .title {
        background-image: url(/assets/web/gacha/images/btz_zycs_ck.png);
    }
}

.gacha-inventory-title.title-item-list .title {
    background-image: url(/assets/web/gacha/images/btz_zycs_jlyl.png);
}

.gacha-inventory-empty {
    display: flex;
    text-align: center;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    height: 100%;
    justify-content: flex-end;

    .content {
        flex-grow: 1;
        display: flex;
        gap: 12px;
        align-self: center;
        justify-items: center;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        img {
            width: 100px;
            height: 101px;
        }

        p {
            font-size: 1rem;
            color: wheat;
            text-shadow: 1px 1px 1px #19120a;
        }
    }
}

.gacha-inventory-roll-button {
    padding-bottom: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    width: 238px;
    height: 80px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: transparent;
    color: wheat;
    text-shadow:
        0px -1px 4px #a13c05,
        1px -1px 4px #a13c05,
        1px 0px 4px #a13c05,
        1px 1px 4px #a13c05,
        0px 1px 4px #a13c05,
        -1px 1px 4px #a13c05,
        -1px 0px 4px #a13c05,
        -1px -1px 4px #a13c05,
        0px -1px 4px #a13c05,
        2px -2px 0px #a13c05,
        2px 0px 0px #a13c05,
        2px 2px 0px #a13c05,
        0px 2px 0px #a13c05,
        -2px 2px 0px #a13c05,
        -2px 0px 0px #a13c05,
        -2px -2px 0px #a13c05;
    background-image: url(/assets/web/gacha/images/public_mu_but09.png);
    transition:
        filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);

    &:hover {
        filter: brightness(1.2);
        transform: scale(1.06);
    }
}

.inventory-actions {
    user-select: none;
    text-align: center;
    padding-top: 3px;
    background: #6a461e;
    background: radial-gradient(at center top, #6a461e, #1a130b);
    height: 14%;
    border-top: 2px solid;
    border-image: linear-gradient(90deg,
            #2b1f11 10%,
            #fcd74d 40%,
            #f2e7a5 50%,
            #fcd74d 60%,
            #2b1f11 90%) 1;

    span {
        display: block;
        font-size: 0.8rem;
        color: wheat;
        text-shadow: 1px 1px 1px #19120a;
    }
}

.inventory-actions .actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.inventory-action-button {
    font-size: 1.1rem;
    font-weight: bold;
    width: 168px;
    height: 68px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: transparent;
    transition:
        filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
}

.inventory-action-button:hover {
    filter: brightness(1.2);
    transform: scale(1.06);
}

.inventory-action-button:disabled {
    cursor: not-allowed;
    filter: grayscale(1);
}

#claim-selected-rewards-button {
    color: white;
    text-shadow:
        0px -1px 4px #088e9f,
        1px -1px 4px #088e9f,
        1px 0px 4px #088e9f,
        1px 1px 4px #088e9f,
        0px 1px 4px #088e9f,
        -1px 1px 4px #088e9f,
        -1px 0px 4px #088e9f,
        -1px -1px 4px #088e9f,
        0px -1px 4px #088e9f,
        2px -2px 0px #088e9f,
        2px 0px 0px #088e9f,
        2px 2px 0px #088e9f,
        0px 2px 0px #088e9f,
        -2px 2px 0px #088e9f,
        -2px 0px 0px #088e9f,
        -2px -2px 0px #088e9f;
    background-image: url(/assets/web/gacha/images/public_mu_but04.png);
}

#claim-all-rewards-button {
    color: wheat;
    text-shadow:
        0px -1px 4px #a13c05,
        1px -1px 4px #a13c05,
        1px 0px 4px #a13c05,
        1px 1px 4px #a13c05,
        0px 1px 4px #a13c05,
        -1px 1px 4px #a13c05,
        -1px 0px 4px #a13c05,
        -1px -1px 4px #a13c05,
        0px -1px 4px #a13c05,
        2px -2px 0px #a13c05,
        2px 0px 0px #a13c05,
        2px 2px 0px #a13c05,
        0px 2px 0px #a13c05,
        -2px 2px 0px #a13c05,
        -2px 0px 0px #a13c05,
        -2px -2px 0px #a13c05;
    background-image: url(/assets/web/gacha/images/public_mu_but03.png);
}

.inventory-item.selected {
    border: 2px solid #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);

    .item-checked {
        visibility: visible;
    }
}

/* Popup */
.gacha-popup-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translate(-50%, 0);
    background-color: transparent;
    padding: 35px 20px 0;

    display: flex;
    width: 26rem;
    height: 6rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url(/assets/web/gacha/images/smsz_zycs_bg9.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    z-index: 1000;

    .gacha-popup-content {
        text-align: center;
        font-size: 0.9rem;
        user-select: none;
        cursor: pointer;
    }
}

.gacha-popup-error {
    .gacha-popup-content {
        color: #e00f00;
        text-shadow:
            0px -2px 2px #1f020060,
            2px 0px 2px #1f020060,
            0px 2px 2px #1f020060,
            -2px 0px 2px #1f020060,
            2px -2px 2px #1f020060,
            2px 2px 2px #1f020060,
            -2px 2px 2px #1f020060,
            -2px -2px 2px #1f020060;
    }
}

.gacha-popup-success {
    .gacha-popup-content {
        color: #78e000;
        text-shadow:
            0px -2px 2px #101f0060,
            2px 0px 2px #101f0060,
            0px 2px 2px #101f0060,
            -2px 0px 2px #101f0060,
            2px -2px 2px #101f0060,
            2px 2px 2px #101f0060,
            -2px 2px 2px #101f0060,
            -2px -2px 2px #101f0060;
    }
}

.gacha-popup-close-btn {
    position: absolute;
    top: 6rem;
    right: 0;
    display: block;
    margin: 0 auto;
    width: 16px;
    height: 16px;
    background-image: url(/assets/web/gacha/images/public_mu_qx.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    transition: filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);
}

.gacha-popup-close-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.06);
}

/* Buy Rolls */
.buy-rolls-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.buy-rolls-popup {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.buy-rolls-popup .popup-content {
    width: 94%;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    background-image: url(/assets/web/gacha/images/hfxj_zycs_bg.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    .content {
        flex-grow: 1;
    }

    .happy {
        display: block;
        text-align: center;
        color: wheat;
        opacity: .3;
    }

    h2 {
        color: wheat;
        font-size: 1.6rem;
        text-shadow: 2px 2px 2px #19120a;
    }


    p {
        margin-top: 5rem;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: .2rem;
        color: wheat;
        font-size: 1.2rem;
        text-shadow: 2px 2px 2px #19120a;
    }

    .total {
        margin-top: 0;
        margin-bottom: 5rem;
    }

    .icon-coins {
        margin-right: 0.5rem;
        width: 1.5rem;
        height: 1.5rem;
        background-image: url(/assets/web/gacha/images/zycs_6400100.png);
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
    }
}

.buy-rolls-controls {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.buy-rolls-controls button {
    margin: 0 5px;
    padding: 5px 10px;
}

.popup-buttons {
    margin: 20px;
}

.popup-buttons button {
    margin: 0 10px;
    padding: 10px 20px;
}

.buy-rolls-popup-wrapper button {
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    transition: filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);

    &:hover {
        filter: brightness(1.2);
        transform: scale(1.06);
    }

    &:disabled {
        filter: grayscale(1);
        cursor: not-allowed;
    }
}

/* hfxj_zycs_bg.png qjzl_zycs_frame.png public_mu_quxiao.png close */
#cancel-buy-roll {
    position: absolute;
    top: 6.3rem;
    right: 1.4rem;
    margin: 0;
    padding: 2.4rem;
    background-image: url(/assets/web/gacha/images/public_mu_quxiao.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* public_zycs_min.png  public_zycs_max.png   public_zycs_quxiao.png close */
#min-rolls {
    padding: 2rem;
    background-image: url(/assets/web/gacha/images/public_zycs_min.png);

}

#max-rolls {
    padding: 2rem;
    background-image: url(/assets/web/gacha/images/public_zycs_max.png);
}

/* public_zycs_j.png -  public_zycs_jia.png + */
#decrease-rolls {
    padding: 1.5rem;
    background-image: url(/assets/web/gacha/images/public_zycs_j.png);
}

#increase-rolls {
    padding: 1.5rem;
    background-image: url(/assets/web/gacha/images/public_zycs_jia.png);
}

/* public_zycs_jians.png -10  public_zycs_jias.png +10 */
#decrease-10-rolls {
    padding: 2rem;
    background-image: url(/assets/web/gacha/images/public_zycs_jians.png);
}

#increase-10-rolls {
    padding: 2rem;
    background-image: url(/assets/web/gacha/images/public_zycs_jias.png);
}

/* public_zycs_zbjlk.png input */
#rolls-to-buy {
    background-color: transparent;
    line-height: 3;
    font-family: 'fontWeb';
    text-align: center;
    color: wheat;
    font-size: 20px;
    font-weight: bold;
    width: 11rem;
    opacity: 0.8;
    background-image: url(/assets/web/gacha/images/public_zycs_zbjlk.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    &:focus {
        opacity: 1;
    }
}

#confirm-buy-roll {
    font-family: 'fontWeb', sans-serif;
    color: white;
    text-shadow:
        0px -1px 4px #f18c20,
        1px -1px 4px #f18c20,
        1px 0px 4px #f18c20,
        1px 1px 4px #f18c20,
        0px 1px 4px #f18c20,
        -1px 1px 4px #f18c20,
        -1px 0px 4px #f18c20,
        -1px -1px 4px #f18c20,
        0px -1px 4px #f18c20,
        2px -2px 0px #f18c20,
        2px 0px 0px #f18c20,
        2px 2px 0px #f18c20,
        0px 2px 0px #f18c20,
        -2px 2px 0px #f18c20,
        -2px 0px 0px #f18c20,
        -2px -2px 0px #f18c20;
    font-weight: bold;
    font-size: 1.6rem;
    padding: 1.5rem 3rem;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    background-image: url(/assets/web/gacha/images/public_mu_but10.png);
    filter: brightness(0.88);
    cursor: pointer;

    transition: filter 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36),
        transform 0.5s cubic-bezier(0.47, 2.02, 0.31, -0.36);

    &:hover {
        filter: brightness(1);
        transform: scale(1.06);
    }

    &:disabled {
        filter: grayscale(1);
        cursor: not-allowed;
    }
}

/*=============================================================================================*/
.loading {
    padding: 6px;
    text-align: center;
    color: #666;
}

.loading i {
    margin-right: 5px;
}

/* Style khi đang loading */
.custom-select.loading .select-trigger {
    pointer-events: none;
    opacity: 0.7;
}

.custom-select {
    position: relative;
    width: 200px;
    font-family: Arial, sans-serif;
}

.select-trigger {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-trigger:hover {
    background: #f8f9fa;
    border-color: #bebebe;
}

.select-trigger .fa-chevron-down {
    color: #666;
    transition: transform 0.3s ease;
}

.custom-select.active .fa-chevron-down {
    transform: rotate(180deg);
}

.options-list {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.custom-select.active .options-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.option-item {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #f5f5f5;
}

.option-item i {
    width: 20px;
    color: #007bff; /* Màu của icon */
}

.option-item span {
    color: #333;
}

/* Thêm đường phân cách giữa các options */
.option-item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* Animation khi hover */
.option-item:hover i {
    transform: scale(1.1);
}

/* Custom scrollbar cho options list khi dài */
.options-list {
    max-height: 250px;
    overflow-y: auto;
}

.options-list::-webkit-scrollbar {
    width: 6px;
}

.options-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.options-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.options-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.character-select {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #5c4b24;
  background-color: #5c4b24;
  font-size: 14px;
  width: 200px;
  color: white;
}