/* ============================================
   EFFECTS.CSS — Animations & Visual Effects
   Lucky Draw Lottery Application
   ============================================ */

/* ---- Keyframes ---- */

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

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

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 8px rgba(212, 168, 83, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(212, 168, 83, 0.6), 0 0 48px rgba(212, 168, 83, 0.2);
  }
  100% {
    box-shadow: 0 0 8px rgba(212, 168, 83, 0.3);
  }
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ---- Animation Classes ---- */

.animate-fadeIn {
  animation: fadeIn 0.4s ease-out both;
}

.animate-slideUp {
  animation: slideUp 0.5s ease-out both;
}

.animate-scaleIn {
  animation: scaleIn 0.4s ease-out both;
}

/* ---- Shimmer Text ---- */

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--accent-gold-dark) 0%,
    var(--accent-gold-light) 25%,
    var(--accent-gold) 50%,
    var(--accent-gold-light) 75%,
    var(--accent-gold-dark) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

/* ---- Glow ---- */

.glow-gold {
  animation: glow 2s ease-in-out infinite;
}

/* ---- Reveal Overlay ---- */

.reveal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.reveal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.reveal-code {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  color: #1a1a1a;
  animation: scaleIn 0.6s ease-out both;
  line-height: 1.2;
}

.reveal-name {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--accent-gold);
  animation: slideUp 0.5s ease-out 0.3s both;
  line-height: 1.3;
}

.reveal-label {
  font-size: 14px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

/* ---- Confetti Wrapper ---- */

.confetti-wrapper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3000;
}
