/* ============================================
   WIN CELEBRATION SYSTEM
   ============================================ */

/* Confetti particle animation */
@keyframes ct-confetti-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(var(--ct-confetti-v, 400px)) translateX(var(--ct-confetti-x, 0px)) rotate(720deg) scale(0);
    opacity: 0;
  }
}

.ct-confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}

/* Glow pulse */
@keyframes ct-glow-pulse {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* Win banner */
.ct-win-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(0, 212, 255, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.2);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.ct-win-banner--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ct-win-banner__icon {
  font-size: 1.8rem;
}

.ct-win-banner__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ct-win-banner__text strong {
  font-size: 1rem;
  font-weight: 700;
  color: #22C55E;
}

.ct-win-banner__text span {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--ct-font-tabular, 'JetBrains Mono', monospace);
  color: #E8EDF5;
}

/* Balance animation */
.balance-up {
  color: #22C55E !important;
  transition: color 0.3s ease;
}

.balance-down {
  color: #EF4444 !important;
  transition: color 0.3s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ct-confetti-container,
  .ct-confetti-particle,
  .ct-pulse-glow {
    display: none !important;
  }
  .ct-win-banner {
    transition: opacity 0.2s ease;
    transform: translateX(-50%) translateY(0);
  }
}
