/* ============================================================
   NURSX · ningdi.wiki 设计系统 v15「Aurora」
   ------------------------------------------------------------
   全站唯一样式来源：登录/注册、开发者/管理/代理面板、账号到期锁页、
   聊天室、音乐播放器。已合并旧版 panel.css / panel-v2…v9.css。
   纯净浅色基底 + 靛蓝→紫罗兰强调色 + 玻璃层 + 克制动效。
   ============================================================ */

/* ── 设计令牌 ── */
:root {
    /* 底色与层次 */
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f2f5fa;
    --surface-3: #e9edf6;
    --line: #e7ebf3;
    --line-strong: #d5dbe8;

    /* 文字 */
    --ink: #0f172a;
    --ink-2: #4a5568;
    --ink-3: #8f9bb0;

    /* 品牌 */
    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --brand-2: #7c3aed;
    --brand-soft: #eeeffc;
    --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --brand-glow: rgba(79, 70, 229, 0.28);

    /* 语义色 */
    --red: #dc2626;
    --red-soft: #fef2f2;
    --green: #15803d;
    --green-soft: #eefaf2;
    --amber: #b45309;
    --amber-soft: #fdf8ec;
    --info: #0b6bcb;
    --info-soft: #eef6fe;
    --violet: #6d28d9;
    --violet-soft: #f6f1fe;

    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 34px -24px rgba(15, 23, 42, 0.28);
    --shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 22px 44px -26px rgba(15, 23, 42, 0.34);
    --shadow-pop: 0 32px 64px -28px rgba(15, 23, 42, 0.42);
    --ring: 0 0 0 3px rgba(79, 70, 229, 0.18);

    /* 圆角 */
    --radius: 20px;
    --radius-s: 13px;
    --radius-xs: 9px;

    /* 动效 */
    --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
    --ease-out: cubic-bezier(0.22, 0.8, 0.32, 1);
    --t-fast: 0.16s;
    --t-mid: 0.28s;
    --t-slow: 0.46s;

    /* 其他 */
    --bar-h: 58px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

/* ── 基础 ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
input[type="hidden"] { display: none !important; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
::selection { background: rgba(79, 70, 229, 0.16); }
* { scrollbar-width: thin; scrollbar-color: #ccd4e2 transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d2d9e6; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #b8c1d2; background-clip: padding-box; border: 2px solid transparent; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    background-image: radial-gradient(1100px 460px at 12% -8%, rgba(99, 102, 241, 0.10), transparent 62%),
                      radial-gradient(900px 400px at 100% 0%, rgba(168, 85, 247, 0.08), transparent 58%);
    background-attachment: fixed;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.5); outline-offset: 2px;
}

/* ── 顶栏 ── */
.appbar {
    position: sticky; top: 0; z-index: 70;
    display: flex; align-items: center; gap: 12px;
    height: var(--bar-h); padding: 0 20px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid var(--line);
}
.appbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.32), transparent);
    opacity: 0.9; pointer-events: none;
}
.appbar .ab-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.appbar .ab-title {
    flex: 0 1 auto; font-size: 15.5px; font-weight: 800; letter-spacing: 0.6px; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.appbar .ab-title .sub, .appbar .ab-title .subtitle { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 8px; letter-spacing: 0; }
.appbar .ab-sp { flex: 1 1 auto; }
.appbar .ab-user {
    display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px;
    text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600;
    transition: background var(--t-fast) var(--ease-out);
}
.appbar .ab-user:hover { background: var(--surface-2); }
.appbar .ab-ava {
    width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-grad); color: #fff; font-size: 12px; font-weight: 800;
    box-shadow: 0 2px 8px -4px var(--brand-glow);
}
.appbar .ab-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.appbar .ab-out {
    font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-decoration: none;
    padding: 7px 12px; border-radius: 999px;
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.appbar .ab-out:hover { background: var(--red-soft); color: var(--red); }

/* ── 内容区 ── */
.content { max-width: 1160px; margin: 0 auto; padding: 26px 24px 60px; }
body.has-bottomnav .content { padding-bottom: 108px; }

/* ── 底部导航（玻璃 Dock） ── */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px) saturate(1.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -10px 30px -22px rgba(15, 23, 42, 0.4);
}
.bottomnav .bn-inner {
    display: flex; align-items: stretch; gap: 4px; overflow-x: auto;
    padding: 7px 12px; max-width: 1000px; margin: 0 auto; scrollbar-width: none;
}
.bottomnav .bn-inner::-webkit-scrollbar { display: none; }
.bottomnav a.bn-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    flex: 1 0 auto; min-width: 66px; max-width: 120px;
    padding: 7px 10px; border-radius: 14px;
    font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap;
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.bottomnav a.bn-item:hover { background: var(--surface-2); color: var(--brand); }
.bottomnav a.bn-item:active { transform: scale(0.96); }
.bottomnav a.bn-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.bottomnav a.bn-item.active::before {
    content: ""; position: absolute; top: 2px; left: 50%; width: 18px; height: 3px; border-radius: 3px;
    background: var(--brand-grad); transform: translateX(-50%);
    animation: ndDrop 0.34s var(--ease-spring) backwards;
}
.bottomnav .bn-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.4; transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-spring); }
.bottomnav a.bn-item.active .bn-dot { opacity: 1; transform: scale(1.15); }
.bottomnav.dense a.bn-item { min-width: 58px; max-width: 96px; font-size: 11px; padding: 6px 8px; }

/* ── 卡片 ── */
.card {
    position: relative; overflow-x: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px 26px; margin: 0 0 22px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.card h3, .card h4, .card h5 {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px; font-size: 15.5px; font-weight: 800; color: var(--ink); letter-spacing: 0.2px;
}
.card h3::before {
    content: ""; flex: none; width: 4px; height: 16px; border-radius: 4px; background: var(--brand-grad);
    box-shadow: 0 2px 8px -3px var(--brand-glow);
}
.card p { font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.card.tight { padding: 16px 18px; }

/* 交错栅格 */
.pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin-bottom: 22px; align-items: start; }
.pair-grid > .card { margin: 0; min-width: 0; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-auto.tight { gap: 12px; }

/* ── 统计卡 ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-item {
    position: relative; overflow: hidden; text-align: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 16px 16px; box-shadow: var(--shadow-card);
    transition: transform var(--t-mid) var(--ease-spring), border-color var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out);
}
.stat-item::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 3px;
    background: var(--brand-grad); opacity: 0.85;
}
.stat-item:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.stat-item .num { font-size: 28px; font-weight: 800; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.stat-item .label { font-size: 12px; color: var(--ink-2); margin-top: 7px; font-weight: 600; }

/* ── 表单 ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; letter-spacing: 0.2px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 140px; }
input[type="text"], input[type="password"], input[type="number"], input[type="email"],
input[type="search"], input[type="url"], input[type="tel"], select, textarea {
    width: 100%; padding: 10px 13px; font-size: 13.5px; font-family: inherit; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-s);
    outline: none; transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), background var(--t-fast);
}
textarea { line-height: 1.65; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: #bcc5d6; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--brand); }
select { cursor: pointer; }
select option { background: #fff; color: var(--ink); }
input[readonly], input[disabled] { background: var(--surface-2); color: var(--ink-3); }
input[type="file"] {
    width: 100%; box-sizing: border-box; padding: 9px 12px; font-size: 12.5px; color: var(--ink-2);
    background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-s); cursor: pointer;
}
input[type="file"]:hover { border-color: var(--brand); }

/* ── 按钮 ── */
a[class*="btn-"] { text-decoration: none; display: inline-block; text-align: center; }
.btn-action, .btn-danger, .btn-success, .btn-warning, .btn-secondary, .btn-info, .btn-copy,
.btn-select-mode, .btn-select-all, .btn {
    position: relative; overflow: hidden;
    padding: 9px 17px; margin: 3px; font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.45;
    border: 1px solid transparent; border-radius: var(--radius-s); white-space: nowrap; display: inline-block; cursor: pointer;
    transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out),
                color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
button[class*="btn-"]:hover, .btn:hover { transform: translateY(-1px); }
button[class*="btn-"]:active, .btn:active { transform: translateY(1px) scale(0.99); }
.btn-action { color: #fff; background: var(--brand-grad); border-color: transparent; box-shadow: 0 10px 22px -14px var(--brand-glow); }
.btn-action:hover { box-shadow: 0 14px 28px -14px var(--brand-glow); }
.btn-secondary { color: var(--ink-2); background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: #c3cbdb; }
.btn-info { color: var(--info); background: var(--info-soft); border-color: #d3e7fb; }
.btn-info:hover { background: #e0effc; }
.btn-danger { color: var(--red); background: var(--red-soft); border-color: #f4d4d4; }
.btn-danger:hover { background: #fde3e3; }
.btn-success { color: var(--green); background: var(--green-soft); border-color: #d3edd9; }
.btn-success:hover { background: #def3e5; }
.btn-warning { color: var(--amber); background: var(--amber-soft); border-color: #f0e2c0; }
.btn-warning:hover { background: #fbefd3; }
.btn-copy, .btn-select-mode { color: var(--violet); background: var(--violet-soft); border-color: #e5d9fa; }
.btn-copy:hover, .btn-select-mode:hover { background: #ece1fc; }
.btn-select-all { color: #9333ea; background: #faf5ff; border-color: #eedffd; }
.btn-select-all:hover { background: #f3e8fe; }
.btn-select-mode.active { color: #fff; background: var(--brand-grad); border-color: transparent; box-shadow: 0 10px 22px -14px var(--brand-glow); }
.btn-row { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; }
.btn-row form { margin: 0; display: inline; }
.btn-row select { width: 140px; display: inline-block; padding: 6px 8px; }

/* 点击涟漪（由各面板内联脚本注入 .bt-ripple 元素） */
.bt-ripple {
    position: absolute; z-index: 1; border-radius: 50%; pointer-events: none; transform: scale(0);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 70%);
    animation: ndRipple 0.66s var(--ease-out) forwards;
}
.btn-secondary .bt-ripple, .btn-info .bt-ripple, .btn-danger .bt-ripple, .btn-success .bt-ripple,
.btn-warning .bt-ripple, .btn-copy .bt-ripple, .btn-select-mode .bt-ripple, .btn-select-all .bt-ripple {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.22) 0%, rgba(79, 70, 229, 0) 70%);
}

/* ── 表格 ── */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
.card table { display: block; width: 100%; overflow-x: auto; }
.card table th {
    background: var(--surface-2); color: #3d4a5f; font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
    padding: 11px 16px; text-align: left; white-space: nowrap;
}
.card table th:first-child { border-radius: 14px 0 0 14px; }
.card table th:last-child { border-radius: 0 14px 14px 0; }
.card table td { padding: 12px 16px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.card table tbody td { background: var(--surface-2); transition: background var(--t-fast) var(--ease-out); }
.card table tbody td:first-child { border-radius: 14px 0 0 14px; }
.card table tbody td:last-child { border-radius: 0 14px 14px 0; }
.card table tbody tr:hover td { background: var(--surface-3); }
.code-text { white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: #2b3a55; }
.selectable-row { cursor: pointer; }
.selectable-row.selected, .selectable-row.selected td { background: var(--brand-soft) !important; box-shadow: inset 3px 0 0 0 var(--brand); }

/* ── 行卡列表（rc-*） ── */
.rc-list { display: flex; flex-direction: column; gap: 10px; }
.row-card {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
    padding: 13px 18px; border-radius: 16px;
    background: var(--surface-2); border: 1px solid transparent;
    transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out),
                transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.row-card:hover { background: var(--surface-3); border-color: var(--line); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.row-card .rc-k { font-size: 11px; letter-spacing: 0.03em; color: var(--ink-3); font-weight: 600; }
.row-card .rc-v { font-size: 13px; font-weight: 600; color: var(--ink); }
.row-card .rc-v.code-text { font-weight: 500; font-family: var(--mono); }
.row-card .rc-id { color: var(--ink-3); font-weight: 700; font-size: 12px; }
.row-card .rc-ops { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-card .rc-ops form { margin: 0; display: inline-flex; }
.row-card .rc-ops .btn-row { margin: 0; }
.row-card .rc-ops a, .row-card .rc-ops button { white-space: nowrap; }
.row-card.selectable-row { cursor: pointer; }
.row-card.selectable-row.selected { background: var(--brand-soft); border-color: rgba(79, 70, 229, 0.28); box-shadow: inset 3px 0 0 0 var(--brand); }
.row-card.selectable-row.selected .rc-v, .row-card.selectable-row.selected .rc-k { color: var(--ink); }

/* 状态 / 类型小胶囊 */
.rc-pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.55; }
.rc-pill.good   { color: #15803d; background: rgba(34, 197, 94, 0.15); }
.rc-pill.dim    { color: #64748b; background: rgba(148, 163, 184, 0.16); }
.rc-pill.bad    { color: #d92d20; background: rgba(220, 38, 38, 0.12); }
.rc-pill.brand  { color: #4338ca; background: rgba(79, 70, 229, 0.13); }
.rc-pill.teal   { color: #0f766e; background: rgba(20, 184, 166, 0.14); }
.rc-pill.purple { color: #7c3aed; background: rgba(124, 58, 237, 0.12); }
.rc-pill.amber  { color: #b45309; background: rgba(245, 158, 11, 0.16); }
.rc-pill.rose   { color: #be123c; background: rgba(244, 63, 94, 0.12); }

/* ── 旧式列表行（卡密 / 日志） ── */
.card-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 9px 12px; border-bottom: 1px solid var(--line); border-radius: var(--radius-s);
    transition: background var(--t-fast) var(--ease-out);
}
.card-row:hover { background: var(--surface-2); }
.card-row .code-text { flex: 1; min-width: 140px; font-size: 12.5px; }
.card-row button { padding: 5px 11px; font-size: 12px; }
.card-row form { margin: 0; display: inline; flex-shrink: 0; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); border-radius: var(--radius-s); transition: background var(--t-fast) var(--ease-out); }
.log-row:last-child { border-bottom: none; }
.log-row:hover { background: var(--surface-2); }
.log-amount { font-weight: 800; font-size: 13.5px; min-width: 56px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.log-reason { flex: 1; font-size: 13px; min-width: 120px; color: var(--ink); }
.log-time { font-size: 11.5px; color: var(--ink-3); flex-shrink: 0; white-space: nowrap; }

/* ── 项目卡 ── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project-item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
    transition: border-color var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-spring);
}
.project-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.project-item h4 { font-size: 14.5px; margin-bottom: 7px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.project-item p { font-size: 12.5px; color: var(--ink-2); word-break: break-all; margin-bottom: 4px; line-height: 1.55; }
.project-item .actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ── 提示条 / 页签 / 工具栏 ── */
.alert-box {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 15px; margin-bottom: 18px; border-radius: 16px; font-size: 13.5px;
    background: #fdf5f5; border: 1px solid #f2d8d8; border-left: 4px solid var(--red); color: #b3261e;
}
.alert-info {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 15px; margin-bottom: 18px; border-radius: 16px; font-size: 13.5px;
    background: var(--info-soft); border: 1px solid #d7e8f9; border-left: 4px solid var(--info); color: #0a5aa8;
}
.alert-warning {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 15px; margin-bottom: 18px; border-radius: 16px; font-size: 13.5px;
    background: var(--amber-soft); border: 1px solid #f0e2c0; border-left: 4px solid var(--amber); color: var(--amber);
}
.warn-icon {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 18px; height: 18px; border-radius: 50%; background: #f59e0b; color: #fff; font-size: 12px; font-weight: 800;
}
.warn-icon::after { content: "!"; }
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search-bar input { width: 190px; height: 34px; padding: 6px 14px; font-size: 12.5px; border-radius: 999px; }
.search-bar select { width: 118px; height: 34px; padding: 6px 10px; font-size: 12.5px; border-radius: 999px; }
.search-bar button { height: 34px; margin: 0; padding: 6px 14px; font-size: 12.5px; border-radius: 999px; }
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-bar a { text-decoration: none; }
.tab-bar a.btn-action, .tab-bar a.btn-secondary { border-radius: 999px; }
.batch-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.batch-bar button { flex-shrink: 0; white-space: nowrap; border-radius: 999px; }
.version-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.version-row input { flex: 1; }

/* ── 弹窗 / 上传层 ── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 200; padding: 18px;
    align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; animation: ndFade var(--t-mid) var(--ease-out); }
.modal {
    width: 100%; max-width: 420px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-pop);
}
.modal-overlay.show .modal { animation: ndPop var(--t-mid) var(--ease-spring) backwards; }
.modal h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; font-size: 16px; font-weight: 800; color: var(--ink); }
.modal h3::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--brand-grad); }
.modal p { font-size: 13px; color: var(--ink-2); }
.modal .modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .modal-actions button { flex: 1; }
.upload-overlay {
    position: fixed; inset: 0; z-index: 300; display: none; padding: 18px;
    align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.45);
}
.upload-overlay.show { display: flex; animation: ndFade var(--t-fast) var(--ease-out); }
.upload-modal {
    width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 24px 22px 20px; box-shadow: var(--shadow-pop);
    animation: ndPop var(--t-mid) var(--ease-spring) backwards;
}
.upload-title { font-size: 15px; font-weight: 700; color: var(--ink); text-align: center; margin-bottom: 18px; }
.upload-bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.upload-bar-fill {
    position: relative; height: 100%; width: 0%; border-radius: 999px; background: var(--brand-grad);
    transition: width 0.14s linear; overflow: hidden;
}
.upload-bar-fill::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: ndShimmer 1.1s linear infinite;
}
.upload-status { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.upload-percent { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.upload-percent.done { color: var(--green); }
.upload-stage { color: var(--ink-2); }
.upload-stage.done { color: var(--green); }

/* ── 开关（sw） ── */
.sw { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; line-height: 1; cursor: pointer; }
.sw-tr { position: relative; display: inline-block; flex: none; width: 42px; height: 24px; border-radius: 999px; background: #d3d9e6; transition: background var(--t-mid) var(--ease-out); }
.sw-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(15, 23, 42, 0.24); transition: transform var(--t-mid) var(--ease-spring); }
.sw.on .sw-tr { background: var(--brand); }
.sw.on .sw-knob { transform: translateX(18px); }
.sw-green.on .sw-tr { background: #16a34a; }
.sw-red.off .sw-tr { background: #ef4444; }
.sw-tx { font-size: 13px; font-weight: 600; color: var(--ink); transition: color var(--t-fast); }
.sw:hover .sw-tx { color: var(--brand); }
.sw-green:hover .sw-tx { color: var(--green); }
.sw-red.off .sw-tx { color: var(--red); }

/* ── 状态胶囊（pst） ── */
.pst {
    position: relative; overflow: hidden; border: 1px solid transparent; border-radius: 999px;
    padding: 6px 14px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
    transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), filter var(--t-fast);
}
.pst-txt { display: inline-block; }
.pst:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -12px rgba(15, 23, 42, 0.4); }
.pst:active { transform: scale(0.96); }
.pst-free   { background: var(--green-soft); color: var(--green); border-color: #cfe9d8; }
.pst-locked { background: var(--amber-soft); color: var(--amber); border-color: #f1e0bd; }
.pst-bound  { background: var(--brand-soft); color: #4338ca; border-color: #dbe0f8; }

/* ── SVIP 金标 ── */
.svip-badge {
    display: inline-flex; align-items: center; gap: 3px; line-height: 1.55; white-space: nowrap;
    padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
    color: #6b4a00; background: linear-gradient(135deg, #ffe9a8, #f6c445); border: 1px solid #e3b13c;
    box-shadow: 0 1px 4px -1px rgba(214, 158, 20, 0.45);
}
.c-name + .svip-badge { margin-left: 2px; vertical-align: 1px; }
body.user-bg-sheer .svip-badge, body.user-bg-clear .svip-badge { color: #5c4200; background: linear-gradient(135deg, #ffe9a8, #f2bf3f); }

/* ── 背景设置控件 ── */
.bg-fab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
    font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--brand);
    background: rgba(255, 255, 255, 0.9); cursor: pointer; box-shadow: var(--shadow-xs);
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.bg-fab .dot { width: 13px; height: 13px; flex: none; border-radius: 50%; background: var(--brand-grad); box-shadow: inset 0 0 0 2px #fff; }
.bg-fab:hover { background: var(--brand-soft); border-color: rgba(79, 70, 229, 0.35); }
.bg-fab:active { transform: scale(0.96); }
.appbar .ab-left .bg-fab { flex: 0 0 auto; }
.bg-preview { width: 100%; height: 150px; margin: 6px 0 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); background: var(--surface) center/cover no-repeat; }
.bg-note { font-size: 12px; line-height: 1.7; color: var(--ink-2); margin: 4px 0 12px; }
.bg-file { padding: 8px 10px; font-size: 12.5px; }
.bg-divider { height: 1px; border: 0; background: var(--line); margin: 14px 0 10px; }
.bg-mode-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 2px; }
.bg-mode-opt, .bg-seg-opt {
    position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 9px 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
    color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.3; cursor: pointer; user-select: none;
    transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.bg-mode-opt input, .bg-seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bg-mode-opt:hover, .bg-seg-opt:hover { transform: translateY(-1px); border-color: var(--brand); }
.bg-mode-opt:has(input:checked), .bg-seg-opt:has(input:checked) { background: var(--brand-grad); border-color: transparent; color: #fff; font-weight: 700; }
.bg-mode-opt:active, .bg-seg-opt:active { transform: scale(0.98); }
.bg-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.bg-seg-opt { border: 0; background: transparent; }
.bg-seg-opt:has(input:checked) { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-xs); }
.bg-switch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; user-select: none; transition: border-color var(--t-fast); }
.bg-switch:hover { border-color: var(--brand); }
.bg-switch input { position: absolute; opacity: 0; pointer-events: none; }
.bg-switch-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bg-switch-name { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.bg-switch-desc { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.bg-switch-track { position: relative; flex: none; margin-left: auto; width: 44px; height: 25px; border-radius: 999px; background: #d3d9e6; transition: background var(--t-mid) var(--ease-out); }
.bg-switch-thumb { position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(15, 23, 42, 0.24); transition: transform var(--t-mid) var(--ease-spring); }
.bg-switch input:checked + .bg-switch-track { background: var(--brand); }
.bg-switch input:checked + .bg-switch-track .bg-switch-thumb { transform: translateX(19px); }

/* ── 打星按钮（公共 PY / 公共资源） ── */
.star-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px;
    border: 1px solid #e3e9f2; border-radius: 999px; background: #fbfcfe; color: #9aa7b8;
    font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1; cursor: pointer; white-space: nowrap;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.star-btn svg { width: 14px; height: 14px; fill: transparent; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: fill var(--t-fast), transform var(--t-fast) var(--ease-spring); }
.star-btn i { font-style: normal; min-width: 1em; text-align: left; }
.star-btn:hover { border-color: #f0d48a; background: #fffdf5; color: #d69a06; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(214, 158, 46, 0.16); }
.star-btn:active { transform: translateY(0) scale(0.97); }
.star-btn.on { background: linear-gradient(135deg, #fff8e1, #ffefc2); border-color: #f2cd77; color: #b57e10; box-shadow: 0 2px 6px rgba(214, 158, 46, 0.22); }
.star-btn.on svg { fill: #fbbf24; stroke: #d99a06; }
.star-btn.busy { opacity: 0.55; pointer-events: none; }
.star-btn.is-self { cursor: default; background: #f4f7fb; border-color: #e6ecf4; color: #a9b6c8; box-shadow: none; }
.star-btn.is-self:hover { background: #f4f7fb; border-color: #e6ecf4; color: #a9b6c8; transform: none; box-shadow: none; }
.star-btn svg.pop { animation: star-pop 0.34s var(--ease-spring); }
@keyframes star-pop { 0% { transform: scale(0.5); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
table td .star-btn, table th .star-btn { margin: 2px 0; }

/* ── 加载态 ── */
.loading { display: flex; align-items: center; justify-content: center; padding: 56px 0; }
.spin { width: 24px; height: 24px; border: 2.5px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: ndSpin 0.8s linear infinite; }

/* ── 聊天室 ── */
.c-room { display: flex; flex-direction: column; overflow: hidden; padding: 0; height: calc(100vh - 200px); min-height: 440px; max-height: 780px; }
.c-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.c-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14); animation: ndBlink 2.4s ease-in-out infinite; }
.c-tt { font-size: 15px; font-weight: 800; color: var(--ink); }
.c-st { font-size: 11.5px; color: var(--ink-2); }
.c-list { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 14px 16px; scroll-behavior: smooth; }
.c-msg { display: flex; align-items: flex-end; gap: 9px; max-width: 88%; animation: ndUp var(--t-mid) var(--ease-out) backwards; }
.c-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.c-ava { display: flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; color: #fff; font-size: 12.5px; font-weight: 800; }
.c-ava .c-ava-img, .c-ava img.c-ava-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.c-role-admin .c-ava { background: #e05262; }
.c-role-developer .c-ava { background: var(--brand-grad); }
.c-role-agent .c-ava { background: linear-gradient(135deg, #9333ea, #6d28d9); }
.c-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 100%; }
.c-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 0 2px; font-size: 11px; color: var(--ink-3); }
.c-name { font-weight: 700; color: var(--ink); }
.c-tag { padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.c-tag.admin { color: #be123c; background: #fde8ec; }
.c-tag.developer { color: #4338ca; background: #e5e9fb; }
.c-tag.agent { color: #7c3aed; background: #f0e8fd; }
.c-wd { font-size: 11px; color: var(--red); font-weight: 700; text-decoration: none; opacity: 0.75; cursor: pointer; }
.c-wd:hover { opacity: 1; text-decoration: underline; }
.c-bubble { padding: 9px 13px; border-radius: 16px; background: var(--surface-2); color: var(--ink); font-size: 13.5px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.c-bubble.mine, .mine .c-bubble { background: var(--brand-soft); border: 1px solid rgba(79, 70, 229, 0.2); }
.c-msg.withdrawn .c-bubble { background: var(--surface-2); color: var(--ink-3); border: 1px dashed var(--line-strong); font-style: italic; }
.c-time { align-self: flex-end; font-size: 10.5px; color: var(--ink-3); }
.c-file { display: flex; flex-direction: column; gap: 7px; max-width: 320px; }
.c-file img { max-width: 290px; max-height: 200px; border-radius: var(--radius-s); display: block; cursor: zoom-in; }
.c-fcard { display: flex; align-items: center; gap: 10px; }
.c-ficon { display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-size: 11px; font-weight: 800; }
.c-finfo { min-width: 0; }
.c-fn { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.c-fs { font-size: 10.5px; color: var(--ink-3); }
.c-dl { font-size: 11.5px; font-weight: 700; color: var(--brand); text-decoration: none; }
.c-dl:hover { text-decoration: underline; }
.c-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.c-input input[type="text"] { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink); }
.c-input input[type="text"]:focus { border-color: var(--brand); outline: none; box-shadow: var(--ring); }
.c-chip { padding: 4px 10px; border: 1px solid rgba(79, 70, 229, 0.25); border-radius: 999px; background: var(--brand-soft); color: #4338ca; font-size: 11.5px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-empty { margin: auto; color: var(--ink-3); font-size: 13px; }

/* ── 音乐播放器（顶栏内联） ── */
#ndp {
    display: none; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; max-width: 100%;
    padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px;
    background: rgba(255, 255, 255, 0.72); font-family: var(--font);
}
#ndp .ndp-note { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-size: 10px; font-weight: 800; }
#ndp .ndp-t { flex: 0 1 auto; min-width: 0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ink); }
#ndp .ndp-tip { font-size: 10.5px; color: var(--ink-3); }
#ndp button { flex: 0 0 auto; padding: 3px 9px; border: 0; border-radius: 999px; font-family: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
#ndp .ndp-play { min-width: 46px; background: var(--brand-grad); color: #fff; }
#ndp .ndp-nav { padding: 3px 8px; background: var(--surface-2); color: var(--brand); }
#ndp .ndp-nav:hover { background: var(--brand-soft); }
#ndp .ndp-close { padding: 2px 5px; background: transparent; color: var(--ink-3); font-size: 13px; }
#ndp .ndp-close:hover { color: var(--red); }

/* ── 账号到期锁页 ── */
body.lk-body {
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: var(--bg);
    background-image: radial-gradient(1000px 420px at 20% -10%, rgba(99, 102, 241, 0.14), transparent 60%);
}
.lk { width: 100%; max-width: 470px; padding: 30px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); animation: ndUp var(--t-slow) var(--ease-out) backwards; }
.lk h1 { font-size: 19px; color: var(--red); margin-bottom: 8px; }
.lk .sub { font-size: 13px; line-height: 1.85; color: var(--ink-2); margin-bottom: 18px; }
.lk input { width: 100%; padding: 11px 13px; margin-bottom: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); font-family: inherit; font-size: 13.5px; outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.lk input:focus { border-color: var(--brand); box-shadow: var(--ring); }
.lk button { width: 100%; padding: 11px; border: 0; border-radius: var(--radius-s); background: var(--brand-grad); color: #fff; font-family: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px -14px var(--brand-glow); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.lk button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -14px var(--brand-glow); }
.lk .out { display: block; margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.lk .out:hover { color: var(--brand); }
.lk .tag { display: inline-block; margin-bottom: 14px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); }

/* ── 登录 / 注册 / 绑定页 ── */
body.auth-body-page {
    display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 22px;
    background-image: radial-gradient(900px 420px at 15% -5%, rgba(99, 102, 241, 0.16), transparent 60%),
                      radial-gradient(760px 380px at 100% 0%, rgba(168, 85, 247, 0.12), transparent 55%);
}
.auth-card {
    width: 100%; max-width: 460px; overflow: hidden; background: var(--surface);
    border: 1px solid var(--line); border-radius: 24px;
    box-shadow: 0 30px 70px -36px rgba(15, 23, 42, 0.3), 0 4px 14px -8px rgba(15, 23, 42, 0.08);
    animation: ndUp var(--t-slow) var(--ease-out) backwards;
}
.auth-header { padding: 34px 26px 28px; text-align: center; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbfcff, #fff); }
.auth-header h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: 5px; color: var(--ink); }
.auth-header h1::after { content: ""; display: block; width: 46px; height: 3px; margin: 12px auto 0; border-radius: 3px; background: var(--brand-grad); }
.auth-header p { margin-top: 9px; font-size: 0.74rem; font-weight: 600; letter-spacing: 4px; color: var(--ink-3); }
.auth-body { padding: 26px 30px 30px; }
.tabs, .role-switch { display: flex; gap: 4px; padding: 4px; margin-bottom: 22px; background: var(--surface-2); border-radius: 999px; }
.role-switch { margin-bottom: 18px; }
.tabs button, .role-switch button {
    flex: 1; padding: 10px; border: none; border-radius: 999px; background: transparent;
    font-family: inherit; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast), box-shadow var(--t-fast);
}
.role-switch button { padding: 8px; font-size: 0.85rem; }
.tabs button.active, .role-switch button.active {
    background: var(--surface); color: var(--brand); font-weight: 800;
    box-shadow: var(--shadow-xs), inset 0 0 0 1px rgba(79, 70, 229, 0.14);
}
.tabs button:not(.active):hover, .role-switch button:not(.active):hover { color: var(--brand); }
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { padding-right: 48px !important; }
.password-toggle {
    position: absolute; right: 6px; top: 50%; z-index: 10; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    padding: 0; border: none; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}
.password-toggle:hover { background: var(--brand-soft); color: var(--brand); }
.password-toggle svg { width: 19px; height: 19px; }
.login-btn {
    width: 100%; padding: 13px; border: none; border-radius: 14px;
    background: var(--brand-grad); color: #fff; font-family: inherit; font-size: 1rem; font-weight: 800; letter-spacing: 5px; cursor: pointer;
    box-shadow: 0 12px 26px -14px var(--brand-glow);
    transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px var(--brand-glow); }
.login-btn:active { transform: translateY(1px); }
.auth-body .form-group input { width: 100%; padding: 12px 14px; border-radius: 14px; font-size: 0.93rem; }

/* ── 自定义背景：三档（glass / sheer / clear） ──
   统一策略：①重设 --surface/--line/--ink 等变量，让所有引用变量的组件整体跟随；
   ②对硬编码白色的控件逐类覆盖；③完全通透档关闭毛玻璃并翻白文字。 */
body.user-bg { --surface: rgba(255, 255, 255, 0.62); --surface-2: rgba(244, 248, 253, 0.42); --surface-3: rgba(226, 232, 244, 0.55); --line: rgba(13, 22, 45, 0.08); --line-strong: rgba(13, 22, 45, 0.16); --brand-soft: rgba(79, 70, 229, 0.14); }
body.user-bg-sheer { --surface: rgba(255, 255, 255, 0.32); --surface-2: rgba(244, 248, 253, 0.22); --surface-3: rgba(226, 232, 244, 0.3); --line: rgba(13, 22, 45, 0.07); --line-strong: rgba(13, 22, 45, 0.13); --brand-soft: rgba(79, 70, 229, 0.14); }
body.user-bg-clear {
    --surface: rgba(255, 255, 255, 0.03); --surface-2: rgba(255, 255, 255, 0.07); --surface-3: rgba(255, 255, 255, 0.12);
    --line: rgba(255, 255, 255, 0.24); --line-strong: rgba(255, 255, 255, 0.38);
    --brand-soft: rgba(79, 70, 229, 0.34);
    --ink: #f6f9ff; --ink-2: #d3dbe9; --ink-3: #9aa6ba;
}
body.user-bg, body.user-bg-sheer, body.user-bg-clear { background-image: none; }

/* 大块玻璃面 */
body.user-bg .appbar, body.user-bg .bottomnav, body.user-bg .card, body.user-bg .stat-item,
body.user-bg .project-item, body.user-bg .modal, body.user-bg .upload-modal {
    backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35);
}
body.user-bg-sheer .appbar, body.user-bg-sheer .bottomnav, body.user-bg-sheer .card, body.user-bg-sheer .stat-item,
body.user-bg-sheer .project-item, body.user-bg-sheer .modal, body.user-bg-sheer .upload-modal {
    backdrop-filter: blur(10px) saturate(1.12); -webkit-backdrop-filter: blur(10px) saturate(1.12);
}
body.user-bg-clear .appbar, body.user-bg-clear .bottomnav, body.user-bg-clear .card, body.user-bg-clear .stat-item,
body.user-bg-clear .project-item, body.user-bg-clear .modal, body.user-bg-clear .upload-modal,
body.user-bg-clear .bg-fab, body.user-bg-clear #ndp, body.user-bg-clear .bg-switch,
body.user-bg-clear .bg-seg, body.user-bg-clear .bg-mode-opt, body.user-bg-clear .bg-seg-opt {
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
/* 卡片/弹层/顶栏底色跟随档位 */
body.user-bg .appbar, body.user-bg .bottomnav, body.user-bg .appbar .bg-fab, body.user-bg .menu-btn { background: var(--surface); }
body.user-bg-sheer .appbar, body.user-bg-sheer .bottomnav { background: rgba(255, 255, 255, 0.72); }
body.user-bg-clear .appbar, body.user-bg-clear .bottomnav { background: rgba(255, 255, 255, 0.03); }
body.user-bg-clear .card, body.user-bg-clear .stat-item, body.user-bg-clear .project-item,
body.user-bg-clear .pair-grid > .card, body.user-bg-clear .c-room,
body.user-bg-clear .modal, body.user-bg-clear .upload-modal { background: rgba(255, 255, 255, 0.03); }
body.user-bg-clear .card, body.user-bg-clear .stat-item, body.user-bg-clear .project-item,
body.user-bg-clear .card:hover, body.user-bg-clear .stat-item:hover, body.user-bg-clear .project-item:hover { box-shadow: none; }
body.user-bg-clear .content { background: transparent; }

/* 输入类控件 */
body.user-bg input[type="text"], body.user-bg input[type="password"], body.user-bg input[type="number"],
body.user-bg input[type="email"], body.user-bg input[type="search"], body.user-bg input[type="url"],
body.user-bg input[type="tel"], body.user-bg select, body.user-bg textarea, body.user-bg input[type="file"],
body.user-bg .c-input input[type="text"] { background: rgba(255, 255, 255, 0.44); border-color: var(--line-strong); color: var(--ink); }
body.user-bg-sheer input[type="text"], body.user-bg-sheer input[type="password"], body.user-bg-sheer input[type="number"],
body.user-bg-sheer input[type="email"], body.user-bg-sheer input[type="search"], body.user-bg-sheer input[type="url"],
body.user-bg-sheer input[type="tel"], body.user-bg-sheer select, body.user-bg-sheer textarea, body.user-bg-sheer input[type="file"],
body.user-bg-sheer .c-input input[type="text"] { background: rgba(255, 255, 255, 0.2); border-color: var(--line-strong); color: var(--ink); }
body.user-bg-clear input[type="text"], body.user-bg-clear input[type="password"], body.user-bg-clear input[type="number"],
body.user-bg-clear input[type="email"], body.user-bg-clear input[type="search"], body.user-bg-clear input[type="url"],
body.user-bg-clear input[type="tel"], body.user-bg-clear select, body.user-bg-clear textarea, body.user-bg-clear input[type="file"],
body.user-bg-clear .c-input input[type="text"] { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); color: var(--ink); }
body.user-bg-clear select option { background: #262b36; color: #eef2f9; }
body.user-bg-clear .c-input input[type="text"]:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.5); }

/* 语义按钮 */
body.user-bg .btn-secondary { background: rgba(255, 255, 255, 0.26); border-color: var(--line-strong); color: var(--ink); }
body.user-bg-clear .btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--ink-2); }
body.user-bg .btn-secondary:hover { background: rgba(255, 255, 255, 0.44); }
body.user-bg .btn-info { background: rgba(11, 107, 203, 0.3); border-color: rgba(11, 107, 203, 0.42); color: #fff; }
body.user-bg .btn-danger { background: rgba(220, 38, 38, 0.3); border-color: rgba(220, 38, 38, 0.45); color: #fff; }
body.user-bg .btn-success { background: rgba(22, 163, 74, 0.3); border-color: rgba(22, 163, 74, 0.45); color: #fff; }
body.user-bg .btn-warning { background: rgba(180, 83, 9, 0.32); border-color: rgba(180, 83, 9, 0.45); color: #fff; }
body.user-bg .btn-copy, body.user-bg .btn-select-mode { background: rgba(109, 40, 217, 0.28); border-color: rgba(109, 40, 217, 0.42); color: #fff; }
body.user-bg .btn-select-all { background: rgba(147, 51, 234, 0.26); border-color: rgba(147, 51, 234, 0.4); color: #fff; }
body.user-bg .btn-action, body.user-bg .btn-select-mode.active { background: var(--brand-grad); border-color: transparent; color: #fff; }
body.user-bg .btn-info:hover { background: rgba(11, 107, 203, 0.48); }
body.user-bg .btn-danger:hover { background: rgba(220, 38, 38, 0.48); }
body.user-bg .btn-success:hover { background: rgba(22, 163, 74, 0.48); }
body.user-bg .btn-warning:hover { background: rgba(180, 83, 9, 0.5); }
body.user-bg .btn-copy:hover, body.user-bg .btn-select-mode:hover { background: rgba(109, 40, 217, 0.46); }
body.user-bg .btn-select-all:hover { background: rgba(147, 51, 234, 0.44); }

/* 胶囊 / 提示条 / 标签 */
body.user-bg .pst-free { background: rgba(22, 163, 74, 0.16); color: #10703a; border-color: rgba(22, 163, 74, 0.34); }
body.user-bg .pst-locked { background: rgba(180, 83, 9, 0.18); color: #96670f; border-color: rgba(180, 83, 9, 0.34); }
body.user-bg .pst-bound { background: var(--brand-soft); color: #4338ca; border-color: rgba(79, 70, 229, 0.3); }
body.user-bg .alert-box { background: rgba(220, 38, 38, 0.16); border-color: rgba(220, 38, 38, 0.32); color: #fff4f4; }
body.user-bg .alert-info { background: rgba(11, 107, 203, 0.18); border-color: rgba(11, 107, 203, 0.32); color: #eaf4ff; }
body.user-bg .c-tag.admin { background: rgba(224, 82, 98, 0.22); color: #ffd8dd; }
body.user-bg .c-tag.developer { background: rgba(79, 70, 229, 0.28); color: #e3e8ff; }
body.user-bg .c-tag.agent { background: rgba(147, 51, 234, 0.26); color: #f0e6ff; }
body.user-bg .row-card { background: var(--surface-2); }
body.user-bg .row-card:hover { background: var(--surface-3); }
body.user-bg .sw-tr { background: rgba(13, 22, 45, 0.18); }
body.user-bg .bg-switch { background: rgba(255, 255, 255, 0.2); }
body.user-bg .bg-seg { background: rgba(255, 255, 255, 0.14); }
body.user-bg .bg-mode-opt, body.user-bg .bg-seg-opt { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.28); color: var(--ink-2); }
body.user-bg-clear .bg-fab { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
body.user-bg-clear .bg-switch { background: rgba(255, 255, 255, 0.07); }
body.user-bg-clear .bg-seg, body.user-bg-clear .bg-seg-opt { background: rgba(255, 255, 255, 0.06); }
body.user-bg-clear .bg-mode-opt { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.24); color: var(--ink-2); }
body.user-bg-clear .bg-mode-opt:has(input:checked), body.user-bg-clear .bg-seg-opt:has(input:checked) { background: var(--brand-grad); border-color: transparent; color: #fff; }
body.user-bg-clear .sw-tr { background: rgba(255, 255, 255, 0.3); }
body.user-bg-clear .sw-knob, body.user-bg-clear .bg-switch-thumb { background: rgba(255, 255, 255, 0.5); box-shadow: none; }
body.user-bg-clear .bg-switch-track { background: rgba(255, 255, 255, 0.22); }
body.user-bg-clear .bg-preview { background: rgba(255, 255, 255, 0.05); }
body.user-bg-clear .c-chip { color: #e6ebff; background: var(--brand-soft); }
body.user-bg-clear table th { color: #e8eef9; }
body.user-bg-clear .code-text { color: #e7edf8; }
body.user-bg-clear .pst-free { color: #d5ffe6; background: rgba(22, 163, 74, 0.24); }
body.user-bg-clear .pst-locked { color: #ffeac2; background: rgba(180, 83, 9, 0.28); }
body.user-bg-clear .pst-bound { color: #dde3ff; }
body.user-bg-clear .star-btn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.26); color: #e7edf5; box-shadow: none; }
body.user-bg-clear .star-btn.on { background: rgba(255, 224, 150, 0.24); border-color: rgba(255, 204, 110, 0.6); color: #ffd98c; }
body.user-bg-clear .star-btn.is-self { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #c6d2e0; }
body.user-bg-sheer .star-btn { background: rgba(255, 255, 255, 0.4); border-color: rgba(255, 255, 255, 0.6); color: #4b5a6d; box-shadow: none; }
body.user-bg-sheer .star-btn.on { background: rgba(255, 238, 190, 0.82); border-color: #f0cf8b; color: #8a5d00; }
body.user-bg-clear .appbar .ab-title, body.user-bg-clear .appbar .ab-user,
body.user-bg-clear .bottomnav a.bn-item { color: #fff; }
body.user-bg-clear .appbar .ab-out { color: rgba(255, 255, 255, 0.72); }
body.user-bg-clear .bottomnav a.bn-item.active { background: rgba(255, 255, 255, 0.16); color: #fff; }
body.user-bg-clear ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); background-clip: padding-box; border: 2px solid transparent; border-radius: 999px; }
body.user-bg-clear ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.46); background-clip: padding-box; border: 2px solid transparent; border-radius: 999px; }

/* ── 动效层 ── */
@keyframes ndUp   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ndPop  { from { opacity: 0; transform: scale(0.955); } to { opacity: 1; transform: scale(1); } }
@keyframes ndFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ndDrop { from { opacity: 0; transform: translate(-50%, -6px) scale(0.7); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes ndRipple { to { transform: scale(1); opacity: 0; } }
@keyframes ndSpin { to { transform: rotate(360deg); } }
@keyframes ndShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes ndBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* 内容块依次进场 */
.content > * { animation: ndUp var(--t-slow) var(--ease-out) backwards; }
.content > *:nth-child(2) { animation-delay: 0.05s; }
.content > *:nth-child(3) { animation-delay: 0.1s; }
.content > *:nth-child(4) { animation-delay: 0.15s; }
.content > *:nth-child(5) { animation-delay: 0.2s; }
.content > *:nth-child(6) { animation-delay: 0.25s; }
.content > *:nth-child(7) { animation-delay: 0.3s; }
.content > *:nth-child(n+8) { animation-delay: 0.34s; }
/* 列表行依次进场 */
.rc-list .row-card, .stat-grid .stat-item, .project-grid .project-item { animation: ndUp var(--t-mid) var(--ease-out) backwards; }
.rc-list .row-card:nth-child(2), .stat-grid .stat-item:nth-child(2), .project-grid .project-item:nth-child(2) { animation-delay: 0.04s; }
.rc-list .row-card:nth-child(3), .stat-grid .stat-item:nth-child(3), .project-grid .project-item:nth-child(3) { animation-delay: 0.08s; }
.rc-list .row-card:nth-child(4), .stat-grid .stat-item:nth-child(4), .project-grid .project-item:nth-child(4) { animation-delay: 0.12s; }
.rc-list .row-card:nth-child(5), .stat-grid .stat-item:nth-child(5), .project-grid .project-item:nth-child(5) { animation-delay: 0.16s; }
.rc-list .row-card:nth-child(n+6), .stat-grid .stat-item:nth-child(n+6), .project-grid .project-item:nth-child(n+6) { animation-delay: 0.2s; }

/* ── 响应式 ── */
@media (min-width: 900px) {
    .content { max-width: 1200px; padding: 30px 32px 84px; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
    .c-room { height: calc(100vh - 240px); }
}
@media (max-width: 720px) {
    .appbar { height: 54px; padding: 0 14px; gap: 8px; }
    .appbar .ab-title { font-size: 14px; letter-spacing: 0.2px; }
    .appbar .ab-user span:not(.ab-ava) { display: none; }
    .appbar .ab-out { padding: 6px 9px; font-size: 12px; }
    .appbar.has-player { flex-wrap: nowrap; align-items: center; gap: 8px; padding: 10px 12px; }
    .appbar.has-player .ab-left { flex: 0 1 auto; min-width: 0; gap: 8px; }
    .appbar.has-player .ab-title { font-size: 13.5px; }
    .appbar.has-player #ndp { flex: 1 1 auto; min-width: 0; padding: 3px 6px; }
    .appbar.has-player #ndp .ndp-t { max-width: 34vw; }
    .appbar.has-player .ab-user { flex: 0 0 auto; gap: 0; }
    .appbar.has-player .ab-out { flex: 0 0 auto; }
    .appbar.has-player #ndp .ndp-nav { padding: 3px 7px; font-size: 0; }
    .appbar.has-player #ndp .ndp-nav::before { font-size: 14px; line-height: 1; }
    .appbar.has-player #ndpPrev::before { content: "‹"; }
    .appbar.has-player #ndpNext::before { content: "›"; }
    .appbar.has-player #ndp .ndp-play { min-width: 40px; padding: 3px 8px; }
}
@media (max-width: 560px) {
    .content { padding: 18px 14px 104px; }
    .card { padding: 18px 16px; border-radius: 18px; }
    .pair-grid { grid-template-columns: 1fr; gap: 16px 0; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-item { padding: 16px 10px 13px; }
    .stat-item .num { font-size: 22px; }
    .row-card { padding: 12px 14px; }
    .search-bar input { width: 100%; }
    .auth-header { padding: 28px 20px 24px; }
    .auth-header h1 { font-size: 1.55rem; letter-spacing: 4px; }
    .auth-body { padding: 22px 20px 24px; }
    .bottomnav a.bn-item { min-width: 60px; font-size: 11px; }
}

/* ── 减少动态 ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important; animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important; scroll-behavior: auto !important;
    }
}
