* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.background {
    width: 550px;
    height: 100%;
    margin: auto;
    overflow: hidden;
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-content {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    position: absolute;
    top: 12%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.logo img {
    width: 100%;
    max-width: 160px;
    height: 100%;
    object-fit: cover;
}

.text {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.text img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
}

.confirm {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 10;
}

.confirm img {
    width: 100%;
    max-width: 170px;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    animation: zoom-in-out 1.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoom-in-out {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.box-main {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    width: 90%;
    max-width: 450px;
    align-items: center;
    justify-items: center;
}

.box1,
.box2,
.box3,
.box4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 180px;
}

.box1-img,
.box2-img,
.box3-img,
.box4-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    display: block;
}

.box1-btn,
.box2-btn,
.box3-btn,
.box4-btn {
    margin-top: -15%;
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.box1-btn:hover,
.box2-btn:hover,
.box3-btn:hover,
.box4-btn:hover {
    transform: scale(1.05);
}

.spin {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 7;
}

.spin img {
    width: 100%;
    max-width: 350px;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.telegram {
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    height: auto;
    z-index: 9;
}


/* Popup Styles */
.popup-win,
.popup-lose {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

.popup-win .popup-content,
.popup-lose .popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: popupIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 20px;
}

/* Popup Logo */
.popup-win .popup-content .logo {
    position: relative;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.popup-win .popup-content .logo img {
    margin-top: 10%;
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

/* Popup Text Bubble */
.popup-win .popup-content .text {
    margin-top: -10%;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 99;
}

.popup-win .popup-content .text img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
    z-index: 5;
}

.popup-win .popup-content .text .text-asorrr {
    margin-top: 10%;
    max-width: 500px;
    z-index: 5;
}
.popup-win .popup-content .text .text-dullar {
    margin-top: -50%;
    max-width: 250px;
    z-index: 11;
}

/* Popup Treasure Chest */
.popup-win .popup-content > img[src*="Layer_5"] {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 7;
}

.popup-win .popup-content .treasure-chest {
    margin-top: -40%;
    width: 100%;
    max-width: 350px;
  
    object-fit: contain;
 
    z-index: 3;
}
/* .popup-win .popup-content img:not(.text img):not(.logo img):not([src*="Layer_5"]):not(.button-container img) {
    width: 100%;
    height: auto;
    object-fit: contain;
} */

.popup-win .button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: -10%;
    background: transparent;
    width: 100%;
    align-items: center;
    z-index: 999;
}

.popup-win .button-container a {
    display: block;
    width: 100%;
    max-width: 280px;
    margin-left:20%;
    transform: translateX(-50%,-50%);
}

.popup-win .button-container img {
    width: 100%;
    max-width: 200px;

    cursor: pointer;
    transition: transform 0.2s ease;
    object-fit: contain;
}

.popup-win .button-container img:hover {
    transform: scale(1.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.telegram img {
    width: 100%;
    max-width: 300px;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    animation: zoomInOut 2s ease-in-out infinite;
}

/* Tablet and Mobile - max-width: 750px */
@media (max-width: 750px) {
    .background {
        width: 100%;
    }

    .background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .logo {
        top: 10%;
    }

    .logo img {
        max-width: 150px;
    }

    .text {
        top: 28%;
        width: 90%;
    }

    .text img {
        max-width: 400px;
    }

    .box-main {
        top: 55%;
        max-width: 400px;
        gap: 15px;
    }

    .box1,
    .box2,
    .box3,
    .box4 {
        max-width: 160px;
    }

    .box1-img,
    .box2-img,
    .box3-img,
    .box4-img {
        max-width: 150px;
    }

    .box1-btn,
    .box2-btn,
    .box3-btn,
    .box4-btn {
        max-width: 120px;
        margin-top: -12%;
    }

    /* Popup Responsive */
    .popup-win .popup-content {
        gap: 20px;
        padding: 15px;
        max-width: 95%;
    }

    .popup-win .popup-content .logo img {
        margin-top: 5%;
        max-width: 160px;
    }

    .popup-win .popup-content .text {
        margin-top: -8%;
    }

    .popup-win .popup-content .text img {
        max-width: 380px;
    }

    .popup-win .popup-content .text .text-asorrr {
        max-width: 420px;
        margin-top: 5%;
    }

    .popup-win .popup-content .text .text-dullar {
        margin-top: -50%;
        max-width: 220px;
    }

    .popup-win .popup-content > img[src*="Layer_5"],
    .popup-win .popup-content .treasure-chest {
        max-width: 250px;
        margin-top: -35%;
    }

    .popup-win .button-container {
        margin-top: -8%;
    }

    .popup-win .button-container a {
        max-width: 240px;
        margin-left: 15%;
    }

    .popup-win .button-container img {
        max-width: 180px;
    }
}

/* Small Mobile - max-width: 430px */
@media (max-width: 430px) {
    .logo {
        top: 8%;
    }

    .logo img {
        max-width: 140px;
    }

    .text {
        top: 26%;
        width: 85%;
    }

    .text img {
        max-width: 350px;
    }

    .box-main {
        top: 58%;
        max-width: 350px;
        gap: 12px;
    }

    .box1,
    .box2,
    .box3,
    .box4 {
        max-width: 140px;
    }

    .box1-img,
    .box2-img,
    .box3-img,
    .box4-img {
        max-width: 130px;
    }

    .box1-btn,
    .box2-btn,
    .box3-btn,
    .box4-btn {
        max-width: 110px;
        margin-top: -10%;
    }

    /* Popup Responsive */
    .popup-win .popup-content {
        gap: 18px;
        padding: 12px;
        max-width: 95%;
    }

    .popup-win .popup-content .logo img {
        margin-top: 3%;
        max-width: 140px;
    }

    .popup-win .popup-content .text {
        margin-top: -6%;
    }

    .popup-win .popup-content .text img {
        max-width: 320px;
    }

    .popup-win .popup-content .text .text-asorrr {
        max-width: 360px;
        margin-top: 3%;
    }

    .popup-win .popup-content .text .text-dullar {
        margin-top: -50%;
        max-width: 200px;
    }

    .popup-win .popup-content > img[src*="Layer_5"],
    .popup-win .popup-content .treasure-chest {
        max-width: 220px;
        margin-top: -30%;
    }

    .popup-win .button-container {
        margin-top: -6%;
    }

    .popup-win .button-container a {
        max-width: 200px;
        margin-left: 12%;
    }

    .popup-win .button-container img {
        max-width: 160px;
    }
}

/* Extra Small Mobile - max-width: 390px */
@media (max-width: 390px) {
    .logo {
        top: 10%;
    }

    .logo img {
        max-width: 130px;
    }

    .text {
        top: 27%;
        width: 85%;
    }

    .text img {
        max-width: 320px;
    }

    .box-main {
        top: 58%;
        max-width: 320px;
        gap: 10px;
    }

    .box1,
    .box2,
    .box3,
    .box4 {
        max-width: 130px;
    }

    .box1-img,
    .box2-img,
    .box3-img,
    .box4-img {
        max-width: 120px;
    }

    .box1-btn,
    .box2-btn,
    .box3-btn,
    .box4-btn {
        max-width: 100px;
        margin-top: -8%;
    }

    /* Popup Responsive */
    .popup-win .popup-content {
        gap: 15px;
        padding: 10px;
        max-width: 98%;
    }

    .popup-win .popup-content .logo img {
        margin-top: 10%;
        max-width: 110px;
    }

    .popup-win .popup-content .text {
        margin-top: -5%;
    }

    .popup-win .popup-content .text img {
        max-width: 290px;
    }

    .popup-win .popup-content .text .text-asorrr {
        max-width: 330px;
        margin-top: 2%;
    }

    .popup-win .popup-content .text .text-dullar {
        margin-top: -50%;
        max-width: 180px;
    }

    .popup-win .popup-content > img[src*="Layer_5"],
    .popup-win .popup-content .treasure-chest {
        max-width: 200px;
        margin-top: -28%;
    }

    .popup-win .button-container {
        margin-top: -5%;
    }

    .popup-win .button-container a {
        max-width: 180px;
        margin-left: 10%;
    }

    .popup-win .button-container img {
        max-width: 150px;
    }
}

