/* custom cursor styles  */

/* Hide default cursor on desktop */
@media (min-width: 769px) {
  * {
    cursor: none !important;
  }
}

/* Main cursor container */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999999;
  mix-blend-mode: difference;
}

/* Inner dot - Fast follower */
.cursor-inner {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 999999;
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Outer circle - Smooth follower */
.cursor-circle {
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 999998;
  transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              border 0.3s ease,
              opacity 0.3s ease;
  opacity: 0.6;
}

/* Hover state for interactive elements */
body.cursor-hover .cursor-inner {
  width: 0;
  height: 0;
  background: transparent;
}

body.cursor-hover .cursor-circle {
  width: 80px;
  height: 80px;
  border: 2px solid #fff;
  opacity: 0.4;
}

/* Click/Active state */
body.cursor-active .cursor-circle {
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  opacity: 1;
}

body.cursor-active .cursor-inner {
  width: 6px;
  height: 6px;
}

/* Link hover state */
body.cursor-link .cursor-circle {
  width: 60px;
  height: 60px;
  border: 3px solid #fff;
  opacity: 0.8;
  animation: cursor-pulse 1s ease-in-out infinite;
}

@keyframes cursor-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.5;
  }
}

/* Hide cursor when leaving viewport */
body.cursor-hidden .cursor-inner,
body.cursor-hidden .cursor-circle {
  opacity: 0;
}

/* Text selection state */
body.cursor-text .cursor-circle {
  width: 50px;
  height: 50px;
  border-style: dashed;
  opacity: 0.5;
}

/* Disabled/Loading state */
body.cursor-disabled .cursor-circle {
  border-color: #666;
  opacity: 0.3;
}

body.cursor-disabled .cursor-inner {
  background: #666;
  opacity: 0.3;
}

/* Hide on mobile */
@media (max-width: 768px) {
  .custom-cursor,
  .cursor-inner,
  .cursor-circle {
    display: none !important;
  }
}

/* Particle trail system */
.cursor-particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999997;
  opacity: 1;
  mix-blend-mode: difference;
  animation: particle-fade 0.8s ease-out forwards;
}

@keyframes particle-fade {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: scale(0.5) translate(-50%, -50%) translateY(-20px);
  }
}

/* Magnetic effect hint */
.cursor-magnetic .cursor-circle {
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.9);
}

/* Special card hover effect */
body.cursor-card .cursor-circle {
  width: 100px;
  height: 100px;
  border: 2px solid #fff;
  opacity: 0.3;
}

body.cursor-card .cursor-inner {
  width: 15px;
  height: 15px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 1);
}