:root {
    color-scheme: light;
    --bg: #f4f7f4;
    --bg-soft: #eaf0ea;
    --card: #ffffff;
    --card-2: #f2f6f2;
    --border: #dfe7df;
    --border-strong: #cbd8cd;
    --text: #15231c;
    --muted: #5b6b60;
    --primary: #0078ff;
    --primary-2: #005ecc;
    --accent: #e0a316;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --radius: 16px;
    --ring: rgba(0, 120, 255, .18);
    --shadow-sm: 0 1px 2px rgba(21, 35, 28, .05), 0 8px 24px -14px rgba(21, 35, 28, .22);
    --shadow: 0 22px 48px -24px rgba(11, 60, 45, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
    background:
        radial-gradient(1000px 480px at 8% -10%, rgba(0, 120, 255, .10), transparent 62%),
        radial-gradient(820px 420px at 100% 0%, rgba(224, 163, 22, .10), transparent 58%),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* 后台页面背景统一为纯色 */
body.admin-body { background: #f5f5f5; }

a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: none; }

::selection { background: rgba(0, 120, 255, .20); }

code {
    padding: 2px 6px; border-radius: 6px;
    background: var(--bg-soft); border: 1px solid var(--border);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}
/* 后台页面自适应屏幕全宽、贴边无外边距 */
body.admin-body .container {
    width: 100%;
    max-width: none;
    margin: 0;
}
body.admin-body .nav {
    margin: 0;
    top: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: none;
}
body.admin-body .admin { padding-top: 20px; padding-right: 20px; }

/* ---------- 顶栏 ---------- */
.nav {
    position: sticky; top: 12px; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    margin: 14px 0 0; padding: 12px 18px; gap: 16px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
/* 前台顶栏：背景全宽贴顶、直边无圆角，内容区固定 1200px 居中 */
body:not(.admin-body) .nav {
    top: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    /* 避免 backdrop-filter 形成包含块，影响手机端抽屉定位 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body:not(.admin-body) .nav-inner {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 18px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(140deg, var(--primary), var(--primary-2));
    display: grid; place-items: center; font-size: 18px; color: #fff;
    box-shadow: 0 8px 18px -10px rgba(11, 122, 95, .9), inset 0 1px 0 rgba(255, 255, 255, .28);
}
/* 后台可上传 Logo：按原始比例自适应，最高 40px、最宽 180px */
.brand-img {
    max-height: 40px; max-width: 180px;
    width: auto; height: auto;
    object-fit: contain; display: block; border-radius: 8px;
}
/* 解析页顶部导航快捷输入框（与首页输入框同款胶囊样式） */
.nav-parse {
    flex: 1 1 280px; max-width: 400px; min-width: 0;
    display: flex; align-items: center; gap: 5px;
    margin: 0 10px; padding: 3px;
    background: #f1f4f2; border: 1px solid #e6ece8; border-radius: 999px;
}
.nav-parse:focus-within { border-color: #e6ece8; box-shadow: none; }
.nav-parse input[type=text] {
    flex: 1 1 auto; min-width: 0; height: 40px;
    padding: 0 14px; border: 0; border-radius: 0;
    background: transparent; box-shadow: none;
    font-size: 13px; color: var(--text);
}
.nav-parse input[type=text]:hover,
.nav-parse input[type=text]:focus {
    background: transparent; border-color: transparent; box-shadow: none; outline: none;
}
.nav-parse input::placeholder { color: #9aa8a1; }
.nav-parse .btn {
    flex: 0 0 auto; height: 40px; padding: 0 20px;
    border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
/* 手机端结果页：同一款输入框显示在第一张卡片上方，桌面端隐藏 */
.res-parse-inline { display: none; }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a.link, .nav-links .link {
    color: var(--muted); padding: 8px 13px; border-radius: 10px; font-size: 14px; text-decoration: none;
    transition: color .15s ease, background .15s ease;
}
.nav-links a.link:hover { color: var(--primary); background: transparent; text-decoration: none; }
/* 手机端菜单按钮（桌面端隐藏） */
.nav-menu-btn {
    display: none; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0; flex: none;
    border: 1px solid var(--border); border-radius: 10px;
    background: transparent; color: var(--muted); cursor: pointer;
}
.nav-menu-btn:hover { color: var(--text); border-color: var(--border-strong); }
.nav-backdrop { display: none; }
/* 手机端菜单文案（桌面端隐藏） */
.nav-text-m { display: none; }
.nav-user { display: flex; align-items: center; gap: 9px; padding-left: 6px; }
.nav-user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.small.muted.nav-user-name { color: #000; font-weight: 700; }
.small.muted.nav-user-name.is-vip { color: #d6a65b; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.nav-user-avatar { display: flex; border-radius: 50%; }
.avatar-img { display: block; object-fit: cover; }

/* ---------- 通用 ---------- */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.section-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 18px; border-radius: 11px; border: 1px solid var(--border);
    font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
    background: var(--card); color: var(--text);
}
.btn:hover { text-decoration: none; border-color: var(--border-strong); background: #fbfdfb; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary {
    background: linear-gradient(135deg, #2f8bff, var(--primary-2));
    border-color: transparent; color: #fff;
    box-shadow: 0 10px 22px -12px rgba(0, 98, 204, .55);
}
.btn-primary:hover { background: linear-gradient(135deg, #4a9bff, #0062d6); box-shadow: 0 12px 26px -12px rgba(0, 98, 204, .6); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-soft); }
.btn-success { background: var(--success); border-color: transparent; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=file], textarea, select {
    width: 100%; padding: 11px 13px; border-radius: 11px;
    background: #fbfdfb; border: 1px solid var(--border); color: var(--text);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type=text]:hover, input[type=password]:hover, input[type=search]:hover, input[type=number]:hover, textarea:hover, select:hover {
    border-color: var(--border-strong);
}
input:focus, textarea:focus, select:focus {
    background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring);
}
input::placeholder, textarea::placeholder { color: #63736a; }
textarea { resize: vertical; min-height: 96px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.checkbox input { width: auto; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.platform-line { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.platform-line .field { margin-bottom: 0; min-width: 0; width: 100%; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.color-input { width: 32px; height: 32px; padding: 2px; border-radius: 8px; background: #fbfdfb; border: 1px solid var(--border); flex: 0 0 auto; cursor: pointer; }
.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.color-combo { display: flex; align-items: stretch; flex: 0 0 auto; width: fit-content; max-width: 100%; height: 36px; }
.color-combo .color-input {
    width: 24px; height: 24px; padding: 0; margin: 0;
    border-radius: 50%; border: 1px solid var(--border);
}
.color-combo .color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-combo .color-input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-combo .color-input::-moz-color-swatch { border: 0; border-radius: 50%; }
.color-combo .hex-input {
    width: 110px; flex: 0 0 110px; height: 36px; margin: 0;
    padding: 0 10px; border-radius: 0; text-align: left; font-size: 13px;
}
.color-combo > .hex-input:last-child { border-radius: 0 10px 10px 0; }
.color-combo input[type=color]:focus,
.color-combo .hex-input:focus {
    background: #fbfdfb; border-color: var(--border); box-shadow: none;
}
.color-combo:focus-within {
    border-radius: 10px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color, var(--primary)) 18%, transparent);
}
.color-swatch {
    position: relative; display: flex; align-items: center; justify-content: center;
    flex: 0 0 40px; width: 40px; height: 36px;
    background: #fbfdfb; border: 1px solid var(--border); border-right: 0;
    border-radius: 10px 0 0 10px;
}
.color-swatch .color-input { pointer-events: none; }
.color-swatch-btn {
    position: absolute; inset: 0; padding: 0; border: 0; background: transparent;
    border-radius: 10px 0 0 10px; cursor: pointer;
}
.color-picker {
    position: fixed; z-index: 200; width: 220px; padding: 12px;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .35);
}
.color-picker-sv {
    position: relative; width: 100%; height: 132px; border-radius: 10px;
    cursor: crosshair; touch-action: none;
    background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, #f00);
}
.color-picker-knob {
    position: absolute; width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
    transform: translate(-50%, -50%); pointer-events: none;
}
.color-picker-hue {
    -webkit-appearance: none; appearance: none; width: 100%; height: 10px;
    margin: 12px 0 0; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
    background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.color-picker-hue::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}
.color-picker-hue::-moz-range-thumb {
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}
.color-picker-foot { margin-top: 10px; display: flex; justify-content: center; }
.color-picker-preview {
    width: 100%; height: 26px; flex: 0 0 auto; border-radius: 8px;
    border: 1px solid var(--border); background: #fff;
}
.color-row .checkbox {
    flex: 0 1 auto; min-width: 0; font-size: 13px; line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.color-combo .checkbox {
    display: inline-flex; align-items: center; justify-content: flex-start;
    flex: 0 0 152px; width: 152px; height: 36px; margin: 0; padding: 0 12px;
    background: #fbfdfb; border: 1px solid var(--border); border-left: 0;
    border-radius: 0 10px 10px 0; font-size: 13px; white-space: nowrap;
    overflow: visible; line-height: 1;
}
.color-combo .checkbox input {
    width: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0;
}
.hex-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-transform: lowercase;
    letter-spacing: .02em;
}
.bg-preview {
    position: relative; width: 96px; height: 96px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    background-color: var(--bg-soft);
}
.bg-preview img {
    display: block; width: 100%; height: 100%;
    max-width: none; object-fit: contain;
    padding: 10px; border-radius: 12px;
    border: 1px solid var(--border); margin-bottom: 0;
}
.bg-preview.is-empty {
    display: flex; align-items: center; justify-content: center;
    width: 96px; height: 96px; min-height: 0; margin-bottom: 0;
    border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--bg-soft);
}
/* 平台展示设置：各平台以独立卡片列表展示 */
.platform-scroll .pay-panel { background: #fff; }
.platform-scroll .pay-panel-head {
    flex-direction: column; align-items: flex-start; gap: 8px;
}
.platform-scroll .grid-2 { grid-template-columns: minmax(0, 1fr); }
.platform-scroll .pay-panel input[type=text] { width: 96px; }
.platform-scroll .pay-panel .platform-line .field-name input[type=text] { width: 300px; max-width: 100%; }
.platform-scroll .badge .dot[hidden] { display: none !important; }

/* ---------- 后台设置 ---------- */
.settings-section { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 22px; }
.logo-preview {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 96px; height: 96px; min-height: 0; padding: 0;
    overflow: hidden;
    border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--bg-soft);
}
.logo-preview img {
    width: 100%; height: 100%; max-width: none; max-height: none;
    object-fit: contain; padding: 10px;
}
.logo-preview, .bg-preview {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
}
.logo-preview.has-image, .bg-preview.has-image {
    background-origin: border-box;
    background-clip: border-box;
}
.bg-preview.has-image { background-size: cover; }
.logo-preview img, .bg-preview img { display: none !important; }
input[type=file][data-upload-target] { display: none; }
.preview-icon {
    width: 22px; height: 22px; display: inline-block; flex: 0 0 auto;
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
.upload-trigger {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 0; border: 0; background: transparent;
    color: var(--accent-color, var(--primary));
    font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; text-align: center;
}
.upload-trigger .preview-icon { width: 20px; height: 20px; }
.upload-trigger:hover { text-decoration: none; }
.upload-trigger[hidden] { display: none; }
.preview-delete {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    padding: 0; border: 0; border-radius: 12px;
    background: rgba(15, 23, 42, .5); color: #fff; cursor: pointer;
    opacity: 0; pointer-events: none;
    transition: opacity .15s ease;
}
.logo-preview:hover .preview-delete,
.bg-preview:hover .preview-delete { opacity: 1; pointer-events: auto; }
.preview-delete:hover { background: rgba(220, 38, 38, .72); }
.preview-delete .preview-icon { width: 24px; height: 24px; }
.preview-delete:disabled { opacity: .6; cursor: default; }

/* 图片上传进度条 */
.upload-progress {
    height: 8px; margin-top: 8px;
    border-radius: 999px; background: var(--bg-soft); overflow: hidden;
}
.upload-progress > span {
    display: block; width: 0; height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-color, var(--primary)), var(--primary-2));
    transition: width .15s ease;
}
.upload-progress.is-done > span { background: var(--success); }
.upload-status { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.upload-status.is-ok { color: var(--success); }
.upload-status.is-error { color: var(--danger); }
.pay-panel {
    margin-top: 14px; padding: 18px; border-radius: 14px;
    border: 1px solid var(--border); background: #fbfdfb;
}
.pay-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- 首页 Hero ---------- */
.hero {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 76px 0 76px;
    text-align: center;
}
.hero h1 { margin: 0; }
.parse-box {
    width: 100%;
    max-width: 1080px;
    margin: 56px auto 36px;
    text-align: center; padding: 84px 46px 72px;
    border-radius: 24px; border-color: var(--border-strong); box-shadow: var(--shadow);
}
.parse-title {
    font-size: clamp(24px, 3.6vw, 38px); line-height: 1.3; letter-spacing: -.01em;
    font-weight: 700; color: var(--text);
}
.parse-sub { margin: 52px 0 0; color: var(--muted); font-size: 16px; }
.parse-row {
    display: flex; align-items: center; gap: 6px;
    width: min(820px, 100%); margin: 68px auto 0; padding: 7px;
    background: #f1f4f2; border: 1px solid #e6ece8; border-radius: 999px;
}
.parse-row:focus-within { border-color: #e6ece8; box-shadow: none; }
.parse-row input {
    flex: 1; min-width: 0; height: 58px; padding: 0 24px;
    border: 0; outline: none; background: transparent;
    font-size: 16px; color: var(--text); box-shadow: none;
}
.parse-row input:focus { border: 0; box-shadow: none; outline: none; }
.parse-row input::placeholder { color: #9aa8a1; }
.parse-submit {
    flex: 0 0 auto; height: 58px; padding: 0 36px; border-radius: 999px;
    font-size: 17px; font-weight: 600; white-space: nowrap;
}
.parse-hint { margin: 8px auto 32px; max-width: 760px; padding: 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.parse-box .platforms-wrap { margin-top: 62px; }
.platforms-wrap {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    max-width: 100%;
}
.platforms-wrap .platforms { margin-top: 0; flex: 0 1 auto; min-width: 0; }
.platforms-wrap .chip[hidden] { display: none; }
.platforms-arrow {
    flex: 0 0 auto; width: 30px; height: 30px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-strong); border-radius: 50%;
    background: #fff; color: var(--muted); cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.platforms-arrow:hover {
    background: var(--accent-color, var(--primary));
    border-color: transparent; color: #fff;
}
.platforms-arrow[disabled] { cursor: default; }
.platforms-arrow[disabled]:hover {
    background: #fff; color: var(--muted); border-color: var(--border-strong);
}
.platforms-arrow[hidden] { display: none; }
.parse-box .chip { padding: 4px 14px; font-size: 13px; background: transparent; box-shadow: none; }
.platforms { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; justify-content: center; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 999px; font-size: 13px;
    background: var(--card); border: 1px solid var(--chip-color, var(--border)); color: var(--chip-color, var(--muted));
    box-shadow: 0 1px 2px rgba(21, 35, 28, .04);
    transition: border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--chip-color, var(--border-strong)); color: var(--chip-color, var(--text)); }

/* ---------- 结果卡 ---------- */
.result { margin-top: 22px; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.result-head { display: flex; gap: 16px; align-items: flex-start; }
.result-media { width: 168px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.result-media img, .result-media video { width: 100%; display: block; }
.result-info { flex: 1; min-width: 0; }
.result-info h3 { margin: 0 0 8px; font-size: 16px; word-break: break-word; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.gallery img { width: 100%; border-radius: 11px; border: 1px solid var(--border); }
.stats { display: flex; gap: 0; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.stats > div { padding: 0 34px; }
.stats > div + div { border-left: 1px solid var(--border); }
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.stat-label { font-size: 13px; color: var(--muted); }
.notice { margin-top: 22px; font-size: 13px; color: var(--muted); text-align: center; }

.spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
    animation: spin .7s linear infinite; display: none;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 提示条 ---------- */
.flash {
    padding: 12px 16px; border-radius: 12px; font-size: 14px; margin: 14px 0;
    border: 1px solid transparent;
}
.flash-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.toast {
    position: fixed; left: 50%; top: 20px;
    display: flex; align-items: center; gap: 10px;
    max-width: min(560px, calc(100% - 40px));
    background: #fff; border: 1px solid var(--border); color: var(--text);
    padding: 12px 20px 12px 14px; border-radius: 14px;
    font-size: 14px; font-weight: 500; line-height: 1.5; text-align: left;
    box-shadow: 0 14px 36px -14px rgba(21, 35, 28, .30), 0 2px 8px rgba(21, 35, 28, .05);
    opacity: 0; pointer-events: none;
    transform: translateX(-50%) translateY(-10px) scale(.98);
    transition: opacity .22s ease, transform .24s cubic-bezier(.22, 1, .36, 1);
    z-index: 200;
}
.toast::before {
    content: '✓';
    flex: 0 0 auto;
    display: grid; place-items: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(22, 163, 74, .12); color: #15803d;
    font-size: 12px; font-weight: 800;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast.error { background: #fff7f7; border-color: #fecaca; color: #991b1b; }
.toast.error::before {
    content: '!';
    background: rgba(220, 38, 38, .12); color: #b91c1c;
}

/* ---------- 认证页 ---------- */
.auth-wrap { display: grid; place-items: center; flex: 1 0 auto; padding: 24px 0; }
.auth-card { width: min(420px, 100%); padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.auth-card-register h1, .auth-card-login h1 { text-align: center; }
.auth-card-register .field label, .auth-card-login .field label { font-weight: 700; }
.agree {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 13px; color: var(--muted); line-height: 1.6;
    margin: 12px 0 16px; cursor: pointer;
}
.agree input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.agree a { color: var(--primary-2); font-weight: 500; }
/* 服务协议与登录/注册提示同一行 */
.agree-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px 14px; flex-wrap: wrap;
    margin: 12px 0 16px;
}
.agree-row .agree { margin: 0; }
.agree-row p { margin: 0; font-size: 13px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.card-code-cell { white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
thead th { background: #f7faf7; }
thead th:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
tbody tr:hover { background: #f8fbf8; }
tbody tr:last-child td { border-bottom: none; }
.env-card th,
.env-card td { border-bottom: none; }
.env-card th {
    width: 110px;
    border-right: none;
}
/* 环境信息表格跟随容器宽度，窄屏时自动换行不横向溢出 */
.env-card table { table-layout: fixed; }
.env-card td { white-space: normal; word-break: break-word; }
/* 行高收紧，保证环境信息整块在屏幕内完整展示 */
.env-card th,
.env-card td { padding: 8px 12px; }
/* 隔行背景画在单元格上，让每一行背景四角都有圆角 */
.env-card tbody tr:nth-child(odd),
.env-card tbody tr:nth-child(odd):hover,
.env-card tbody tr:nth-child(even),
.env-card tbody tr:nth-child(even):hover { background: transparent; }
.env-card tbody tr:nth-child(odd) th,
.env-card tbody tr:nth-child(odd) td { background: #f5f5f5; }
.env-card tbody tr:nth-child(odd) th { border-radius: 10px 0 0 10px; }
.env-card tbody tr:nth-child(odd) td { border-radius: 0 10px 10px 0; }
.thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--bg-soft); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
    font-size: 12px; border: 1px solid var(--border); color: var(--muted);
    background: var(--card-2);
}
.badge-on { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.badge-off { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* 用户管理：会员组、状态列内容垂直居中，并让徽章文字与表头文字左对齐 */
.users-table td.cell-middle { vertical-align: middle; }
.users-table td.cell-middle .cell-middle-inner {
    display: flex; align-items: center; justify-content: flex-start;
}
.users-table td.cell-middle .badge {
    /* 徽章左侧内边距 10px + 边框 1px，抵消后徽章文字与表头文字对齐 */
    margin-left: -11px;
}

.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.pager a, .pager span {
    padding: 6px 12px; border-radius: 9px; border: 1px solid var(--border);
    color: var(--muted); font-size: 13px; text-decoration: none; background: var(--card);
}
.pager a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.pager .current { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; }

/* ---------- 后台布局 ---------- */
.admin { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 22px; padding: 18px 0 40px; align-items: start; }
.admin > main { min-width: 0; }
/* 手机端后台菜单按钮（桌面端隐藏） */
.admin-menu-btn {
    display: none; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0; flex: none;
    border: 1px solid var(--border); border-radius: 10px;
    background: transparent; color: var(--muted); cursor: pointer;
}
.admin-menu-btn:hover { color: var(--text); border-color: var(--border-strong); }
.admin-backdrop { display: none; }
.admin-side {
    position: sticky; top: 92px;
    display: flex; flex-direction: column; gap: 4px; padding: 10px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
/* 桌面端：左侧菜单固定，不随页面滚动，且左侧贴边 */
@media (min-width: 721px) {
    body.admin-body .admin-side {
        position: fixed;
        top: 61px;
        left: 0;
        bottom: 0;
        width: 216px;
        padding-top: 25px;
        padding-bottom: 24px;
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 40;
        border-radius: 0;
        border-left: 0;
        border-top: 0;
    }
    body.admin-body .admin-side::-webkit-scrollbar { width: 4px; }
    body.admin-body .admin-side::-webkit-scrollbar-track { background: transparent; }
    body.admin-body .admin-side::-webkit-scrollbar-thumb {
        background: transparent; border-radius: 999px;
    }
    body.admin-body .admin-side.is-scrolling::-webkit-scrollbar-thumb {
        background: #94c5fd;
    }
    /* Firefox：仅在滚动时显示滑块 */
    @supports (-moz-appearance: none) {
        body.admin-body .admin-side {
            scrollbar-width: thin;
            scrollbar-color: transparent transparent;
        }
        body.admin-body .admin-side.is-scrolling {
            scrollbar-color: #94c5fd transparent;
        }
    }
    body.admin-body .admin > main { grid-column: 2; }
}
.admin-side a {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    border-radius: 11px; color: var(--muted); font-size: 14px; text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.admin-side-icon {
    width: 18px; height: 18px; flex: none; display: inline-block;
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
.admin-side a:hover { background: #f5f5f5; }
.admin-side a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
    box-shadow: 0 10px 22px -14px rgba(11, 122, 95, .95);
}
.admin-side-group {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 6px 10px 14px;
    border-radius: 11px;
    font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: normal;
}
.admin-side-group:hover { background: #f5f5f5; }
.admin-side-group .admin-side-icon { width: 18px; height: 18px; }
.admin-side-group .admin-side-toggle {
    position: static; transform: none; margin-left: auto;
    width: 22px; height: 22px; flex: 0 0 auto;
}
.admin-side-group-items { display: flex; flex-direction: column; gap: 4px; }
.admin-side-group-items[hidden] { display: none; }
.admin-side-group.is-open .admin-side-toggle-icon { transform: rotate(180deg); }
.admin-side-parent { position: relative; display: flex; align-items: center; }
.admin-side-parent > a { flex: 1 1 auto; padding-right: 32px; font-weight: 700; }
.admin-side-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    padding: 0; border: 0; border-radius: 8px; background: transparent;
    color: var(--muted); cursor: pointer;
}
.admin-side-toggle:hover { background: rgba(0, 0, 0, .06); }
.admin-side-toggle-icon {
    width: 13px; height: 13px; background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    transition: transform .18s ease;
}
.admin-side-parent.is-open .admin-side-toggle-icon { transform: rotate(180deg); }
.admin-side-parent.is-active .admin-side-toggle { color: #fff; }
.admin-side-parent.is-active .admin-side-toggle:hover { background: rgba(255, 255, 255, .18); }
.admin-side-sub {
    display: flex; flex-direction: column; gap: 4px;
    margin: 2px 0 6px; padding-left: 0;
}
.admin-side-sub[hidden] { display: none; }
.admin-side-sub a { padding: 10px 14px; border-radius: 11px; font-size: 14px; }
.admin-side-sub .admin-side-icon { width: 18px; height: 18px; }
.admin-side-sub a.is-current { background: #f5f5f5; color: var(--accent-color, var(--primary)); font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: clamp(12px, 1.4vw, 18px);
    box-shadow: var(--shadow-sm);
}
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }

.bar-list { display: flex; flex-direction: column; gap: 22px; margin-top: 10px; }
.bar-item { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.bar-name { width: 74px; flex: none; color: var(--muted); }
/* 每条按分类使用独立渐变色，数值越大露出的颜色越多 */
.bar-track {
    position: relative;
    flex: 1; height: 10px; border-radius: 999px; overflow: hidden;
    background: var(--bg-soft);
}
.bar-fill {
    display: block; height: 100%;
    border-radius: 999px;
    background-color: var(--bar-color, var(--primary));
    background-image: linear-gradient(90deg,
        var(--bar-color-light, #e9f7f0),
        var(--bar-color, var(--primary)));
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transition: width .45s ease;
}
.bar-count { width: 60px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 图表 X 轴刻度 */
.bar-axis { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-size: 12px; color: var(--muted); }
.bar-axis-name { width: 74px; flex: none; }
.bar-axis-line {
    flex: 1; display: flex; align-items: center; justify-content: space-between;
    padding-top: 6px; border-top: 1px dashed var(--border-strong);
}

/* 竖向柱形图：高度随窗口缩放，保证在电脑端完整显示 */
.vbar-card { height: auto; }
.vbar-chart { margin-top: 18px; }
.vbar-plot {
    display: flex; align-items: flex-end; justify-content: space-around;
    gap: clamp(10px, 2vw, 28px);
    /* 高度跟随窗口高度：窗口变矮时图表等比收缩，避免把环境信息顶出屏幕 */
    height: clamp(150px, calc(100vh - 660px), 340px);
    padding: 0 clamp(12px, 2.4vw, 34px);
    border-bottom: 1px dashed var(--border-strong);
}
.vbar-item {
    flex: 1 1 0; max-width: 120px; height: 100%; min-height: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.vbar-value {
    margin-bottom: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.vbar-bar {
    flex: 1 1 auto; width: 100%; max-width: 76px; min-height: 0;
    display: flex; align-items: flex-end; justify-content: center;
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
.vbar-fill {
    display: block; width: 100%;
    border-radius: 12px 12px 0 0;
    background-color: var(--bar-color, var(--primary));
    transition: height .45s ease;
}
.vbar-names {
    display: flex; justify-content: space-around;
    gap: clamp(10px, 2vw, 28px);
    padding: 10px clamp(12px, 2.4vw, 34px) 0;
}
.vbar-name {
    flex: 1 1 0; max-width: 120px; text-align: center;
    font-size: 13px; color: var(--muted);
}

.modal-mask {
    position: fixed; inset: 0; background: rgba(11, 26, 20, .42); display: none;
    place-items: center; z-index: 80; padding: 20px;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-mask.show { display: grid; }
.modal { width: min(460px, 100%); box-shadow: var(--shadow); }

/* ---------- 会员中心 ---------- */
.vip-page { margin: 50px 0 150px; }
.vip-hero { padding: 50px 0 10px; text-align: center; }
.vip-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4.2vw, 36px); letter-spacing: -.02em; font-weight: 800; }
.vip-hero p { margin: 0; }
.vip-slider {
    display: flex; align-items: center; gap: 14px;
    margin: 52px 0 50px;
}
.vip-grid {
    display: flex; flex-wrap: nowrap; justify-content: center;
    gap: 20px; align-items: stretch;
    flex: 1 1 auto; min-width: 0;
}
.vip-grid .vip-card { flex: 1 1 280px; max-width: 340px; min-width: 0; }
.vip-grid .vip-card[hidden] { display: none; }
.vip-arrow {
    flex: 0 0 auto; width: 44px; height: 44px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--border-strong);
    background: #fff; color: var(--muted); cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.vip-arrow:hover { background: var(--primary); border-color: transparent; color: #fff; }
.vip-arrow[disabled] { opacity: .35; cursor: default; }
.vip-arrow[disabled]:hover { background: #fff; color: var(--muted); border-color: var(--border-strong); }
.vip-arrow[hidden] { display: none; }
.vip-grid .card + .card { margin-top: 0; }
.vip-card {
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
    padding: 0;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.vip-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.vip-card.featured { border-color: var(--card-color, var(--primary)); border-width: 2px; }
.vip-card-top {
    position: relative;
    padding: 26px 24px 22px;
    background: linear-gradient(165deg, color-mix(in srgb, var(--card-color, var(--primary)) 22%, #fff), #fff 92%);
    border-bottom: 1px solid var(--border);
}
.vip-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 6px;
}
.vip-card-name { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.vip-card-name::before {
    content: ""; display: inline-block;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--card-color, var(--primary));
}
.vip-card-badge {
    position: absolute; top: 14px; right: 14px;
    background: var(--card-color, var(--primary));
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 999px;
    letter-spacing: .02em; white-space: nowrap;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5);
}
.vip-price {
    display: flex; align-items: baseline; gap: 4px;
    font-size: 40px; font-weight: 800; letter-spacing: -.03em;
    color: var(--text);
    margin: 10px 0 2px;
}
.vip-price .cur { font-size: 18px; font-weight: 700; }
.vip-price span { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.vip-card-sub { font-size: 12.5px; color: var(--muted); }
.vip-divider { height: 1px; background: var(--border); margin: 4px 0 16px; }
.vip-card-body {
    display: flex; flex-direction: column; flex: 1;
    padding: 20px 24px 24px;
}
.vip-benefits {
    list-style: none; padding: 0; margin: 0 0 22px;
    display: flex; flex-direction: column; gap: 10px;
    color: var(--text); font-size: 14px;
}
.vip-benefits li {
    position: relative; padding-left: 24px; line-height: 1.5;
}
.vip-benefits li::before {
    content: ""; position: absolute; left: 0; top: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: color-mix(in srgb, var(--card-color, var(--primary)) 18%, transparent);
}
.vip-benefits li::after {
    content: "✓"; position: absolute; left: 3px; top: 1px;
    font-size: 11px; font-weight: 800;
    color: var(--card-color, var(--primary));
}
.vip-methods {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: auto;
}
.vip-methods .btn { justify-content: center; }
.vip-methods .btn-primary {
    background: var(--accent-color, var(--primary));
    color: #fff;
    border: 1px solid transparent;
    box-shadow: none;
}
.vip-methods .btn-primary:hover {
    background: var(--accent-color, var(--primary));
    color: #fff;
    filter: brightness(1.06);
}
.vip-card-foot-note {
    font-size: 12px; color: var(--muted); text-align: center; margin-top: 2px;
}

/* ---------- 获取权益弹窗 ---------- */
.pay-modal {
    position: fixed; inset: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.pay-modal[hidden] { display: none; }
.pay-modal-mask {
    position: absolute; inset: 0;
    background: rgba(11, 26, 20, .45);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.pay-modal-card {
    position: relative; z-index: 1;
    width: min(360px, 100%);
    background: #fff; border-radius: 20px; border: 1px solid var(--border);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .5);
    overflow: hidden;
}
.pay-modal-head {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: 16px 48px; border-bottom: 1px solid var(--border);
}
.pay-modal-title { font-weight: 800; font-size: 15px; text-align: center; }
.pay-modal-close {
    position: absolute; top: 50%; right: 14px; transform: translateY(-50%);
    width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: var(--bg-soft); color: var(--muted);
    font-size: 18px; line-height: 1; cursor: pointer;
}
.pay-modal-close:hover { background: var(--border); color: var(--text); }
.pay-modal-body {
    padding: 20px 18px 22px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.pay-qr {
    width: 200px; height: 200px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px; background: var(--card-2);
    border: 1px dashed var(--border-strong);
    overflow: hidden;
}
.pay-qr-img {
    display: block; width: 100%; height: 100%;
    object-fit: contain; background: #fff;
    border-radius: 16px;
}
/* hidden 时彻底不占位、不显示空白图片 */
.pay-qr-img[hidden] { display: none; }
/* 未开启 / 异常时：提示文字显示在二维码框内 */
.pay-qr-empty {
    padding: 0 14px; text-align: center;
    font-size: 14px; font-weight: 600; color: var(--text);
    line-height: 1.6;
}
.pay-method-list { display: flex; gap: 10px; width: 100%; }
.pay-method {
    flex: 1; padding: 10px 8px; border-radius: 12px;
    border: 1px solid var(--border); background: #fff; color: var(--text);
    font-size: 14px; cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pay-method:hover { border-color: var(--accent-color, var(--primary)); color: var(--accent-color, var(--primary)); }
.pay-method.active {
    border-color: var(--accent-color, var(--primary));
    background: var(--accent-color, var(--primary));
    color: #fff;
}
.pay-modal-tip { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.pay-modal-tip.error { color: var(--danger); }
.pay-modal-link { font-size: 12.5px; text-align: center; }
/* 付款方式下方的卡密兑换入口 */
.pay-redeem-entry {
    width: 100%;
    padding: 9px 12px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    background: transparent;
    color: var(--accent-color, var(--primary));
    font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.pay-redeem-entry:hover {
    background: color-mix(in srgb, var(--accent-color, var(--primary)) 8%, transparent);
}

/* ---------- 客服悬浮按钮 ---------- */
.service-fab {
    position: fixed; right: 20px; bottom: 24px; z-index: 70;
}
.service-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 11px 16px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--accent-color, var(--primary)); color: #fff;
    font-size: 14px; font-weight: 700;
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5);
    transition: filter .15s ease, transform .15s ease;
}
.service-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.service-modal {
    position: fixed; inset: 0; z-index: 95;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.service-modal[hidden] { display: none; }
.service-mask {
    position: absolute; inset: 0;
    background: rgba(11, 26, 20, .45);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.service-card {
    position: relative; z-index: 1;
    width: min(320px, 100%);
    padding: 18px;
    background: #fff; border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .5);
    text-align: center;
}
.service-head {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; font-weight: 800; font-size: 15px;
}
.service-head .service-close {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
}
.service-close {
    width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: var(--bg-soft); color: var(--muted);
    font-size: 18px; line-height: 1; cursor: pointer;
}
.service-qr-img {
    display: block; width: 100%; max-width: 240px; aspect-ratio: 1 / 1;
    margin: 0 auto 10px; border-radius: 12px;
    background-size: contain; background-position: center center; background-repeat: no-repeat;
}

/* 站点公告弹窗 */
.notice-modal {
    position: fixed; inset: 0; z-index: 110;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.notice-modal[hidden] { display: none; }
.notice-mask {
    position: absolute; inset: 0;
    background: rgba(11, 26, 20, .45);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.notice-card {
    position: relative; z-index: 1;
    width: min(460px, 100%);
    background: #fff; border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .5);
    overflow: hidden;
}
.notice-head {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
    font-weight: 800; font-size: 15px;
}
.notice-close {
    position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: var(--bg-soft); color: var(--muted);
    font-size: 18px; line-height: 1; cursor: pointer;
}
.notice-body {
    padding: 18px; max-height: 55vh; overflow-y: auto;
    font-size: 14.5px; line-height: 1.8; color: var(--text);
    white-space: pre-wrap; word-break: break-word;
}
.notice-foot { padding: 0 18px 18px; display: flex; justify-content: flex-end; }

/* 首页未登录提示：顶部轻提示 */
.top-notice {
    position: fixed; top: 16px; left: 50%; z-index: 200;
    display: flex; align-items: center; gap: 10px;
    max-width: min(90vw, 520px);
    padding: 12px 18px 12px 14px;
    background: #fff; border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 14px 36px -14px rgba(21, 35, 28, .30), 0 2px 8px rgba(21, 35, 28, .05);
    color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.5;
    opacity: 0; pointer-events: none;
    transform: translate(-50%, -12px) scale(.98);
    transition: opacity .22s ease, transform .24s cubic-bezier(.22, 1, .36, 1);
}
.top-notice.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.top-notice-icon {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--accent-color, var(--primary)) 12%, #fff);
    color: var(--accent-color, var(--primary));
}
.top-notice-icon svg { width: 13px; height: 13px; }
.top-notice-icon-info { display: none; }
.top-notice.is-info .top-notice-icon-lock { display: none; }
.top-notice.is-info .top-notice-icon-info { display: block; }
.top-notice-text { min-width: 0; word-break: break-word; }

/* ---------- 支付页 ---------- */
.pay-box { text-align: center; }
.pay-box h3 { margin: 10px 0 4px; }
.pay-success {
    width: 62px; height: 62px; margin: 6px auto 0; border-radius: 50%;
    display: grid; place-items: center; font-size: 30px; font-weight: 700;
    color: #047857; background: #ecfdf5; border: 2px solid #a7f3d0;
}
.qr-img {
    display: block; width: 240px; height: 240px; margin: 14px auto 0;
    background: #fff; padding: 8px; border-radius: 14px; border: 1px solid var(--border);
}

/* ---------- 页脚 ---------- */
.footer {
    margin-top: auto;
    padding: 0 0 34px;
    color: var(--muted); font-size: 13px; text-align: center;
}
.footer::before {
    content: ""; display: block;
    border-top: 1px solid var(--border);
    margin: 0 0 26px;
}
.footer-inner { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.footer-links {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 8px 26px; margin-bottom: 12px;
}
.footer-links a { color: var(--text); font-size: 13.5px; }
.footer-links a:hover, .footer-links a:active,
.footer-links a:focus, .footer-links a:visited { color: var(--text); text-decoration: none; }
.footer-meta {
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
    gap: 6px 8px; font-size: 12.5px; color: var(--muted);
}
.footer-meta a { color: var(--muted); }
.footer-meta a:hover, .footer-meta a:active { color: var(--muted); text-decoration: none; }
.footer-sep { opacity: .45; }

/* ---------- 内容页 ---------- */
.page-wrap { padding: 34px 0 10px; }
.page-doc { max-width: 900px; margin: 0 auto; padding: 36px 40px 40px; }
.page-doc h1 {
    margin: 0 0 20px; font-size: clamp(22px, 3vw, 30px);
    letter-spacing: -.01em; color: var(--text); text-align: center;
}
.page-body { font-size: 15px; line-height: 1.9; color: var(--text); overflow-wrap: anywhere; }
.page-body p { margin: 0 0 14px; }
.page-body h2, .page-body h3 { margin: 26px 0 12px; font-size: 18px; }
.page-body ul, .page-body ol { margin: 0 0 14px; padding-left: 22px; }
.page-body a { color: var(--primary-2); }

/* ---------- 解析结果页 ---------- */
.res-page { display: flex; flex-direction: column; gap: 16px; padding: 26px 0 10px; }
/* 解析页暂无素材占位 */
.res-empty {
    flex: 1 0 auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 52vh; padding: 40px 20px; text-align: center;
}
.res-loading {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    margin-bottom: 40px;
}
.res-loading-spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--accent-color, var(--primary)) 18%, transparent);
    border-top-color: var(--accent-color, var(--primary));
    animation: res-spin .8s linear infinite;
}
@keyframes res-spin { to { transform: rotate(360deg); } }
.res-loading-text { font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.res-empty-img { width: 200px; height: 160px; color: var(--border-strong); }
.res-hero { padding: 26px 28px 24px; position: relative; overflow: hidden; }
.res-hero-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.res-platform {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 600; color: var(--primary-2);
    background: rgba(0, 120, 255, .09); padding: 4px 11px; border-radius: 999px;
}
.res-platform .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.res-chip {
    font-size: 12.5px; color: var(--muted); background: var(--card-2);
    border: 1px solid var(--border); padding: 4px 11px; border-radius: 999px;
}
.res-title { margin: 0 0 10px; font-size: 15px; line-height: 1.7; letter-spacing: 0; font-weight: 400; color: var(--text); word-break: break-word; }
.res-hero-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.res-copy-scroll {
    margin-top: 14px;
    max-height: 240px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.85;
    color: var(--text);
    background: var(--card-2);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    padding: 14px 16px;
}
/* 视频 / 图片卡片按设备宽度自动分栏（每列最小 240px，自动缩放） */
.res-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    align-items: stretch;
}
.res-item { padding: 16px 20px 20px; min-width: 0; overflow: hidden; }
/* 横向排列时去掉 .card + .card 的纵向间距，避免卡片上下错位 */
.res-list > .res-item + .res-item { margin-top: 0; }
.res-item-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.res-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.res-check input { width: 17px; height: 17px; flex: none; accent-color: var(--primary); }
.res-tools { display: flex; gap: 8px; flex-wrap: wrap; }
/* 视频 / 图片 / 音频统一 1:1 正方形区域，内容缩放填充 */
.res-media, .res-cover, .res-audio {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-2);
}
.res-media {
    display: flex; align-items: center; justify-content: center;
    background: #0b1512;
}
.res-media video {
    display: block; width: 100%; height: 100%;
    object-fit: cover; background: #0b1512;
}
/* 隐藏视频原生控件右上角的下载按钮（安卓 Chrome 等） */
.res-media video::-webkit-media-controls-download-button,
.lightbox-body video::-webkit-media-controls-download-button,
.res-media video::-internal-media-controls-download-button,
.lightbox-body video::-internal-media-controls-download-button {
    display: none;
}
.res-cover img {
    display: block; width: 100%; height: 100%;
    object-fit: cover;
    border-radius: var(--radius); background: var(--card-2);
}
.res-audio {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 14px; padding: 18px;
    border: 1px solid var(--border);
}
.res-audio::before {
    content: "🎵";
    font-size: 48px; line-height: 1;
    opacity: .5;
}
.res-audio audio { display: block; width: 100%; }
.res-audio .hint { text-align: center; font-size: 12px; margin: 0; }

/* 音频卡片：改为一条小横条，功能不变 */
.res-item-audio {
    grid-column: 1 / -1;
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 12px; padding: 10px 16px;
}
.res-item-audio .res-item-head {
    flex: 0 0 auto; margin-bottom: 0; gap: 10px;
}
.res-item-audio .res-audio {
    flex: 1 1 240px;
    width: auto; aspect-ratio: auto;
    flex-direction: row; flex-wrap: wrap;
    align-items: center; justify-content: flex-start;
    gap: 10px; padding: 0;
    border: 0; background: transparent; border-radius: 0;
    overflow: visible;
}
.res-item-audio .res-audio::before {
    content: "🎵"; font-size: 18px; line-height: 1; opacity: .7;
}
.res-item-audio .res-audio audio { flex: 1 1 180px; width: auto; min-width: 150px; }
.res-item-audio .res-audio .hint { flex: 1 1 100%; text-align: left; margin: 0; font-size: 12px; }
.res-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.res-gallery-item {
    margin: 0; background: var(--card-2);
    border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.res-gallery-item img { display: block; width: 100%; height: 160px; object-fit: cover; }
.res-gallery-item figcaption {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px; background: #fff;
}
.res-copy {
    white-space: pre-wrap; font-size: 14.5px; line-height: 1.9;
    background: var(--card-2); border: 1px dashed var(--border-strong);
    border-radius: 12px; padding: 14px 16px; max-height: 260px; overflow: auto;
}
.res-bar {
    position: sticky; bottom: 14px; z-index: 20;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 12px 18px; background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.res-count { font-size: 12.5px; color: var(--muted); margin-right: auto; }

/* 放大预览 */
.lightbox {
    position: fixed; inset: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    padding: 4vw; background: rgba(6, 16, 12, .88);
    opacity: 0; transition: opacity .18s ease;
}
.lightbox.show { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox-body { display: flex; align-items: center; justify-content: center; max-width: 94vw; max-height: 88vh; }
.lightbox-body img, .lightbox-body video {
    max-width: 94vw; max-height: 88vh; border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox-body audio { width: min(560px, 90vw); }
.lightbox-close {
    position: absolute; top: 18px; right: 22px;
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: rgba(255, 255, 255, .14);
    color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .26); }
body.no-scroll { overflow: hidden; }

/* 窄屏不再固定列数，交给 .res-list 的 auto-fill 自动缩放 */
@media (max-width: 900px) {
    /* 窄屏不启用会员卡片左右切换，直接换行展示全部 */
    .vip-arrow { display: none; }
    .vip-grid { flex-wrap: wrap; }
    .vip-slider { margin: 34px 0 38px; }
}

@media (max-width: 720px) {
    /* 手机端轻提示下移，避免被顶部导航栏遮挡 */
    .toast, .top-notice { top: 76px; }
    .nav { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; border-radius: 16px; }
    body:not(.admin-body) .nav { z-index: 95; }
    .nav-inner { flex-wrap: nowrap; gap: 10px; padding: 10px 12px; justify-content: space-between; }
    .nav-parse { display: none; }
    .brand { font-size: 16px; }
    .nav-menu-btn { display: inline-flex; }
    .nav-text-d { display: none; }
    .nav-text-m { display: inline; }
    /* 手机端：导航收进右侧半屏抽屉 */
    body:not(.admin-body) .nav-links {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: 50vw; min-width: 190px; max-width: 340px;
        display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
        gap: 4px; margin: 0; padding: 62px 14px 22px;
        background: #fff; border-left: 1px solid var(--border);
        box-shadow: -20px 0 48px -28px rgba(15, 23, 42, .4);
        overflow-y: auto; z-index: 90; flex: none;
        visibility: hidden;
        transform: translateX(105%); transition: transform .24s ease, visibility .24s ease;
    }
    body.menu-open .nav-links { visibility: visible; transform: translateX(0); }
    body:not(.admin-body) .nav-links a.link {
        display: block; width: 100%; padding: 12px; border-radius: 10px;
        font-size: 15px;
    }
    body:not(.admin-body) .nav-user {
        flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px;
        margin: 10px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border);
    }
    body:not(.admin-body) .nav-user-meta { flex: 1 1 0; min-width: 0; }
    body:not(.admin-body) .nav-user .avatar { margin: 0; flex: none; }
    body:not(.admin-body) .nav-user .nav-user-name {
        display: block; max-width: 100%;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    body:not(.admin-body) .nav-user form { flex: 1 1 100%; }
    body:not(.admin-body) .nav-user form .btn { width: 100%; }
    .nav-backdrop {
        display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0;
        background: rgba(15, 23, 42, .38);
        opacity: 0; visibility: hidden; z-index: 85;
        transition: opacity .2s ease, visibility .2s ease;
    }
    body.menu-open .nav-backdrop { opacity: 1; visibility: visible; }
    body.menu-open { overflow: hidden; }
    /* 手机端支持平台保持单行，可横向滑动 */
    .platforms {
        flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .platforms::-webkit-scrollbar { display: none; }
    .platforms .chip { flex: 0 0 auto; }
    /* 注册/登录页：协议与提示保持在同一行 */
    .auth-card { padding: 20px; }
    .agree-row { flex-wrap: nowrap; gap: 8px; }
    .agree-row .agree, .agree-row p { font-size: 11.5px; white-space: nowrap; }
    .agree-row .agree { gap: 6px; }
    .agree-row .agree input { width: 14px; height: 14px; }
    .nav-user .small { display: none; }
    /* 后台：左侧半屏抽屉菜单 + 右侧内容 */
    .admin { grid-template-columns: minmax(0, 1fr); }
    /* 抽屉收起时左右留白一致，内容居中显示 */
    body.admin-body .admin { padding-left: 20px; padding-right: 20px; }
    .platform-line { gap: 12px; }
    .admin-menu-btn { display: inline-flex; }
    body.admin-body .admin-side {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 50vw; min-width: 200px; max-width: 320px;
        display: flex; flex-direction: column; gap: 4px;
        overflow-x: hidden; overflow-y: auto; min-height: 0;
        padding: 18px 10px 24px; border-radius: 0;
        border: 0; border-right: 1px solid var(--border);
        box-shadow: 20px 0 48px -28px rgba(15, 23, 42, .4);
        z-index: 96; visibility: hidden;
        transform: translateX(-105%);
        transition: transform .24s ease, visibility .24s ease;
    }
    body.admin-menu-open .admin-side { visibility: visible; transform: translateX(0); }
    .admin-side a { white-space: normal; }
    .admin-side-sub {
        flex-direction: column; margin: 2px 0 6px;
        padding-left: 0;
    }
    .admin-side-group-items { flex-direction: column; }
    .admin-backdrop {
        display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0;
        background: rgba(15, 23, 42, .38);
        opacity: 0; visibility: hidden; z-index: 94;
        transition: opacity .2s ease, visibility .2s ease;
    }
    body.admin-menu-open .admin-backdrop { opacity: 1; visibility: visible; }
    body.admin-menu-open { overflow: hidden; }
    .admin .table-wrap table { min-width: 820px; }
    .admin .env-card .table-wrap { overflow: visible; }
    .admin .env-card .table-wrap table { min-width: 0; width: 100%; }
    .result-head { flex-direction: column; }
    .result-media { width: 100%; }
    .stats > div { padding: 0 22px; }
    .hero {
        padding: 26px 0 34px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .parse-box { padding: 36px 18px 30px; border-radius: 18px; margin: 22px auto 12px; }
    .parse-title { font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .parse-sub { font-size: 13.5px; margin: 18px 0 0; }
    .parse-row { margin-top: 30px; padding: 5px; }
    .parse-row input { height: 50px; padding: 0 16px; font-size: 15px; }
    .parse-submit { height: 50px; padding: 0 20px; font-size: 15px; }
    .parse-hint { font-size: 13px; margin: 6px 8px 24px; }
    .parse-box .platforms-wrap { margin-top: 34px; gap: 8px; }
    .parse-box .chip { padding: 5px 10px; font-size: 13px; }
    .platforms { gap: 12px; }
    .page-doc { padding: 24px 18px 28px; }
    .footer-links { gap: 6px 18px; }
    .res-page { padding-top: 18px; }
    .res-hero { padding: 20px 16px 18px; }
    .res-item { padding: 8px 8px 10px; }
    .res-item-audio { padding: 10px 12px; }
    .color-row { flex-wrap: wrap; }
    .color-combo { width: fit-content; max-width: 100%; flex: 0 1 auto; }
    .color-combo .hex-input { flex: 1 1 auto; width: auto; min-width: 0; }
    .color-combo .checkbox { flex: 0 0 auto; width: auto; padding: 0 10px; }
    /* 手机端：去掉左侧勾选框，下载按钮移到左侧，放大保持在右侧 */
    .res-item-head { gap: 4px; margin-bottom: 8px; }
    .res-item-head .res-check { order: 2; flex: 1 1 auto; min-width: 0; font-size: 11.5px; gap: 4px; }
    .res-item-head .res-check input { display: none; }
    .res-item-head .res-tools { display: contents; }
    .res-item-head .res-tools a[data-download] { order: 1; }
    .res-item-head .res-tools [data-zoom-type] { order: 3; }
    .res-item-head .btn { padding: 4px 6px; font-size: 11.5px; }
    /* 手机端解析结果固定两列，视频 / 音频 / 图片统一两行排布 */
    .res-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    /* 音频卡片跟随两列布局，内部改为竖向紧凑排列 */
    .res-item-audio {
        grid-column: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 8px;
    }
    .res-item-audio .res-audio { flex: 1 1 auto; flex-direction: column; align-items: center; gap: 4px; }
    .res-item-audio .res-audio::before { font-size: 22px; }
    .res-item-audio .res-audio audio { flex: 0 0 auto; width: 100%; min-width: 0; }
    .res-item-audio .res-audio .hint { flex: 0 0 auto; text-align: center; font-size: 11px; }
    /* 手机端不展示「全选 + 打包下载全部」操作栏 */
    .res-bar { display: none; }
    /* 结果页第一张卡片上方的解析输入框 */
    .res-parse-inline {
        display: flex;
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        margin: 0;
        background: #fff;
    }
    .res-gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .res-gallery-item img { height: 130px; }
    .vip-grid { flex-direction: column; gap: 14px; }
    .vip-grid .vip-card { max-width: none; }
    .vip-card-top { padding: 22px 18px 18px; }
    .vip-card-body { padding: 18px 18px 20px; }
    .vbar-plot { height: 180px; gap: 14px; padding: 0 10px; }
    .vbar-names { gap: 14px; padding: 10px 10px 0; }
}

/* ---------- 用户中心 ---------- */
.uc-page { display: flex; flex-direction: column; gap: 18px; margin: 24px 0 48px; }

.uc-hero {
    position: relative; overflow: hidden;
    padding: 26px 26px 22px;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid color-mix(in srgb, var(--accent-color, var(--primary)) 20%, var(--border));
    background: #fff;
    box-shadow: var(--shadow);
}
.uc-profile { position: relative; display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.uc-avatar-form { flex: none; }
.uc-avatar-wrap { position: relative; }
.uc-avatar {
    position: relative; overflow: hidden; cursor: pointer;
    width: 88px; height: 88px; flex: none; border-radius: 14px;
    border: 4px solid #f5f5f5;
    display: grid; place-items: center;
    font-size: 34px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent-color, var(--primary)), var(--primary-2));
}
.uc-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uc-avatar-text { line-height: 1; }
.uc-avatar-mask {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
    background: rgba(0, 0, 0, .35);
    opacity: 0; transition: opacity .15s ease;
}
.uc-avatar:hover .uc-avatar-mask { opacity: 1; }
.uc-id { min-width: 0; }
.uc-name {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25;
}
.uc-name .badge { font-size: 11px; padding: 2px 9px; }
.uc-meta { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.uc-links { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.uc-text-btn {
    padding: 0; border: 0; background: none; cursor: pointer;
    font-size: 12.5px; font-weight: 600; color: var(--accent-color, var(--primary));
}
.uc-text-btn:hover { text-decoration: underline; }
.uc-links-sep { color: var(--border-strong); font-size: 12px; }
.uc-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uc-profile .uc-actions { margin-top: 18px; }
.uc-btn-gold {
    background: #eac791;
    border-color: transparent; color: #3d2b00;
    box-shadow: 0 10px 22px -12px rgba(234, 199, 145, .95);
}
.uc-btn-gold:hover {
    background: #f1d4a8;
    color: #3d2b00;
}
.uc-btn-theme {
    background: var(--accent-color, var(--primary));
    border-color: transparent; color: #fff;
    box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent-color, var(--primary)) 70%, transparent);
}
.uc-btn-theme:hover {
    background: color-mix(in srgb, var(--accent-color, var(--primary)) 86%, #fff);
    border-color: transparent;
    color: #fff;
}

.uc-stats {
    position: relative;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px; margin-top: 22px; padding-top: 18px;
    border-top: 1px dashed color-mix(in srgb, var(--accent-color, var(--primary)) 22%, var(--border));
}
.uc-stat { padding-left: 16px; border-left: 1px solid color-mix(in srgb, var(--accent-color, var(--primary)) 14%, var(--border)); }
.uc-stat:first-child { padding-left: 0; border-left: 0; }
.uc-stat .k { display: block; font-size: 12px; color: var(--muted); }
.uc-stat .v { display: block; margin-top: 2px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.uc-stat .v small { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }

.uc-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.uc-grid > .uc-side { order: -1; }
.uc-side { display: flex; flex-direction: column; gap: 18px; }
.uc-side > .uc-card { flex: 1 1 auto; }
.uc-span-2 { grid-column: 1 / -1; }
.uc-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
    box-shadow: var(--shadow-sm);
}
.uc-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.uc-eyebrow { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.uc-panel-head h2, .uc-rec-head h2 { margin: 3px 0 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.uc-badge {
    flex: none; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
    color: var(--accent-color, var(--primary));
    background: color-mix(in srgb, var(--accent-color, var(--primary)) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent-color, var(--primary)) 30%, #fff);
}
.uc-badge.is-off { color: var(--muted); background: var(--card-2); border-color: var(--border); }
.uc-count {
    flex: none; padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; color: var(--muted);
    background: var(--card-2); border: 1px solid var(--border);
}

.uc-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.uc-meta-grid > div {
    padding: 12px 14px; border-radius: 12px;
    background: var(--card-2); border: 1px solid var(--border);
}
.uc-meta-grid span { display: block; font-size: 12px; color: var(--muted); }
.uc-meta-grid b { display: block; margin-top: 2px; font-size: 15px; }

.uc-quota { margin-top: 16px; }
.uc-quota-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.uc-quota-head b { color: var(--accent-color, var(--primary)); }
.uc-quota-track { height: 10px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.uc-quota-track > span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--accent-color, var(--primary)) 38%, #fff),
        var(--accent-color, var(--primary)));
    transition: width .5s ease;
}
.uc-quota-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }
.uc-membership { display: flex; flex-direction: column; }
.uc-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

.uc-membership-cta { margin-top: auto; padding-top: 18px; }
.uc-plans { display: flex; flex-direction: column; }
.uc-plan-nav { display: flex; gap: 6px; }
.uc-plan-arrow {
    width: 28px; height: 28px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--border-strong);
    background: #fff; color: var(--muted); cursor: pointer;
    font-size: 15px; line-height: 1;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.uc-plan-arrow:hover { background: var(--accent-color, var(--primary)); border-color: transparent; color: #fff; }
.uc-plan-arrow[disabled] { opacity: .35; cursor: default; }
.uc-plan-arrow[disabled]:hover { background: #fff; color: var(--muted); border-color: var(--border-strong); }
.uc-plan-arrow[hidden] { display: none; }
.uc-plan-track { flex: 1 1 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
.uc-plan-track > [hidden] { display: none; }
.uc-plan {
    display: flex; flex-direction: column; gap: 9px; padding: 14px;
    height: 100%;
    border: 1px solid var(--border); border-radius: 14px;
    background: linear-gradient(165deg, color-mix(in srgb, var(--plan-color, var(--primary)) 10%, #fff), #fff 62%);
}
.uc-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.uc-plan-name { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.uc-plan-current {
    flex: none; padding: 1px 7px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700;
    color: #3d2b00;
    background: #eac791;
}
.uc-plan-price { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.uc-plan-price small { margin-left: 2px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.uc-plan-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.uc-plan-meta li { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.uc-plan-meta b { color: var(--text); font-weight: 700; }
.uc-plan-desc {
    margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.uc-plan .btn { margin-top: auto; }

/* 用户中心弹窗 */
.uc-modal {
    position: fixed; inset: 0; z-index: 120;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.uc-modal[hidden] { display: none; }
.uc-modal-mask {
    position: absolute; inset: 0;
    background: rgba(11, 26, 20, .5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.uc-modal-card {
    position: relative; width: min(420px, 100%);
    padding: 22px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.uc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.uc-modal-head h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.uc-modal-x {
    width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
    background: var(--bg-soft); color: var(--muted);
    font-size: 18px; line-height: 1; cursor: pointer;
}
.uc-modal-x:hover { color: var(--text); }
.uc-modal-form { display: flex; flex-direction: column; gap: 12px; }
.uc-modal-form .field { margin: 0; }
.uc-modal-actions { display: flex; gap: 10px; margin-top: 4px; }
.uc-modal-actions .btn-primary { flex: 1; }

.uc-rec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.uc-records .table-wrap {
    border: 1px solid var(--border); border-radius: 14px;
    overflow-x: auto; overflow-y: auto;
    max-height: 388px;
}
.uc-records table { border-collapse: separate; border-spacing: 0; }
.uc-records thead th {
    position: sticky; top: 0; z-index: 2;
    padding: 11px 14px; font-size: 11.5px; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted);
    background: var(--card-2); border-bottom: 1px solid var(--border);
}
.uc-records tbody td { padding: 12px 14px; }
.uc-records th:nth-child(2), .uc-records td:nth-child(2),
.uc-records th:nth-child(3), .uc-records td:nth-child(3),
.uc-records th:nth-child(5), .uc-records td:nth-child(5),
.uc-records th:nth-child(6), .uc-records td:nth-child(6) { text-align: center; }
.uc-records td:nth-child(6) .uc-actions { justify-content: center; }

/* 后台下载记录：封面 / 平台 / IP / 状态 / 操作 居中 */
.admin-records th:nth-child(3), .admin-records td:nth-child(3),
.admin-records th:nth-child(4), .admin-records td:nth-child(4),
.admin-records th:nth-child(6), .admin-records td:nth-child(6),
.admin-records th:nth-child(7), .admin-records td:nth-child(7),
.admin-records th:nth-child(8), .admin-records td:nth-child(8),
.admin-records th:nth-child(9), .admin-records td:nth-child(9) { text-align: center; }
.admin-records td:nth-child(9) form { display: flex; justify-content: center; }
.uc-records tbody tr { height: 68px; transition: background .15s ease; }
.uc-records tbody tr:hover { background: color-mix(in srgb, var(--accent-color, var(--primary)) 4%, #fff); }
.uc-records .thumb { width: 64px; height: 44px; }
.uc-title {
    max-width: 340px; font-size: 13.5px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.uc-actions form { margin: 0; }

.uc-empty {
    padding: 30px 16px; text-align: center; font-size: 13px; color: var(--muted);
    border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--card-2);
}
.uc-empty a { margin-left: 4px; color: var(--accent-color, var(--primary)); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
    .uc-page > * { animation: uc-rise .5s cubic-bezier(.2, .7, .3, 1) both; }
    .uc-page > *:nth-child(2) { animation-delay: .06s; }
    .uc-page > *:nth-child(3) { animation-delay: .12s; }
}
@keyframes uc-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
    .uc-grid { grid-template-columns: minmax(0, 1fr); }
    .uc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
    .uc-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
    /* 手机端隐藏底部版权文字 */
    .footer-copy,
    .footer-copy + .footer-sep { display: none; }
    .uc-page { margin: 16px 0 36px; }
    .uc-hero { padding: 20px 18px 18px; }
    .uc-profile { align-items: flex-start; }
    .uc-avatar { width: 72px; height: 72px; font-size: 28px; border-radius: 12px; }
    .uc-name { font-size: 20px; }
    .uc-actions { width: 100%; margin-left: 0; }
    .uc-actions .btn { flex: 1 1 0; }
    .uc-plan-track { grid-template-columns: minmax(0, 1fr); }
    .uc-rec-head { gap: 8px; }
}

/* iOS / 手机浏览器：输入框字号保持 16px，聚焦时页面不会自动放大 */
@media (max-width: 820px) {
    input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):not([type=range]),
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ---------- 后台富文本编辑器 ---------- */
.rich-editor {
    border: 1px solid var(--border); border-radius: 11px; background: #fbfdfb; overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.rich-editor:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.rich-toolbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    padding: 8px 10px; border-bottom: 1px solid var(--border); background: #f5f9f5;
}
.rich-btn {
    padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border);
    background: #fff; color: var(--text); font-size: 13px; line-height: 1.3; cursor: pointer;
    font-family: inherit;
}
.rich-btn:hover { border-color: var(--border-strong); background: #f1f7f1; }
.rich-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }
.rich-size { width: auto; min-width: 82px; padding: 5px 8px; font-size: 13px; border-radius: 8px; }
.rich-color {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px;
    border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer;
}
.rich-color-label { font-size: 13px; font-weight: 700; color: var(--text); }
.rich-color input[type=color] { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.rich-body {
    min-height: 260px; padding: 14px 16px; font-size: 15px; line-height: 1.8;
    outline: none; overflow-y: auto; color: var(--text);
}
.rich-body:empty::before { content: '在这里编辑文章内容…'; color: #9aa79f; }
.rich-body p { margin: 0 0 12px; }
.rich-body img { max-width: 100%; height: auto; border-radius: 20px; }

/* 前台文章里的图片：跟随页面宽度自适应，四角 20px 圆角 */
.page-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 20px;
    display: inline-block;
    cursor: zoom-in;
}

/* 文章图片点击放大：原尺寸显示，超出屏幕按屏幕缩放，再次点击关闭 */
.page-lightbox {
    position: fixed; inset: 0; z-index: 1200; display: none;
    align-items: center; justify-content: center; padding: 24px;
    background: rgba(6, 12, 9, .9); backdrop-filter: blur(6px); cursor: zoom-out;
}
.page-lightbox.show { display: flex; }
.page-lightbox img {
    max-width: 96vw; max-height: 92vh; width: auto; height: auto;
    border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

/* ===== 新子网络科技 · 资源整合站 浮窗引流入口 ===== */
.xz-float{
  position:fixed; left:18px; bottom:22px; z-index:80;
  display:flex; align-items:center; gap:11px;
  padding:12px 14px; border-radius:16px; text-decoration:none;
  background:linear-gradient(135deg,#5A78FF,#7A5CFF);
  color:#fff !important; box-shadow:0 10px 30px rgba(90,120,255,.45);
  animation:xzFloat 2.6s ease-in-out infinite;
  max-width:min(78vw,280px);
}
.xz-float:hover{filter:brightness(1.08); color:#fff;}
.xz-float .ic{flex:none; width:40px; height:40px; border-radius:12px; background:rgba(255,255,255,.18); display:grid; place-items:center;}
.xz-float .ic svg{width:22px; height:22px;}
.xz-float .tx b{display:block; font-size:14.5px; font-weight:700; letter-spacing:.02em;}
.xz-float .tx i{display:block; font-style:normal; font-size:11.5px; opacity:.92; margin-top:1px; white-space:nowrap;}
@media (max-width:600px){
  .xz-float{left:12px; bottom:14px; padding:10px 12px;}
  .xz-float .ic{width:34px; height:34px;}
  .xz-float .ic svg{width:19px; height:19px;}
  .xz-float .tx b{font-size:13.5px;}
}
@keyframes xzFloat{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-6px);}
}

/* PC 端放大加醒目 */
@media (min-width:601px){
  .xz-float{
    left:26px; bottom:30px; padding:18px 22px; border-radius:20px; gap:15px;
    box-shadow:0 14px 44px rgba(90,120,255,.55), 0 0 0 1px rgba(255,255,255,.25) inset;
    max-width:340px;
  }
  .xz-float .ic{width:54px; height:54px; border-radius:16px;}
  .xz-float .ic svg{width:30px; height:30px;}
  .xz-float .tx b{font-size:19px; letter-spacing:.03em;}
  .xz-float .tx i{font-size:14px; white-space:normal; line-height:1.45;}
}
