body {
  margin: 0;
  background-color: linear-gradient(to bottom right, #1ca9c9, #87ceeb); /* Ocean to Sky Blue */
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

.container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#hand {
  font-size: 5rem;
  position: relative;
  display: inline-block;
  animation: flick 0.3s ease-out forwards;
  animation-delay: 0.5s;
  z-index: 1;
}

#result {
  text-align: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: #444;
  opacity: 0;
  animation: showResult 0.3s ease-in forwards;
}

@keyframes flick {
  0% { transform: translateY(0); }
  30% { transform: translateY(-20px) rotate(-10deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes flipCoin {
  0% {
    transform: translateX(-50%) translateY(0) rotateX(0deg);
  }
  50% {
    transform: translateX(-50%) translateY(-150px) rotateX(180deg);
  }
  100% {
    transform: translateX(-50%) translateY(0) rotateX(360deg);
  }
}

@keyframes showResult {
  to { opacity: 1; }
}

.output {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 120px;
  gap: 20px;
}

.hand-container {
  position: relative;
  display: inline-block;
  perspective: 1000px; /* 👈 Add this line */
}

#coin {
  font-size: 2.5rem;
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 2;
  transform-origin: center center; /* ✅ Flip from the thumb */
  transform-style: flat; /* 👈 Add this line */
  transition: transform 1.5s ease-in-out;
}




