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

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.card .front-view img {
    width: 40px;
}

.card .back-view img {
    max-width: 80px;
}

.container {
    height: 500px;
    width: 500px;
    background: linear-gradient(to right, #fc6767, #ec008c);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 0 10px;
}

.cards,
.card,
.view {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cards {
    height: 100%;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cards .card {
    height: calc(100% / 4 - 10px);
    width: calc(100% / 4 - 10px);
    cursor: pointer;

    position: relative;
    perspective: 800px;
    transform-style: preserve-3d;
}

.cards .card .view {
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 25px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.616);

    position: absolute;
    transition: transform .25s linear;
    backface-visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.card .front-view span {
    font-size: 40px;
    color: #6563ff;
}

.card .back-view {
    /* display: none; */

    transform: rotateY(-180deg);
}

/* .card:hover .back-view{
    transform: rotateY(0);
}
.card:hover .front-view{
    transform: rotateY(180deg);
} js 3*/


/*JS 3*/
.card.flip .back-view {
    transform: rotateY(0);
}

.card.flip .front-view {
    transform: rotateY(180deg);
}

/*JS 7.2*/
.card.shake {
    animation: shake 0.35s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-13px);
    }

    40% {
        transform: translateX(13px);
    }

    60% {
        transform: translateX(-8px);
    }

    80% {
        transform: translateX(8px);
    }
}