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

.container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background {
    position: relative;
    width: 550px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
}

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

.main-content{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}   
.scratch{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.items1{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    max-width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.items2{
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    max-width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.items3{
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    max-width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.scratch-container {
    position: relative;
    width: 100%;
    height: 100px;
    flex-shrink: 0;
}

.scratch-reveal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
}

.items1 img,
.items2 img,
.items3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.popout-lose.show {
    display: flex;
}

.popout-lose .image-lose {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popout-lose .image-lose img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.popout-lose .button-lose {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    z-index: 1001;
}

.popout-lose .button-lose img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    animation: zoominout 2s ease-in-out infinite;
}

.popout-win {
    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;
}

.popout-win.show {
    display: flex;
}

.popout-win .image-win {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popout-win .image-win img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.popout-win .buttons {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 210px;
    z-index: 1001;
}

.popout-win .buttons img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    cursor: pointer;
    animation: zoominout 2s ease-in-out infinite;
}

@keyframes zoominout {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 430px) {
    .items1{
        max-width: 180px;
    }
    .items2{
        max-width: 180px;
    }
    .items3{
        max-width: 180px;
    }
    .popout-lose .image-lose{
        width: 450px;
    }
    .popout-win .image-win{
        width: 450px;
    }
    .popout-win .buttons{
        max-width: 180px;
    }
}

@media (max-width: 414px) {
    .items1{
        max-width: 180px;
    }
    .items2{
        max-width: 180px;
    }
    .items3{
        max-width: 180px;
    }
    .popout-lose .image-lose{
        width: 450px;
    }
    .popout-win .image-win{
        width: 450px;
    }
    .popout-win .buttons{
        max-width: 150px;
    }
}

@media (max-width: 390px) {
    .items1{
        max-width: 160px;
    }
    .items2{
        max-width: 160px;
    }
    .items3{
        max-width: 160px;
    }
    .popout-lose .image-lose{
        width: 400px;
    }
    .popout-win .image-win{
        width: 400px;
    }
    .popout-win .buttons{
        max-width: 160px;
    }
}

@media (max-width: 375px) {
    .items1{
        max-width: 140px;
    }
    .items2{
        max-width: 140px;
    }
    .items3{
        max-width: 140px;
    }
    .popout-lose .image-lose{
        width: 380px;
    }
    .popout-win .image-win{
        width: 380px;
    }
    .popout-win .buttons{
        max-width: 140px;
    }
}
@media (max-width: 360px) {
    .items1{
        max-width: 140px;
    }
    .items2{
        max-width: 140px;
    }
    .items3{
        max-width: 140px;
    }
    .popout-lose .image-lose{
        width: 360px;
    }
    .popout-win .image-win{
        width: 360px;
    }
    .popout-win .buttons{
        max-width: 140px;
    }
}