/* 网站特效层（2026-11-15 个性装扮·网站特效，会员专属）：启用项由 body[data-fx] 决定，site-fx.js 负责动态行为 */
/* 容器（点击系特效粒子宿主） */
#yg-site-fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
#yg-site-fx-layer[hidden] { display: none; }

/* 1. Logo 扫光 */
body[data-fx*=logo-shine] .site-fx-logo-scope { position: relative; overflow: hidden; display: inline-flex; }
body[data-fx*=logo-shine] .site-fx-logo-scope::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
    transform: skewX(-18deg); left: -60%;
    animation: zfFxLogoShine 4.5s ease-in-out infinite;
}
@keyframes zfFxLogoShine { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }

/* 5-7. 鼠标跟随光圈 */
#yg-site-fx-halo { position: fixed; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
    pointer-events: none; z-index: 99998; transform: translate(-50%, -50%); mix-blend-mode: multiply; display: none; }
#yg-site-fx-halo.h-blue  { background: radial-gradient(circle, rgba(93, 135, 255, .35) 0%, rgba(93, 135, 255, .12) 55%, transparent 70%); border: 1.5px solid rgba(93, 135, 255, .55); }
#yg-site-fx-halo.h-green { background: radial-gradient(circle, rgba(52, 199, 123, .35) 0%, rgba(52, 199, 123, .12) 55%, transparent 70%); border: 1.5px solid rgba(52, 199, 123, .55); }
#yg-site-fx-halo.h-pink  { background: radial-gradient(circle, rgba(255, 126, 179, .35) 0%, rgba(255, 126, 179, .12) 55%, transparent 70%); border: 1.5px solid rgba(255, 126, 179, .55); }

/* 8. 鼠标皮肤 */
body[data-fx*=cursor-skin], body[data-fx*=cursor-skin] a, body[data-fx*=cursor-skin] button {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M4 2 L20 13 L12.5 14.5 L15 21 L12 22 L9.5 15.5 L4 19 Z' fill='%23f5d67b' stroke='%231a1d26' stroke-width='1.6'/></svg>") 4 2, auto;
}

/* 9. 右键菜单 */
#yg-site-fx-ctx { position: fixed; z-index: 100000; min-width: 150px; background: #fff; border: 1px solid #e4e9f2;
    border-radius: 10px; box-shadow: 0 10px 28px rgba(17, 25, 45, .14); padding: 6px; display: none; }
#yg-site-fx-ctx .yg-ctx-item { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 7px;
    font-size: 13px; color: #333c4e; cursor: pointer; }
#yg-site-fx-ctx .yg-ctx-item i { font-size: 15px; color: #8590a6; }
#yg-site-fx-ctx .yg-ctx-item:hover { background: #f2f6ff; color: #1a1d26; }
#yg-site-fx-ctx .yg-ctx-item:hover i { color: #1a1d26; }
#yg-site-fx-ctx .yg-ctx-sep { height: 1px; background: #eef1f6; margin: 4px 6px; }

/* 10-12. 飘落粒子宿主（复用层） */
#yg-site-fx-fall { position: fixed; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; }
.yg-sfx-p { position: absolute; top: -30px; will-change: transform, opacity; }
/* 樱花花瓣 */
.yg-sfx-p.p-sakura { width: 11px; height: 13px; background: currentColor; border-radius: 11px 3px 11px 3px;
    color: #ffb7d5; opacity: .8; animation: zfSFxFall linear infinite; }
/* 枫叶 */
.yg-sfx-p.p-maple { width: 14px; height: 12px; background: currentColor; color: #e8833a; opacity: .85;
    clip-path: polygon(50% 0, 68% 30%, 100% 32%, 76% 58%, 84% 100%, 50% 76%, 16% 100%, 24% 58%, 0 32%, 32% 30%);
    animation: zfSFxFall linear infinite; }
/* 雪花 */
.yg-sfx-p.p-snow { width: 6px; height: 6px; background: #fff; border-radius: 50%; opacity: .9;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, .8); animation: zfSFxSnow linear infinite; }
@keyframes zfSFxFall {
    0% { transform: translate3d(0, -30px, 0) rotate(0deg); }
    25% { transform: translate3d(20px, 26vh, 0) rotate(100deg); }
    50% { transform: translate3d(-12px, 52vh, 0) rotate(200deg); }
    75% { transform: translate3d(18px, 78vh, 0) rotate(300deg); }
    100% { transform: translate3d(-8px, 108vh, 0) rotate(400deg); }
}
@keyframes zfSFxSnow {
    0% { transform: translate3d(0, -20px, 0); opacity: .9; }
    40% { transform: translate3d(14px, 40vh, 0); opacity: .7; }
    70% { transform: translate3d(-10px, 72vh, 0); opacity: .85; }
    100% { transform: translate3d(8px, 108vh, 0); opacity: .2; }
}

/* 点击爆炸粒子 / 漂浮文字 */
.yg-burst { position: absolute; width: 7px; height: 7px; border-radius: 50%; animation: zfBurst .8s ease-out forwards; }
@keyframes zfBurst {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
    100% { transform: translate3d(var(--dx), var(--dy), 0) scale(.2); opacity: 0; }
}
.yg-wtxt { position: absolute; font-weight: 800; white-space: nowrap; pointer-events: none;
    animation: zfWtxt 1.1s ease-out forwards; text-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
@keyframes zfWtxt {
    0% { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
    25% { transform: translate3d(0, -14px, 0) scale(1.15); opacity: 1; }
    100% { transform: translate3d(var(--dx, 0), -70px, 0) scale(1); opacity: 0; }
}

/* 13. 全局灰色主题 */
body[data-fx*=global-gray] { filter: grayscale(1); }
body[data-fx*=global-gray] .el-message, body[data-fx*=global-gray] .yg-toast { filter: none; }

/* 14. 文章随机彩色标签（JS 上色，基础过渡） */
body[data-fx*=article-tags] .yg-article-absite-tag-item span,
body[data-fx*=article-tags] .article-tags a,
body[data-fx*=article-tags] .tag-link { transition: background .25s, color .25s, border-color .25s; }

/* 15. 评论区背景图片 */
body[data-fx*=comment-bg] #comments, body[data-fx*=comment-bg] .comment-area,
body[data-fx*=comment-bg] .yg-article-comment, body[data-fx*=comment-bg] .yg-comment-wrap {
    background-image: linear-gradient(rgba(255, 255, 255, .92), rgba(255, 255, 255, .92)),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><text x='20' y='40' font-size='30' opacity='0.08'>💬</text><text x='70' y='90' font-size='24' opacity='0.08'>✦</text><text x='30' y='105' font-size='18' opacity='0.06'>♥</text></svg>");
    background-size: auto, 120px 120px;
    border-radius: 12px;
}

/* 16. 文章阴影边缘（淡绿柔光） */
body[data-fx*=article-glow] .yg-article-content,
body[data-fx*=article-glow] .article-detail-card,
body[data-fx*=article-glow] .yg-article-box {
    box-shadow: 0 0 0 1px rgba(72, 187, 120, .25), 0 0 26px rgba(72, 187, 120, .18) !important;
}

/* 17. 文章内图片边框光效 */
body[data-fx*=article-imgfx] .yg-article-content img,
body[data-fx*=article-glow] .yg-article-content img,
body[data-fx*=article-imgfx] .article-detail-card img {
    transition: box-shadow .25s, transform .25s;
    border-radius: 6px;
}
body[data-fx*=article-imgfx] .yg-article-content img:hover,
body[data-fx*=article-glow] .yg-article-content img:hover {
    box-shadow: 0 0 0 2px rgba(72, 187, 120, .55), 0 0 22px rgba(72, 187, 120, .35);
    transform: translateY(-1px);
}

/* 18. 文章标题美化 */
body[data-fx*=article-head] .yg-article-content h2,
body[data-fx*=article-head] .yg-article-content h3,
body[data-fx*=article-head] .article-detail-card h2,
body[data-fx*=article-head] .article-detail-card h3 {
    text-decoration: none !important;
    border-bottom: none !important;
    padding: 2px 0 2px 12px;
    border-left: 4px solid #1a1d26;
    background: linear-gradient(90deg, rgba(26, 29, 38, .06), transparent 75%);
    border-radius: 0 6px 6px 0;
}
body[data-fx*=article-head] .yg-article-content h2::before,
body[data-fx*=article-head] .article-detail-card h2::before {
    content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #1a1d26; margin-right: 8px; vertical-align: 2px;
}
