/* ============================================================
   LinQi · 个人小房间
   视觉风格：液态玻璃（Liquid Glass）
   ------------------------------------------------------------
   设计要点：
   1. 半透明毛玻璃卡片 + 高光反射层，鼠标移动时光斑跟随
   2. 背景两颗缓慢飘动的光斑，模拟培养皿里的营养液
   3. 极细点阵纹理，像显微镜下的细胞
   4. 翡翠绿作为唯一强调色，只用在交互状态和图标上
   5. 深色与浅色两套完全独立的配色，跟随系统并可手动切换

   技术约束（不要破坏）：
   - 不引入任何外部依赖，全程手写 CSS，保持零请求
   - 页面结构、data-i18n 键名一律不动，只换视觉
   - 所有动效受 prefers-reduced-motion 约束
   ============================================================ */

/* ---------- 配色变量：浅色 ---------- */
:root {
    /* 背景不再是纯白，压成带一点蓝灰的底，玻璃才有东西可折射 */
    --bg: #eef2f7;
    --bg-elevated: rgba(255, 255, 255, 0.34);
    --bg-subtle: rgba(255, 255, 255, 0.24);
    --border: rgba(255, 255, 255, 0.90);
    --border-strong: rgba(255, 255, 255, 0.98);

    --text: #1e293b;
    --text-muted: #5b6779;
    --text-faint: #8b96a8;

    --accent: #059669;
    --accent-soft: rgba(16, 185, 129, 0.14);
    --accent-border: rgba(52, 211, 153, 0.45);

    /* 玻璃材质。模糊 34px 是性能和观感的平衡点：
       超过 40px 后视觉提升就很有限了，但 GPU 采样成本是线性上涨的。
       去掉了 brightness，多一个滤镜函数就多一遍全屏采样。 */
    --glass-blur: blur(34px) saturate(200%) contrast(106%);
    --glass-blur-strong: blur(38px) saturate(210%) contrast(108%);

    /* 外投影分三层：远投影给悬浮感，近投影贴地，
       再加一圈极淡的绿色环境光，让玻璃像有自发光。 */
    --shadow-card:
        0 30px 60px -16px rgba(15, 23, 42, 0.16),
        0 12px 26px -8px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.30);

    /* 内阴影是玻璃厚度的核心：
       顶部 2px 强白线 = 上边缘受光
       底部 2px 暗线 = 下边缘背光
       四周 1px 描边 = 玻璃切边 */
    --shadow-inner:
        inset 0 2px 3px 0 rgba(255, 255, 255, 1),
        inset 0 -2px 3px 0 rgba(15, 23, 42, 0.10),
        inset 0 0 0 1px rgba(255, 255, 255, 0.75);

    /* 弹性的回弹曲线，做出果冻质感。数字超过 1 表示会先过头再回位。 */
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 背景元素浓度加大，玻璃后面才有明显色块 */
    --mesh-dot: rgba(16, 185, 129, 0.18);
    --blob-a: rgba(16, 185, 129, 0.38);
    --blob-b: rgba(20, 184, 166, 0.34);
    --blob-c: rgba(56, 189, 248, 0.30);
}

/* ---------- 配色变量：深色 ---------- */
html.dark {
    --bg: #050b1a;
    --bg-elevated: rgba(20, 30, 52, 0.40);
    --bg-subtle: rgba(30, 41, 64, 0.32);
    --border: rgba(255, 255, 255, 0.22);
    --border-strong: rgba(255, 255, 255, 0.35);

    --text: #e8eef6;
    --text-muted: #9aa8bb;
    --text-faint: #6a7789;

    --accent: #34d399;
    --accent-soft: rgba(16, 185, 129, 0.22);
    --accent-border: rgba(52, 211, 153, 0.40);

    /* 深色下模糊略大、对比略高，避免整块发灰。
       同样去掉了 brightness，用更暗的底色调代替。 */
    --glass-blur: blur(38px) saturate(210%) contrast(110%);
    --glass-blur-strong: blur(42px) saturate(220%) contrast(114%);

    /* 深色下靠更强的黑色外投影拉开层次，
       内阴影反过来用高光，玻璃边缘在暗底上才显出来 */
    --shadow-card:
        0 34px 70px -18px rgba(0, 0, 0, 0.90),
        0 12px 28px -8px rgba(0, 0, 0, 0.60),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-inner:
        inset 0 2px 3px 0 rgba(255, 255, 255, 0.55),
        inset 0 -2px 3px 0 rgba(0, 0, 0, 0.80),
        inset 0 0 0 1px rgba(255, 255, 255, 0.14);

    --mesh-dot: rgba(52, 211, 153, 0.16);
    --blob-a: rgba(16, 185, 129, 0.32);
    --blob-b: rgba(20, 184, 166, 0.28);
    --blob-c: rgba(6, 182, 212, 0.26);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    transition: background-color 0.35s ease;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.9;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.35s ease, color 0.35s ease;
    overflow-x: hidden;
    position: relative;
}

/* ---------- 背景层：点阵纹理 + 两颗飘动光斑 ---------- */

/* 点阵铺满整屏，固定不随滚动。 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-size: 32px 32px;
    background-image: radial-gradient(circle, var(--mesh-dot) 1.2px, transparent 1.2px);
}

/* 光斑层。三颗大色块，位置刻意压在页面中上部，
   因为卡片主要集中在那里，玻璃背后必须有颜色才有折射感。

   性能说明：这层是固定的全屏大块，如果每帧重绘渐变会非常贵。
   所以只让 transform 参与动画，配合 will-change 让它独立成合成层，
   动画期间 GPU 只移动一张已经画好的位图，不重新计算渐变。
   特意只用平移、不做缩放：缩放会让合成层做位图重采样，
   在大面积上同样有开销，而平移是纯粹的矩阵变换，几乎零成本。 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(46rem 46rem at 6% -4%, var(--blob-a), transparent 62%),
        radial-gradient(42rem 42rem at 96% 102%, var(--blob-b), transparent 62%),
        radial-gradient(34rem 34rem at 68% 42%, var(--blob-c), transparent 60%);
    animation: drift 26s ease-in-out infinite alternate;
    will-change: transform;
    /* 只隔离绘制范围。不用 contain: strict，因为它会连尺寸计算一起限制，
       对 fixed 定位的全屏层可能造成异常。 */
    contain: paint;
}

/* 光斑缓慢漂移，模拟培养液缓慢对流。纯平移，不做缩放。 */
@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-30px, -70px, 0); }
}

/* ---------- 页面容器 ---------- */
.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 72px 22px 40px;
    min-height: 100vh;
    position: relative;
}

/* 入场：元素依次浮现。
   翻页栏排除在外——它是固定定位，靠 transform 做水平居中，
   再加位移动画会跟居中打架，整条栏会左右抖。 */
.page > *:not(.pager) {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.page > *:nth-child(1) { animation-delay: 0.02s; }
.page > *:nth-child(2) { animation-delay: 0.08s; }
.page > *:nth-child(3) { animation-delay: 0.14s; }
.page > *:nth-child(4) { animation-delay: 0.20s; }
.page > *:nth-child(5) { animation-delay: 0.26s; }
.page > *:nth-child(6) { animation-delay: 0.32s; }
.page > *:nth-child(7) { animation-delay: 0.38s; }

/* 页脚单独给延迟 */
.page > footer { animation-delay: 0.48s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   液态玻璃卡片
   ------------------------------------------------------------
   玻璃的观感靠四层叠加，缺一层就会塌成磨砂：
   1. 本体 background 里的两层固定渐变 —— 顶部受光带、底部暗边，
      这是「厚度」的来源，不随指针移动
   2. ::before 跟随指针的光晕，模拟光源在玻璃面上的反射
   3. ::after  色散棱镜边，左上白、右下青绿，模拟边缘分光
   4. box-shadow 里的内外阴影 —— 外投影给悬浮感，内阴影勾边
   ============================================================ */
.glass {
    position: relative;

    /* 两层固定渐变叠在玻璃本体上：
       上层是从顶部落下的白色光带，模拟顶面接收环境光；
       下层是从底部升起的暗色，模拟厚玻璃的底边。 */
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.12) 18%,
            rgba(255, 255, 255, 0.00) 42%,
            rgba(15, 23, 42, 0.035) 88%,
            rgba(15, 23, 42, 0.075) 100%
        ),
        var(--bg-elevated);

    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card), var(--shadow-inner);
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;
    /* 只隔离绘制范围，让每块玻璃独立光栅化，互不牵连。
       不用 strict，因为它会限制尺寸计算，对弹性布局不友好。 */
    contain: paint;
    /* 不过渡 box-shadow。阴影动画每帧都要重绘整个元素的投影，
       在有 backdrop-filter 的元素上尤其贵。悬停时阴影直接跳变即可。 */
    transition: transform 0.4s var(--spring),
                border-color 0.3s ease;
}

html.dark .glass {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.16) 0%,
            rgba(255, 255, 255, 0.04) 18%,
            rgba(255, 255, 255, 0.00) 42%,
            rgba(0, 0, 0, 0.18) 88%,
            rgba(0, 0, 0, 0.32) 100%
        ),
        var(--bg-elevated);
}

/* 跟随指针的光晕反射。
   --mx / --my 由脚本写入，桌面跟鼠标、手机跟手指和陀螺仪倾斜。
   半径放大到 300px、中心亮度拉满，扫过时能明显看到一坨光移动。 */
.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        300px circle at var(--mx, 50%) var(--my, 25%),
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.38) 22%,
        rgba(255, 255, 255, 0.08) 45%,
        transparent 72%
    );
    /* 用 normal 混合代替 soft-light。
       soft-light 需要读取下层像素逐个通道计算，开销明显高于普通叠加；
       这里靠降低不透明度做近似，肉眼差别很小，但省下一次全屏混合。 */
    opacity: 0.42;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

html.dark .glass::before {
    background: radial-gradient(
        300px circle at var(--mx, 50%) var(--my, 25%),
        rgba(255, 255, 255, 0.60) 0%,
        rgba(255, 255, 255, 0.22) 22%,
        rgba(255, 255, 255, 0.05) 45%,
        transparent 72%
    );
    opacity: 0.46;
}

.glass:hover::before { opacity: 0.62; }

/* 色散棱镜边。
   真实玻璃的切边会把白光拆成彩虹，这里用两层渐变近似：
   主层 135 度方向，左上白 → 中间透明 → 右下青绿和天蓝；
   副层 315 度方向补一道极淡的紫边缘，让色散更接近真实光谱。
   这层不跟随指针，固定在几何边缘上。 */
.glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(
            315deg,
            rgba(196, 181, 253, 0.20) 0%,
            transparent 22%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.30) 12%,
            rgba(255, 255, 255, 0.00) 34%,
            rgba(52, 211, 153, 0.22) 66%,
            rgba(56, 189, 248, 0.38) 90%,
            rgba(129, 140, 248, 0.30) 100%
        );
    pointer-events: none;
    opacity: 0.9;
    mix-blend-mode: overlay;
    z-index: 0;
}

html.dark .glass::after {
    background:
        linear-gradient(
            315deg,
            rgba(196, 181, 253, 0.14) 0%,
            transparent 22%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.12) 12%,
            rgba(255, 255, 255, 0.00) 34%,
            rgba(52, 211, 153, 0.26) 66%,
            rgba(56, 189, 248, 0.34) 90%,
            rgba(129, 140, 248, 0.22) 100%
        );
    opacity: 0.75;
    /* 深色下原本用 screen，它要读底层像素做反相计算，比 overlay 贵。
       这里统一成 overlay，配合上面调过的颜色，观感接近。 */
    mix-blend-mode: overlay;
}

/* ---------- 头像 ---------- */
.avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 22px;
    /* 外圈渐变环，模仿培养皿边缘的折射光 */
    padding: 3px;
    background: linear-gradient(135deg, var(--accent), #2dd4bf 55%, #22d3ee);
    box-shadow: 0 18px 36px -12px rgba(16, 185, 129, 0.45);
    transition: transform 0.4s var(--spring);
}

.avatar:hover { transform: scale(1.05); }

h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 38px 0 14px;
    color: var(--text-muted);
    letter-spacing: 0.4px;
}

/* 原来 h2 前的 # 号换成一个小圆点，更像样本标记 */
h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    margin-bottom: 2px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    vertical-align: middle;
}

.subtitle {
    color: var(--text-faint);
    font-size: 13px;
    letter-spacing: 2.5px;
    margin-top: 8px;
    text-transform: uppercase;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.lead {
    margin-top: 22px;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.95;
}

p {
    margin-bottom: 16px;
    font-size: 15.5px;
    color: var(--text);
}

/* ============================================================
   目录：做成胶囊卡片，每一条都是一块玻璃
   ============================================================ */
.toc {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.toc li {
    animation: fadeIn 0.5s ease both;
}

.toc li:nth-child(1) { animation-delay: 0.34s; }
.toc li:nth-child(2) { animation-delay: 0.40s; }
.toc li:nth-child(3) { animation-delay: 0.46s; }
.toc li:nth-child(4) { animation-delay: 0.52s; }

.toc a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 22px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-size: 15.5px;
    font-weight: 600;

    /* 和 .glass 一样的两层固定渐变，做出胶囊的厚度 */
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.60) 0%,
            rgba(255, 255, 255, 0.14) 20%,
            rgba(255, 255, 255, 0.00) 45%,
            rgba(15, 23, 42, 0.035) 86%,
            rgba(15, 23, 42, 0.080) 100%
        ),
        var(--bg-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card), var(--shadow-inner);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    contain: paint;
    transition: transform 0.4s var(--spring),
                border-color 0.3s ease;
}

html.dark .toc a {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.00) 45%,
            rgba(0, 0, 0, 0.20) 86%,
            rgba(0, 0, 0, 0.35) 100%
        ),
        var(--bg-elevated);
}

/* 胶囊左侧的图标位。
   注意：这里 ::before 被图标占了，所以胶囊的底部暗边改用本体背景叠加。 */
.toc a::before {
    content: "";
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.95), transparent 60%),
        var(--accent-soft);
    border: 1px solid var(--accent-border);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px rgba(15, 23, 42, 0.12),
        0 2px 6px -2px rgba(16, 185, 129, 0.35);
    order: -1;
}

.toc a:hover {
    transform: translateY(-3px) scale(1.012);
    border-color: var(--accent-border);
    box-shadow:
        0 32px 60px -16px rgba(15, 23, 42, 0.20),
        0 14px 28px -8px rgba(16, 185, 129, 0.22),
        var(--shadow-inner);
}

.toc a:active {
    transform: scale(0.97) translateY(1px);
    transition-duration: 0.12s;
}

.toc .hint {
    color: var(--text-faint);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.toc a:hover .hint { color: var(--accent); }

/* 目录末尾的省略号 */
.toc-more {
    text-align: center;
    padding: 6px 0 !important;
    border: none !important;
    background: none !important;
}

.toc-more span {
    display: inline-block;
    color: var(--text-faint);
    letter-spacing: 6px;
    font-size: 16px;
    animation: breathe 4.5s ease-in-out 1s infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

/* ============================================================
   赞助页
   ============================================================ */
.step {
    font-size: 13px;
    color: var(--text-faint);
    margin: 18px 0 10px;
    letter-spacing: 0.3px;
}

.opt-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.opt {
    background: var(--bg-subtle);
    /* 小控件不单独做背景模糊。它面积小、又嵌在已经有玻璃的卡片里，
       再叠一层 backdrop-filter 等于让 GPU 多采一次背景，视觉上几乎看不出差别。 */
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 20px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    box-shadow: var(--shadow-inner);
    /* 只过渡真正会变的属性。
       原来写 all 会把 box-shadow、background 这些也拉进过渡，
       每次悬停都要逐帧插值阴影的四个数值，白费力气。 */
    transition: transform 0.3s var(--spring),
                color 0.25s ease,
                border-color 0.25s ease;
}

.opt:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    transform: translateY(-1px);
}

.opt.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 18px -6px rgba(16, 185, 129, 0.6);
}

html.dark .opt.active { color: #04140e; }

.opt:disabled {
    opacity: 0.35;
    cursor: default;
}

.choice {
    flex: 1 1 45%;
    background: var(--bg-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    box-shadow: var(--shadow-card), var(--shadow-inner);
    /* 阴影不做过渡。动画 box-shadow 每帧都要重新绘制整个元素的阴影，
       是这几处里最贵的一项。悬停时阴影直接切换，肉眼几乎察觉不到，
       真正承担反馈的是下面的位移。 */
    transition: transform 0.35s var(--spring),
                border-color 0.3s ease,
                color 0.3s ease;
}

.choice:hover {
    transform: translateY(-3px);
    border-color: var(--accent-border);
    color: var(--accent);
    box-shadow:
        0 24px 44px -12px rgba(16, 185, 129, 0.22),
        var(--shadow-inner);
}

.choice:active { transform: scale(0.98); }

.back {
    display: inline-block;
    font-size: 13px;
    color: var(--text-faint);
    text-decoration: none;
    margin-bottom: 18px;
    transition: color 0.2s ease;
}

.back:hover { color: var(--accent); }

.foot-note { margin-top: 28px; }

.supporters-link {
    font-size: 13px;
    color: var(--text-faint);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.supporters-link:hover { color: var(--accent); }

/* 地址展示区。
   这里不做背景模糊：它嵌在赞助页的虚拟货币面板里，
   背后就是同一片背景，再模糊一次视觉上分辨不出来，
   但 GPU 要多采一遍全屏。改成略高的底色不透明度来保证可读性。 */
.addr-box {
    margin-top: 18px;
    padding: 20px;
    border-radius: 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card), var(--shadow-inner);
}

.addr-label {
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.addr-value {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 14px;
    word-break: break-all;
    color: var(--text);
    line-height: 1.7;
}

.copy-btn {
    margin-top: 14px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 13px;
    cursor: pointer;
    color: var(--accent);
    font-family: inherit;
    font-weight: 600;
    /* 只过渡颜色。这个按钮悬停会换背景和阴影，
       但背景是纯色切换、阴影是直接跳变，都不需要逐帧插值。 */
    transition: color 0.22s ease, border-color 0.22s ease;
}

.copy-btn:hover {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 18px -6px rgba(16, 185, 129, 0.55);
}

/* 微信赞赏码 */
.wechat-qr {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.wechat-qr img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 18px;
    background: #ffffff;
    padding: 10px;
    box-shadow: var(--shadow-card), var(--shadow-inner);
}

/* 赞助者卡片。
   列表里可能同时出现十几张，每张都做背景模糊是最浪费的场景。
   它们本身就在赞助者面板之内，视觉上只要半透明底加描边就够。 */
.supporter-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-inner);
    animation: fadeIn 0.45s ease both;
}

#supportersList .supporter-card:nth-child(1)  { animation-delay: 0.04s; }
#supportersList .supporter-card:nth-child(2)  { animation-delay: 0.10s; }
#supportersList .supporter-card:nth-child(3)  { animation-delay: 0.16s; }
#supportersList .supporter-card:nth-child(4)  { animation-delay: 0.22s; }
#supportersList .supporter-card:nth-child(5)  { animation-delay: 0.28s; }
#supportersList .supporter-card:nth-child(6)  { animation-delay: 0.34s; }
#supportersList .supporter-card:nth-child(7)  { animation-delay: 0.40s; }
#supportersList .supporter-card:nth-child(8)  { animation-delay: 0.46s; }
#supportersList .supporter-card:nth-child(9)  { animation-delay: 0.52s; }
#supportersList .supporter-card:nth-child(10) { animation-delay: 0.58s; }

.supporter-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.supporter-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.supporter-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.supporter-date {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 2px;
}

.supporter-msg {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.empty-tip {
    text-align: center;
    color: var(--text-faint);
    font-size: 14px;
    padding: 28px 0;
}

/* ============================================================
   联系方式
   ============================================================ */
.inline-links {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 15px;
}

.inline-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    background: var(--bg-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card), var(--shadow-inner);
    transition: transform 0.35s var(--spring),
                border-color 0.3s ease,
                color 0.3s ease;
}

.inline-links a:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    color: var(--accent);
}

.inline-links .link-note {
    font-size: 12.5px;
    color: var(--text-faint);
    margin-left: 2px;
}

/* ============================================================
   页底翻页栏（iOS 液态玻璃风格）
   ------------------------------------------------------------
   固定在屏幕底部悬浮，不跟随内容滚动。
   这样无论页面长短，翻页都在拇指够得到的位置，
   手机上不用滑到底才能翻页。
   ============================================================ */
.pager {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 6px;
    padding: 7px;
    flex-wrap: wrap;

    /* 固定在视口底部，水平居中 */
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;

    /* 宽度自适应内容，但不超过屏幕 */
    width: max-content;
    max-width: calc(100vw - 32px);

    /* 玻璃主体 */
    background: var(--bg-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 999px;

    /* 外投影 + 内高光，两层都要，缺一层就不像玻璃 */
    box-shadow:
        0 18px 38px -12px rgba(16, 185, 129, 0.16),
        0 10px 20px -8px rgba(0, 0, 0, 0.10),
        inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.04);

    overflow: hidden;
    isolation: isolate;
}

/* 翻页栏贴底之后，页面底部要留出等高的空档，
   否则最后一段文字和页脚会被压在栏下面 */
.page {
    padding-bottom: 120px;
}

/* 光泽反射层。--mx / --my 由脚本写入，指向指针位置 */
.pager::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        180px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.75),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 0;
}

/* 桌面悬停时显示，手机上按住时显示 */
.pager:hover::before,
.pager:active::before { opacity: 1; }

html.dark .pager::before {
    background: radial-gradient(
        180px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.30),
        transparent 70%
    );
}

/* 顶部一道细亮线，模拟玻璃边缘的折射 */
.pager::after {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.9) 50%,
        transparent
    );
    pointer-events: none;
    z-index: 2;
}

html.dark .pager {
    box-shadow:
        0 22px 44px -14px rgba(0, 0, 0, 0.75),
        0 8px 18px -6px rgba(16, 185, 129, 0.10),
        inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.45);
}

html.dark .pager::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35) 50%,
        transparent
    );
}

/* 翻页按钮：默认是透明的，只承担点击区域 */
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    /* 去掉 box-shadow 过渡：翻页栏是固定定位，阴影动画会连带触发
       整条栏的重绘，而它下面还有背景模糊要重算。 */
    transition: color 0.25s ease,
                background-color 0.25s ease,
                border-color 0.25s ease,
                transform 0.3s var(--spring);
}

/* 悬停时在内部浮起一块小玻璃 */
.pager-btn:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.55);
    border-color: var(--accent-border);
    box-shadow:
        0 6px 14px -6px rgba(16, 185, 129, 0.35),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

html.dark .pager-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 6px 14px -6px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);
}

/* 按下时轻微内缩，跟 iOS 的触感一致 */
.pager-btn:active {
    transform: scale(0.965);
    transition-duration: 0.1s;
    background: rgba(255, 255, 255, 0.75);
}

html.dark .pager-btn:active {
    background: rgba(255, 255, 255, 0.16);
}

/* 手机上翻页栏做得更紧凑，避免三个按钮换行后变成两层 */
@media (max-width: 480px) {
    .pager {
        gap: 2px;
        padding: 6px;
        bottom: 14px;
    }
    .pager-btn {
        padding: 9px 14px;
        font-size: 13px;
        flex: 0 1 auto;
        min-width: 0;
    }
}

/* 触屏设备没有 hover，用 active 状态给足反馈 */
@media (hover: none) {
    .pager-btn:hover {
        color: var(--text-muted);
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        transform: none;
    }
    .pager-btn:active {
        color: var(--accent);
        background: rgba(255, 255, 255, 0.7);
        border-color: var(--accent-border);
        transform: scale(0.965);
    }
    html.dark .pager-btn:active {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ============================================================
   页脚
   ============================================================ */
footer {
    text-align: center;
    padding: 36px 0 48px;
    color: var(--text-faint);
    font-size: 12.5px;
}

/* ============================================================
   右上角工具条：语言切换 + 主题切换
   做成一颗玻璃胶囊，两个功能并排
   ============================================================ */
.toolbar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    /* 固定定位的常驻元素，滚动时一直留在视口里。
       它面积小、背后往往是纯背景，做实时模糊收益很低，
       但因为是固定的，会持续参与每帧合成。改成实色更划算。 */
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card), var(--shadow-inner);
}

.toolbar button {
    background: none;
    border: none;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    /* 工具栏是常驻元素，别给它 all 过渡，
       否则切语言时会连背景、字重一起插值，白白重绘。 */
    transition: color 0.2s ease, background-color 0.2s ease;
    line-height: 1.4;
}

.toolbar button:hover { color: var(--text); }

.toolbar button.active {
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px -4px rgba(16, 185, 129, 0.7);
}

html.dark .toolbar button.active { color: #04140e; }

/* 语言按钮和主题按钮之间一条细分隔线 */
.toolbar .divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 3px;
    flex-shrink: 0;
}

/* 主题切换按钮，只放一个图标 */
.toolbar .theme-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

/* ============================================================
   统一给所有玻璃组件加光照渐变
   ------------------------------------------------------------
   上面各组件是分别定义的，这里集中补一层顶部受光带和底部暗边，
   保证整站的玻璃材质一致。写在后面靠层叠覆盖，
   这样不必回头改每一处的 background 声明。
   ============================================================ */
.choice,
.inline-links a,
.addr-box,
.supporter-card,
.pager,
.toolbar {
    background-image:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.58) 0%,
            rgba(255, 255, 255, 0.14) 20%,
            rgba(255, 255, 255, 0.00) 45%,
            rgba(15, 23, 42, 0.030) 86%,
            rgba(15, 23, 42, 0.070) 100%
        );
}

html.dark .choice,
html.dark .inline-links a,
html.dark .addr-box,
html.dark .supporter-card,
html.dark .pager,
html.dark .toolbar {
    background-image:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.16) 0%,
            rgba(255, 255, 255, 0.04) 20%,
            rgba(255, 255, 255, 0.00) 45%,
            rgba(0, 0, 0, 0.18) 86%,
            rgba(0, 0, 0, 0.32) 100%
        );
}

/* 这些组件里原本 ::before 空闲的，补一层跟随指针的光晕。
   翻页栏单独处理过，这里跳过。 */
.choice::before,
.inline-links a::before,
.addr-box::before,
.supporter-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        260px circle at var(--mx, 50%) var(--my, 20%),
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.30) 24%,
        transparent 70%
    );
    opacity: 0.32;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.choice:hover::before,
.inline-links a:hover::before { opacity: 0.58; }

html.dark .choice::before,
html.dark .inline-links a::before,
html.dark .addr-box::before,
html.dark .supporter-card::before {
    background: radial-gradient(
        260px circle at var(--mx, 50%) var(--my, 20%),
        rgba(255, 255, 255, 0.60) 0%,
        rgba(255, 255, 255, 0.20) 24%,
        transparent 70%
    );
    opacity: 0.50;
}

/* 上面加了 ::before 的组件必须让内容浮在光晕之上，
   否则光斑会盖住文字。 */
.choice,
.inline-links a,
.addr-box,
.supporter-card {
    position: relative;
    isolation: isolate;
}

/* ============================================================
   手机适配
   ============================================================ */
@media (max-width: 480px) {
    .page { padding: 48px 18px 32px; }
    h1 { font-size: 26px; }
    .avatar { width: 78px; height: 78px; }
    .toc a { padding: 14px 18px; font-size: 15px; }
    .toc .hint { font-size: 12px; }
    .toolbar { top: 10px; right: 10px; }
    .choice { flex: 1 1 100%; }
    .wechat-qr img { width: 190px; height: 190px; }
    .pager { gap: 3px; padding: 6px; bottom: 12px; }
    .pager-btn { padding: 9px 16px; font-size: 13px; }
}

/* 背景模糊在部分老设备上开销大，降级为不模糊的实色 */
@supports not (backdrop-filter: blur(1px)) {
    .glass,
    .toc a,
    .choice,
    .inline-links a,
    .pager-btn,
    .toolbar,
    .addr-box,
    .supporter-card {
        background: var(--bg);
    }
}

/* ============================================================
   低性能设备降级
   ------------------------------------------------------------
   页面上的 backdrop-filter 是主要开销。低端机或老旧显卡上，
   七八块玻璃同时做实时模糊会明显掉帧。
   这里退化成半透明纯色，保留玻璃的分层和配色，
   但不再对背景做实时采样。
   触发条件是：小屏 + 粗指针（手机），且系统报告低内存设备。
   ============================================================ */
@media (max-width: 600px) and (pointer: coarse) {
    html[data-perf="low"] {
        --glass-blur: none;
        --glass-blur-strong: none;
    }

    html[data-perf="low"] .glass,
    html[data-perf="low"] .toc a,
    html[data-perf="low"] .choice,
    html[data-perf="low"] .inline-links a,
    html[data-perf="low"] .addr-box,
    html[data-perf="low"] .supporter-card,
    html[data-perf="low"] .pager,
    html[data-perf="low"] .toolbar {
        /* 没有实时模糊时，提高底色的不透明度来补足可读性 */
        background-color: rgba(255, 255, 255, 0.88);
    }

    html[data-perf="low"].dark .glass,
    html[data-perf="low"].dark .toc a,
    html[data-perf="low"].dark .choice,
    html[data-perf="low"].dark .inline-links a,
    html[data-perf="low"].dark .addr-box,
    html[data-perf="low"].dark .supporter-card,
    html[data-perf="low"].dark .pager,
    html[data-perf="low"].dark .toolbar {
        background-color: rgba(18, 26, 42, 0.90);
    }

    /* 光晕层在低性能模式下也去掉，它同样会触发重绘 */
    html[data-perf="low"] .glass::before,
    html[data-perf="low"] .choice::before,
    html[data-perf="low"] .inline-links a::before,
    html[data-perf="low"] .addr-box::before,
    html[data-perf="low"] .supporter-card::before {
        display: none;
    }

    /* 背景光斑停止动画，静态显示即可 */
    html[data-perf="low"] body::after {
        animation: none;
        will-change: auto;
    }
}

/* ============================================================
   尊重系统的「减少动态效果」设置
   所有动画的终点都等于元素自然状态，关掉不会丢内容
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    body::after { animation: none !important; }
}
