.flip-card { background-color: transparent; width: 200px; height: 250px; perspective: 1000px; /* Enables the 3D effect */ } .flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; } .flip-card:hover .flip-card-inner { transform: rotateY(-180deg) } .flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; justify-content: center; align-items: center; font-size: 24px; color: white; border-radius: 10px; } .flip-card-front { background-color: #3498db; } .flip-card-back { background-color: #03a046; transform: rotateY(-180deg) }