.custom-smooth-cursor {
  --cursor-blur: 0px;
  --cursor-trail-1-x: 0px;
  --cursor-trail-1-y: 0px;
  --cursor-trail-1-opacity: 0;
  --cursor-trail-2-x: 0px;
  --cursor-trail-2-y: 0px;
  --cursor-trail-2-opacity: 0;
  --smooth-cursor-rotate: 0deg;
  --smooth-cursor-scale: 1;
  position: fixed;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  pointer-events: none;
  z-index: 999999;
  opacity: 0;
  transform: translate3d(-120px, -120px, 0);
  will-change: transform, opacity;
  transition: opacity .18s ease;
}

.custom-smooth-cursor-inner,
.custom-smooth-cursor-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: var(--cursor-hotspot-x, 34px) var(--cursor-hotspot-y, 7px);
  will-change: transform, filter, opacity;
}

.custom-smooth-cursor-inner {
  transform: rotate(var(--smooth-cursor-rotate)) scale(var(--smooth-cursor-scale));
  filter:
    blur(var(--cursor-blur))
    drop-shadow(0 7px 16px rgba(0, 0, 0, .38))
    drop-shadow(0 0 12px rgba(89, 239, 220, .12));
  transition: filter .12s ease;
}

.custom-smooth-cursor-trail {
  opacity: 0;
  pointer-events: none;
}

.custom-smooth-cursor-trail-1 {
  opacity: var(--cursor-trail-1-opacity);
  transform:
    translate3d(var(--cursor-trail-1-x), var(--cursor-trail-1-y), 0)
    rotate(var(--smooth-cursor-rotate))
    scale(var(--smooth-cursor-scale));
  filter:
    blur(calc(var(--cursor-blur) + 1.8px))
    drop-shadow(0 5px 14px rgba(0, 0, 0, .26))
    drop-shadow(0 0 10px rgba(89, 239, 220, .08));
}

.custom-smooth-cursor-trail-2 {
  opacity: var(--cursor-trail-2-opacity);
  transform:
    translate3d(var(--cursor-trail-2-x), var(--cursor-trail-2-y), 0)
    rotate(var(--smooth-cursor-rotate))
    scale(var(--smooth-cursor-scale));
  filter:
    blur(calc(var(--cursor-blur) + 3px))
    drop-shadow(0 4px 12px rgba(0, 0, 0, .2));
}

.custom-smooth-cursor img,
.custom-smooth-cursor-trail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.custom-smooth-cursor.is-visible {
  opacity: .94;
}

.custom-smooth-cursor.is-hovering .custom-smooth-cursor-inner {
  filter:
    blur(var(--cursor-blur))
    brightness(1.12) saturate(1.08)
    drop-shadow(0 9px 20px rgba(0, 0, 0, .42))
    drop-shadow(0 0 18px rgba(255, 216, 107, .22));
}

.custom-smooth-cursor.is-active .custom-smooth-cursor-inner {
  filter:
    blur(var(--cursor-blur))
    brightness(1.05) saturate(1.04)
    drop-shadow(0 5px 12px rgba(0, 0, 0, .4))
    drop-shadow(0 0 12px rgba(255, 216, 107, .18));
}

.custom-smooth-cursor.is-native {
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.smooth-cursor-enabled,
  html.smooth-cursor-enabled body,
  html.smooth-cursor-enabled body *,
  body.smooth-cursor-enabled,
  body.smooth-cursor-enabled * {
    cursor: none !important;
  }

  html.smooth-cursor-enabled input,
  html.smooth-cursor-enabled textarea,
  html.smooth-cursor-enabled select,
  html.smooth-cursor-enabled [contenteditable="true"],
  body.smooth-cursor-enabled input,
  body.smooth-cursor-enabled textarea,
  body.smooth-cursor-enabled select,
  body.smooth-cursor-enabled [contenteditable="true"] {
    cursor: text !important;
  }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .custom-smooth-cursor {
    display: none !important;
  }
}
