/* ========== Coin Flip   ========== */
.coin-main {
  position: relative;
  padding: 60px 20px 80px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;


}

.coin-container {
  width: 260px;
  height: 260px;
  margin: 40px auto 80px;
  perspective: 1200px;
  position: relative;
}

.coin {
  width: 100%;
  height: 100%;
  position: relative;
  transform: rotateX(0deg) rotateZ(0deg);
  transform-style: preserve-3d;
  z-index: 2;
  cursor: pointer;
}

.coin-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  overflow: hidden;
 
  background:
    repeating-conic-gradient(rgba(139, 101, 8, 0.15) 0deg 1.5deg,
      transparent 1.5deg 3deg),
    #B38F00;
  box-shadow:
    0 6px 0 #8A6700,
    4px 10px 15px rgba(0, 0, 0, 0.3),
    inset 0 0 2px 1px rgba(110, 82, 0, 0.4),
    0 20px 40px rgba(212, 175, 55, 0.2);
}

.coin-face::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 14px);
 
  height: calc(100% - 14px);
  border-radius: 50%;
  background: linear-gradient(135deg, #FFEAA7, #F1C40F);
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.18),
    inset 0 -2px 5px rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.face-text {
  font-size: 64px;
 
  font-weight: 900;
  color: #7E5300;
  letter-spacing: 2px;
  z-index: 2;
  position: relative;
  text-shadow: 0 1px 0 #FFFFFF;
  transition: opacity 0.1s;
}

.coin-shadow {
  position: absolute;
  bottom: -70px;
 
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
 
  height: 24px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  filter: blur(10px);
  transition: all 0.1s ease;
  z-index: 1;
}

.shine-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(120deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.8) 50%, transparent 60%, transparent 100%);
  transform: translateX(-100%) skewX(-20deg);
  z-index: 10;
}

.shine-effect.active {
  animation: shineAnim 0.6s ease-out;
}

@keyframes shineAnim {
  0% {
    opacity: 1;
    transform: translateX(-100%) skewX(-20deg);
  }

  100% {
    opacity: 0;
    transform: translateX(100%) skewX(-20deg);
  }
}

 
.coin.flipping {
  animation: flipAir 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes flipAir {
  0% {
    transform: translateY(0) rotateX(0deg) rotateZ(0deg);
    filter: blur(0px);
  }

  20% {
    transform: translateY(-130px) rotateX(360deg) rotateZ(10deg);
    filter: blur(4px);
  }

 
  50% {
    transform: translateY(-190px) rotateX(720deg) rotateZ(-10deg);
    filter: blur(5px);
  }

  80% {
    transform: translateY(-40px) rotateX(1080deg) rotateZ(5deg);
    filter: blur(2px);
  }

  90% {
    transform: translateY(12px) rotateX(1260deg) rotateZ(0deg);
    filter: blur(0px);
  }

  100% {
    transform: translateY(0) rotateX(1440deg) rotateZ(0deg);
    filter: blur(0px);
  }
}

.coin.flipping~.coin-shadow {
  animation: shadowAnim 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes shadowAnim {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 0.2;
  }

  50% {
    transform: translateX(-50%) scale(0.5);
    opacity: 0.1;
  }

  90% {
    transform: translateX(-50%) scale(1.2);
    opacity: 0.3;
  }

  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.2;
  }
}

 
.btn-coin {
  display: inline-block;
  padding: 14px 50px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #FFB347, #FF8C00);
  border: none !important;
 
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 6px 15px rgba(255, 140, 0, 0.3);
  transition: all 0.3s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  margin-top: 10px;
  outline: none;
}

.btn-coin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 140, 0, 0.4);
}

.btn-coin:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(255, 140, 0, 0.3);
}

.btn-coin:disabled {
  background: #E0E0E0 !important;
  color: #999 !important;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  text-shadow: none;
}

.result {
  margin-top: 15px;
  font-size: 24px;
  font-weight: 900;
  color: #7E5300;
  opacity: 0;
 
  min-height: 30px;
 
  transition: opacity 0.3s;
}

 
.result.shine-text {
  opacity: 1;
  color: #FF8C00;
  animation: popUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
    goldShine 1.2s ease-in-out infinite alternate;
}

@keyframes popUp {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  60% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes goldShine {
  0% {
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.7), 0 0 15px rgba(255, 140, 0, 0.5);
  }

  100% {
    text-shadow: 0 0 15px rgba(255, 215, 0, 1), 0 0 25px rgba(255, 140, 0, 0.8), 0 0 40px rgba(255, 140, 0, 0.6);
  }
}

 
.stats-panel {
  margin-top: 60px;
  width: 90%;
 
  max-width: 400px;
 
  margin-left: auto;
  margin-right: auto;
  padding: 0 5px;
}

.stats-header {
  display: flex;
  justify-content: space-between;
 
  align-items: center;
  margin-bottom: 12px;
  position: relative;
  gap: 20px;
 
}

 
.stat-item {
  font-size: 14px;
  font-weight: 800;
}

.stat-yes {
  text-align: left;
  color: #B7950B;
 
}

.stat-no {
  text-align: right;
  color: #9C3D00;
 
}

/* Reset    */
.btn-reset {
  background: none;
 
  border: none;
  color: #8B6508;
 
  font-size: 12px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
  outline: none;
  align-self: center;
}

.btn-reset:hover {
  color: #B38F00;
 
  background: transparent;
}

 
.progress-bar {
  width: 100%;
  height: 18px;
 
  background: #F5F5F5;
  border-radius: 50px;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-yes {
 
  background: linear-gradient(90deg, #F1C40F, #B8E994);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.4);
}

.progress-no {
 
  background: linear-gradient(90deg, #D35400, #7E5300);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
}

 
@media (max-width: 768px) {
  .coin-container {
    width: 180px;
 
    height: 180px;
    margin: 20px auto 60px;
  }

  .coin-face {
    box-shadow:
      0 4px 0 #8A6700,
      3px 8px 12px rgba(0, 0, 0, 0.3),
      inset 0 0 2px 1px rgba(110, 82, 0, 0.4),
      0 15px 30px rgba(212, 175, 55, 0.15);
  }

  .face-text {
    font-size: 42px;
  }

  .cards {
    display: none;
  }

 

  @keyframes flipAir {
    0% {
      transform: translateY(0) rotateX(0deg) rotateZ(0deg);
      filter: blur(0px);
    }

    50% {
      transform: translateY(-100px) rotateX(720deg) rotateZ(-10deg);
      filter: blur(5px);
    }

    90% {
      transform: translateY(10px) rotateX(1260deg) rotateZ(0deg);
      filter: blur(0px);
    }

    100% {
      transform: translateY(0) rotateX(1440deg) rotateZ(0deg);
      filter: blur(0px);
    }
  }
}