body{
display: flex;
justify-content: center;
align-items: center;
max-height: 100vh;
font-family: sans-serif;
}
.card{
width: 250px;
height: 350px;
perspective: 1000px;
}
.card-container{
width: 100%;
height: 100%;
position: relative;
transform-style:preserve-3d ;
transition: all 0.8s;
transform-origin: center;
}
.one{
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
color: white;
border-radius: 10px;
}
.front{
background-color: #3498db;

}
.back{
background-color: #e74c3c;
transform: rotateY(180deg);
}
.card:hover .card-container{
    transform: rotateY(180deg);
}