/* ===== PREMIUM CELEBRATION ANIMATION ===== */
/* GPU-accelerated: only transform & opacity animations */

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  will-change: background;
  transition: background 0.6s ease;
}

.celebration-overlay.active {
  pointer-events: all;
  background: rgba(0, 0, 0, 0.88);
}

.celebration-overlay.fade-out {
  background: rgba(0, 0, 0, 0);
  transition: background 0.8s ease 0.2s;
}

/* Particle canvas */
.celebration-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Rotating light rays behind the card */
.celebration-rays {
  position: absolute;
  width: 600px;
  height: 600px;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.6s ease;
}

.celebration-overlay.active .celebration-rays {
  opacity: 1;
  animation: rays-rotate 12s linear infinite;
}

.celebration-overlay.fade-out .celebration-rays {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.celebration-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 300px;
  transform-origin: 50% 0;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.5), transparent 80%);
}

@keyframes rays-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Central glow pulse */
.celebration-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.25), rgba(255, 107, 53, 0.08) 50%, transparent 70%);
  opacity: 0;
  will-change: transform, opacity;
  filter: blur(40px);
}

.celebration-overlay.active .celebration-glow {
  opacity: 1;
  animation: glow-pulse 2s ease-in-out infinite alternate;
}

.celebration-overlay.fade-out .celebration-glow {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@keyframes glow-pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* Main card */
.celebration-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 48px 52px 40px;
  border-radius: 20px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  background:
    radial-gradient(ellipse at top, rgba(245, 166, 35, 0.12), transparent 60%),
    linear-gradient(170deg, rgba(30, 24, 12, 0.97), rgba(13, 13, 13, 0.98));
  box-shadow:
    0 0 80px rgba(245, 166, 35, 0.2),
    0 30px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: scale(0.6) translateY(40px);
  will-change: transform, opacity;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.celebration-overlay.active .celebration-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.celebration-overlay.fade-out .celebration-card {
  opacity: 0;
  transform: scale(1.08) translateY(-20px);
  transition: transform 0.6s ease, opacity 0.4s ease;
}

/* Crown icon */
.celebration-crown {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  opacity: 0;
  transform: scale(0) rotate(-20deg);
  will-change: transform, opacity;
}

.celebration-overlay.active .celebration-crown {
  animation: crown-enter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

@keyframes crown-enter {
  0% { opacity: 0; transform: scale(0) rotate(-20deg); }
  60% { opacity: 1; transform: scale(1.2) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.celebration-crown::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.3), transparent 70%);
  animation: crown-glow 2s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes crown-glow {
  0% { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.1); }
}

/* "PREMIUM" kicker text */
.celebration-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(10px);
  will-change: transform, opacity;
}

.celebration-overlay.active .celebration-kicker {
  animation: text-enter 0.5s ease 0.5s forwards;
}

/* Main title */
.celebration-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #FFD076, #F5A623, #FF6B35);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(10px);
  will-change: transform, opacity;
}

.celebration-overlay.active .celebration-title {
  animation: text-enter 0.5s ease 0.55s forwards;
}

/* Subtitle */
.celebration-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  will-change: transform, opacity;
}

.celebration-overlay.active .celebration-subtitle {
  animation: text-enter 0.5s ease 0.65s forwards;
}

@keyframes text-enter {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Feature pills */
.celebration-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.celebration-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.18);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  will-change: transform, opacity;
}

.celebration-overlay.active .celebration-pill:nth-child(1) { animation: pill-enter 0.4s ease 0.8s forwards; }
.celebration-overlay.active .celebration-pill:nth-child(2) { animation: pill-enter 0.4s ease 0.88s forwards; }
.celebration-overlay.active .celebration-pill:nth-child(3) { animation: pill-enter 0.4s ease 0.96s forwards; }
.celebration-overlay.active .celebration-pill:nth-child(4) { animation: pill-enter 0.4s ease 1.04s forwards; }

@keyframes pill-enter {
  0% { opacity: 0; transform: translateY(8px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.celebration-pill::before {
  content: '✦';
  font-size: 0.6rem;
  color: var(--gold);
}

/* Dismiss button */
.celebration-dismiss {
  padding: 12px 36px;
  border-radius: 10px;
  background: var(--gradient-gold);
  color: #000;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  will-change: transform, opacity;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
}

.celebration-overlay.active .celebration-dismiss {
  animation: text-enter 0.5s ease 1.15s forwards;
}

.celebration-dismiss:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(245, 166, 35, 0.45);
}

/* Shine sweep on card */
.celebration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  border-radius: 20px;
  pointer-events: none;
}

.celebration-overlay.active .celebration-card::before {
  animation: shine-sweep 1.5s ease 0.6s forwards;
}

@keyframes shine-sweep {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Responsive */
@media (max-width: 520px) {
  .celebration-card {
    padding: 36px 28px 32px;
    margin: 0 16px;
  }
  .celebration-title {
    font-size: 1.5rem;
  }
  .celebration-rays {
    width: 350px;
    height: 350px;
  }
  .celebration-ray {
    height: 175px;
  }
  .celebration-glow {
    width: 200px;
    height: 200px;
  }
}
