#sparkles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  pointer-events: auto; /* clickable */
}

.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(white, transparent);
    border-radius: 0%;
    opacity: 0.8;
    animation: sparklePoint 1.5s ease-out forwards;
}

@keyframes sparklePoint {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }

    50% {
        transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translate(calc(var(--x) * 2px), calc(var(--y) * 2px)) scale(0);
        opacity: 0;
    }
}