@import "globals.css";

html, body {
    background: url(../images/bg.jpg), var(--primary-color) 50%;
    background-size: cover;
    position: relative;
}

.main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    position: relative;
}

.coins {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    object-fit: cover;
    z-index: 1;
    top: 0;
    left: 0;
}

.main .panel {
    width: max-content;
    height: auto;
    padding: 5.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    row-gap: 10px;
    position: relative;
    overflow: hidden;
    align-content: start;
    z-index: 9;
}

.main .panel .panel-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    pointer-events: none;
    user-select: none;
}

.main .panel .item {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    z-index: 3;
}

.main .panel .item .chest-shine {
    opacity: 0;
    position: absolute;
    z-index: 4;
    transition: .5s ease;
    pointer-events: none;
    user-select: none;
}

.main .panel .item .chest {
    width: 166px;
    height: 146px;
    z-index: 5;
    padding: 1rem;
    transition: .5s ease;
    user-select: none;
}

@media screen and (max-width: 550px) {
    .main .panel .item .chest {
        padding: 0.2rem;
    }
}

.main .panel .item .chest-shadow {
    position: absolute;
    bottom: -50px;
    opacity: 0.4;
    filter: blur(24.031007766723633px);
    pointer-events: none;
    user-select: none;
}


.main .panel .item:hover .chest {
    transform: scale(1.1);
}

.main .panel .item:hover .chest-shine {
    opacity: 1;
}

.main .panel .item:hover .chest-shadow {
    display: none;
}

.main .panel .item.opened .chest-shine {
    opacity: 1;
}

.main .panel .item.not-opened {
    opacity: 0.3;
    -webkit-animation: heartbeat 1.5s ease-in-out both;
    animation: heartbeat 1.5s ease-in-out both;
    animation-delay: 1s;
    pointer-events: none;
}

@-webkit-keyframes heartbeat {
    from {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    10% {
        -webkit-transform: scale(0.91);
        transform: scale(0.91);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    17% {
        -webkit-transform: scale(0.98);
        transform: scale(0.98);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    33% {
        -webkit-transform: scale(0.87);
        transform: scale(0.87);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    45% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
}

@keyframes heartbeat {
    from {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    10% {
        -webkit-transform: scale(0.91);
        transform: scale(0.91);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    17% {
        -webkit-transform: scale(0.98);
        transform: scale(0.98);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    33% {
        -webkit-transform: scale(0.87);
        transform: scale(0.87);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    45% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
}

.main .main-images {
    position: relative;
    display: flex;
    justify-content: center;
}

.main .main-images .main-img {
    max-width: 500px;
    user-select: none;
    pointer-events: none;
    position: relative;
    z-index: 3;
}

.main .main-images .main-cash {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
}


@media screen and (max-width: 1200px) {
    .main {
        flex-direction: column-reverse;
    }
    .main .main-images .main-img {
        margin-left: 100px;
    }

    .main {
        width: 100%;
    }

    .main .panel {
        margin-top: -70px;
    }
}


@media screen and (max-width: 700px) {
    .main .panel {
        width: 100%;
    }

    .main .panel .item .chest {
        width: 100%;
        height: auto;
    }

}


@media screen and (max-width: 600px) {
    .main .main-images .main-img{
        width: 100%;
        margin-left: unset;
    }
}



@media screen and (max-width: 500px) {
    .main .panel {
        padding: 4rem;
    }

    .main .main-images .main-img {
        width: 80%;
    }
    .main .panel .item .chest-shine, .chest-shadow  {
        display: none;
    }
}


@media screen and (max-width: 380px) {
    .main .panel {
        padding: 3rem;
    }
}
