/* ─── Celebration Particle System — Styles ─────────────────── */

/* Toast container */
#cw-celebration-toasts {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 360px;
}

/* Toast base */
.cw-celebration-toast {
  padding: 12px 20px;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.4s ease;
  pointer-events: auto;
}

.cw-celebration-toast.cw-toast-visible {
  transform: translateX(0);
  opacity: 1;
}

.cw-celebration-toast.cw-toast-exit {
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}

/* Toast type colors */
.cw-toast-milestone {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(255, 165, 0, 0.9));
  border-left: 4px solid #ff6b6b;
}

.cw-toast-surge {
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.9), rgba(255, 140, 0, 0.9));
  border-left: 4px solid #ff4500;
}

.cw-toast-overtake {
  background: linear-gradient(135deg, rgba(100, 100, 255, 0.9), rgba(160, 160, 255, 0.9));
  border-left: 4px solid #6464ff;
  animation: cw-toast-flash 0.3s ease-out;
}

.cw-toast-combat {
  background: linear-gradient(135deg, rgba(255, 50, 50, 0.9), rgba(200, 30, 30, 0.9));
  border-left: 4px solid #ff3232;
}

.cw-toast-levelup {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.85), rgba(255, 165, 0, 0.85));
  border-left: 4px solid #ffd700;
  color: #333;
}

.cw-toast-championship {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 140, 0, 0.95));
  border-left: 4px solid #ffd700;
  color: #333;
  font-size: 16px;
  animation: cw-toast-glow 1s ease-in-out infinite alternate;
}

/* Animations */
@keyframes cw-toast-flash {
  0% { filter: brightness(2); }
  100% { filter: brightness(1); }
}

@keyframes cw-toast-glow {
  0% { box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3); }
  100% { box-shadow: 0 8px 32px rgba(255, 215, 0, 0.7), 0 0 60px rgba(255, 215, 0, 0.3); }
}

/* Mobile responsive */
@media (max-width: 600px) {
  #cw-celebration-toasts {
    top: 60px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .cw-celebration-toast {
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .cw-celebration-toast {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }

  .cw-toast-levelup,
  .cw-toast-championship {
    color: #1a1a2e;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .cw-celebration-toast {
    transition: opacity 0.2s ease;
    transform: none !important;
  }

  .cw-celebration-toast.cw-toast-visible {
    opacity: 1;
  }

  .cw-celebration-toast.cw-toast-exit {
    opacity: 0;
  }

  @keyframes cw-toast-glow {
    0%, 100% { box-shadow: 0 8px 32px rgba(255, 215, 0, 0.5); }
  }
}
