body{
    background-color: #3f3fe7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wrapper{
    width: 400px;
    height: 400px;
    background-color: #f6f2f2;
    border-radius: 8px;
    padding: 25px;
}
.cards{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.cards .card{
    position: relative;
    cursor: pointer;
    height: calc(100% / 4 - 10px);
    width: calc(100% / 4 - 10px);
    transform-style: preserve-3d;
    perspective: 800px;
}
.card .front-view span{
    font-size: 43px;
    color: #3f3fe7;
}
.card .back-view{
    transform: rotateY(-180deg);
}
.card.flip .back-view{
    transform: rotateY(0);
}
.card, .view{
    display: flex;
    justify-content: center;
    align-items: center;
}
.cards .card .view{
    width: 100%;
    height: 100%;
    background-color: white;
    box-shadow: 0 3px 10px rgb(0, 0, 0 , 0.1);
    border-radius: 7px;
    position: absolute;
    transition: transform 0.3s linear;
    backface-visibility: hidden;
    user-select: none;
    pointer-events: none;
}
.card .back-view img{
    width: 45px;
}
.card.flip .front-view{
    transform: rotateY(180deg);
}
.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);
    }
}

