/* ============================================================
   Voxuk · ningdi.wiki 前端设计系统 v14（纯白 · 全新重写）
   ------------------------------------------------------------
   本文件为全站唯一样式来源：登录/注册页、开发者/管理/代理面板、
   账号到期锁页、聊天室、音乐播放器均引用本文件。
   不依赖任何历史内联版型。纯白基底 + 中性灰层次 + 靛蓝单色点缀，
   无渐变炫彩、无扫光/旋转彩边动画；动效克制并尊重系统“减少动态”。
   ============================================================ */

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --line: #e7eaf0;
    --line-strong: #d3d9e2;
    --ink: #111827;
    --ink-2: #4b5563;
    --ink-3: #8a94a3;
    --brand: #4f5fd0;
    --brand-dark: #3f4dc0;
    --brand-soft: #eef0fb;
    --red: #dc2626;
    --green: #15803d;
    --amber: #b45309;
    --violet: #6d28d9;
    --shadow-card: 0 12px 30px -22px rgba(20, 30, 50, 0.22), 0 1px 3px rgba(20, 30, 50, 0.05);
    --shadow-pop: 0 30px 60px -28px rgba(20, 30, 50, 0.4);
    --ring: 0 0 0 3px rgba(79, 95, 208, 0.16);
    --radius: 22px;
    --radius-s: 14px;
    --sidebar-w: 256px;
    --font: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
input[type="hidden"] { display: none !important; }
html { min-height: 100%; }
::selection { background: rgba(79, 95, 208, 0.18); }
* { scrollbar-width: thin; scrollbar-color: #cfd6df transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3dae3; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c2ce; background-clip: padding-box; border: 2px solid transparent; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; }
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, 95, 208, 0.55); outline-offset: 2px; }

/* ---------------- 顶栏 ---------------- */
.top-bar {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.top-bar .page-title { font-size: 15.5px; font-weight: 700; letter-spacing: 1.5px; color: var(--ink); }
.menu-btn {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: var(--radius-s);
    border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
    font-size: 19px; line-height: 1; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.menu-btn:hover { background: var(--surface-2); color: var(--brand); }
.menu-btn:active { transform: translateY(-50%) scale(0.94); }

/* ---------------- 抽屉 / 侧边导航 ---------------- */
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(17, 24, 39, 0.4); z-index: 90; }
.drawer-overlay.show { display: block; }
.drawer {
    position: fixed; top: 0; left: -280px; width: 256px; height: 100%; z-index: 100;
    display: flex; flex-direction: column;
    background: #fff; border-right: 1px solid var(--line);
    box-shadow: 22px 0 46px -28px rgba(20, 30, 50, 0.3);
    transition: left 0.24s ease;
    padding: 18px 12px 14px; overflow-y: auto;
}
.drawer.show { left: 0; }
.drawer .logo {
    display: flex; align-items: center; gap: 9px;
    padding: 2px 14px 18px; margin-bottom: 16px;
    font-size: 16.5px; font-weight: 800; letter-spacing: 1px; color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.drawer .logo::before { content: ""; width: 10px; height: 10px; border-radius: 4px; background: var(--brand); flex: none; }
.drawer nav { flex: 1; display: flex; flex-direction: column; padding: 6px 0; }
.drawer nav a {
    position: relative; margin: 3px 4px; padding: 12px 14px 12px 24px;
    color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600;
    border-radius: var(--radius-s); transition: background 0.15s ease, color 0.15s ease;
}
.drawer nav a::before {
    content: ""; position: absolute; left: 10px; top: 50%;
    transform: translateY(-50%); width: 5px; height: 5px; border-radius: 50%;
    background: var(--brand); opacity: 0; transition: opacity 0.15s ease;
}
.drawer nav a:hover { color: var(--brand); background: var(--surface-2); }
.drawer nav a:hover::before { opacity: 1; }
.drawer .logout-btn {
    margin: 12px 4px 4px; padding: 11px; border-radius: var(--radius-s);
    display: block; text-align: center; font-size: 13.5px; font-weight: 700;
    color: var(--red); background: #fdf3f3; border: 1px solid #f4d9d9;
    text-decoration: none; transition: background 0.15s ease;
}
.drawer .logout-btn:hover { background: #fbe4e4; }

/* 抽屉底部用户行（QQ 绑定入口）：小圆头像 + 名字 + 状态标签，导航行样式 */
.drawer .du {
    display: flex; align-items: center; gap: 8px;
    margin: 0 6px 4px; padding: 5px 8px;
    border-radius: 8px;
    text-decoration: none; transition: background 0.15s ease;
}
.drawer .du:hover { background: var(--surface-2); }
.drawer .du-ava {
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; color: #fff;
    background: var(--brand);
}
.drawer .du-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drawer .du-txt { min-width: 0; display: flex; align-items: center; gap: 7px; }
.drawer .du-txt b { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .du-txt i.st { flex-shrink: 0; font-style: normal; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: rgba(120, 130, 150, 0.10); color: var(--ink-3); white-space: nowrap; }
.drawer .du-txt i.st.on { background: rgba(52, 199, 123, 0.13); color: #1e9e63; }
body.user-bg .drawer .du:hover { background: rgba(255, 255, 255, 0.12); }
body.user-bg .drawer .du-txt b { color: #fff; }
body.user-bg .drawer .du-txt i.st { background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.78); }
body.user-bg .drawer .du-txt i.st.on { background: rgba(52, 199, 123, 0.25); color: #7ce3b0; }

/* SVIP 金标 */
.svip-badge {
    display: inline-flex; align-items: center; gap: 3px;
    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);
    line-height: 1.5; white-space: nowrap;
}
.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);
}

/* ---------------- 内容区 ---------------- */
.content { padding: 28px 26px 60px; max-width: 1160px; margin: 0 auto; }

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 28px; margin: 0 0 26px; overflow-x: auto;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-strong); }
.card h3, .card h4, .card h5 {
    margin-bottom: 20px; font-size: 15.5px; font-weight: 800; color: var(--ink);
    display: flex; align-items: center; gap: 9px;
}
.card h3::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--brand); flex: none; }
.card p { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; margin: 0 0 26px; align-items: start; }
.pair-grid > .card { margin: 0; min-width: 0; }

/* ---------------- 表单 ---------------- */
.form-group { margin-bottom: 17px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; letter-spacing: 0.2px; }
.form-row { display: flex; gap: 18px; 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"], select, textarea {
    width: 100%; padding: 10px 13px; font-size: 13.5px; color: var(--ink);
    background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
    outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { line-height: 1.6; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: #b6bdc9; }
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); }

/* ---------------- 按钮 ---------------- */
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; padding: 10px 18px; font-size: 13px; font-weight: 700;
    border-radius: var(--radius-s); cursor: pointer; margin: 3px; white-space: nowrap;
    border: 1px solid transparent; display: inline-block; line-height: 1.4;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
button[class*="btn-"]:active, .btn-action:active, .btn:active { transform: translateY(1px) scale(0.99); }
.btn-action { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 8px 18px -12px rgba(79, 95, 208, 0.65); }
.btn-action:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-secondary { color: var(--ink-2); background: #fff; border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-info { color: #0b6bcb; background: #eef6fe; border-color: #d3e7fb; }
.btn-info:hover { background: #e0effc; }
.btn-danger { color: var(--red); background: #fef2f2; border-color: #f4d4d4; }
.btn-danger:hover { background: #fde3e3; }
.btn-success { color: var(--green); background: #eefaf2; border-color: #d3edd9; }
.btn-success:hover { background: #def3e5; }
.btn-warning { color: var(--amber); background: #fdf8ec; border-color: #f0e2c0; }
.btn-warning:hover { background: #fbefd3; }
.btn-copy, .btn-select-mode { color: var(--violet); background: #f6f1fe; 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: #7c3aed; border-color: #7c3aed; }
.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; }

/* ---------------- 表格 ---------------- */
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: #3f4a5c; 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: 16px 0 0 16px; }
.card table th:last-child { border-radius: 0 16px 16px 0; }
.card table td { padding: 12px 16px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.card table tbody td { background: var(--surface-2); }
.card table tbody td:first-child { border-radius: 16px 0 0 16px; }
.card table tbody td:last-child { border-radius: 0 16px 16px 0; }
.card table tbody tr:hover td { background: #e9edf5; }
.code-text { white-space: nowrap; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; color: #2d3a52; }
.selectable-row { cursor: pointer; }
.selectable-row.selected, .selectable-row.selected td { background: var(--brand-soft) !important; }

/* ---------------- 列表行 / 日志 / 卡密行 ---------------- */
.card-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; border-radius: var(--radius-s); transition: background 0.15s ease; }
.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: 8px 10px; border-bottom: 1px solid var(--line); border-radius: var(--radius-s); transition: background 0.15s ease; }
.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; }
.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; }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 18px 18px; text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.stat-item:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 34px -24px rgba(20, 30, 50, 0.28); }
.stat-item .num { font-size: 28px; font-weight: 800; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-item .label { font-size: 12px; color: var(--ink-2); margin-top: 8px; }

/* ---------------- 提示条 / 页签 / 工具栏 ---------------- */
.alert-box {
    display: flex; align-items: center; gap: 10px;
    background: #fdf5f5; border: 1px solid #f2d8d8; border-left: 4px solid var(--red);
    border-radius: 24px; padding: 12px 15px; margin-bottom: 18px; color: #c0392b; font-size: 14px;
}
.warn-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; border-radius: 22px; background: #f59e0b; color: #fff; font-size: 12px; font-weight: 800; }
.warn-icon::after { content: "!"; }
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.search-bar input { width: 180px; padding: 6px 10px; font-size: 12.5px; height: 34px; border-radius: 22px; }
.search-bar select { width: 110px; padding: 6px 8px; font-size: 12.5px; height: 34px; border-radius: 22px; }
.search-bar button { padding: 6px 12px; font-size: 12.5px; height: 34px; margin: 0; border-radius: 22px; }
.tab-bar { display: flex; gap: 10px; 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: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.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; }

/* ---------------- 项目卡 ---------------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project-item {
    border: 1px solid var(--line); border-radius: 22px; padding: 15px 16px;
    background: var(--surface);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.project-item:hover { border-color: var(--line-strong); box-shadow: 0 16px 30px -24px rgba(20, 30, 50, 0.28); transform: translateY(-2px); }
.project-item h4 { font-size: 14.5px; margin-bottom: 7px; color: var(--ink); }
.project-item p { font-size: 12.5px; color: var(--ink-2); word-break: break-all; margin-bottom: 4px; line-height: 1.5; }
.project-item .actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- 弹窗 / 上传层 ---------------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(17, 24, 39, 0.42); z-index: 200; align-items: center; justify-content: center; padding: 18px; }
.modal-overlay.show { display: flex; }
.modal {
    background: #fff; border: 1px solid var(--line); border-radius: 22px;
    padding: 24px; width: 100%; max-width: 400px;
    box-shadow: var(--shadow-pop);
}
.modal h3 { margin-bottom: 15px; font-size: 16px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.modal h3::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--brand); }
.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; align-items: center; justify-content: center; background: rgba(17, 24, 39, 0.42); padding: 18px; }
.upload-modal { width: 100%; max-width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 24px 22px 20px; box-shadow: var(--shadow-pop); }
.upload-title { font-size: 15px; font-weight: 700; color: var(--ink); text-align: center; margin-bottom: 18px; }
.upload-bar { height: 12px; border-radius: 24px; background: var(--surface-2); overflow: hidden; }
.upload-bar-fill { height: 100%; width: 0%; border-radius: 24px; background: var(--brand); transition: width 0.12s linear; }
.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; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; line-height: 1; }
.sw-tr { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #d3d9e1; display: inline-block; flex: none; transition: background 0.25s ease; }
.sw-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(20, 30, 50, 0.25); transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.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); }
.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; border: 1px solid transparent; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.pst-txt { display: inline-block; }
.pst:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -10px rgba(20, 30, 50, 0.3); }
.pst:active { transform: scale(0.96); }
.pst-free { background: #eefaf2; color: var(--green); border-color: #cfe9d8; }
.pst-locked { background: #fdf7ea; color: var(--amber); border-color: #f1e0bd; }
.pst-bound { background: var(--brand-soft); color: #1d4ed8; border-color: #d8e0f7; }

/* ---------------- 背景设置控件 ---------------- */
.bg-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 160;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
    color: var(--brand); background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px -16px rgba(20, 30, 50, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.bg-fab .dot { width: 16px; height: 16px; border-radius: 22px; flex: none; background: linear-gradient(135deg, #4f5fd0, #38bdf8, #f472b6); box-shadow: inset 0 0 0 2px #fff; }
.bg-fab:hover { transform: translateY(-2px); }
.bg-preview { width: 100%; height: 150px; border-radius: 24px; border: 1px dashed var(--line-strong); background: #fff; margin: 6px 0 14px; background-position: center; background-size: cover; background-repeat: 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-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.3; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease; }
.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); border-color: var(--brand); 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: 24px; }
.bg-seg-opt { border: 0; background: transparent; border-radius: 22px; }
.bg-seg-opt:has(input:checked) { background: #fff; color: var(--brand); box-shadow: 0 3px 8px -4px rgba(20, 30, 50, 0.2); }
.bg-switch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 24px; background: #fff; cursor: pointer; user-select: none; transition: border-color 0.2s ease; }
.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: #d3d9e1; transition: background 0.25s ease; }
.bg-switch-thumb { position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(20, 30, 50, 0.25); transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.bg-switch input:checked + .bg-switch-track { background: var(--brand); }
.bg-switch input:checked + .bg-switch-track .bg-switch-thumb { transform: translateX(19px); }

/* ---------------- 点击涟漪 ---------------- */
.bt-ripple { position: absolute; border-radius: 50%; z-index: 1; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%); transform: scale(0); animation: ndRipple 0.65s ease-out forwards; }
@keyframes ndRipple { to { transform: scale(1); opacity: 0; } }

/* ---------------- 聊天室 ---------------- */
.c-room { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: calc(100vh - 180px); min-height: 440px; max-height: 760px; }
.c-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.c-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.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; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.c-msg { display: flex; gap: 9px; align-items: flex-end; max-width: 88%; }
.c-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.c-ava { width: 30px; height: 30px; border-radius: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; color: #fff; overflow: hidden; }
.c-ava .c-ava-img, .c-ava img.c-ava-img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; display: block; }
.c-role-admin .c-ava { background: #e05262; }
.c-role-developer .c-ava { background: var(--brand); }
.c-role-agent .c-ava { background: #9333ea; }
.c-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 100%; }
.c-meta { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-3); padding: 0 2px; flex-wrap: wrap; }
.c-name { font-weight: 700; color: var(--ink); }
.c-tag { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.c-tag.admin { color: #be123c; background: #fde8ec; }
.c-tag.developer { color: #1d4ed8; background: #e5ebfb; }
.c-tag.agent { color: #7c3aed; background: #f0e8fd; }
.c-wd { color: var(--red); font-weight: 700; text-decoration: none; opacity: 0.75; cursor: pointer; font-size: 11px; }
.c-wd:hover { opacity: 1; text-decoration: underline; }
.c-bubble { padding: 9px 13px; border-radius: 22px; font-size: 13.5px; line-height: 1.6; word-break: break-word; background: var(--surface-2); color: var(--ink); white-space: pre-wrap; }
.mine .c-bubble { background: var(--brand-soft); border: 1px solid rgba(79, 95, 208, 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 { font-size: 10.5px; color: var(--ink-3); align-self: flex-end; }
.c-file { display: flex; flex-direction: column; gap: 7px; max-width: 320px; }
.c-file img { max-width: 290px; max-height: 200px; border-radius: 22px; display: block; cursor: zoom-in; }
.c-fcard { display: flex; align-items: center; gap: 10px; }
.c-ficon { width: 36px; height: 36px; border-radius: 22px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.c-finfo { min-width: 0; }
.c-fn { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-fs { font-size: 10.5px; color: var(--ink-3); }
.c-dl { font-size: 11.5px; color: var(--brand); text-decoration: none; font-weight: 700; }
.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-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 13px; color: var(--ink); }
.c-input input[type="text"]:focus { border-color: var(--brand); outline: none; box-shadow: var(--ring); }
.c-chip { font-size: 11.5px; color: #1d4ed8; background: var(--brand-soft); border: 1px solid rgba(79, 95, 208, 0.25); padding: 4px 10px; border-radius: 999px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-empty { color: var(--ink-3); font-size: 13px; text-align: center; margin: auto; }

/* ---------------- 音乐播放器 ---------------- */
#ndp { display: none; position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1200; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 14px; box-shadow: var(--shadow-pop); font-family: var(--font); max-width: 92vw; }
#ndp .ndp-note { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
#ndp .ndp-t { font-size: 12.5px; font-weight: 700; color: var(--ink); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ndp .ndp-tip { font-size: 10.5px; color: var(--ink-3); }
#ndp button { border: 0; cursor: pointer; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 5px 12px; transition: background 0.15s ease; }
#ndp .ndp-play { background: var(--brand); color: #fff; min-width: 58px; }
#ndp .ndp-play:hover { background: var(--brand-dark); }
#ndp .ndp-nav { background: var(--surface-2); color: var(--brand); padding: 5px 9px; }
#ndp .ndp-nav:hover { background: #e8ebf6; }
#ndp .ndp-close { background: transparent; color: var(--ink-3); font-size: 14px; padding: 3px 7px; }
#ndp .ndp-close:hover { color: var(--red); }

/* ---------------- 账号到期锁页 ---------------- */
body.lk-body { display: flex; align-items: center; justify-content: center; padding: 20px; background: #f4f6f9; }
.lk { width: 100%; max-width: 470px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; box-shadow: var(--shadow-pop); }
.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; border-radius: var(--radius-s); border: 1px solid var(--line-strong); font-size: 13.5px; margin-bottom: 12px; outline: none; }
.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); color: #fff; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.lk button:hover { background: var(--brand-dark); }
.lk .out { display: block; text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.lk .out:hover { color: var(--brand); }
.lk .tag { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; display: inline-block; margin-bottom: 14px; }

/* ---------------- 登录 / 注册页 ---------------- */
body.auth-body-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 22px; background: #fff; }
.auth-card { width: 100%; max-width: 460px; background: #fff; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 70px -36px rgba(20, 30, 50, 0.26), 0 4px 14px -8px rgba(20, 30, 50, 0.08); }
.auth-header { padding: 36px 26px 30px; 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 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; background: var(--surface-2); border-radius: 24px; margin-bottom: 22px; }
.role-switch { border-radius: 22px; margin-bottom: 18px; }
.tabs button, .role-switch button { flex: 1; padding: 10px; background: transparent; border: none; border-radius: 22px; cursor: pointer; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); transition: all 0.18s; }
.role-switch button { padding: 8px; font-size: 0.85rem; border-radius: 24px; }
.tabs button.active, .role-switch button.active { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 3px 10px -4px rgba(20, 30, 50, 0.16), inset 0 0 0 1px rgba(79, 95, 208, 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%; transform: translateY(-50%); width: 36px; height: 36px; cursor: pointer; color: var(--ink-3); display: flex; align-items: center; justify-content: center; border-radius: 22px; background: transparent; border: none; padding: 0; z-index: 10; transition: all 0.15s; }
.password-toggle:hover { color: var(--brand); background: var(--brand-soft); }
.password-toggle svg { width: 19px; height: 19px; }
.login-btn { width: 100%; padding: 13px; border: none; border-radius: 22px; font-size: 1rem; font-weight: 800; letter-spacing: 5px; color: #fff; cursor: pointer; background: var(--brand); box-shadow: 0 12px 26px -14px rgba(79, 95, 208, 0.7); transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease; }
.login-btn:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(79, 95, 208, 0.8); }
.login-btn:active { transform: translateY(1px); }
.auth-body .form-group input { width: 100%; padding: 12px 14px; border-radius: 22px; font-size: 0.93rem; }

/* ---------------- 自定义背景：三档全局统一 ----------------
   三档：user-bg（glass 毛玻璃）/ +user-bg-sheer（通透）/ +user-bg-clear（完全通透）。
   统一策略：①重设 --surface/--surface-2/--line/--line-strong/--ink 等变量，
   使所有引用变量的组件（卡片/统计卡/表头/行悬停/聊天气泡/正文/边框）整体随档位变化；
   ②对背景为硬编码白色的控件（弹层、输入框、浅色按钮、开关轨道、状态胶囊、提示条、
   退出按钮、背景设置控件等）逐类覆盖为同档位半透明，保证任一档位下界面不出现
   “卡片透、组件实白”的斑驳；③完全通透档额外关闭全部毛玻璃并将文字翻白。 */

/* 变量档位 */
body.user-bg {
    --surface: rgba(255, 255, 255, 0.60);
    --surface-2: rgba(244, 248, 253, 0.40);
    --line: rgba(13, 22, 45, 0.08);
    --line-strong: rgba(13, 22, 45, 0.16);
    --brand-soft: rgba(79, 95, 208, 0.12);
}
body.user-bg-sheer {
    --surface: rgba(255, 255, 255, 0.30);
    --surface-2: rgba(244, 248, 253, 0.20);
    --line: rgba(13, 22, 45, 0.07);
    --line-strong: rgba(13, 22, 45, 0.13);
    --brand-soft: rgba(79, 95, 208, 0.12);
}
body.user-bg-clear {
    --surface: rgba(255, 255, 255, 0.02);
    --surface-2: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.24);
    --line-strong: rgba(255, 255, 255, 0.38);
    --brand-soft: rgba(79, 95, 208, 0.34);
    --ink: #f6f9ff;
    --ink-2: #d3dbe9;
    --ink-3: #9aa6ba;
}

/* 大块玻璃面：毛玻璃（clear 档完全关闭磨砂） */
body.user-bg .top-bar, body.user-bg .drawer,
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 .top-bar, body.user-bg-sheer .drawer,
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 .top-bar, body.user-bg-clear .drawer,
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;
}
/* 弹层底色由实白改为跟随档位变量（.modal/.upload-modal 默认硬编码 #fff） */
body.user-bg .modal, body.user-bg .upload-modal { background: var(--surface); }
body.user-bg-sheer .modal, body.user-bg-sheer .upload-modal { background: var(--surface); }
body.user-bg-clear .modal, body.user-bg-clear .upload-modal { background: var(--surface); }

/* 输入框/选择框/文本域/文件选择：随档位变半透明（默认硬编码白底） */
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 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.42); border-color: var(--line-strong); color: var(--ink); }
body.user-bg input::placeholder, body.user-bg textarea::placeholder { color: var(--ink-3); }
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 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.18); border-color: var(--line-strong); color: var(--ink); }
body.user-bg-sheer input::placeholder, body.user-bg-sheer textarea::placeholder { color: var(--ink-3); }
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 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.05); border-color: var(--line-strong); color: var(--ink); }
body.user-bg-clear input::placeholder, body.user-bg-clear textarea::placeholder { color: var(--ink-3); }

/* 浅色语义按钮：统一转半透明语义彩底 + 白字（主按钮 .btn-action 保留品牌实色便于辨识） */
body.user-bg .btn-secondary { background: rgba(255, 255, 255, 0.24); border-color: var(--line-strong); color: var(--ink); }
body.user-bg .btn-info { background: rgba(11, 107, 203, 0.28); border-color: rgba(11, 107, 203, 0.42); color: #fff; }
body.user-bg .btn-danger { background: rgba(220, 38, 38, 0.28); border-color: rgba(220, 38, 38, 0.45); color: #fff; }
body.user-bg .btn-success { background: rgba(22, 163, 74, 0.28); border-color: rgba(22, 163, 74, 0.45); color: #fff; }
body.user-bg .btn-warning { background: rgba(180, 83, 9, 0.30); 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.26); border-color: rgba(109, 40, 217, 0.42); color: #fff; }
body.user-bg .btn-select-all { background: rgba(147, 51, 234, 0.24); border-color: rgba(147, 51, 234, 0.40); color: #fff; }
body.user-bg .btn-select-mode.active, body.user-bg .btn-action { background: var(--brand); border-color: var(--brand); color: #fff; }
body.user-bg .btn-action:hover, body.user-bg .btn-select-mode.active:hover { background: var(--brand-dark); }
body.user-bg .btn-secondary:hover { background: rgba(255, 255, 255, 0.42); }
body.user-bg .btn-info:hover { background: rgba(11, 107, 203, 0.45); }
body.user-bg .btn-danger:hover { background: rgba(220, 38, 38, 0.45); }
body.user-bg .btn-success:hover { background: rgba(22, 163, 74, 0.45); }
body.user-bg .btn-warning:hover { background: rgba(180, 83, 9, 0.48); }
body.user-bg .btn-copy:hover, body.user-bg .btn-select-mode:hover { background: rgba(109, 40, 217, 0.44); }
body.user-bg .btn-select-all:hover { background: rgba(147, 51, 234, 0.42); }

/* 状态胶囊 / 通知条 / 退出按钮 / 聊天气泡标签：随档位半透，clear 档文字翻白 */
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: #1d4ed8; border-color: rgba(79, 95, 208, 0.3); }
body.user-bg .alert-box { background: rgba(220, 38, 38, 0.14); border-color: rgba(220, 38, 38, 0.32); color: #fff4f4; }
body.user-bg .logout-btn { background: rgba(220, 38, 38, 0.16); border-color: rgba(220, 38, 38, 0.35); color: #ffdcdc; }
body.user-bg .logout-btn:hover { background: rgba(220, 38, 38, 0.34); }
body.user-bg .c-tag.admin { background: rgba(224, 82, 98, 0.22); color: #ffd8dd; border-color: transparent; }
body.user-bg .c-tag.developer { background: rgba(79, 95, 208, 0.28); color: #e3e8ff; }
body.user-bg .c-tag.agent { background: rgba(147, 51, 234, 0.26); color: #f0e6ff; }

/* 开关轨道 / 背景设置控件：随档位半透 */
body.user-bg .sw-tr { background: rgba(13, 22, 45, 0.16); }
body.user-bg .bg-fab { background: rgba(255, 255, 255, 0.42); border-color: rgba(255, 255, 255, 0.4); }
body.user-bg .bg-switch { background: rgba(255, 255, 255, 0.18); }
body.user-bg .bg-seg { background: rgba(255, 255, 255, 0.12); }
body.user-bg .bg-mode-opt, body.user-bg .bg-seg-opt { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.26); color: var(--ink-2); }
body.user-bg-clear .sw-tr { background: rgba(255, 255, 255, 0.30); }
body.user-bg-clear .bg-fab { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.3); }
body.user-bg-clear .bg-switch { background: rgba(255, 255, 255, 0.06); }
body.user-bg-clear .bg-seg { background: rgba(255, 255, 255, 0.05); }
body.user-bg-clear .bg-mode-opt, body.user-bg-clear .bg-seg-opt { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.24); color: var(--ink-2); }

/* clear 档残余硬编码深色文字亮化 */
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 .c-bubble.mine { color: var(--ink); }
body.user-bg-clear .sw-green:hover .sw-tx, body.user-bg-clear .sw:hover .sw-tx { color: var(--ink-2); }

/* clear 档播放器 / 模式面板细节 */
body.user-bg-clear #ndp { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.26); }
body.user-bg-clear .c-input input[type="text"]:focus { box-shadow: 0 0 0 3px rgba(79, 95, 208, 0.5); }

/* ---------------- 响应式 ----------------
   桌面(≥900px)：侧边栏常驻 + 内容右移；移动端：顶部栏 + 抽屉 */
@media (min-width: 900px) {
    .drawer { left: 0; border-radius: 0; box-shadow: 18px 0 46px -30px rgba(20, 30, 50, 0.3); }
    .drawer .logo { padding-top: 4px; }
    .drawer nav { justify-content: flex-start; }
    .drawer .logout-btn { margin-top: auto; }
    .drawer-overlay { display: none !important; }
    .menu-btn { display: none; }
    .top-bar { margin-left: var(--sidebar-w); border-bottom: none; border-left: 1px solid var(--line); padding: 14px 28px; }
    .content { margin-left: var(--sidebar-w); max-width: none; padding: 32px 40px 72px; }
    .card { margin-bottom: 28px; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
    .c-room { height: calc(100vh - 220px); }
}
@media (max-width: 480px) {
    .content { padding: 20px 16px 48px; }
    .card { padding: 20px 16px; }
    .pair-grid { grid-template-columns: 1fr; gap: 22px 0; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item { padding: 16px 10px 13px; }
    .stat-item .num { font-size: 22px; }
    .auth-header { padding: 28px 20px 24px; }
    .auth-header h1 { font-size: 1.55rem; letter-spacing: 4px; }
    .auth-body { padding: 22px 20px 24px; }
}

/* ---------------- 动效（轻量，尊重减少动态） ---------------- */
@keyframes v14In { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes v14Pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes v14Fade { from { opacity: 0; } to { opacity: 1; } }
.content > * { animation: v14In 0.4s cubic-bezier(0.22, 0.8, 0.32, 1) backwards; }
.drawer-overlay.show { animation: v14Fade 0.2s ease; }
.modal-overlay.show .modal { animation: v14Pop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) backwards; }
.auth-card { animation: v14In 0.5s cubic-bezier(0.22, 0.8, 0.32, 1) backwards; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* 文件选择框统一观感 */
input[type="file"] { width: 100%; padding: 9px 12px; font-size: 12.5px; color: var(--ink-2); background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); box-sizing: border-box; cursor: pointer; }

/* ---------------- 背景档位收尾覆盖 ----------------
   顶栏/抽屉/菜单按钮/播放器底色为硬编码白，须随档位变量（clear 时完全通透）；滚动条与背景模式选中态适配。 */
body.user-bg .top-bar, body.user-bg .drawer, body.user-bg .menu-btn, body.user-bg #ndp { background: var(--surface); }
body.user-bg .menu-btn { border-color: var(--line-strong); color: var(--ink-2); }
body.user-bg-clear .menu-btn:hover { color: var(--ink); }
body.user-bg-clear ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.30); 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.45); background-clip: padding-box; border: 2px solid transparent; border-radius: 999px; }
body.user-bg-clear .bg-seg-opt:has(input:checked), body.user-bg-clear .bg-mode-opt:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
body.user-bg .top-bar { border-bottom-color: var(--line); }

/* ---------------- 完全通透：彻底清零残余白 ----------------
   逐类把 clear 档仍可能呈现纯白/近白的小控件与辅助面清除；
   卡片移除投影避免“透明卡片带白边”错觉。 */
body.user-bg-clear .btn-secondary { background: rgba(255, 255, 255, 0.07); color: var(--ink-2); }
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 select option { background: #262b36; color: #eef2f9; }
body.user-bg-clear .bg-preview { background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); }
body.user-bg-clear .c-chip { color: #e6ebff; background: var(--brand-soft); }
body.user-bg-clear #ndp .ndp-nav { color: #dde3ff; }
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 .bg-fab { box-shadow: 0 8px 20px -14px rgba(0, 0, 0, 0.4); }

/* 完全通透：项目卡等核心容器显式透明兜底（不依赖变量继承，杜绝任何残留白卡） */
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.02);
}
body.user-bg-clear .top-bar, body.user-bg-clear .drawer { background: rgba(255, 255, 255, 0.02); }
body.user-bg-clear .content { background: transparent; }

/* 表格行卡圆润化：clear 档 hover 行保持通透 */
body.user-bg-clear .card table tbody tr:hover td { background: rgba(255, 255, 255, 0.10); }

/* ════════ 行卡列表（v20）：每行独立成一条圆角卡，替代整块表格 ════════ */
.rc-list { display: flex; flex-direction: column; gap: 12px; }
.row-card {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
    padding: 14px 20px; border-radius: 18px;
    background: var(--surface-2);
    transition: background 0.16s ease, transform 0.16s ease;
}
.row-card:hover { background: #e9edf5; }
.row-card .rc-k { font-size: 11px; letter-spacing: 0.03em; color: var(--ink-3); }
.row-card .rc-v { font-size: 13px; font-weight: 600; color: var(--ink); }
.row-card .rc-v.code-text { font-weight: 500; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.row-card .rc-id { color: var(--ink-3); font-weight: 600; 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); }
.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.5; }
.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: #1d4ed8; background: rgba(79, 95, 208, 0.12); }
.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); }
/* 通透档行卡透明度与 hover 兜底 */
body.user-bg-sheer .row-card:hover { background: rgba(255, 255, 255, 0.22); }
body.user-bg-clear .row-card { background: rgba(255, 255, 255, 0.05); }
body.user-bg-clear .row-card:hover { background: rgba(255, 255, 255, 0.12); }
/* ===== 公共PY / 公共资源 打星按钮 ===== */
.star-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; border: 1px solid #e3e9f2; background: #fbfcfe; color: #9aa7b8; font-size: 12.5px; font-weight: 700; line-height: 1; cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; white-space: nowrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.star-btn svg { width: 14px; height: 14px; fill: transparent; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: fill .16s ease, transform .16s ease; }
.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, .16); }
.star-btn:active { transform: translateY(0) scale(.97); }
.star-btn.on { background: linear-gradient(135deg, #fff8e1, #ffefc2); border-color: #f2cd77; color: #b57e10; box-shadow: 0 2px 6px rgba(214, 158, 46, .22); }
.star-btn.on svg { fill: #fbbf24; stroke: #d99a06; }
.star-btn.busy { opacity: .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 .32s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes star-pop { 0% { transform: scale(.5); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
body.user-bg-clear .star-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .26); color: #e7edf5; box-shadow: none; }
body.user-bg-clear .star-btn.on { background: rgba(255, 224, 150, .24); border-color: rgba(255, 204, 110, .6); color: #ffd98c; }
body.user-bg-clear .star-btn.is-self { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #c6d2e0; }
body.user-bg-sheer .star-btn { background: rgba(255, 255, 255, .38); border-color: rgba(255, 255, 255, .6); color: #4b5a6d; box-shadow: none; }
body.user-bg-sheer .star-btn.on { background: rgba(255, 238, 190, .82); border-color: #f0cf8b; color: #8a5d00; }
/* 表格单元格内星标留白 */
table td .star-btn, table th .star-btn { margin: 2px 0; }

/* ============================================================
   v2 布局层（B 形态）：桌面顶部横向导航 + 全宽内容栅格
   仅覆盖布局，不影响配色与既有组件
   ============================================================ */

/* 通用自适应栅格 */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-auto.tight { gap: 12px; }

/* 顶部横向导航（桌面） */
.topnav { display: none; }
.topnav .tn-logo { font-size: 15px; font-weight: 800; letter-spacing: 1.2px; color: var(--ink); white-space: nowrap; }
.topnav .tn-logo::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 4px; background: var(--brand); margin-right: 8px; vertical-align: 1px; }
.topnav .tn-links { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; }
.topnav .tn-links a { padding: 8px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.topnav .tn-links a:hover { background: var(--surface-2); color: var(--brand); }
.topnav .tn-links a.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.topnav .tn-user { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.topnav .tn-user:hover { background: var(--surface-2); }
.topnav .tn-ava { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.topnav .tn-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topnav .tn-name { font-size: 13px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topnav .tn-out { font-size: 12.5px; color: var(--ink-3); text-decoration: none; padding: 7px 10px; border-radius: 9px; white-space: nowrap; }
.topnav .tn-out:hover { background: #fbe4e4; color: var(--red); }

@media (min-width: 900px) {
    body.has-topnav .topnav { display: block; position: sticky; top: 0; z-index: 80; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
    body.has-topnav .topnav .tn-inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 0 28px; height: 58px; }
    body.has-topnav .drawer, body.has-topnav .drawer-overlay { display: none !important; }
    body.has-topnav .top-bar { display: none !important; }
    body.has-topnav .content { margin-left: 0; max-width: 1440px; padding: 26px 28px 72px; }
    body.has-topnav .stat-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
    body.has-topnav .pair-grid { gap: 0 16px; margin-bottom: 16px; }
    body.has-topnav .card { margin-bottom: 16px; }
}
