/* =========================================================
 * cursor.css —— 自定义鼠标：根部牵线吊着初音酱 + logo 点击爆散
 * 仅鼠标设备启用；触屏自动关闭。
 * =======================================================*/

/* 启用自定义鼠标后隐藏系统指针（文本输入保留工字光标） */
body.has-cursor, body.has-cursor * { cursor: none !important; }
body.has-cursor input, body.has-cursor textarea { cursor: text !important; }

/* 提线根部：传统圆角箭头光标（青绿填充 + 白描边，即时跟随） */
.cur-dot, .cur-line, .cur-miku {
  position: fixed; left: 0; top: 0;
  pointer-events: none; opacity: 0;
  transition: opacity .3s;
  z-index: 1400;
  will-change: transform;
}
.cur-dot { width: 24px; }
.cur-dot svg {
  display: block;
  transition: transform .22s var(--ease), filter .22s;
  filter: drop-shadow(0 2px 6px rgba(10, 23, 19, .35));
}
.cur-dot.is-hover svg { transform: scale(1.14); filter: drop-shadow(0 0 8px rgba(53, 224, 178, .65)); }
.cur-dot.is-text svg { transform: scale(.8); opacity: .75; }

/* 牵线：从根部垂到初音的领口 */
.cur-line {
  height: 2px; margin-top: -1px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(53,224,178,.85));
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(53, 224, 178, .5);
  z-index: 1399;
}

/* 初音酱：挂在提线下，物理摆动 */
.cur-miku {
  z-index: 1398;
  filter:
    drop-shadow(0 6px 10px rgba(0, 0, 0, .3))
    drop-shadow(0 0 12px rgba(53, 224, 178, .25));
}
.cur-miku img {
  width: 76px; height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* 点击特效层 */
.cur-fx { position: fixed; inset: 0; z-index: 1390; pointer-events: none; }
.cur-logo {
  position: absolute; left: 0; top: 0;
  height: 26px; width: auto;
  animation: curLogoFly .95s cubic-bezier(.16,.8,.35,1) forwards;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
  will-change: transform, opacity;
}
@keyframes curLogoFly {
  0%   { transform: translate(-50%, -50%) scale(.4) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot)); opacity: 0; }
}

/* 触屏设备彻底关闭 */
@media (pointer: coarse) {
  .cur-dot, .cur-line, .cur-miku, .cur-fx { display: none; }
}
