/**
 * Fireworks Display Styles
 * CSS for animated fireworks display shown Dec 29 - Jan 2
 */

.fireworks-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.firework-explosion {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.firework-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--particle-color, #ffffff);
  box-shadow: 0 0 4px var(--particle-color, #ffffff),
              0 0 8px var(--particle-color, #ffffff);
  animation: particle-explode 1.5s ease-out forwards;
  pointer-events: none;
}

.firework-flash {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--flash-color, #ffffff) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: flash-fade 0.5s ease-out forwards;
  pointer-events: none;
}

/* Particle explosion animation */
@keyframes particle-explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
    opacity: 0;
  }
}

/* Flash fade animation */
@keyframes flash-fade {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
  }
}

/* Add some variation with nth-child selectors */
.firework-particle:nth-child(2n) {
  animation-duration: 1.3s;
}

.firework-particle:nth-child(3n) {
  animation-duration: 1.7s;
}

.firework-particle:nth-child(4n) {
  width: 6px;
  height: 6px;
}

.firework-particle:nth-child(5n) {
  animation-duration: 1.4s;
}

.firework-particle:nth-child(7n) {
  animation-duration: 1.6s;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .firework-particle,
  .firework-flash {
    animation: none;
    opacity: 0;
  }
  
  .fireworks-container {
    display: none;
  }
}
