/* Base cursor style */
.cursor {
  position: fixed;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0;
  background-color: transparent;
  pointer-events: none;
  z-index: 1000;
  transform-origin: center;
  transition: transform 0.3s ease-out, opacity .5s ease;
  transform: translate(-50%, -50%) scale(.3);
}

/* Pseudo-element for the gradient border */
.cursor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid transparent;
  animation: spin 2s linear infinite;
  background: conic-gradient(from 0deg, hotpink, orange, yellow, hotpink);
  background-clip: padding-box;
  mask: radial-gradient(circle, transparent 20%, black 41%);
  -webkit-mask: radial-gradient(circle, transparent 40%, black 0%);
  z-index: -1;
}

.cursor.grow {
  transform: translate(-50%, -50%) scale(.5);
}

/* Keyframes for spinning animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Keyframes for spark animation */
@keyframes sparkAnimation {
  0% {
    transform: rotate(0deg) translateX(40px) scale(0.5);
    opacity: 0.8;
  }

  50% {
    transform: rotate(180deg) translateX(40px) scale(1.2);
    opacity: 0.5;
  }

  100% {
    transform: rotate(360deg) translateX(40px) scale(0.5);
    opacity: 0.8;
  }
}