/* 全站磁吸跟随 · 保留系统指针，多款式随机 */
.ptg-cursor,
.ptg-cursor * {
    pointer-events: none !important;
}

.ptg-cursor {
    --ptg-c-line: rgba(255, 80, 0, 0.5);
    --ptg-c-soft: rgba(229, 167, 81, 0.16);
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    overflow: hidden;
}

[data-bs-theme="dark"] .ptg-cursor {
    --ptg-c-line: rgba(255, 176, 96, 0.55);
    --ptg-c-soft: rgba(229, 167, 81, 0.2);
}

/* 天气特效开启时由特效层绘制道具跟随（水盆/雪人/护目镜），隐藏原样式 */
.ptg-cursor.ptg-cursor--basin-hide .ptg-cursor__glow,
.ptg-cursor.ptg-cursor--basin-hide .ptg-cursor__mark {
    opacity: 0 !important;
    visibility: hidden;
}

.ptg-cursor__glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 280px;
    margin: -140px 0 0 -140px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--ptg-c-soft) 0%,
        rgba(255, 80, 0, 0.04) 42%,
        transparent 70%
    );
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.35s ease;
}

.ptg-cursor.is-ready .ptg-cursor__glow {
    opacity: 0.85;
}

.ptg-cursor.is-magnet .ptg-cursor__glow,
.ptg-cursor.is-hover .ptg-cursor__glow {
    opacity: 1;
}

.ptg-cursor.is-text .ptg-cursor__glow,
.ptg-cursor.is-text .ptg-cursor__mark {
    opacity: 0.12 !important;
}

/* —— 公共 mark 底座 —— */
.ptg-cursor__mark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    opacity: 0;
    box-sizing: border-box;
    will-change: transform, opacity, width, height, margin;
    transition:
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        margin 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        border-radius 0.25s ease;
}

.ptg-cursor.is-ready .ptg-cursor__mark {
    opacity: 0.75;
}

.ptg-cursor.is-magnet .ptg-cursor__mark {
    opacity: 1;
}

.ptg-cursor.is-hover .ptg-cursor__mark {
    opacity: 1;
}

.ptg-cursor.is-down .ptg-cursor__mark {
    width: 14px !important;
    height: 14px !important;
    margin: -7px 0 0 -7px !important;
}

/* ========== 款式 1：菱形 ========== */
.ptg-cursor--diamond .ptg-cursor__mark {
    border: 1.5px solid var(--ptg-c-line);
    border-radius: 4px;
    background: rgba(255, 80, 0, 0.04);
    box-shadow: 0 0 12px rgba(255, 80, 0, 0.1);
}
.ptg-cursor--diamond.is-magnet .ptg-cursor__mark {
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border-color: rgba(255, 140, 0, 0.75);
    box-shadow: 0 0 20px rgba(255, 80, 0, 0.22);
}
.ptg-cursor--diamond.is-hover .ptg-cursor__mark {
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 6px;
    background: rgba(229, 167, 81, 0.1);
    box-shadow: 0 0 26px rgba(255, 80, 0, 0.28);
}

/* ========== 款式 2：细圆环 ========== */
.ptg-cursor--ring .ptg-cursor__mark {
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 1.5px solid var(--ptg-c-line);
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 0 4px rgba(255, 80, 0, 0.06);
}
.ptg-cursor--ring.is-magnet .ptg-cursor__mark {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-color: rgba(255, 140, 0, 0.8);
    box-shadow: 0 0 0 6px rgba(255, 80, 0, 0.08), 0 0 18px rgba(255, 80, 0, 0.2);
}
.ptg-cursor--ring.is-hover .ptg-cursor__mark {
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-width: 2px;
    box-shadow: 0 0 0 8px rgba(255, 80, 0, 0.1), 0 0 24px rgba(255, 80, 0, 0.25);
}

/* ========== 款式 3：十字准星 ========== */
.ptg-cursor--cross .ptg-cursor__mark {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 0;
    background:
        linear-gradient(var(--ptg-c-line), var(--ptg-c-line)) center/1.5px 100% no-repeat,
        linear-gradient(var(--ptg-c-line), var(--ptg-c-line)) center/100% 1.5px no-repeat;
    box-shadow: none;
    border-radius: 0;
}
.ptg-cursor--cross .ptg-cursor__mark::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1.5px solid var(--ptg-c-line);
    border-radius: 50%;
    opacity: 0.85;
}
.ptg-cursor--cross.is-magnet .ptg-cursor__mark {
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
}
.ptg-cursor--cross.is-hover .ptg-cursor__mark {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    filter: drop-shadow(0 0 8px rgba(255, 80, 0, 0.35));
}

/* ========== 款式 4：四角括号 ========== */
.ptg-cursor--brackets .ptg-cursor__mark {
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.ptg-cursor--brackets .ptg-cursor__mark::before,
.ptg-cursor--brackets .ptg-cursor__mark::after,
.ptg-cursor--brackets .ptg-cursor__mark > span::before,
.ptg-cursor--brackets .ptg-cursor__mark > span::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: var(--ptg-c-line);
    border-style: solid;
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), height 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
}
.ptg-cursor--brackets .ptg-cursor__mark > span {
    position: absolute;
    inset: 0;
}
.ptg-cursor--brackets .ptg-cursor__mark::before {
    top: 0;
    left: 0;
    border-width: 1.5px 0 0 1.5px;
}
.ptg-cursor--brackets .ptg-cursor__mark::after {
    top: 0;
    right: 0;
    border-width: 1.5px 1.5px 0 0;
}
.ptg-cursor--brackets .ptg-cursor__mark > span::before {
    bottom: 0;
    left: 0;
    border-width: 0 0 1.5px 1.5px;
}
.ptg-cursor--brackets .ptg-cursor__mark > span::after {
    right: 0;
    bottom: 0;
    border-width: 0 1.5px 1.5px 0;
}
.ptg-cursor--brackets.is-magnet .ptg-cursor__mark {
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
}
.ptg-cursor--brackets.is-magnet .ptg-cursor__mark::before,
.ptg-cursor--brackets.is-magnet .ptg-cursor__mark::after,
.ptg-cursor--brackets.is-magnet .ptg-cursor__mark > span::before,
.ptg-cursor--brackets.is-magnet .ptg-cursor__mark > span::after {
    width: 10px;
    height: 10px;
}
.ptg-cursor--brackets.is-hover .ptg-cursor__mark {
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    filter: drop-shadow(0 0 6px rgba(255, 80, 0, 0.3));
}
.ptg-cursor--brackets.is-hover .ptg-cursor__mark::before,
.ptg-cursor--brackets.is-hover .ptg-cursor__mark::after,
.ptg-cursor--brackets.is-hover .ptg-cursor__mark > span::before,
.ptg-cursor--brackets.is-hover .ptg-cursor__mark > span::after {
    width: 12px;
    height: 12px;
    border-color: rgba(255, 140, 0, 0.9);
}

/* 补齐 brackets 另外两角 */
.ptg-cursor--brackets .ptg-cursor__glow::after {
    content: none;
}

/* ========== 款式 5：实心光点 + 虚线环 ========== */
.ptg-cursor--orbit .ptg-cursor__mark {
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border: 1.5px dashed rgba(255, 80, 0, 0.4);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 80, 0, 0.85) 0 3px, transparent 3.5px);
    box-shadow: 0 0 10px rgba(255, 80, 0, 0.15);
}
.ptg-cursor--orbit.is-magnet .ptg-cursor__mark {
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border-color: rgba(255, 140, 0, 0.65);
    background: radial-gradient(circle at center, rgba(255, 140, 0, 0.95) 0 3.5px, transparent 4px);
    box-shadow: 0 0 18px rgba(255, 80, 0, 0.25);
}
.ptg-cursor--orbit.is-hover .ptg-cursor__mark {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-style: solid;
    border-color: rgba(255, 80, 0, 0.75);
    box-shadow: 0 0 24px rgba(255, 80, 0, 0.3);
}

/* ========== 款式 6：胶囊条 ========== */
.ptg-cursor--capsule .ptg-cursor__mark {
    width: 28px;
    height: 12px;
    margin: -6px 0 0 -14px;
    border: 1.5px solid var(--ptg-c-line);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 80, 0, 0.12), rgba(229, 167, 81, 0.18));
    box-shadow: 0 2px 10px rgba(255, 80, 0, 0.12);
}
.ptg-cursor--capsule.is-magnet .ptg-cursor__mark {
    width: 40px;
    height: 16px;
    margin: -8px 0 0 -20px;
    border-color: rgba(255, 140, 0, 0.8);
    box-shadow: 0 4px 16px rgba(255, 80, 0, 0.2);
}
.ptg-cursor--capsule.is-hover .ptg-cursor__mark {
    width: 48px;
    height: 20px;
    margin: -10px 0 0 -24px;
    background: linear-gradient(90deg, rgba(255, 80, 0, 0.18), rgba(229, 167, 81, 0.28));
    box-shadow: 0 6px 20px rgba(255, 80, 0, 0.28);
}

/* 被磁吸的目标 */
.ptg-magnet-active {
    will-change: translate;
    position: relative;
    z-index: 2;
}

html.ptg-cursor-on a,
html.ptg-cursor-on button,
html.ptg-cursor-on [role="button"],
html.ptg-cursor-on .btn,
html.ptg-cursor-on .page-numbers,
html.ptg-cursor-on .nav-link,
html.ptg-cursor-on .ptg-tax-link,
html.ptg-cursor-on .ptg-games-tag,
html.ptg-cursor-on .ptg-mod-fav,
html.ptg-cursor-on .action-btn,
html.ptg-cursor-on input[type="submit"],
html.ptg-cursor-on input[type="button"],
html.ptg-cursor-on label[for],
html.ptg-cursor-on summary {
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .ptg-cursor {
        display: none !important;
    }
}
