/* 自定义光标脱尾动画效果 */

/* 隐藏默认光标 */
@media (pointer: fine) {
  html, body, * { 
    cursor: none !important; 
  }
}

/* 自定义光标容器 */
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* 主光标 - 真实鼠标箭头样式 */
.cursor-main {
  position: fixed;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 10000;
  transform: translate3d(-2px, -2px, 0);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%230066cc'/><stop offset='100%' stop-color='%23004499'/></linearGradient><filter id='gl' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='1.2'/></filter></defs><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='%23ffffff' stroke='url(%23g1)' stroke-width='1.5'/><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='none' stroke='%230066cc' stroke-opacity='0.8' stroke-width='2.5' filter='url(%23gl)'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  will-change: left, top, transform;
}


/* 光标悬停效果 */
.cursor-hover {
  transform: translate(-2px, -2px) scale(1.3);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%23cc3300'/><stop offset='100%' stop-color='%23990066'/></linearGradient><filter id='gl' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='1.4'/></filter></defs><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='%23ffffff' stroke='url(%23g1)' stroke-width='1.5'/><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='none' stroke='%23cc3300' stroke-opacity='0.9' stroke-width='2.5' filter='url(%23gl)'/></svg>");
}

/* 点击效果 */
.cursor-click {
  transform: translate(-2px, -2px) scale(0.9);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%23cc6600'/><stop offset='100%' stop-color='%23cc3300'/></linearGradient><filter id='gl' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='1.6'/></filter></defs><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='%23ffffff' stroke='url(%23g1)' stroke-width='1.5'/><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='none' stroke='%23cc6600' stroke-opacity='0.9' stroke-width='2.5' filter='url(%23gl)'/></svg>");
}

/* 文本光标 */
.cursor-text {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, #0066cc, #004499);
  border-radius: 1px;
  box-shadow: 
    0 0 8px rgba(0, 102, 204, 0.9),
    0 0 16px rgba(0, 68, 153, 0.7),
    0 0 24px rgba(0, 68, 153, 0.5);
  background-image: none;
  border: 1px solid rgba(0, 102, 204, 0.8);
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
  .cursor-main {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%2300ff6a'/><stop offset='100%' stop-color='%23009cff'/></linearGradient><filter id='gl' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='1.2'/></filter></defs><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='%23ffffff' stroke='url(%23g1)' stroke-width='1'/><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='none' stroke='%2300ff6a' stroke-opacity='0.7' stroke-width='2' filter='url(%23gl)'/></svg>");
  }
  
  .cursor-hover {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%23ff8a80'/><stop offset='100%' stop-color='%2380cbc4'/></linearGradient><filter id='gl' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='1.4'/></filter></defs><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='%23ffffff' stroke='url(%23g1)' stroke-width='1'/><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='none' stroke='%23ff8a80' stroke-opacity='0.8' stroke-width='2' filter='url(%23gl)'/></svg>");
  }
  
  .cursor-click {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%23ffd93d'/><stop offset='100%' stop-color='%23ff6b6b'/></linearGradient><filter id='gl' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='1.6'/></filter></defs><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='%23ffffff' stroke='url(%23g1)' stroke-width='1'/><path d='M2 2 L2 16 L6 12 L9 18 L11 17 L8 11 L13 11 Z' fill='none' stroke='%23ffd93d' stroke-opacity='0.9' stroke-width='2' filter='url(%23gl)'/></svg>");
  }
  
  .cursor-text {
    background: linear-gradient(to bottom, #00ff6a, #009cff);
    box-shadow: 
      0 0 12px rgba(0, 255, 106, 0.9),
      0 0 24px rgba(0, 156, 255, 0.7);
    border: 1px solid rgba(0, 255, 106, 0.8);
  }
}

/* 减少动画效果（无障碍支持） */
@media (prefers-reduced-motion: reduce) {
  .cursor-main {
    transition: none;
  }
}

/* Dark mode variants (slightly brighter) with valid combined media query */
@media (pointer: fine) and (prefers-color-scheme: dark) {
  :root {
    --cursor-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%2300ff6a'/><stop offset='100%' stop-color='%23009cff'/></linearGradient><filter id='gl' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='0.9'/></filter></defs><path d='M3 2 L3 20 L7 16 L11.6 24 L14.6 22.4 L10.2 14.4 L15.2 14 Z' fill='%23ffffff' stroke='url(%23g1)' stroke-width='1.3'/><path d='M3 2 L3 20 L7 16 L11.6 24 L14.6 22.4 L10.2 14.4 L15.2 14 Z' fill='none' stroke='%2300ff6a' stroke-opacity='0.65' stroke-width='3.2' filter='url(%23gl)'/></svg>") 2 2, auto;
    --cursor-pointer: var(--cursor-arrow);
    --cursor-text: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><defs><linearGradient id='t1' x1='0' y1='0' x2='0' y2='1'><stop offset='0%' stop-color='%2300ff6a'/><stop offset='100%' stop-color='%23009cff'/></linearGradient><filter id='tg' x='-50%' y='-50%' width='200%' height='200%'><feGaussianBlur stdDeviation='0.9'/></filter></defs><path d='M14 4 L14 24 M9 6 L19 6 M9 22 L19 22' stroke='url(%23t1)' stroke-width='1.6' stroke-linecap='round'/><path d='M14 4 L14 24 M9 6 L19 6 M9 22 L19 22' stroke='%2300ff6a' stroke-opacity='0.65' stroke-width='3.2' stroke-linecap='round' filter='url(%23tg)'/></svg>") 10 14, auto;
  }
}

