@charset "utf-8";
/* ==========================================================================
   雪舞极客 · 赛博特效增强层 (FX LAYER)
   --------------------------------------------------------------------------
   加载顺序: waylee-cyber.css -> waylee-hud.css -> waylee-fx.css
   本层只做"增量叠加"，不改动既有版式；删除 header_common.htm 中追加的两行
   引用即可完全回退。

   开关约定:
     <html data-wl-fx="0">  关闭全部特效（等价于移除本层）
     <html data-wl-fx="1">  标准（默认）
     <html data-wl-fx="2">  增强（追加粒子雨、透视地平线、更密集的故障抖动）
     <html data-wl-motion="off">  仅关闭循环动画，保留静态霓虹
   JS 未执行时 <html> 上不会有 wl-fx-on 类，本层全部规则不生效，页面保持原样。
   ========================================================================== */

/* ---------- 1. 调色板与公共变量 ---------------------------------------- */
:root {
    /* rgb 三元组，便于 rgba(var(--x), a) 拼接，兼容不支持 color-mix 的浏览器 */
    --fx-cyan: 8, 125, 130;
    --fx-pink: 214, 51, 108;
    --fx-violet: 112, 82, 190;
    --fx-amber: 214, 170, 0;

    --fx-bracket: 18px;
    --fx-line: 2px;
    --fx-ease: cubic-bezier(.2, .75, .25, 1);
}

:root[data-discuz-theme="dark"] {
    --fx-cyan: 82, 224, 204;
    --fx-pink: 255, 61, 129;
    --fx-violet: 183, 164, 246;
    --fx-amber: 248, 232, 93;
}

/* ---------- 2. 背景层：极光 / 动态网格 / 扫描线 -------------------------- */
/* 极光光斑：纯径向渐变 + transform 位移，全部走合成层，不触发重绘 */
html.wl-fx-on .wl-fx-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
html.wl-fx-on .wl-fx-aurora > i {
    position: absolute;
    display: block;
    width: 78vw;
    height: 78vw;
    max-width: 1100px;
    max-height: 1100px;
    border-radius: 50%;
    will-change: transform;
}
html.wl-fx-on .wl-fx-aurora > i:nth-child(1) {
    top: -32vw; left: -20vw;
    background: radial-gradient(circle, rgba(var(--fx-cyan), .20), rgba(var(--fx-cyan), .06) 42%, transparent 68%);
    animation: fx-drift-a 26s ease-in-out infinite alternate;
}
html.wl-fx-on .wl-fx-aurora > i:nth-child(2) {
    top: -26vw; right: -24vw;
    background: radial-gradient(circle, rgba(var(--fx-pink), .15), rgba(var(--fx-pink), .04) 42%, transparent 68%);
    animation: fx-drift-b 32s ease-in-out infinite alternate;
}
html.wl-fx-on .wl-fx-aurora > i:nth-child(3) {
    bottom: -40vw; left: 14vw;
    background: radial-gradient(circle, rgba(var(--fx-violet), .17), rgba(var(--fx-violet), .05) 42%, transparent 68%);
    animation: fx-drift-c 38s ease-in-out infinite alternate;
}
/* 日间模式收敛，避免整体发灰 */
:root:not([data-discuz-theme="dark"]) html.wl-fx-on .wl-fx-aurora > i { opacity: .45; }

/* 动态主网格：48px 周期与 body 既有网格同相位，位移一个周期后无缝循环 */
html.wl-fx-on .wl-fx-grid {
    position: fixed;
    inset: -48px;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(var(--fx-cyan), .085) 1px, transparent 1px),
        linear-gradient(rgba(var(--fx-cyan), .085) 1px, transparent 1px);
    background-size: 48px 48px;
    will-change: transform;
    animation: fx-grid-scroll 14s linear infinite;
}
/* 每 5 格一条加粗的"主干线"，形成双尺度网格 */
html.wl-fx-on .wl-fx-grid::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(var(--fx-cyan), .16) 1px, transparent 1px),
        linear-gradient(rgba(var(--fx-cyan), .16) 1px, transparent 1px);
    background-size: 240px 240px;
}
/* 网格向页面中部渐隐，避免与正文抢对比 */
html.wl-fx-on .wl-fx-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 62% at 50% 42%, var(--wl-bg) 0%, transparent 78%);
    opacity: .62;
}
:root:not([data-discuz-theme="dark"]) html.wl-fx-on .wl-fx-grid { opacity: .6; }

/* 扫描线 + 周期性下行亮线。不用 mix-blend-mode，避免整页离屏合成 */
html.wl-fx-on .wl-fx-scan {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    background: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent 2px,
        rgba(0, 0, 0, .22) 2px,
        rgba(0, 0, 0, .22) 3px
    );
    opacity: .2;
}
:root:not([data-discuz-theme="dark"]) html.wl-fx-on .wl-fx-scan { opacity: .06; }
html.wl-fx-on .wl-fx-scan::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 160px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(var(--fx-cyan), .05) 50%,
        rgba(var(--fx-cyan), .16) 90%,
        rgba(var(--fx-cyan), .48) 99%,
        transparent 100%
    );
    animation: fx-scan-drop 8s linear infinite;
}
html.wl-fx-on[data-wl-fx="0"] :is(.wl-fx-scan, .wl-fx-grid, .wl-fx-aurora, .wl-fx-spot, .wl-fx-floor, .wl-fx-particles, .wl-fx-progress) {
    display: none;
}

/* ---------- 3. 霓虹面板：描边发光 + HUD 四角角标 ------------------------- */
/* .pg_index / .pg_forumdisplay / .pg_viewthread 与 .wl-cyber 同在 body 上，必须写成并列类 */
html.wl-fx-on .wl-cyber.pg_index .fl > .bm,
html.wl-fx-on .wl-cyber.pg_forumdisplay .mn > .bm,
html.wl-fx-on .wl-cyber.pg_viewthread #postlist,
html.wl-fx-on .wl-cyber #chart,
html.wl-fx-on .wl-cyber .sd .bm {
    position: relative;
    box-shadow:
        0 0 0 1px rgba(var(--fx-cyan), .30),
        0 0 22px -6px rgba(var(--fx-cyan), .55),
        0 0 60px -28px rgba(var(--fx-cyan), .50),
        0 0 26px -16px rgba(var(--fx-cyan), .30) inset;
    transition: box-shadow .28s var(--fx-ease);
}
html.wl-fx-on .wl-cyber.pg_index .fl > .bm:is(:hover, :focus-within),
html.wl-fx-on .wl-cyber.pg_forumdisplay .mn > .bm:is(:hover, :focus-within),
html.wl-fx-on .wl-cyber.pg_viewthread #postlist:is(:hover, :focus-within),
html.wl-fx-on .wl-cyber #chart:is(:hover, :focus-within) {
    box-shadow:
        0 0 0 1px rgba(var(--fx-cyan), .62),
        0 0 30px -4px rgba(var(--fx-cyan), .78),
        0 0 80px -24px rgba(var(--fx-pink), .45),
        0 0 30px -14px rgba(var(--fx-cyan), .40) inset;
}

/* HUD 角标：用多重线性渐变在四角画出 L 形折线。.wl-hero 的伪元素已被主题占用，故排除 */
html.wl-fx-on .wl-cyber.pg_index .fl > .bm::before,
html.wl-fx-on .wl-cyber.pg_forumdisplay .mn > .bm::before,
html.wl-fx-on .wl-cyber.pg_viewthread #postlist::before,
html.wl-fx-on .wl-cyber #chart::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(rgba(var(--fx-cyan), .95), rgba(var(--fx-cyan), .95)) left top / var(--fx-bracket) var(--fx-line) no-repeat,
        linear-gradient(rgba(var(--fx-cyan), .95), rgba(var(--fx-cyan), .95)) left top / var(--fx-line) var(--fx-bracket) no-repeat,
        linear-gradient(rgba(var(--fx-cyan), .95), rgba(var(--fx-cyan), .95)) right top / var(--fx-bracket) var(--fx-line) no-repeat,
        linear-gradient(rgba(var(--fx-cyan), .95), rgba(var(--fx-cyan), .95)) right top / var(--fx-line) var(--fx-bracket) no-repeat,
        linear-gradient(rgba(var(--fx-pink), .85), rgba(var(--fx-pink), .85)) left bottom / var(--fx-bracket) var(--fx-line) no-repeat,
        linear-gradient(rgba(var(--fx-pink), .85), rgba(var(--fx-pink), .85)) left bottom / var(--fx-line) var(--fx-bracket) no-repeat,
        linear-gradient(rgba(var(--fx-pink), .85), rgba(var(--fx-pink), .85)) right bottom / var(--fx-bracket) var(--fx-line) no-repeat,
        linear-gradient(rgba(var(--fx-pink), .85), rgba(var(--fx-pink), .85)) right bottom / var(--fx-line) var(--fx-bracket) no-repeat;
    opacity: .72;
    transition: opacity .28s var(--fx-ease);
    filter: drop-shadow(0 0 5px rgba(var(--fx-cyan), .75));
}
html.wl-fx-on .wl-cyber.pg_index .fl > .bm:is(:hover, :focus-within)::before,
html.wl-fx-on .wl-cyber.pg_forumdisplay .mn > .bm:is(:hover, :focus-within)::before,
html.wl-fx-on .wl-cyber.pg_viewthread #postlist:is(:hover, :focus-within)::before,
html.wl-fx-on .wl-cyber #chart:is(:hover, :focus-within)::before { opacity: 1; }

/* 悬停时沿面板顶边跑动的一道光：只改 transform，开销极低 */
html.wl-fx-on .wl-cyber.pg_index .fl > .bm::after,
html.wl-fx-on .wl-cyber.pg_forumdisplay .mn > .bm::after,
html.wl-fx-on .wl-cyber.pg_viewthread #postlist::after,
html.wl-fx-on .wl-cyber #chart::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    z-index: 4;
    width: 28%;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgb(var(--fx-cyan)) 55%, #fff 78%, transparent);
    box-shadow: 0 0 12px rgba(var(--fx-cyan), .9);
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
    transition: opacity .2s ease;
}
@media (hover: hover) and (pointer: fine) {
    html.wl-fx-on .wl-cyber.pg_index .fl > .bm:hover::after,
    html.wl-fx-on .wl-cyber.pg_forumdisplay .mn > .bm:hover::after,
    html.wl-fx-on .wl-cyber.pg_viewthread #postlist:hover::after,
    html.wl-fx-on .wl-cyber #chart:hover::after {
        opacity: 1;
        animation: fx-edge-run 1.5s cubic-bezier(.3, .1, .2, 1) infinite;
    }
}

/* ---------- 4. 面板标题栏：扫光 + 霓虹字 ------------------------------- */
/* 扫光做成标题栏自身的一层背景，位移一个周期；不引入 overflow:hidden，
   以免裁掉 Discuz 标题栏里的下拉菜单 */
html.wl-fx-on .wl-cyber.pg_index .fl .bm_h,
html.wl-fx-on .wl-cyber .forumlist .subforumshow {
    background-image:
        linear-gradient(100deg, transparent 0%, rgba(var(--fx-cyan), .30) 50%, transparent 100%),
        linear-gradient(100deg, var(--wl-accent-soft), var(--wl-raised) 72%) !important;
    background-size: 34% 100%, 100% 100% !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: -40% 0, 0 0 !important;
    animation: fx-sweep-bg 7.5s cubic-bezier(.2, .75, .25, 1) infinite;
}
html.wl-fx-on .wl-cyber .bm_h :is(h2, h2 a) {
    text-shadow: 0 0 12px rgba(var(--fx-cyan), .32);
}
/* 标题栏左侧信号条：改为青→品红渐变霓虹 */
html.wl-fx-on .wl-cyber.pg_index .fl .bm_h::before {
    background: linear-gradient(180deg, rgb(var(--fx-cyan)), rgb(var(--fx-pink))) !important;
    box-shadow: 0 0 10px rgba(var(--fx-cyan), .7);
}

/* ---------- 5. 故障艺术标题（Glitch） ----------------------------------- */
/* JS 把标题文本写入 data-text，两个伪元素分别染成品红与青色做错位切片 */
html.wl-fx-on .wl-cyber .wl-fx-glitch {
    position: relative;
    display: inline-block;
    text-shadow:
        0 0 14px rgba(var(--fx-cyan), .38),
        0 0 2px rgba(var(--fx-cyan), .5);
}
html.wl-fx-on .wl-cyber .wl-fx-glitch::before,
html.wl-fx-on .wl-cyber .wl-fx-glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: none;
    mix-blend-mode: screen;
}
html.wl-fx-on .wl-cyber .wl-fx-glitch::before {
    color: rgb(var(--fx-pink));
    transform: translate(-1px, 0);
    animation: fx-glitch-a 3.4s steps(1, end) infinite;
}
html.wl-fx-on .wl-cyber .wl-fx-glitch::after {
    color: rgb(var(--fx-cyan));
    transform: translate(1px, 0);
    animation: fx-glitch-b 3.4s steps(1, end) infinite;
}
html.wl-fx-on[data-wl-fx="2"] .wl-cyber .wl-fx-glitch::before,
html.wl-fx-on[data-wl-fx="2"] .wl-cyber .wl-fx-glitch::after { animation-duration: 1.9s; }

/* ---------- 6. 链接与按钮 ------------------------------------------------ */
html.wl-fx-on .wl-cyber .tl .xst {
    transition: color .18s ease, text-shadow .18s ease;
}
@media (hover: hover) and (pointer: fine) {
    html.wl-fx-on .wl-cyber .tl .xst:hover {
        color: rgb(var(--fx-cyan));
        text-shadow: 0 0 12px rgba(var(--fx-cyan), .55);
    }
}

/* 主题色按钮（搜索、签到、分页）：霓虹外发光 */
html.wl-fx-on .wl-cyber :is(#scbar_btn, .wl-hero-links > a:first-child, .pgs strong, .pgbtn a) {
    box-shadow:
        0 0 0 1px rgba(var(--fx-amber), .5),
        0 0 16px -2px rgba(var(--fx-amber), .55);
    transition: box-shadow .22s var(--fx-ease), filter .22s ease;
}
html.wl-fx-on .wl-cyber :is(#scbar_btn, .wl-hero-links > a:first-child, .pgs strong, .pgbtn a):hover {
    box-shadow:
        0 0 0 1px rgba(var(--fx-amber), .9),
        0 0 26px 1px rgba(var(--fx-amber), .8);
    filter: brightness(1.06);
}

/* 导航当前项：底部霓虹条 */
html.wl-fx-on .wl-cyber #nv li.a a::after {
    height: 2px;
    box-shadow: 0 0 10px rgba(var(--fx-amber), .85), 0 0 22px rgba(var(--fx-amber), .45);
}

/* ---------- 7. 帖子列表行：悬停霓虹指示条 ------------------------------- */
@media (hover: hover) and (pointer: fine) {
    html.wl-fx-on .wl-cyber .tl tbody tr:hover > td,
    html.wl-fx-on .wl-cyber .tl tbody tr:hover > th {
        background-color: rgba(var(--fx-cyan), .07);
        box-shadow: inset 2px 0 0 rgb(var(--fx-cyan));
    }
}

/* ---------- 8. 顶栏 / 页脚 ---------------------------------------------- */
html.wl-fx-on .wl-cyber #toptb {
    border-bottom-color: rgba(var(--fx-cyan), .28);
    box-shadow: 0 1px 14px -4px rgba(var(--fx-cyan), .45);
}
html.wl-fx-on .wl-cyber #toptb .wp::before {
    color: rgb(var(--fx-cyan));
    text-shadow: 0 0 10px rgba(var(--fx-cyan), .7);
}
/* 顶栏标识末尾的闪烁光标 */
html.wl-fx-on .wl-cyber #toptb .wp::after {
    content: "";
    display: inline-block;
    float: left;
    width: 6px;
    height: 11px;
    margin: 9px 0 0 4px;
    background: rgb(var(--fx-cyan));
    box-shadow: 0 0 8px rgb(var(--fx-cyan));
    animation: fx-blink 1.1s steps(2, jump-none) infinite;
}
html.wl-fx-on .wl-cyber #nv {
    box-shadow: 0 1px 0 rgba(var(--fx-cyan), .28), 0 6px 22px -10px rgba(var(--fx-cyan), .55);
}
html.wl-fx-on .wl-cyber #nv li a {
    text-shadow: 0 0 10px rgba(var(--fx-cyan), .22);
}
html.wl-fx-on .wl-cyber #hd .wl-wordmark small {
    color: rgba(var(--fx-cyan), .85);
    letter-spacing: .22em;
}
html.wl-fx-on .wl-cyber #ft {
    border-top: 1px solid rgba(var(--fx-cyan), .22);
    box-shadow: 0 -1px 18px -6px rgba(var(--fx-cyan), .4);
}
html.wl-fx-on .wl-cyber .wl-theme-credit {
    color: rgb(var(--fx-cyan));
    text-shadow: 0 0 10px rgba(var(--fx-cyan), .6);
}

/* FX 强度开关（由 JS 注入到 #toptb .y） */
html.wl-fx-on .wl-cyber .wl-fx-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    margin: 4px 6px 4px 0;
    padding: 0 8px;
    border: 1px solid rgba(var(--fx-cyan), .45);
    border-radius: 3px;
    background: rgba(var(--fx-cyan), .07);
    color: rgb(var(--fx-cyan));
    font: 600 10px/1 var(--wl-mono, Consolas, monospace);
    letter-spacing: .12em;
    cursor: pointer;
    vertical-align: top;
    transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
html.wl-fx-on .wl-cyber .wl-fx-toggle:hover {
    background: rgba(var(--fx-cyan), .16);
    border-color: rgb(var(--fx-cyan));
    box-shadow: 0 0 14px -2px rgba(var(--fx-cyan), .7);
}
html.wl-fx-on .wl-cyber .wl-fx-toggle:focus-visible {
    outline: 2px solid rgb(var(--fx-cyan));
    outline-offset: 2px;
}
html.wl-fx-on .wl-cyber .wl-fx-toggle b {
    font-weight: 700;
    color: rgb(var(--fx-amber));
    text-shadow: 0 0 8px rgba(var(--fx-amber), .8);
}
html.wl-fx-on .wl-cyber .wl-fx-toggle i {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgb(var(--fx-cyan));
    box-shadow: 0 0 8px rgb(var(--fx-cyan));
    animation: fx-blink 1.6s steps(2, jump-none) infinite;
}
html.wl-fx-on[data-wl-fx="0"] .wl-cyber .wl-fx-toggle {
    border-color: rgba(var(--fx-pink), .5);
    color: rgb(var(--fx-pink));
    background: rgba(var(--fx-pink), .06);
}
html.wl-fx-on[data-wl-fx="0"] .wl-cyber .wl-fx-toggle i {
    background: rgb(var(--fx-pink));
    box-shadow: none;
    animation: none;
}

/* ---------- 9. 顶部滚动进度条 ------------------------------------------- */
html.wl-fx-on .wl-fx-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483001;
    width: 100%;
    height: 2px;
    pointer-events: none;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, rgb(var(--fx-cyan)), rgb(var(--fx-violet)) 55%, rgb(var(--fx-pink)));
    box-shadow: 0 0 10px rgba(var(--fx-cyan), .9), 0 0 22px rgba(var(--fx-pink), .5);
    will-change: transform;
}

/* ---------- 10. 光标光晕 ------------------------------------------------- */
/* 不用 mix-blend-mode，只改 transform，合成层开销可控 */
html.wl-fx-on .wl-fx-spot {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147482999;
    width: 520px;
    height: 520px;
    margin: -260px 0 0 -260px;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--fx-cyan), .12), rgba(var(--fx-cyan), .04) 40%, transparent 66%);
    opacity: 0;
    transition: opacity .35s ease;
    will-change: transform;
}
html.wl-fx-on .wl-fx-spot.is-on { opacity: 1; }
:root:not([data-discuz-theme="dark"]) html.wl-fx-on .wl-fx-spot {
    background: radial-gradient(circle, rgba(var(--fx-cyan), .08), transparent 62%);
}

/* ---------- 11. 粒子层与透视地平线（增强档） ---------------------------- */
html.wl-fx-on .wl-fx-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .8;
}
html.wl-fx-on[data-wl-fx="1"] :is(.wl-fx-particles, .wl-fx-floor) { display: none; }

/* 透视地平线网格：固定在视口底部，制造纵深 */
html.wl-fx-on .wl-fx-floor {
    position: fixed;
    left: -50%;
    right: -50%;
    bottom: -14vh;
    height: 46vh;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(var(--fx-cyan), .32) 1px, transparent 1px),
        linear-gradient(rgba(var(--fx-cyan), .32) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(420px) rotateX(68deg);
    transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%);
    opacity: .5;
    animation: fx-floor-run 3.2s linear infinite;
}

/* ---------- 12. 细节：滚动条 / 选区 / 表单 ------------------------------- */
html.wl-fx-on { scrollbar-color: rgba(var(--fx-cyan), .55) transparent; }
html.wl-fx-on::-webkit-scrollbar,
html.wl-fx-on ::-webkit-scrollbar { width: 10px; height: 10px; }
html.wl-fx-on::-webkit-scrollbar-track,
html.wl-fx-on ::-webkit-scrollbar-track { background: rgba(0, 0, 0, .25); }
html.wl-fx-on::-webkit-scrollbar-thumb,
html.wl-fx-on ::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(var(--fx-cyan), .85), rgba(var(--fx-violet), .85));
    background-clip: padding-box;
}
html.wl-fx-on::-webkit-scrollbar-thumb:hover,
html.wl-fx-on ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgb(var(--fx-cyan)), rgb(var(--fx-pink)));
    background-clip: padding-box;
}
html.wl-fx-on .wl-cyber ::selection {
    background: rgba(var(--fx-cyan), .35);
    color: #fff;
    text-shadow: none;
}
html.wl-fx-on .wl-cyber :is(input[type="text"], input[type="password"], input[type="search"], textarea):focus {
    border-color: rgb(var(--fx-cyan)) !important;
    box-shadow: 0 0 0 1px rgba(var(--fx-cyan), .55), 0 0 18px -3px rgba(var(--fx-cyan), .7) !important;
}

/* ---------- 13. 关键帧 ---------------------------------------------------- */
@keyframes fx-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(9vw, 5vh, 0) scale(1.14); }
}
@keyframes fx-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.06); }
    to   { transform: translate3d(-10vw, 7vh, 0) scale(1); }
}
@keyframes fx-drift-c {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(7vw, -6vh, 0) scale(1.18); }
}
@keyframes fx-grid-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(48px, 48px, 0); }
}
@keyframes fx-scan-drop {
    from { transform: translate3d(0, -160px, 0); }
    to   { transform: translate3d(0, 100vh, 0); }
}
@keyframes fx-sweep-bg {
    0%, 62% { background-position: -40% 0, 0 0; }
    100%    { background-position: 140% 0, 0 0; }
}
@keyframes fx-floor-run {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 0, 0 64px; }
}
@keyframes fx-blink {
    from { opacity: 1; }
    to   { opacity: .15; }
}

/* 故障切片：静止时保留一条很淡的色散带（常驻赛博感），只在几个时间点瞬间大幅错位 */
@keyframes fx-glitch-a {
    0%, 100% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 0); opacity: .42; }
    4%  { clip-path: inset(12% 0 66% 0); transform: translate(-6px, 0); opacity: 1; }
    7%  { clip-path: inset(58% 0 20% 0); transform: translate(5px, 0); opacity: 1; }
    10% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 0); opacity: .42; }
    46% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 0); opacity: .42; }
    48% { clip-path: inset(70% 0 8% 0); transform: translate(-7px, 0); opacity: 1; }
    51% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 0); opacity: .42; }
}
@keyframes fx-glitch-b {
    0%, 100% { clip-path: inset(56% 0 24% 0); transform: translate(1px, 0); opacity: .42; }
    4%  { clip-path: inset(62% 0 16% 0); transform: translate(6px, 0); opacity: 1; }
    7%  { clip-path: inset(18% 0 58% 0); transform: translate(-5px, 0); opacity: 1; }
    10% { clip-path: inset(56% 0 24% 0); transform: translate(1px, 0); opacity: .42; }
    46% { clip-path: inset(56% 0 24% 0); transform: translate(1px, 0); opacity: .42; }
    48% { clip-path: inset(24% 0 54% 0); transform: translate(7px, 0); opacity: 1; }
    51% { clip-path: inset(56% 0 24% 0); transform: translate(1px, 0); opacity: .42; }
}
@keyframes fx-edge-run {
    from { transform: translate3d(-100%, 0, 0); }
    to   { transform: translate3d(360%, 0, 0); }
}

/* ---------- 14. 降级：关闭动效 / 强制颜色 / 触屏 / 打印 ------------------ */
/* 保留静态霓虹，只停掉持续消耗 GPU 的循环动画 */
:root[data-wl-motion="off"] :is(
    .wl-fx-aurora > i,
    .wl-fx-grid,
    .wl-fx-scan::after,
    .wl-fx-floor,
    .wl-fx-toggle i,
    .wl-fx-particles
) { animation: none !important; }
:root[data-wl-motion="off"] :is(.wl-fx-scan::after, .wl-fx-spot) { display: none; }
:root[data-wl-motion="off"] .wl-cyber :is(.bm_h, .subforumshow) { animation: none !important; }
:root[data-wl-motion="off"] .wl-cyber .wl-fx-glitch::before,
:root[data-wl-motion="off"] .wl-cyber .wl-fx-glitch::after { display: none; }

@media (prefers-reduced-motion: reduce) {
    html.wl-fx-on :is(
        .wl-fx-aurora > i,
        .wl-fx-grid,
        .wl-fx-scan::after,
        .wl-fx-floor,
        .wl-fx-toggle i,
        .wl-fx-particles
    ) { animation: none !important; }
    html.wl-fx-on .wl-cyber :is(.bm_h, .subforumshow) { animation: none !important; }
    html.wl-fx-on :is(.wl-fx-scan::after, .wl-fx-spot) { display: none; }
    html.wl-fx-on .wl-cyber .wl-fx-glitch::before,
    html.wl-fx-on .wl-cyber .wl-fx-glitch::after { display: none; }
}

@media (forced-colors: active) {
    html.wl-fx-on :is(.wl-fx-aurora, .wl-fx-grid, .wl-fx-scan, .wl-fx-spot, .wl-fx-floor, .wl-fx-particles) { display: none; }
    html.wl-fx-on .wl-cyber .wl-fx-glitch::before,
    html.wl-fx-on .wl-cyber .wl-fx-glitch::after { display: none; }
}

/* 触屏与窄屏：省掉光晕与地平线，网格放缓 */
@media (hover: none), (pointer: coarse) {
    html.wl-fx-on .wl-fx-spot { display: none; }
}
@media (max-width: 768px) {
    html.wl-fx-on .wl-fx-aurora > i { width: 130vw; height: 130vw; }
    html.wl-fx-on .wl-fx-scan { opacity: .09; }
    html.wl-fx-on .wl-fx-floor { display: none; }
    html.wl-fx-on .wl-cyber .wl-fx-glitch::before,
    html.wl-fx-on .wl-cyber .wl-fx-glitch::after { display: none; }
    html.wl-fx-on .wl-cyber .wl-fx-toggle span { display: none; }
}

@media print {
    html.wl-fx-on :is(.wl-fx-aurora, .wl-fx-grid, .wl-fx-scan, .wl-fx-spot, .wl-fx-floor, .wl-fx-particles, .wl-fx-progress) {
        display: none !important;
    }
}
