body {
    background-color: #000;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}



.container {
    /* background: url(images/background.jpg) no-repeat center center;
    background-size: contain;*/
    width: auto;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.background {
    height: 100%;
    width: auto;
    max-width: 100%;

}

.snake {
    position: absolute;
    left: 1%;
    bottom: 0%;
    z-index: 2;
    height: 98%;
    width: auto;
    max-width: 98%;
    /* animation: rotateSwing 5s ease-in-out infinite; */
    animation: move 9s ease-in-out 0s infinite;
    /* animation: swing 15s ease-in-out infinite; */
}

.elements {
    position: absolute;
    z-index: 4;
    height: 100%;
    width: auto;
    /* animation: zoomIn 0.5s ease-in-out forwards;*/
    animation: zoomIn 0.5s ease-in-out forwards, move 9s ease-in-out 0s infinite;
    animation-delay: 0s, 0.5s;
    /* move 动画在 zoomIn 结束后开始 */
}

/* .coin-container {
    position: absolute;
    left: -10px;
    z-index: 2;
    width: 110%;
    height: 100%;
    overflow: hidden;
}

.cryto {
    position: absolute;
    height: 100%;
    width: auto;
    max-width: 100%;
    animation: move 9s linear 0s infinite;
}

*/
.button,
a {
    position: absolute;
    z-index: 5;
    bottom: 0;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.5s ease;
    /* animation: move 2s linear 0s infinite; */

}

a .button {
    width: 100%;
}

.packet,
.packet2 {
    position: absolute;
    z-index: 2;
    width: 100%;
    /* max-width: 400px; */
    /* transition: opacity 0.5s ease; */
    transition: opacity 0.5s ease;

}

.packet {
    animation: headShake 1s ease-in-out, infiniteHeadShake 1s ease-in-out infinite;
    animation-delay: 0s, 3s;
    /* headShake 立即执行，infiniteHeadShake 在 3s 后开始 */
    /* animation: move 3s ease-in-out 0s infinite; */
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        /* height: 100vh; */
    }

    .background {
        height: 100%;
        width: 100%;
    }

    .elements {
        height: auto;
        width: 100%;
    }

    .packet,
    .packet2 {
        width: 100%;
        height: auto;
    }

    .button {
        width: 100%;
        height: auto;
    }

}


@keyframes move {
    100% {
        transform: rotate(360deg) translatex(5px) rotate(-360deg);
    }

    0% {
        transform: rotate(0deg) translatex(5px) rotate(0deg);
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes swing {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-1px);
    }

    50% {
        transform: translateX(1px);
    }

    75% {
        transform: translateX(-1px);
    }

    100% {
        transform: translateX(0);
    }
}

.swing-infinite {
    animation: swing 1s ease-in-out infinite;
}

@keyframes rotateSwing {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(1deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(1deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.rotate-swing {
    animation: rotateSwing 1.5s ease-in-out infinite;
}


@keyframes headShake {
    0% {
        transform: translateX(0);
    }

    6.5% {
        transform: translateX(-6px) rotateY(-9deg);
    }

    18.5% {
        transform: translateX(5px) rotateY(7deg);
    }

    31.5% {
        transform: translateX(-3px) rotateY(-5deg);
    }

    43.5% {
        transform: translateX(2px) rotateY(3deg);
    }

    50% {
        transform: translateX(0);
    }
}

@keyframes infiniteHeadShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(-6px) rotateY(-9deg);
    }

    30% {
        transform: translateX(5px) rotateY(7deg);
    }

    50% {
        transform: translateX(-3px) rotateY(-5deg);
    }

    70% {
        transform: translateX(2px) rotateY(3deg);
    }
}