/* 光标样式定义层 - 仅样式，不控制显示/隐藏 */

/* 自定义光标基础样式 */
.custom-cursor {
  width: 16px;
  height: 16px;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background: rgba(128, 128, 128, 0.8);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  display: none;
  /* 初始隐藏，由JS控制显示 */
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* 延迟跟随光标样式 */
.cursor-follower {
  width: 32px;
  height: 32px;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  background: rgba(100, 100, 255, 0.3);
  border-radius: 50%;
  border: 1px solid rgba(100, 150, 255, 0.5);
  display: none;
  /* 初始隐藏，由JS控制显示 */
  transform: translate(-50%, -50%);
  transition: left 0.2s ease-out, top 0.2s ease-out, opacity 0.3s ease;
}

/* 可点击元素上的光标样式 */
.custom-cursor.clickable {
  width: 25px;
  height: 25px;
  background: rgba(100, 150, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(100, 150, 255, 0.5);
}

/* 粒子样式 */
.cursor-particle {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  animation: particle-flow 1.2s ease-out forwards;
  display: block;
}

@keyframes particle-flow {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 1;
  }

  70% {
    opacity: 0.7;
  }

  100% {
    transform: scale(0.1) translate(var(--tx), var(--ty));
    opacity: 0;
    filter: blur(1px);
  }
}

/* 触摸设备隐藏光标 */
@media (hover: none) and (pointer: coarse) {

  .custom-cursor,
  .cursor-follower,
  .cursor-particle {
    display: none !important;
  }
}

/* 弹窗样式保持不变 */
.popup-overlay * {
  cursor: auto !important;
}

.popup-link {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 152, 219, 0.3);
  padding: 0 2px;
  transition: all 0.2s ease;
}

.popup-link:hover {
  color: #2980b9;
  border-bottom-color: #2980b9;
  background-color: rgba(52, 152, 219, 0.1);
}

.popup-link:active {
  color: #1c6ea4;
  transform: translateY(1px);
}

.popup-link:focus {
  outline: 2px solid rgba(52, 152, 219, 0.5);
  outline-offset: 2px;
}

.popup-link:visited {
  color: #8e44ad;
  border-bottom-color: rgba(142, 68, 173, 0.3);
}