*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.coantain{
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
}
.background{
    position: relative;
    width: 550px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.background > img{
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.main-content{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text{
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text img{
    width: 100%;
    height: 100%;
    max-width: 500px;
    object-fit: cover;
}
.text2{
    position: absolute;
    top: 29%;
    left: 75%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text2 img{
    width: 100%;
    height: 100%;
    max-width: 210px;
    object-fit: cover;
}
.frame{
    position: absolute;
    top: 67%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.frame-board{
    width: 100%;
    max-width: 510px;
    height: auto;
    object-fit: contain;
}
.frame-grid{
    position: absolute;
    width: 100%;
    max-width: 360px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
    padding: 0;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.box-card{
    position: relative;
    width: 100%;
    aspect-ratio: 210 / 230;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.box-bg{
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.box-top{
    position: absolute;
    width: 60%;
    height: auto;
    object-fit: contain;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: boxZoomInOut 1.6s ease-in-out infinite;

}

@keyframes boxZoomInOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.popout-lose{
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
}
.popout-lose.show{
    display: flex;
}
.popout-lose > div{
    position: absolute;
}

.model{
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.model img{
    width: 100%;
    max-width: 420px;
    object-fit: contain;
}
.text-lose{
    top: 13%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text-lose img{
    width: 100%;
    max-width: 550px;
    object-fit: contain;
}
.text-lose2{
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text-lose2 img{
    width: 100%;
    max-width: 550px;
    object-fit: contain;
}
.buttontryagain{
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.buttontryagain img{
    width: 100%;
    max-width: 220px;
    object-fit: contain;
}

.popout-win{
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1001;
}
.popout-win.show{
    display: flex;
}
.popout-win > div{
    position: absolute;
}
.text-win{
    top: 13%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text-win img{
    width: 100%;
    max-width: 550px;
    object-fit: contain;
}
.text-win2{
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.text-win2 img{
    width: 100%;
    max-width: 550px;
    object-fit: contain;
}
.frame-win{
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.frame-win img{
    width: 100%;
    max-width: 360px;
    object-fit: contain;
}
.popout-win .model{
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.button-win{
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.button-win img{
    width: 100%;
    max-width: 220px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .text2 img{
        max-width: 170px;
    }

    .frame-grid{
        max-width: 320px;
        gap: 12px 10px;
        top: 54%;
    }

    .box-card{
        aspect-ratio: 210 / 225;
    }

    .box-top{
        width: 55%;
        top: 39%;
    }
}