/* =======================================
   COIN REWARD ANIMATION STYLES
   Used when a coupon is successfully redeemed
   ======================================= */

/* Full-screen overlay */
#coinRewardOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  pointer-events: all;
}

.coin-reward-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  animation: coinBackdropIn 0.4s ease;
}

.coin-reward-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.coin-reward-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
}

/* Glow behind the coin */
.coin-reward-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  animation: coinGlowPulse 2s ease-in-out infinite;
  z-index: 5;
}

/* Sparkle particles */
.coin-reward-sparkles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
}

.coin-reward-sparkles::before,
.coin-reward-sparkles::after {
  content: '✦';
  position: absolute;
  color: #fbbf24;
  font-size: 1.2rem;
  animation: sparkleFloat 2s ease-in-out infinite;
}

.coin-reward-sparkles::before {
  top: 0;
  left: 20%;
  animation-delay: 0s;
}

.coin-reward-sparkles::after {
  top: 10%;
  right: 15%;
  animation-delay: 0.5s;
}

/* Main coin icon with ring */
.coin-reward-icon-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(249, 115, 22, 0.2));
  border: 3px solid rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: coinRingPulse 1.5s ease-in-out infinite;
  position: relative;
}

.coin-reward-icon-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 158, 11, 0.3);
  animation: coinRingSpin 8s linear infinite;
}

.coin-reward-main-coin {
  font-size: 3.5rem;
  color: #f59e0b;
  text-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
  animation: coinBounce 1s ease 0.3s both;
}

/* Text elements */
.coin-reward-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.coin-reward-amount {
  font-size: 3rem;
  font-weight: 900;
  color: #f59e0b;
  margin: 0.5rem 0;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.coin-reward-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Dismiss button */
.coin-reward-claim-btn {
  background: linear-gradient(135deg, #f59e0b, #f97316) !important;
  color: #000 !important;
  border: none !important;
  padding: 12px 40px !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  border-radius: 50px !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  transition: all 0.3s ease;
}

.coin-reward-claim-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.6);
}

/* Coin rain canvas */
#coinRainCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Fade out */
.coin-reward-fadeout {
  animation: coinFadeOut 0.5s ease forwards;
}

/* ========== KEYFRAMES ========== */

@keyframes coinBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes coinGlowPulse {
  0%, 100% { 
    transform: translate(-50%, -60%) scale(1); 
    opacity: 0.6; 
  }
  50% { 
    transform: translate(-50%, -60%) scale(1.15); 
    opacity: 1; 
  }
}

@keyframes coinRingPulse {
  0%, 100% { 
    transform: scale(1); 
    border-color: rgba(245, 158, 11, 0.5); 
  }
  50% { 
    transform: scale(1.05); 
    border-color: rgba(245, 158, 11, 0.8); 
  }
}

@keyframes coinRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes coinBounce {
  0% { 
    transform: scale(0) rotate(-180deg); 
    opacity: 0; 
  }
  50% { 
    transform: scale(1.3) rotate(10deg); 
  }
  70% { 
    transform: scale(0.9) rotate(-5deg); 
  }
  100% { 
    transform: scale(1) rotate(0deg); 
    opacity: 1; 
  }
}

@keyframes sparkleFloat {
  0%, 100% { 
    transform: translateY(0) scale(1); 
    opacity: 0.4; 
  }
  50% { 
    transform: translateY(-15px) scale(1.3); 
    opacity: 1; 
  }
}

@keyframes coinFadeOut {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 576px) {
  .coin-reward-title {
    font-size: 1.3rem;
  }
  .coin-reward-amount {
    font-size: 2.2rem;
  }
  .coin-reward-icon-ring {
    width: 90px;
    height: 90px;
  }
  .coin-reward-main-coin {
    font-size: 2.5rem;
  }
  .coin-reward-glow {
    width: 200px;
    height: 200px;
  }
}

/* ========== COUPON REDEEM INPUT STYLES ========== */

#couponRedeemInput:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.25) !important;
  outline: none;
}

#couponRedeemInput::placeholder {
  color: rgba(245, 158, 11, 0.3);
  letter-spacing: 5px;
}
