.coin-scene { width: 120px; height: 120px; margin: 40px auto; perspective: 1000px; } .coin { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 2s cubic-bezier(.17,.67,.83,.67); } .coin-face { position: absolute; width: 100%; height: 100%; border-radius: 50%; font-size: 48px; font-weight: bold; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; } .heads { background: gold; color: black; } .tails { background: silver; color: black; transform: rotateY(180deg); }