@import "globals.css";

body {
    background: url(../images/bg.png), var(--primary-color);
    background-size: cover;
    background-position: top center;
    position: relative;
    max-height: 100%;
    max-width: 100%;
}

.main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column-reverse;
    position: relative;
    padding-top: 18rem;
}

@media screen and (max-width: 768px) {
    html, body {
        background: url(../images/bg-mobile.png), var(--primary-color);
        background-size: cover;
        background-position: center;
    }    

    .main {
        padding-top: 12rem;
    }

}


.main .panel {
    width: max-content;
    height: auto;
    padding: 5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    margin-top: -70px;
    position: relative;
    align-content: start;
    z-index: 2;
}

.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;
    padding: 0.5rem;
    object-fit: contain;
    z-index: 5;
    transition: .5s ease;
    user-select: none;
}

.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-img {
    max-width: 300px;
    user-select: none;
    pointer-events: none;
    z-index: 2;
}

@media screen and (max-width: 1200px) {
    .main {
        flex-direction: column-reverse;
    }
    .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-img {
        width: 100%;
    }
}



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

    .main .main-img {
        width: 80%;
    }
    .main .panel .item .chest-shine, .chest-shadow  {
        width: 150px;
    }
}


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


.register {
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.register .field {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.register .field input {
    width: 100%;
    height: 40px;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.50);
    border: none;
    outline: none;
    padding-left: 3.5rem;
    font-size: 16px;
    font-weight: 400;
}

.register .field img {
    position: absolute;
    left: 20px;
    user-select: none;
    pointer-events: none;
}

@media screen and (max-width: 600px) {
    .register {
        width: 100%;
        padding: 0 1rem;
    }
}


.register .hidden {
    display: none;
}

.coins-bottom {
    z-index: 9;
    position: relative;
    pointer-events: none;
    margin-top: -120px;
}

.coins-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.coins-bottom .container img {
    width: 100%;
    max-width: 140px;
}

.coins-bottom .container img:nth-child(2) {
    width: 100%;
    max-width: 140px;
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}

@media screen and (min-width: 700px) {
    .coins-bottom .container img {
        max-width: 200px;
    }

    .coins-bottom .container img:nth-child(2) {
        max-width: 200px;
    }
}

@media screen and (min-width: 900px) {
    .coins-bottom {
        margin-top: -250px;
    }

    .coins-bottom .container img {
        max-width: 280px;
    }

    .coins-bottom .container img:nth-child(2) {
        max-width: 280px;
    }
}