/* Custom cursor styling */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: transform;
}

.custom-cursor.hidden {
  opacity: 0;
}

.cursor-dot {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.1s ease, background-color 0.3s ease;
  z-index: 2;
}

.cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 1;
}

/* Hover effect for interactive elements */
.custom-cursor.hovering .cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: #ffd700;
}

.custom-cursor.hovering .cursor-ring {
  width: 50px;
  height: 50px;
  border-color: rgba(255, 215, 0, 0.5);
  background-color: rgba(255, 215, 0, 0.1);
}

/* Click effect */
.custom-cursor.clicking .cursor-dot {
  transform: translate(-50%, -50%) scale(0.8);
}

.custom-cursor.clicking .cursor-ring {
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0.7;
}

/* Text cursor */
.cursor-text {
  position: absolute;
  top: -30px;
  left: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-cursor.has-text .cursor-text {
  opacity: 1;
}

/* Cursor over accent elements */
.custom-cursor.over-accent .cursor-dot {
  background-color: #ffd700;
}

.custom-cursor.over-accent .cursor-ring {
  border-color: rgba(255, 215, 0, 0.7);
}

/* Media cursor */
.custom-cursor.media-cursor .cursor-ring {
  width: 70px;
  height: 70px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.7);
}

.custom-cursor.media-cursor .cursor-dot {
  transform: translate(-50%, -50%) scale(0);
}

/* Click ripple effect */
@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

.custom-cursor.clicking::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid #ffd700;
  border-radius: 50%;
  animation: ripple 0.8s ease-out;
  z-index: 0;
}

/* Ensure cursor is hidden on mobile/touch devices */
@media (pointer: coarse) {
  .custom-cursor {
    display: none;
  }
}

/* Respect user's reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .custom-cursor {
    display: none;
  }
  
  html {
    cursor: auto !important;
  }
}
