@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    list-style:none;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #425F57;
    height:100vh;
}
.container{
    display:block;
    width: 750px;
    height: 600px;
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
}
h1{
    font-weight: 600;
    margin-top: 10px;
    font-size: 30px;
    color: #425F57;
    margin-left: 10px;
    margin-bottom: 10px;
}
.wrapper{
    margin-top:10px;
    background-color: #f8f8f8;
    display: flex;
    width: 725px;
    height: 500px;
    border-radius:10px;
    padding: 10px;
    align-items: center;
    justify-content: center;
}

.cards, .card, .view{
    display: flex;
    justify-content: center;
    align-items: center;
}
.cards{
    display: flex;
    margin: 10px;
    padding: 10px;
    flex-wrap: wrap;
    justify-content: space-between; 
    height:100%;
    width: 100%;
}
.cards .card{
    height: calc(100% /4 - 15px);
    width: calc(100% /4 - 15px);
    perspective: 800px;
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
}
.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);
    }
}
.cards .card .view{
    position: absolute;
    width: 90%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    border-radius: 7px;
    background: #fff;
    transition:transform 0.05s linear;
    box-shadow: 3px 4px 50px -15px rgba(0,0,0,0.3); 
}
.view{
    display: flex;
    margin: 10px;
    background: #fff;
}
.card .front-view span{
    font-size: 43px;
    color: #425F57;
    padding: 20px;
    max-width: 130px;
}
.card .back-view{
    transform: rotateY(-90deg);
}
.card .back-view img{
    max-width:43px;

}
.card.transform .front-view{
    transform: rotateY(180);
}
.card.transform .back-view{
    transform: rotateY(0);
}