/* ============================================================
 * 用户端样式（AI 写作平台 / 猫哥助手）
 * 主题通过 html[data-theme] 切换：brand(原型金,默认) / blue / teal / pink / dark
 * ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- 主题变量 ---------- */
:root,
[data-theme="brand"] {
    /* 默认主题 = 原型配色（猫哥助手）：驼金主色 + 暖米白底 + 暖调深蓝黑文字 */
    --primary: #d4a574;
    --primary-deep: #a67c2e;
    --accent: #b8860b;
    --primary-rgb: 212, 165, 116;
    --accent-rgb: 184, 134, 11;
    --primary-soft: rgba(212, 165, 116, 0.20);
    --text-1: #1a1a2e;
    --text-2: #5a5246;
    --text-3: #9a8f7d;
    --glass: rgba(255, 253, 249, 0.72);
    --glass-strong: rgba(255, 253, 249, 0.90);
    --glass-border: rgba(255, 255, 255, 0.85);
    --surface: rgba(255, 253, 249, 0.74);
    --surface-2: rgba(255, 253, 249, 0.57);
    --surface-soft: rgba(255, 253, 249, 0.38);
    --border-line: #e8e2da;
    --radius: 20px;
    --shadow: 0 12px 40px rgba(150, 110, 50, 0.12), 0 2px 8px rgba(150, 110, 50, 0.06);
    --shadow-hover: 0 22px 52px rgba(150, 110, 50, 0.18), 0 4px 12px rgba(150, 110, 50, 0.08);
    --bg-page: #faf8f5;
    --card: #ffffff;
    --card-2: #f5f0ea;
    --brand: #d4a574;
    --brand-deep: #b8860b;
    --brand-rgb: 212, 165, 116;
    --brand-light: #f5ebe0;
    --brand-soft: rgba(212, 165, 116, 0.16);
}

[data-theme="blue"] {
    --primary: #4f6ef7;
    --primary-deep: #3b5bdb;
    --accent: #6c5ce7;
    --primary-rgb: 79, 110, 247;
    --accent-rgb: 108, 92, 231;
    --primary-soft: rgba(79, 110, 247, 0.12);
    --text-1: #1e2433;
    --text-2: #5b6472;
    --text-3: #9aa3b2;
    --glass: rgba(255, 255, 255, 0.66);
    --glass-strong: rgba(255, 255, 255, 0.86);
    --glass-border: rgba(255, 255, 255, 0.85);
    --surface: rgba(255, 255, 255, 0.72);
    --surface-2: rgba(255, 255, 255, 0.55);
    --surface-soft: rgba(255, 255, 255, 0.35);
    --border-line: #e2e8f0;
    --radius: 20px;
    --shadow: 0 12px 40px rgba(58, 80, 150, 0.12), 0 2px 8px rgba(58, 80, 150, 0.06);
    --shadow-hover: 0 22px 52px rgba(58, 80, 150, 0.18), 0 4px 12px rgba(58, 80, 150, 0.08);
    --bg-page: #faf8f5;
    --card: #ffffff;
    --card-2: #f5f7fa;
    --brand: #d4a574;
    --brand-deep: #b8860b;
    --brand-rgb: 212, 165, 116;
    --brand-light: #f5ebe0;
    --brand-soft: rgba(212, 165, 116, 0.12);
}

[data-theme="teal"] {
    --primary: #1fb6a6;
    --primary-deep: #159c8c;
    --accent: #2bc4b0;
    --primary-rgb: 31, 182, 166;
    --accent-rgb: 43, 196, 176;
    --primary-soft: rgba(31, 182, 166, 0.14);
    --text-1: #173a37;
    --text-2: #4d6f6a;
    --text-3: #88a39e;
    --glass: rgba(255, 255, 255, 0.70);
    --glass-strong: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(255, 255, 255, 0.85);
    --surface: rgba(255, 255, 255, 0.74);
    --surface-2: rgba(255, 255, 255, 0.58);
    --surface-soft: rgba(255, 255, 255, 0.38);
    --border-line: #cfeee7;
    --shadow: 0 12px 40px rgba(20, 110, 100, 0.12), 0 2px 8px rgba(20, 110, 100, 0.06);
    --shadow-hover: 0 22px 52px rgba(20, 110, 100, 0.18), 0 4px 12px rgba(20, 110, 100, 0.08);
    --bg-page: #faf8f5;
    --card: #ffffff;
    --card-2: #f2faf8;
    --brand: #d4a574;
    --brand-deep: #b8860b;
    --brand-rgb: 212, 165, 116;
    --brand-light: #f5ebe0;
    --brand-soft: rgba(212, 165, 116, 0.12);
}

[data-theme="pink"] {
    --primary: #ff6fa5;
    --primary-deep: #e85a95;
    --accent: #ff8fb8;
    --primary-rgb: 255, 111, 165;
    --accent-rgb: 255, 143, 184;
    --primary-soft: rgba(255, 111, 165, 0.14);
    --text-1: #3a2430;
    --text-2: #7a5564;
    --text-3: #b08a98;
    --glass: rgba(255, 255, 255, 0.70);
    --glass-strong: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(255, 255, 255, 0.85);
    --surface: rgba(255, 255, 255, 0.74);
    --surface-2: rgba(255, 255, 255, 0.58);
    --surface-soft: rgba(255, 255, 255, 0.38);
    --border-line: #f3d9e4;
    --shadow: 0 12px 40px rgba(190, 70, 120, 0.12), 0 2px 8px rgba(190, 70, 120, 0.06);
    --shadow-hover: 0 22px 52px rgba(190, 70, 120, 0.18), 0 4px 12px rgba(190, 70, 120, 0.08);
    --bg-page: #faf8f5;
    --card: #ffffff;
    --card-2: #faf2f6;
    --brand: #d4a574;
    --brand-deep: #b8860b;
    --brand-rgb: 212, 165, 116;
    --brand-light: #f5ebe0;
    --brand-soft: rgba(212, 165, 116, 0.12);
}

[data-theme="dark"] {
    --primary: #5b8cff;
    --primary-deep: #3f6fe0;
    --accent: #7c6cf0;
    --primary-rgb: 91, 140, 255;
    --accent-rgb: 124, 108, 240;
    --primary-soft: rgba(91, 140, 255, 0.20);
    --text-1: #e6e9f2;
    --text-2: #aab2c2;
    --text-3: #8893a8;
    --glass: rgba(35, 42, 58, 0.62);
    --glass-strong: rgba(40, 48, 66, 0.85);
    --glass-border: rgba(255, 255, 255, 0.12);
    --surface: rgba(255, 255, 255, 0.06);
    --surface-2: rgba(255, 255, 255, 0.09);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --border-line: rgba(255, 255, 255, 0.14);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.30);
    --shadow-hover: 0 22px 52px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
    --bg-page: #0f1420;
    --card: #1a2030;
    --card-2: #252d40;
    --brand: #d4a574;
    --brand-deep: #b8860b;
    --brand-rgb: 212, 165, 116;
    --brand-light: rgba(212, 165, 116, 0.20);
    --brand-soft: rgba(212, 165, 116, 0.16);
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-1);
    min-height: 100vh;
    background: var(--bg-page);
}

/* ---------- 悬浮 Header（白底毛玻璃，匹配原型） ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-line);
}
/* 内容约束在 1280px 居中，对齐原型 header 的 max-w-7xl 布局 */
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 26px;
    color: var(--text-1);
}
.header-inner .brand { justify-self: start; }
.header-inner .nav { justify-self: center; }
.header-inner .header-right { justify-self: end; }
.site-header .brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 700; letter-spacing: 0.3px;
    color: var(--text-1);
    cursor: pointer;
}
.site-header .brand .logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.site-header .brand .logo-img { height: 48px; width: auto; border-radius: 6px; object-fit: contain; }
.site-header .brand .brand-name { font-weight: 700; letter-spacing: 0.3px; }
.site-header .brand .logo-text {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; font-size: 17px; font-weight: 800;
}
.nav {
    display: flex; gap: 4px;
}
.nav-item {
    padding: 8px 16px;
    font-size: 15px; font-weight: 600;
    color: var(--text-2); background: transparent;
    border: none; border-radius: 8px; cursor: pointer; transition: all 0.22s;
    text-decoration: none;
}
.nav-item:hover { color: var(--text-1); background: rgba(0, 0, 0, 0.05); }
/* 选中态：更浅的主题强调底(10%透明) + 深字（对齐原型 bg-accent，比 primary-soft 更淡） */
.nav-item.active {
    color: var(--text-1);
    background: rgba(var(--primary-rgb), 0.10);
    box-shadow: none;
}
.header-right { display: flex; align-items: center; gap: 12px; }
.theme-btn {
    position: relative;
    width: 36px; height: 36px; border-radius: 8px;
    border: 1px solid var(--border-line);
    background: #ffffff;
    color: var(--text-1);
    cursor: pointer; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.22s;
}
.theme-btn:hover { border-color: var(--primary); }
.theme-menu {
    position: absolute; top: 44px; right: 0;
    background: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: 10px; padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: none; min-width: 160px;
}
.theme-menu.show { display: block; }
.theme-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border: none; background: transparent;
    border-radius: 10px; cursor: pointer; color: var(--text-1); font-size: 14px;
    transition: background 0.18s;
}
.theme-menu button:hover { background: var(--surface); }
.theme-menu button .swatch {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
}
/* 主题菜单选中项：更浅的主题底 + 右侧对勾（与导航选中态一致） */
.theme-menu button.active { background: rgba(var(--primary-rgb), 0.10); font-weight: 600; }
.theme-menu button.active::after { content: '\2713'; margin-left: auto; color: var(--primary); font-weight: 700; }

/* ---------- 页面容器 ---------- */
.page {
    width: 100%;
    animation: pageIn .5s ease both;
}
/* 无满屏背景的 section（个人中心）自己留顶部空间给 fixed header */
#section-profile { padding-top: 84px; padding-bottom: 72px; }
/* 满屏区块（背景铺满视口），内部用 .container 居中 */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.band { padding: 64px 0; }
/* hero：米白纯色段，背景铺满顶部与 fixed header 无缝衔接（对齐原型 py-20 md:py-32） */
.band-hero {
    padding: 188px 0 88px;
    background: var(--bg-page);
}
/* 分段配色：白段（features / pricing）与米白段（hero / how-it-works）交替 */
.band-card { background: var(--card); }
.band-plain { background: var(--bg-page); }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
.section { display: none; }
.section.active { display: block; }

/* ---------- 原页面内部 header（保留兼容 balance-pill 等） ---------- */
.header .brand { font-size: 26px; font-weight: 800; letter-spacing: 0.5px; color: var(--primary); }
.header .brand .dot { color: var(--primary); }
.header .subtitle { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.header .user-box { text-align: right; font-size: 14px; color: var(--text-2);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.balance-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f6f5f2;
    border: 1px solid var(--border-line);
    border-radius: 8px; padding: 7px 16px;
    font-size: 13px; color: var(--text-1); font-weight: 600;
}
.balance-pill::before { content: '💰'; font-size: 14px; }
.balance-pill .num { color: var(--primary); font-weight: 700; }
.balance-pill .hint { color: var(--text-3); font-weight: 400; font-size: 12px; }
.btn-link { font-size: 14px; color: var(--primary); background: transparent; border: none; cursor: pointer; padding: 4px 8px; transition: color .2s; }
.btn-link:hover { text-decoration: underline; }
.guest-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none; border-radius: 8px;
    padding: 8px 18px; color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.22s;
}
.guest-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; font-size: 14px; font-weight: 700;
}

/* ---------- 轻提示 toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 60px;
    transform: translateX(-50%) translateY(12px);
    background: rgba(30, 34, 48, 0.92); color: #fff;
    font-size: 14px; line-height: 1.5;
    padding: 10px 22px; border-radius: 999px; z-index: 9999;
    opacity: 0; pointer-events: none;
    max-width: 80vw; text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 右上角账号下拉菜单 ---------- */
.user-menu { position: relative; }
.user-trigger {
    display: flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer;
    padding: 6px 10px; border-radius: 10px;
    color: var(--text-1); font-size: 14px; font-weight: 600;
    transition: background 0.2s;
}
.user-trigger:hover { background: var(--primary-soft); }
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-chevron { width: 14px; height: 14px; flex-shrink: 0; transition: transform 0.2s; }
.user-menu.open .ud-chevron { transform: rotate(180deg); }
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px;
    background: #ffffff; border: 1px solid var(--border-line); border-radius: 14px;
    box-shadow: var(--shadow); padding: 8px; z-index: 60;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
[data-theme="dark"] .user-dropdown { background: #1a2030; }
.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.ud-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; border-bottom: 1px solid var(--border-line); margin-bottom: 6px; }
.ud-head .user-avatar { width: 42px; height: 42px; font-size: 18px; }
.ud-id { min-width: 0; }
.ud-nick { font-size: 14px; font-weight: 700; color: var(--text-1); }
.ud-acc { font-size: 12px; color: var(--text-3); margin-top: 2px; word-break: break-all; }
.ud-item {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: none; border: none; text-align: left; cursor: pointer;
    padding: 10px 12px; border-radius: 8px;
    font-size: 14px; color: var(--text-1);
    transition: background 0.15s;
}
.ud-item:hover { background: var(--primary-soft); }
.ud-item.ud-balance { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; }
.ud-balance .num { font-size: 15px; font-weight: 700; color: var(--primary); }
.ud-item.ud-danger { color: #e5484d; }
.ud-item.ud-danger:hover { background: rgba(229, 72, 77, 0.08); }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 30px;
    margin-bottom: 22px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card h2 {
    font-size: 18px; color: var(--text-1);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
}
.card h2::before {
    content: ''; width: 4px; height: 18px; border-radius: 2px;
    background: var(--primary);
}

/* ---------- 首页分段（满屏 band，内部 .container 居中） ---------- */
.home-block {
    padding: 0;
}
.home-block:first-child { margin-top: 0; }

/* ---------- 首页营销区 ---------- */
.hero {
    text-align: center; padding: 10px 10px 16px;
}
.hero-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--text-1);
    background: var(--primary-soft); border: 1px solid rgba(var(--primary-rgb), 0.25);
    border-radius: 999px; padding: 6px 14px; margin-bottom: 18px;
}
.hero-tag::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}
.hero h1.hero-title {
    font-size: 60px; font-weight: 800; line-height: 1.18; margin-bottom: 18px;
    color: var(--text-1); letter-spacing: -0.5px;
    font-family: Georgia, 'Times New Roman', 'Songti SC', serif;
}
/* 主标题中被单独上色的强调词（随主题切换的渐变，对齐原型「重获人味」） */
.hero h1 .hl {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
/* 第二行次要描述文字（原型「专业内容去AI化服务」） */
.hero h1 .hero-sub {
    display: block; font-size: 48px; font-weight: 700; color: var(--text-1);
    letter-spacing: 0; margin-top: 6px;
}
.hero p.lead { font-size: 20px; color: var(--text-2); max-width: 720px; margin: 0 auto 30px; line-height: 1.8; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.btn-primary-lg {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-size: 16px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none; border-radius: 10px; cursor: pointer;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.30);
    transition: all 0.22s;
}
.btn-primary-lg:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.40); }
.btn-ghost-lg {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-size: 16px; font-weight: 600; color: var(--primary);
    background: #ffffff; border: 1px solid var(--border-line);
    border-radius: 10px; cursor: pointer; transition: all 0.22s;
}
.btn-ghost-lg:hover { border-color: var(--primary); transform: translateY(-1px); }

.feature-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    margin: 34px 0;
}
.feature-card {
    background: #ffffff; border: 1px solid var(--border-line);
    border-radius: 16px; padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
/* 首页 hero 下方三个模式卡片：横向小卡，对齐原型 hero-section（图标左 / 文字右） */
.feature-grid.mode-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    max-width: 960px; margin: 36px auto;
}
.mode-card {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; border-radius: 12px; text-align: left;
    background: var(--card); border: 1px solid var(--border-line);
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.mode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); }
.mc-icon {
    flex: 0 0 auto; width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: var(--primary-soft); color: var(--primary);
}
.mc-icon svg { width: 20px; height: 20px; display: block; }
.mc-text { min-width: 0; }
.mc-text h3 { font-size: 14px; font-weight: 600; color: var(--text-1); margin: 0 0 2px; line-height: 1.3; }
.mc-text p { font-size: 12px; color: var(--text-2); margin: 0; line-height: 1.4; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand); }
/* 白段（为什么选择）内卡片用米白底，与 hero 段白卡形成交错（用户要求的分段配色，原型 features-section 为白底，此处保留交错） */
.reason-grid .feature-card { background: var(--bg-page); }
.feature-card .fc-icon {
    width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-soft); color: var(--primary);
}
.feature-card .fc-icon svg { width: 24px; height: 24px; display: block; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-1); font-weight: 700; }
.feature-card p { font-size: 14px; color: var(--text-2); line-height: 1.7; }

.section-head { text-align: center; margin: 0 0 36px; }
.section-head h2 { font-family: Georgia, 'Songti SC', 'Times New Roman', serif; font-size: 30px; color: var(--text-1); }
.section-head h2 { font-size: 30px; font-weight: 800; color: var(--text-1); letter-spacing: -0.3px; }
.section-head p { color: var(--text-2); margin-top: 10px; font-size: 15px; }

/* 使用流程：原型为开放式居中布局（无白卡边框），每步=图标圆角方块(80px,浅主题底+主题色细边框)+右上角渐变序号徽章+标题+描述，桌面步骤间有连接线 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 30px; }
.step-card { position: relative; text-align: center; padding-top: 6px; }
/* 步骤间连接线：桌面显示（与原型 left-[60%] w-[80%] h-px 对齐），移动端折叠网格时隐藏 */
.step-line { position: absolute; top: 40px; left: 60%; width: 80%; height: 1px; background: var(--border-line); display: none; }
.step-ic-wrap { position: relative; display: inline-flex; margin-bottom: 18px; }
.step-ic {
    width: 80px; height: 80px; border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-soft);
    border: 2px solid rgba(var(--primary-rgb), 0.22);
}
.step-ic svg { width: 32px; height: 32px; display: block; color: var(--primary); }
.step-num {
    position: absolute; top: -10px; right: -10px;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; font-weight: 700; font-size: 12px;
}
.step-card h4 { font-size: 18px; margin-bottom: 8px; color: var(--text-1); font-weight: 600; }
.step-card p { font-size: 14px; color: var(--text-2); line-height: 1.7; }

.pkg-wrap { position: relative; margin-top: 26px; }
.pkg-grid {
    display: flex; gap: 18px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    padding: 32px 0 18px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    cursor: default; user-select: none; -webkit-user-select: none;
}
.pkg-grid.has-overflow { cursor: grab; }
.pkg-grid.dragging { cursor: grabbing; scroll-snap-type: none; }
.pkg-grid::-webkit-scrollbar { display: none; }
.pkg-card {
    flex: 0 0 280px; scroll-snap-align: center;
    background: var(--bg-page); border: 1.5px solid var(--border-line);
    border-radius: 14px; padding: 30px 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center; position: relative; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex; flex-direction: column;
}
.pkg-card:first-child { margin-left: auto; }
.pkg-card:last-child { margin-right: auto; }
.pkg-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.08); border-color: var(--primary); }
.pkg-card.recommended {
    border: 2px solid var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.20);
    transform: scale(1.06);
    z-index: 1;
}
.pkg-card.recommended:hover { box-shadow: 0 14px 34px rgba(var(--primary-rgb), 0.26); }
.pkg-card ul { flex: 1 1 auto; margin-bottom: 18px; }
.pkg-card .btn-primary-lg { margin-top: auto; justify-content: center; }
.pkg-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border-line); background: #fff; color: var(--text-1);
    font-size: 22px; line-height: 1; cursor: pointer; z-index: 3;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12); transition: background .2s, border-color .2s, color .2s;
}
.pkg-wrap.has-overflow .pkg-nav { display: flex; }
.pkg-nav:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.pkg-nav-prev { left: -56px; }
.pkg-nav-next { right: -56px; }
@media (max-width: 1320px) {
    .pkg-nav-prev { left: -14px; }
    .pkg-nav-next { right: -14px; }
}
.pkg-card .porig { font-size: 13px; color: var(--text-3); text-decoration: line-through; margin: 4px 0 0; }
@media (max-width: 768px) {
    .pkg-nav, .pkg-wrap.has-overflow .pkg-nav { display: none; }
    .pkg-card { flex-basis: 78vw; }
}
.pkg-card .tag {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
    font-size: 12px; font-weight: 600;
    padding: 4px 16px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.30);
}
.pkg-card .pname { font-size: 16px; font-weight: 700; color: var(--text-1); }
.pkg-card .pdesc { font-size: 13px; color: var(--text-2); margin: 8px 0 18px; }
.pkg-card .price { font-size: 36px; font-weight: 800; color: var(--text-1); line-height: 1.2; }
.pkg-card .price small { font-size: 14px; font-weight: 500; }
.pkg-card ul { list-style: none; text-align: left; font-size: 13px; color: var(--text-2); margin: 26px 0 22px; padding: 0; }
.pkg-card ul li { margin-bottom: 8px; padding-left: 22px; position: relative; line-height: 1.6; }
.pkg-card ul li::before {
    content: '✓'; position: absolute; left: 0; top: 0;
    color: var(--primary); font-weight: 800; font-size: 14px;
}

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; text-align: center; margin-top: 26px; }
.stat-card .sv {
    font-size: 30px; font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-card .sl { font-size: 14px; color: var(--text-2); margin-top: 8px; }

.about-hero { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.about-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 16px; color: var(--text-1); }
.about-hero p { font-size: 18px; color: var(--text-2); line-height: 1.8; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 30px; }
.about-card { padding: 24px 16px; text-align: center; }
.about-card .ac-icon {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-light); color: var(--brand);
}
.about-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: var(--text-1); }
.about-card p { font-size: 14px; color: var(--text-2); line-height: 1.8; margin: 0; }
.contact-wrap { max-width: 760px; margin: 0 auto; text-align: center; }
.contact-wrap h2 { font-size: 30px; font-weight: 800; color: var(--text-1); margin-bottom: 40px; font-family: Georgia, 'Songti SC', 'Times New Roman', serif; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; text-align: left; }
.contact-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-page); border: 1px solid var(--border-line); border-radius: 14px; padding: 24px;
}
.contact-card .cc-icon {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-light); color: var(--brand);
}
.contact-card .cc-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.contact-card .cc-value { font-size: 14px; color: var(--text-2); }

.site-footer { background: var(--card); padding: 50px 20px 0; border-top: 1px solid var(--border-line); }
.footer-inner {
    display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px;
    max-width: 1280px; margin: 0 auto; padding: 0;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .logo-mark {
    width: 36px; height: 36px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
    font-weight: 800; font-size: 15px;
}
.footer-brand .logo-text { font-size: 18px; font-weight: 600; color: var(--text-1); font-family: Georgia, 'Songti SC', 'Times New Roman', serif; }
.footer-desc { font-size: 14px; color: var(--text-2); line-height: 1.8; max-width: 448px; }
.footer-col h4 { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 16px; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-links li, .footer-contact li { margin-bottom: 10px; font-size: 14px; color: var(--text-2); }
.footer-links a { color: var(--text-2); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-contact li span { margin-right: 4px; }
.footer-bottom { margin-top: 40px; padding: 20px; text-align: center; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border-line); }
.footer-bottom .footer-icp a { color: var(--text-3); text-decoration: none; transition: color .2s; }
.footer-bottom .footer-icp a:hover { color: var(--primary); text-decoration: underline; }

@media (min-width: 769px) {
    .step-card:not(:last-child) .step-line { display: block; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .stat-card .sv { font-size: 36px; }
}

@media (max-width: 1024px) {
    .hero h1 .hero-sub { font-size: 38px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .header-inner { display: flex; justify-content: space-between; }
    .hero h1.hero-title { font-size: 38px; }
    .hero h1 .hero-sub { font-size: 30px; }
    .hero p.lead { font-size: 18px; }
    .hero-tag { font-size: 12px; }
    .page { padding: 0; }
    .band-hero { padding: 140px 0 56px; }
    .op-wrap, #section-profile { padding-top: 76px; padding-bottom: 56px; }
    .card { padding: 20px 18px; }
    .feature-grid.mode-cards { grid-template-columns: 1fr; gap: 12px; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .footer-desc { max-width: 100%; }
    .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .header-inner { display: flex; justify-content: space-between; }
    .hero h1.hero-title { font-size: 38px; }
    .hero h1 .hero-sub { font-size: 30px; }
    .hero p.lead { font-size: 18px; }
    .hero-tag { font-size: 12px; }
    .page { padding: 0; }
    .band-hero { padding: 140px 0 56px; }
    .op-wrap, #section-profile { padding-top: 76px; padding-bottom: 56px; }
    .card { padding: 20px 18px; }
    .feature-grid.mode-cards { grid-template-columns: 1fr; gap: 12px; }
    .feature-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .footer-desc { max-width: 100%; }
    .about-grid { grid-template-columns: 1fr; }
}

/* ---------- 左右双栏布局：左输入 + 右输出（标题生文 / 文章AI去重独立页） ---------- */
.op-wrap { max-width: 1500px; padding-top: 84px; padding-bottom: 24px; }
.op-wrap .card { margin-bottom: 0; }
.main-wrap { display: flex; gap: 22px; align-items: stretch; min-height: calc(100vh - 108px); }
.input-card { flex: 1 1 0; min-width: 0; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.output-card { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.output-card .output-head, .output-card .output-meta, .output-card .btn-actions, .output-card .deai-tip { flex: none; }
/* 文章AI去重页：原文输入框弹性撑满左卡 */
body[data-page="rewrite"] .input-card { display: flex; flex-direction: column; }
body[data-page="rewrite"] .input-card .tab-panel.active { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
body[data-page="rewrite"] .input-card .form-row { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
body[data-page="rewrite"] #rwContent { flex: 1 1 auto; min-height: 180px; }

/* Tab 切换（页内子 tab） */
.tabs {
    display: flex; gap: 8px;
    margin-bottom: 24px;
}
.tab {
    flex: 1; padding: 10px 0; font-size: 15px; font-weight: 600;
    color: var(--text-2); background: transparent; border: none; border-radius: 10px;
    cursor: pointer; transition: all 0.25s;
}
.tab:hover { color: var(--primary); }
.tab.active { color: #fff; background: var(--primary); box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.30); }
[data-theme="dark"] .tabs-mini { background: var(--card-2); border-color: var(--border-line); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 表单 */
.form-row { margin-bottom: 18px; }
.form-row > label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
.form-row .hint-text { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 8px; }
.form-row .form-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.form-row .form-label-row label { display: flex; align-items: center; margin: 0; }
.form-row .form-label-row .hint-text { margin-left: 8px; }
.btn-clear {
    flex: none; padding: 8px 20px; font-size: 14px; color: var(--text-2);
    background: transparent; border: 1px solid var(--border-line); border-radius: 8px;
    cursor: pointer; transition: color .2s, border-color .2s;
}
.btn-clear:hover { color: #e0483e; border-color: #e0483e; }
.form-row input[type='text'],
.form-row input[type='password'],
.form-row input[type='number'],
.form-row textarea,
.form-row select {
    width: 100%; padding: 12px 16px; font-size: 15px;
    border: 1px solid var(--border-line); border-radius: 8px;
    background: #ffffff; color: var(--text-1); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
[data-theme="dark"] .form-row input,
[data-theme="dark"] .form-row textarea,
[data-theme="dark"] .form-row select { border-color: var(--border-line); }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #ffffff;
}
[data-theme="dark"] .form-row input:focus,
[data-theme="dark"] .form-row textarea:focus,
[data-theme="dark"] .form-row select:focus { background: rgba(255,255,255,0.10); }
.form-row textarea { min-height: 180px; resize: vertical; font-family: inherit; }

/* 字数滑块 */
.word-count-group { display: flex; align-items: center; gap: 16px; }
.wc-range {
    -webkit-appearance: none; appearance: none;
    flex: 1; min-width: 0; height: 6px; border-radius: 999px;
    background: var(--primary); outline: none; cursor: pointer;
}
.wc-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    border: 3px solid var(--primary); box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.45);
    cursor: grab; transition: transform 0.15s;
}
.wc-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.wc-range::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    border: 3px solid var(--primary); box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.45); cursor: grab;
}
.wc-display {
    flex-shrink: 0; min-width: 108px; text-align: center; padding: 7px 14px; border-radius: 8px;
    background: #ffffff; border: 1px solid var(--border-line);
    font-size: 14px; font-weight: 600; color: var(--text-2);
    white-space: nowrap;
}
.wc-display span { color: var(--primary); font-variant-numeric: tabular-nums; }

/* 文章类型 */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.type-btn {
    padding: 13px 8px; font-size: 14px; font-weight: 600;
    border: 1px solid var(--border-line); border-radius: 8px;
    background: #ffffff; color: var(--text-2);
    cursor: pointer; text-align: center;
    transition: all 0.22s;
}
[data-theme="dark"] .type-btn { border-color: var(--border-line); }
.type-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.type-btn.active {
    background: var(--primary); color: #fff; border-color: transparent;
    box-shadow: 0 6px 14px rgba(var(--primary-rgb), 0.30);
}
.type-btn.active .pkg-price { color: #fff; }
.type-btn .mode-default-tag {
    display: inline-block;
    margin-left: 5px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    border-radius: 4px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    vertical-align: 1px;
}
.type-btn.active .mode-default-tag {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ---------- 处理模式（流水线）选择器 ---------- */
.pipeline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.pl-item {
    position: relative;
    padding: 8px 10px;
    border: 1px solid var(--border-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-1);
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: all 0.22s;
}
[data-theme="dark"] .pl-item { background: rgba(255,255,255,0.05); }
.pl-item:hover { border-color: var(--primary); transform: translateY(-1px); }
.pl-item.active {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.25);
}
.pl-item .pl-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.pl-item .pl-name .pl-default-tag {
    display: inline-block;
    margin-left: 5px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    border-radius: 4px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    vertical-align: 1px;
}
.pl-item.active .pl-name .pl-default-tag {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.pl-item .pl-steps {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-item.active .pl-steps { color: rgba(255,255,255,0.85); }

/* ===== 流式步骤进度条 ===== */
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-strip { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 0; margin-bottom: 0; }
.step-dot { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,0.03); color: var(--text-3); font-size: 12px; border: 1px solid transparent; transition: all .25s ease; }
[data-theme="dark"] .step-dot { background: rgba(255,255,255,0.05); }
.step-dot .step-idx { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,0.14); color: #fff; font-size: 10px; font-style: normal; line-height: 1; transition: all .25s; }
[data-theme="dark"] .step-dot .step-idx { background: rgba(255,255,255,0.2); }
.step-dot.active { color: var(--primary); border-color: var(--primary); background: rgba(var(--primary-rgb), 0.10); transform: translateY(-1px); }
.step-dot.active .step-idx { background: var(--primary); }
.step-dot.done { color: #16a34a; }
.step-dot.done .step-idx { background: #16a34a; font-size: 0; }
.step-dot.done .step-idx::after { content: '✓'; font-size: 10px; }
.step-line { width: 18px; height: 1px; background: var(--border-line); transition: background .25s; }
.step-line.done { background: #16a34a; }

/* ===== 状态条完结 / 失败动画 ===== */
.status-check, .status-cross { display: none; align-items: center; justify-content: center; font-weight: 700; }
.output-status { align-items: center; gap: 8px; }
.output-status .spinner { flex: none; }
.output-status.done .spinner,
.output-status.failed .spinner { display: none; }
.output-status.done .status-check { display: inline-flex; color: #16a34a; animation: checkPop .4s ease-out; }
.output-status.failed .status-cross { display: inline-flex; color: #dc2626; }
.output-status.done { color: #16a34a; background: rgba(22,163,74,0.07); border-radius: 8px; border-color: rgba(22,163,74,0.4); animation: cardPulse .8s ease-out; }
.output-status.failed { color: #dc2626; background: rgba(220,38,38,0.07); border-radius: 8px; border-color: rgba(220,38,38,0.4); animation: shakeX .5s; }

@keyframes checkPop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.3); } 100% { transform: scale(1); opacity: 1; } }
@keyframes cardPulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.45); } 100% { box-shadow: 0 0 0 16px rgba(22,163,74,0); } }
@keyframes shakeX { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

.pkg-chars { display: block; font-size: 12px; font-weight: 400; margin-top: 2px; opacity: 0.85; }
.pkg-price { display: block; font-size: 16px; font-weight: 700; color: #e0483e; margin-top: 4px; }
[data-theme="dark"] .pkg-price { color: #ff8a8a; }

.char-stat { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11px; color: var(--text-2); }
.char-stat .count { color: var(--primary); font-weight: 700; }
.char-stat .warn { color: #e0483e; font-weight: 600; }

.btn-submit #genCost { font-weight: 600; }
.btn-submit {
    display: block; width: 100%; padding: 15px; font-size: 16px; font-weight: 700; color: #fff;
    background: var(--primary); border: none; border-radius: 8px;
    cursor: pointer; transition: all 0.22s; box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.30);
}
.btn-submit:hover:not(:disabled) { background: var(--primary-deep); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.40); }
.btn-submit:disabled { background: #c2c9d6; cursor: not-allowed; box-shadow: none; transform: none; }
[data-theme="dark"] .btn-submit:disabled { background: #3a4254; }

/* 流式输出 */
.output-card.show { animation: pageIn .35s ease both; }
.output-empty {
    flex: 1 1 auto; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; color: var(--text-3); font-size: 14px; text-align: center; padding: 30px;
}
.output-empty .empty-title { font-size: 15px; color: var(--text-2); font-weight: 600; }
.output-status { font-size: 13px; color: var(--text-2); margin-bottom: 12px; display: none; align-items: center; gap: 8px; }
.spinner {
    display: inline-block; width: 15px; height: 15px;
    border: 2px solid rgba(245, 158, 11, 0.2); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
[data-theme="dark"] .spinner { border-color: rgba(255,255,255,0.25); }
@keyframes spin { to { transform: rotate(360deg); } }
.output-text {
    flex: 1 1 auto; min-height: 0; max-height: none; display: none; overflow-y: auto; padding: 20px;
    background: #ffffff; border: 1px solid var(--border-line); border-radius: 10px;
    font-size: 15px; line-height: 1.9; white-space: pre-wrap; word-break: break-word;
}
.deai-tip {
    position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 999;
    display: flex; align-items: center; gap: 8px; padding: 10px 18px;
    background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); color: var(--text-1); font-size: 13px;
    animation: deai-tip-in .3s ease both;
}
.deai-tip.hidden { display: none; }
@keyframes deai-tip-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.output-meta { margin-top: 12px; font-size: 12px; color: var(--text-3); display: flex; gap: 16px; flex-wrap: wrap; }
.btn-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-secondary {
    padding: 9px 20px; font-size: 14px; font-weight: 600; color: var(--primary);
    background: #ffffff; border: 1px solid rgba(var(--primary-rgb), 0.4); border-radius: 8px;
    cursor: pointer; transition: all 0.22s;
}
.btn-secondary:hover { background: var(--primary-soft); border-color: var(--primary); transform: translateY(-1px); }
[data-theme="dark"] .btn-secondary { background: var(--card-2); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }

/* 模态弹窗 */
.modal-mask {
    position: fixed; inset: 0; background: rgba(30, 36, 51, 0.35);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center; z-index: 999;
}
.modal-mask.show { display: flex; }
.modal {
    background: var(--glass-strong); backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 20px; padding: 30px;
    width: 92%; max-width: 420px; max-height: calc(100vh - 48px); overflow-y: auto;
    box-shadow: 0 24px 70px rgba(30, 36, 51, 0.3); animation: popIn 0.25s ease;
}
[data-theme="dark"] .modal { border-color: var(--border-line); }
@keyframes popIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 19px; color: var(--text-1); margin-bottom: 12px; font-weight: 700; }
.modal p { font-size: 14px; color: var(--text-2); margin-bottom: 18px; line-height: 1.7; }
.modal .form-row { margin-bottom: 14px; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 16px; }
.modal .btn-primary {
    flex: 1; padding: 12px; font-size: 15px; font-weight: 700; color: #fff;
    background: var(--primary); border: none; border-radius: 8px;
    cursor: pointer; transition: all 0.22s;
}
.modal .btn-primary:hover { background: var(--primary-deep); transform: translateY(-1px); }
.modal .btn-cancel {
    flex: 1; padding: 12px; font-size: 15px; font-weight: 600; color: var(--text-2);
    background: var(--surface); border: none; border-radius: 12px; cursor: pointer; transition: all 0.22s;
}
.modal .btn-cancel:hover { background: var(--surface-2); }
.modal .divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: #94a3b8; font-size: 12px; }
.modal .divider::before, .modal .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-line); }
.modal .btn-wechat {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px;
    font-size: 15px; font-weight: 600; color: #07c160; background: #f6fff9; border: 1px solid #b9f3d3;
    border-radius: 12px; cursor: pointer; transition: all 0.22s;
}
.modal .btn-wechat:hover { background: #eafff3; transform: translateY(-1px); }
.modal .btn-wechat:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.modal #authWechatView { display: flex; flex-direction: column; }
.modal .wechat-login-box {
    flex: 1; min-height: 330px; margin-top: 4px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-radius: 12px;
}
.modal .tabs-mini {
    display: flex; gap: 4px; margin-bottom: 16px; background: #f3f4f6;
    border: 1px solid var(--border-line); border-radius: 10px; padding: 4px;
}
.modal .tabs-mini button {
    flex: 1; padding: 8px; font-size: 14px; font-weight: 600; border: none; border-radius: 8px;
    background: transparent; color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.modal .tabs-mini button.active { background: var(--primary); color: #fff; }

.msg-line { font-size: 13px; margin-top: 8px; min-height: 18px; }
.msg-line.error { color: #e0483e; }
.msg-line.ok { color: #16a34a; }
[data-theme="dark"] .msg-line.ok { color: #4ade80; }

/* 历史抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(30, 36, 51, 0.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: none; z-index: 998; }
.drawer-mask.show { display: block; }
.drawer {
    position: fixed; top: 0; right: -540px; width: 92%; max-width: 500px; height: 100vh;
    background: var(--glass-strong); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-left: 1px solid rgba(255, 255, 255, 0.9); box-shadow: -12px 0 40px rgba(30, 36, 51, 0.18);
    transition: right 0.28s ease; z-index: 999; overflow-y: auto; padding: 26px 24px;
}
[data-theme="dark"] .drawer { border-color: var(--border-line); }
.drawer.show { right: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(226, 232, 240, 0.9); }
[data-theme="dark"] .drawer-head { border-color: var(--border-line); }
.drawer-head h3 { font-size: 18px; color: var(--text-1); }

/* 历史详情卡片化 */
.ld-meta { background: var(--bg-page); border: 1px solid var(--border-line); border-radius: 12px; padding: 4px 16px; margin-bottom: 16px; }
.ld-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--border-line); font-size: 14px; }
.ld-meta-row:last-child { border-bottom: none; }
.ld-meta-row > span { color: var(--text-3); flex-shrink: 0; }
.ld-meta-row > strong { color: var(--text-1); font-weight: 600; word-break: break-all; text-align: right; }
.ld-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ld-ok { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.ld-fail { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.ld-pending { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.ld-section { margin-bottom: 16px; }
.ld-section-title { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.ld-text { background: var(--bg-page); border: 1px solid var(--border-line); border-radius: 12px; padding: 16px; white-space: pre-wrap; line-height: 1.85; font-size: 14px; color: var(--text-1); max-height: 46vh; overflow-y: auto; }
.ld-actions { margin-top: 10px; text-align: right; }
.ld-step { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border-line); border-radius: 12px; margin-bottom: 10px; background: var(--bg-page); }
.ld-step-ic { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.ld-step-body { min-width: 0; }
.ld-step-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.ld-step-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.ld-fail-text { color: #dc2626; }
.history-item {
    padding: 14px 16px; border: 1px solid var(--surface-strong); border-radius: 14px; margin-bottom: 10px;
    background: var(--surface); cursor: pointer; transition: all 0.22s;
}
.history-item:hover { background: var(--surface-2); transform: translateX(2px); box-shadow: 0 8px 18px rgba(58, 80, 150, 0.12); }
[data-theme="dark"] .history-item:hover { box-shadow: 0 8px 18px rgba(0,0,0,0.3); }
.history-item .title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.history-item .meta { font-size: 12px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.history-item .meta .badge { background: var(--primary-soft); color: var(--primary); padding: 1px 7px; border-radius: 4px; }

/* 历史记录独立页 */
.history-wrap { max-width: 1200px; margin: 0 auto; padding: 84px 20px 64px; display: flex; flex-direction: column; min-height: 100vh; }
.history-tabs { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.h-tab { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border-line); background: var(--card); color: var(--text-2); cursor: pointer; font-size: 14px; transition: all .2s; }
.h-tab:hover { border-color: var(--primary); color: var(--primary); }
.h-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.history-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; flex: 1 1 auto; }
.history-card { background: var(--card); border: 1px solid var(--border-line); border-radius: 14px; padding: 14px; cursor: pointer; transition: all .22s; min-width: 0; height: 220px; display: flex; flex-direction: column; overflow: hidden; }
.history-card:hover { box-shadow: 0 8px 22px rgba(30,36,51,.10); transform: translateY(-2px); border-color: var(--primary-soft); }
[data-theme="dark"] .history-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.hc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.hc-chain { font-size: 13px; color: var(--primary-deep); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hc-input { font-size: 13px; color: var(--text-2); background: var(--bg-page); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-output { font-size: 13px; color: var(--text-1); background: var(--card-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-label { display: inline-block; font-size: 11px; color: var(--text-3); margin-right: 6px; font-weight: 700; }
.hc-foot { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-3); margin-top: auto; }
.hc-consumed { color: var(--accent); font-weight: 600; }
.hc-view { margin-left: auto; color: var(--primary); font-weight: 600; }
.history-empty, .history-loading, .history-login-tip { text-align: center; color: var(--text-3); padding: 40px 0; }
.history-login-tip { color: var(--text-2); }
.history-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 20px 0 2px; }
.hp-btn { padding: 6px 16px; border-radius: 8px; border: 1px solid var(--border-line); background: var(--card); color: var(--text-1); cursor: pointer; font-size: 13px; transition: all .2s; }
.hp-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.hp-btn:disabled { opacity: .5; cursor: not-allowed; }
.hp-info { font-size: 13px; color: var(--text-3); }
.hp-jump { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.hp-input { width: 56px; padding: 5px 8px; border: 1px solid var(--border-line); border-radius: 8px; background: var(--card); color: var(--text-1); font-size: 13px; text-align: center; }
.hp-input:focus { outline: none; border-color: var(--primary); }
.hp-btn-jump { padding: 5px 12px; }

/* 历史详情中间弹窗 */
.log-modal { max-width: 640px; padding: 0; }
.log-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border-line); }
.log-modal-head h3 { font-size: 18px; color: var(--text-1); margin: 0; font-weight: 700; }
.modal-close { flex-shrink: 0; width: 32px; height: 32px; border: none; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 16px; line-height: 1; cursor: pointer; transition: all .2s; }
.modal-close:hover { background: var(--primary-soft); color: var(--primary); }
.log-modal #logModalContent { padding: 20px 24px 24px; }
.log-modal .ld-text { max-height: 34vh; }

.hidden { display: none !important; }

/* 个人中心 */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.profile-card { background: #ffffff; border: 1px solid var(--border-line); border-radius: 10px; padding: 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.profile-card h3 { font-size: 16px; margin-bottom: 12px; }
.profile-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border-line); }
.profile-row:last-child { border-bottom: none; }
.profile-row .v { color: var(--primary); font-weight: 700; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* 登录记录弹窗 */
#loginLogsBox .log-loading,
#loginLogsBox .log-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 24px 0; }
#loginLogsBox .log-row { padding: 10px 0; border-bottom: 1px dashed var(--border-line); }
#loginLogsBox .log-row:last-child { border-bottom: none; }
#loginLogsBox .log-main { display: flex; align-items: center; gap: 8px; }
#loginLogsBox .log-label { font-size: 14px; color: var(--text-1); font-weight: 700; }
#loginLogsBox .log-badge { font-size: 12px; padding: 1px 8px; border-radius: 999px; }
#loginLogsBox .log-badge-ok { color: #16a34a; background: rgba(22, 163, 74, 0.12); }
#loginLogsBox .log-badge-fail { color: #e0483e; background: rgba(224, 72, 62, 0.12); }
#loginLogsBox .log-reason { font-size: 12px; color: #e0483e; margin-top: 2px; }
#loginLogsBox .log-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 响应式 */
@media (max-width: 1024px) {
    .main-wrap { flex-direction: column; align-items: stretch; }
    .input-card { flex: 1 1 auto; position: static; max-height: none; overflow: visible; }
    .output-card { max-height: none; }
    body[data-page="rewrite"] #rwContent { min-height: 300px; }
    .history-wrap { padding-top: 76px; }
    .history-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .header .brand { font-size: 22px; }
    .history-wrap { padding-top: 76px; }
    .history-list { grid-template-columns: 1fr; }
}

/* ---------- 毛玻璃开关（主题子菜单内，默认关闭=实色卡片，开启=毛玻璃） ---------- */
[data-glass="on"] {
    --card: rgba(255, 255, 255, 0.72);
    --card-2: rgba(255, 255, 255, 0.52);
}
[data-glass="on"][data-theme="dark"] {
    --card: rgba(30, 38, 56, 0.62);
    --card-2: rgba(40, 48, 66, 0.50);
}
[data-glass="on"] .feature-card,
[data-glass="on"] .step-card,
[data-glass="on"] .pkg-card,
[data-glass="on"] .stat-card,
[data-glass="on"] .about-card,
[data-glass="on"] .card,
[data-glass="on"] .profile-card,
[data-glass="on"] .site-header {
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

/* 主题菜单内的「质感 / 毛玻璃」开关 */
.theme-divider { height: 1px; background: var(--border-line); margin: 6px 4px; }
.glass-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; font-size: 14px; color: var(--text-1);
}
.glass-switch {
    position: relative; width: 42px; height: 24px; border: none; border-radius: 999px;
    background: #d1d5db; cursor: pointer; transition: background 0.25s; flex-shrink: 0;
}
.glass-switch.on { background: var(--primary); }
.glass-switch .knob {
    position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: left 0.25s;
}
.glass-switch.on .knob { left: 21px; }

/* ---------- 深色模式适配（覆盖硬编码浅色表面） ---------- */
[data-theme="dark"] .site-header { background: rgba(15, 20, 32, 0.92); border-color: var(--border-line); }
[data-theme="dark"] .nav { background: transparent; border-color: transparent; }
[data-theme="dark"] .nav-item:hover { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .theme-btn { background: var(--card-2); border-color: var(--border-line); }
[data-theme="dark"] .balance-pill { background: var(--card-2); border-color: var(--border-line); }
[data-theme="dark"] .feature-card,
[data-theme="dark"] .step-card,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .profile-card { background: var(--card); border-color: var(--border-line); }
[data-theme="dark"] .reason-grid .feature-card { background: var(--card-2); }
[data-theme="dark"] .hero-tag { background: var(--primary-soft); }
[data-theme="dark"] .hero h1 { color: var(--text-1); }
