.firework {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #0097fc, transparent);
  border-radius: 100%;
  pointer-events: none;
  animation: explode 1500ms ease-out forwards;
  z-index: 1000;
}

@keyframes explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.5);
    opacity: 0;
  }
}
