/* Public custom mouse cursor library. Loaded only when a pointer is selected. */

.mouse-circle-mover,
.mouse-circle-mover-follow,
.cp-cursor {
  pointer-events: none !important;
  user-select: none;
  -webkit-user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  html[data-public-cursor]:not([data-cursor-pointer="none"]) {
    cursor: none;
  }
  html[data-public-cursor]:not([data-cursor-pointer="none"]) * {
    cursor: none !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .mouse-circle-mover,
  .mouse-circle-mover-follow,
  .cp-cursor { display: none !important; }
}

/* Existing pointer */
.mouse-circle-mover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100000;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
}
.mouse-circle-mover-follow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
  transition: width .2s ease, height .2s ease, margin .2s ease, opacity .15s ease;
}
.mouse-circle-mover.is-ready,
.mouse-circle-mover-follow.is-ready { opacity: 1; }
html[data-cursor-hover="1"] .mouse-circle-mover-follow {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
}

/* Shared styled cursor — compact 32px canvas */
.cp-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100000;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .cp-cursor.is-ready { display: flex; }
}
.cp-cursor > * { pointer-events: none; position: absolute; }
.cp-shell {
  inset: 0;
  display: block;
  transition: transform .2s ease;
}
.cp-shell > * { position: absolute; }
.cp-cursor.is-hover .cp-shell { transform: scale(1.12); }

.cp-cursor-burst {
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.7);
  opacity: 0;
  transform: scale(.4);
}
.cp-cursor.is-click .cp-cursor-burst {
  animation: cp-burst .42s ease-out;
}

.cp-core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  z-index: 3;
}
.cp-ring {
  border-radius: 50%;
  inset: 0;
}
.cp-particle {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
}

/* Fireball — small molten orb + thin rotating rainbow ring */
.cp-cursor--fireball {
  overflow: visible;
}
.cp-cursor--fireball .cp-fb-glow {
  width: 16px;
  height: 16px;
  left: 50%;
  top: 50%;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,140,30,.5) 0 28%, rgba(255,70,0,.18) 52%, transparent 72%);
  z-index: 1;
}
.cp-cursor--fireball .cp-fb-ring,
.cp-cursor--fireball .cp-fb-highlight {
  inset: 1px;
  border-radius: 50%;
  z-index: 2;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.15px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.15px), #000 calc(100% - 1px));
}
.cp-cursor--fireball .cp-fb-ring {
  background: conic-gradient(
    from 0deg,
    #ff2a2a 0%,
    #ff7a00 14%,
    #ffd000 28%,
    #3ee08a 42%,
    #1ac8ff 56%,
    #7a5cff 70%,
    #ff3d8a 84%,
    #ff2a2a 100%
  );
  filter:
    drop-shadow(0 0 2px rgba(255,160,50,.7))
    drop-shadow(0 0 5px rgba(80,180,255,.35));
  animation: cp-spin 3.6s linear infinite;
}
.cp-cursor--fireball .cp-fb-highlight {
  background: conic-gradient(
    from 80deg,
    transparent 0 62%,
    rgba(255,255,255,.95) 72%,
    rgba(255,230,160,.55) 76%,
    transparent 86% 100%
  );
  animation: cp-spin 3.6s linear infinite;
  opacity: .9;
}
.cp-cursor--fireball .cp-fb-core {
  width: 8px;
  height: 8px;
  left: 50%;
  top: 50%;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  z-index: 4;
  background:
    radial-gradient(circle at 34% 28%, #fff8d2 0 16%, transparent 38%),
    radial-gradient(circle at 50% 58%, #ffcc55 0 28%, #ff8418 55%, #e31b00 100%);
  box-shadow:
    0 0 4px 1px rgba(255,190,70,.9),
    0 0 9px 2px rgba(255,90,10,.45);
  animation: cp-fb-pulse 2s ease-in-out infinite;
}
.cp-cursor--fireball .cp-fb-flame {
  position: absolute;
  width: 11px;
  height: 11px;
  left: 50%;
  top: 50%;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  z-index: 3;
  background: radial-gradient(circle at 50% 60%, rgba(255,170,40,.55) 0 36%, rgba(255,70,0,.2) 58%, transparent 74%);
  animation: cp-fb-flicker .5s ease-in-out infinite;
}
.cp-cursor--fireball .cp-fb-spark {
  width: 2px;
  height: 2px;
  left: 50%;
  top: 50%;
  margin: -1px 0 0 -1px;
  border-radius: 50%;
  z-index: 5;
  background: #ffe7a8;
  box-shadow: 0 0 4px 1px rgba(255,180,70,.8);
  animation: cp-orbit 4.2s linear infinite;
  opacity: .75;
}
.cp-cursor--fireball .cp-fb-spark:nth-child(5) { animation-duration: 3.4s; animation-delay: -.8s; }
.cp-cursor--fireball .cp-fb-spark:nth-child(6) { animation-duration: 5s; animation-delay: -1.6s; }
.cp-cursor--fireball .cp-fb-spark:nth-child(7) { animation-duration: 4.6s; animation-delay: -2.4s; }
.cp-cursor--fireball.is-hover .cp-fb-ring,
.cp-cursor--fireball.is-hover .cp-fb-highlight { animation-duration: 2.1s; }
.cp-cursor--fireball.is-hover .cp-fb-core {
  box-shadow:
    0 0 6px 2px rgba(255,200,80,.95),
    0 0 12px 3px rgba(255,90,10,.55);
}
.cp-cursor--fireball.is-click .cp-fb-ring {
  filter:
    drop-shadow(0 0 4px rgba(255,180,60,.9))
    drop-shadow(0 0 8px rgba(80,180,255,.45));
}

/* Cyber Orb */
.cp-cursor--cyber-orb .cp-ring {
  border: 1.4px solid transparent;
  background:
    linear-gradient(#071525, #071525) padding-box,
    conic-gradient(#22d3ee, #3b82f6, #8b5cf6, #22d3ee) border-box;
  animation: cp-spin 4.2s linear infinite;
}
.cp-cursor--cyber-orb .cp-ring-2 {
  inset: 5px;
  border-radius: 50%;
  border: 1.2px solid rgba(34,211,238,.55);
  animation: cp-spin-rev 6s linear infinite;
}
.cp-cursor--cyber-orb .cp-core {
  background: radial-gradient(circle, #fff 0 20%, #67e8f9 45%, #2563eb 100%);
  box-shadow: 0 0 8px 2px rgba(34,211,238,.7);
  animation: cp-pulse 2s ease-in-out infinite;
}
.cp-cursor--cyber-orb .cp-particle {
  background: #67e8f9;
  animation: cp-orbit 3.6s linear infinite;
}
.cp-cursor--cyber-orb .cp-particle:nth-child(5) { animation-delay: -1.2s; }
.cp-cursor--cyber-orb .cp-particle:nth-child(6) { animation-delay: -2.4s; }

/* Neural Network */
.cp-cursor--neural-network .cp-core {
  width: 6px;
  height: 6px;
  background: #67e8f9;
  box-shadow: 0 0 8px #22d3ee;
}
.cp-cursor--neural-network .cp-nn-node {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 5px #8b5cf6;
  animation: cp-nn-drift 3.2s ease-in-out infinite;
}
.cp-cursor--neural-network .cp-nn-node:nth-child(2) { top: 3px; left: 13px; background: #22d3ee; animation-delay: -.4s; }
.cp-cursor--neural-network .cp-nn-node:nth-child(3) { top: 8px; right: 3px; animation-delay: -.8s; }
.cp-cursor--neural-network .cp-nn-node:nth-child(4) { bottom: 6px; right: 5px; background: #818cf8; animation-delay: -1.2s; }
.cp-cursor--neural-network .cp-nn-node:nth-child(5) { bottom: 3px; left: 12px; animation-delay: -1.6s; }
.cp-cursor--neural-network .cp-nn-node:nth-child(6) { top: 10px; left: 3px; background: #22d3ee; animation-delay: -2s; }
.cp-cursor--neural-network .cp-nn-line {
  height: 1px;
  width: 11px;
  background: linear-gradient(90deg, rgba(103,232,249,.15), rgba(103,232,249,.75), rgba(167,139,250,.2));
  transform-origin: left center;
  top: 15.5px;
  left: 16px;
  opacity: .7;
}
.cp-cursor--neural-network .cp-pulse-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  top: 14px;
  left: 16px;
  animation: cp-nn-signal 1.8s linear infinite;
}

/* Plasma */
.cp-cursor--plasma-energy .cp-core {
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #fff 0 35%, #67e8f9 70%, #c084fc 100%);
  box-shadow: 0 0 8px #22d3ee, 0 0 14px rgba(192,132,252,.45);
}
.cp-cursor--plasma-energy .cp-arc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.4px solid transparent;
  border-top-color: #22d3ee;
  border-right-color: #c084fc;
  animation: cp-spin 1.4s linear infinite;
  filter: drop-shadow(0 0 3px #22d3ee);
}
.cp-cursor--plasma-energy .cp-arc:nth-child(2) {
  width: 16px;
  height: 16px;
  border-top-color: #f472b6;
  border-right-color: #6366f1;
  animation-duration: 1.9s;
  animation-direction: reverse;
}
.cp-cursor--plasma-energy .cp-particle {
  background: #a5f3fc;
  animation: cp-spark 1.6s ease-in-out infinite;
}
.cp-cursor--plasma-energy .cp-particle:nth-child(5) { top: 2px; left: 14px; }
.cp-cursor--plasma-energy .cp-particle:nth-child(6) { right: 3px; bottom: 8px; animation-delay: .5s; }

/* Holographic Diamond */
.cp-cursor--holographic-diamond .cp-aura {
  inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(165,243,252,.35);
  animation: cp-spin 8s linear infinite;
}
.cp-cursor--holographic-diamond .cp-diamond {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, rgba(103,232,249,.45), rgba(167,139,250,.35), rgba(244,114,182,.4));
  border: 1px solid rgba(224,231,255,.85);
  box-shadow: 0 0 8px rgba(139,92,246,.55);
  animation: cp-diamond 5s linear infinite;
}
.cp-cursor--holographic-diamond.is-hover .cp-diamond { animation-duration: 2.2s; }

/* Quantum Ring */
.cp-cursor--quantum-ring .cp-core {
  width: 5px;
  height: 5px;
  background: #fff;
  box-shadow: 0 0 8px #67e8f9;
  animation: cp-pulse 2.2s ease-in-out infinite;
}
.cp-cursor--quantum-ring .cp-qring {
  width: 26px;
  height: 10px;
  border: 1.2px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(transparent, transparent) padding-box,
    conic-gradient(from 90deg, #22d3ee, #6366f1, #c026d3, #fb7185, #22d3ee) border-box;
  border: 1.2px solid transparent;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  animation: cp-spin 3.2s linear infinite;
}
.cp-cursor--quantum-ring .cp-qring:nth-child(2) { transform: rotate(60deg); animation-duration: 4.4s; animation-direction: reverse; }
.cp-cursor--quantum-ring .cp-qring:nth-child(3) { transform: rotate(-50deg); width: 22px; height: 9px; animation-duration: 5.2s; }
.cp-cursor--quantum-ring .cp-particle { background: #f0abfc; animation: cp-orbit 4s linear infinite; }

/* Digital Flame */
.cp-cursor--digital-flame .cp-flame {
  width: 8px;
  height: 14px;
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #fff7cc 0 16%, #fb923c 48%, #ef4444 78%, transparent 86%);
  box-shadow: 0 0 8px rgba(249,115,22,.75), 0 0 12px rgba(168,85,247,.3);
  filter: drop-shadow(0 0 3px #22d3ee);
  animation: cp-flicker .28s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.cp-cursor--digital-flame .cp-particle {
  background: #fdba74;
  animation: cp-rise 1.4s ease-out infinite;
}
.cp-cursor--digital-flame .cp-particle:nth-child(3) { left: 10px; animation-delay: .3s; }
.cp-cursor--digital-flame .cp-particle:nth-child(4) { left: 18px; animation-delay: .7s; }

/* AI Robot Eye */
.cp-cursor--ai-robot-eye .cp-hud {
  inset: 1px;
  border-radius: 50%;
  border: 1.4px solid rgba(103,232,249,.75);
  box-shadow: 0 0 8px rgba(34,211,238,.35);
  animation: cp-spin 9s linear infinite;
}
.cp-cursor--ai-robot-eye .cp-hud::before,
.cp-cursor--ai-robot-eye .cp-hud::after {
  content: '';
  position: absolute;
  background: #67e8f9;
}
.cp-cursor--ai-robot-eye .cp-hud::before { width: 4px; height: 1.5px; top: -1px; left: 13px; }
.cp-cursor--ai-robot-eye .cp-hud::after { width: 1.5px; height: 4px; right: -1px; top: 13px; }
.cp-cursor--ai-robot-eye .cp-core {
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 40% 40%, #fff 0 12%, #22d3ee 38%, #1e1b4b 70%);
  box-shadow: 0 0 8px #22d3ee, 0 0 12px rgba(139,92,246,.35);
  overflow: hidden;
}
.cp-cursor--ai-robot-eye .cp-scan {
  width: 12px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: cp-scan 1.6s ease-in-out infinite;
  top: 8px;
  left: 10px;
}

/* Aurora Galaxy */
.cp-cursor--aurora-galaxy .cp-core {
  width: 5px;
  height: 5px;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 14px #c084fc;
  animation: cp-pulse 2s ease-in-out infinite;
}
.cp-cursor--aurora-galaxy .cp-ring {
  inset: 3px;
  background: conic-gradient(#22d3ee, #6366f1, #c026d3, #fb7185, #fb923c, #22d3ee);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.2px), #000 calc(100% - 1.8px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.2px), #000 calc(100% - 1.8px));
  animation: cp-spin 5.4s linear infinite;
  filter: drop-shadow(0 0 4px rgba(192,38,211,.45));
  border-radius: 46% 54% 48% 52%;
}
.cp-cursor--aurora-galaxy .cp-particle {
  background: #fff;
  animation: cp-orbit 5s linear infinite;
}
.cp-cursor--aurora-galaxy .cp-particle:nth-child(4) { animation-duration: 3.6s; }
.cp-cursor--aurora-galaxy .cp-particle:nth-child(5) { animation-duration: 6.2s; animation-delay: -1s; }

/* Hover + click */
.cp-cursor.is-hover { filter: brightness(1.12); }
.cp-cursor.is-hover .cp-ring,
.cp-cursor.is-hover .cp-arc,
.cp-cursor.is-hover .cp-qring { animation-duration: 1.8s; }
.cp-cursor--digital-flame.is-hover .cp-flame { transform: scale(1.08); }
.cp-cursor.is-click .cp-core { transform: scale(1.2); }

@media (prefers-reduced-motion: reduce) {
  .cp-cursor * { animation: none !important; }
}

@keyframes cp-spin { to { transform: rotate(360deg); } }
@keyframes cp-spin-rev { to { transform: rotate(-360deg); } }
@keyframes cp-fb-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.08); filter: brightness(1.18); }
}
@keyframes cp-fb-flicker {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes cp-spark {
  0%, 100% { opacity: .2; transform: scale(.7); }
  50% { opacity: .95; transform: scale(1); }
}
@keyframes cp-orbit {
  from { transform: rotate(0deg) translateX(12px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(12px) rotate(-360deg); }
}
@keyframes cp-burst {
  0% { opacity: .8; transform: scale(.4); }
  100% { opacity: 0; transform: scale(1.8); }
}
@keyframes cp-nn-drift {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(1px, -1px); }
}
@keyframes cp-nn-signal {
  0% { transform: rotate(0deg) translateX(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: rotate(360deg) translateX(10px); opacity: 0; }
}
@keyframes cp-diamond {
  to { transform: rotate(405deg); }
}
@keyframes cp-flicker {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  50% { transform: scaleY(1.08) scaleX(.94); }
}
@keyframes cp-rise {
  0% { opacity: .8; transform: translateY(6px) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(.4); }
}
@keyframes cp-scan {
  0%, 100% { transform: translateY(-3px); opacity: .3; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* Admin preview containment */
.ws-cursor-stage {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.08), transparent 40%),
    linear-gradient(160deg, #071525 0%, #12324f 55%, #0b2540 100%);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.ws-cursor-stage:not([data-preview-mode="none"]) { cursor: none; }
.ws-cursor-stage:not([data-preview-mode="none"]) * { cursor: none !important; }
.ws-cursor-stage .mouse-circle-mover,
.ws-cursor-stage .mouse-circle-mover-follow,
.ws-cursor-stage .cp-cursor { position: absolute; }
.ws-cursor-stage-hint {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: rgba(226,232,240,.78);
  pointer-events: none;
}
.ws-cursor-stage-hint strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  color: #fff;
}
