/* ============================================================
   全网去水印系统 —— 前台主题样式
   设计取向：浅色、干净、高对比，移动端优先
   ============================================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #eef2ff;
    --violet: #8b5cf6;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-soft: #f1f5f9;
    --bg: #f8fafc;
    --white: #ffffff;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
    --shadow: 0 6px 24px rgba(15, 23, 42, .07);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, .1);
    --shadow-primary: 0 10px 30px rgba(99, 102, 241, .28);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--violet); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ------------------------------------------------------------
   顶部导航
   ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.site-header .inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 17px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
    padding: 8px 14px; border-radius: 9px; font-size: 14.5px;
    color: var(--text-soft); font-weight: 500;
}
.site-nav a:hover { background: var(--primary-light); color: var(--primary-dark); }
.site-nav a.active { color: var(--primary-dark); background: var(--primary-light); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }

/* ------------------------------------------------------------
   按钮
   ------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 20px; border-radius: 10px;
    border: 1px solid transparent; cursor: pointer;
    font-size: 14.5px; font-weight: 600; font-family: inherit;
    line-height: 1.4; text-align: center; white-space: nowrap;
    transition: all .16s ease; text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(99, 102, 241, .34); color: #fff; }
.btn-outline { background: var(--white); border-color: var(--border); color: var(--text-soft); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-dark); }
.btn-ghost { background: var(--primary-light); color: var(--primary-dark); }
.btn-ghost:hover:not(:disabled) { background: #e0e7ff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------
   Hero 与解析框
   ------------------------------------------------------------ */
.hero {
    position: relative;
    padding: 60px 0 54px;
    background:
        radial-gradient(1000px 420px at 12% -10%, rgba(99, 102, 241, .16), transparent 62%),
        radial-gradient(820px 380px at 88% 0%, rgba(168, 85, 247, .14), transparent 60%),
        var(--white);
    border-bottom: 1px solid var(--border-soft);
    overflow: hidden;
}
.hero h1 { font-size: 40px; margin-bottom: 14px; }
.hero h1 .grad {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .lead { font-size: 16.5px; color: var(--text-soft); max-width: 620px; margin: 0 auto 30px; }

.parse-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-soft);
    padding: 22px;
    max-width: 780px;
    margin: 0 auto;
}
.parse-input-wrap { position: relative; }
.parse-input {
    width: 100%;
    min-height: 96px;
    padding: 15px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    resize: vertical;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
    line-height: 1.6;
}
.parse-input::placeholder { color: var(--text-muted); }
.parse-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, .1); }
.parse-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.parse-actions .spacer { flex: 1; }
.parse-hint { font-size: 13px; color: var(--text-muted); }

.parse-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--text-soft);
    background: var(--border-soft); padding: 4px 11px; border-radius: 20px;
}

/* 解析中状态 */
.parse-loading { text-align: center; padding: 40px 20px; }
.spinner {
    width: 42px; height: 42px; margin: 0 auto 16px;
    border: 3.5px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: sy-spin .8s linear infinite;
}
@keyframes sy-spin { to { transform: rotate(360deg); } }
.parse-loading p { color: var(--text-soft); font-size: 14.5px; margin: 0; }

/* 解析特效：双环轨道旋转 + 脉冲核心（2026-10-03 第五轮） */
.parse-orbit {
    position: relative;
    width: 68px; height: 68px;
    margin: 0 auto 16px;
}
.orbit-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 3px solid var(--primary-light, rgba(99, 102, 241, .18));
    border-top-color: var(--primary);
    animation: sy-spin .9s linear infinite;
}
.orbit-ring--inner {
    inset: 9px;
    border-width: 2px;
    border-top-color: transparent;
    border-left-color: var(--primary);
    border-right-color: transparent;
    border-bottom-color: transparent;
    animation-duration: .6s;
    animation-direction: reverse;
    opacity: .75;
}
.orbit-core {
    position: absolute; left: 50%; top: 50%;
    width: 12px; height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--primary);
    animation: sy-pulse 1.2s ease-in-out infinite;
}
@keyframes sy-pulse {
    0%, 100% { transform: scale(.65); opacity: .45; }
    50%      { transform: scale(1.15); opacity: 1; }
}
.parse-loading-title { color: var(--text); font-weight: 600; font-size: 15.5px; margin: 0 0 6px !important; }
.parse-loading-tip { color: var(--primary) !important; font-size: 13.5px; min-height: 19px; margin: 0 0 4px !important; transition: opacity .3s; }
.parse-loading-sub { color: var(--text-muted) !important; font-size: 12.5px; margin: 0 !important; }

@media (prefers-reduced-motion: reduce) {
    .orbit-ring, .orbit-ring--inner, .orbit-core, .spinner { animation-duration: 3s; }
}

/* ------------------------------------------------------------
   解析结果
   ------------------------------------------------------------ */
.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    max-width: 860px;
    margin: 26px auto 0;
}
.result-head {
    display: flex; gap: 18px; padding: 22px;
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(180deg, #fbfcff, #fff);
}
.result-cover {
    width: 132px; height: 132px; flex-shrink: 0;
    border-radius: var(--radius); overflow: hidden;
    background: var(--border-soft);
    position: relative;
}
.result-cover img { width: 100%; height: 100%; object-fit: cover; }
.result-meta { flex: 1; min-width: 0; }
.result-title { font-size: 16.5px; font-weight: 600; margin: 0 0 8px; line-height: 1.45; word-break: break-word; }
.result-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; padding: 3px 9px; border-radius: 6px;
    background: var(--border-soft); color: var(--text-soft);
}
.tag-primary { background: var(--primary-light); color: var(--primary-dark); }
.tag-success { background: #d1fae5; color: #047857; }
.tag-warning { background: #fef3c7; color: #b45309; }
.result-author { font-size: 13.5px; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.result-author img { width: 22px; height: 22px; border-radius: 50%; }

/* 作品描述与话题标签 */
.result-desc { padding: 14px 22px 4px; border-top: 1px solid var(--border-soft); }
.result-desc .desc-text {
    margin: 0 0 10px; font-size: 13.5px; line-height: 1.7;
    color: var(--text-soft); white-space: pre-wrap; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.topic-chip {
    display: inline-block; font-size: 12.5px; line-height: 1;
    padding: 5px 10px; border-radius: 999px;
    background: var(--primary-light); color: var(--primary-dark);
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* API 文档页 */
.api-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.api-table th, .api-table td {
    text-align: left; padding: 9px 12px;
    border-bottom: 1px solid var(--border-soft); vertical-align: top;
}
.api-table th { color: var(--text-soft); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.api-table code, .api-body code {
    font-family: Consolas, Monaco, monospace; font-size: 12.5px;
    background: var(--border-soft); padding: 2px 6px; border-radius: 5px;
}
.api-code {
    margin: 10px 0 0; padding: 14px 16px;
    background: var(--border-soft); border-radius: 10px;
    font-family: Consolas, Monaco, monospace; font-size: 12.5px; line-height: 1.7;
    overflow-x: auto; white-space: pre; color: var(--text);
}

.quality-list { padding: 8px 0; }
.quality-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border-soft);
    transition: background .15s;
}
.quality-item:last-child { border-bottom: 0; }
.quality-item:hover { background: #fafbff; }
.quality-icon {
    width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
    background: var(--primary-light); color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.quality-icon.is-origin { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.quality-info { flex: 1; min-width: 0; }
.quality-name { font-weight: 600; font-size: 14.5px; margin-bottom: 2px; }
.quality-desc { font-size: 12.5px; color: var(--text-muted); }

.image-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px; padding: 20px;
}
.image-item {
    position: relative; border-radius: var(--radius-sm); overflow: hidden;
    background: var(--border-soft); aspect-ratio: 1;
}
.image-item img { width: 100%; height: 100%; object-fit: cover; }
.image-item .overlay {
    position: absolute; inset: auto 0 0 0;
    padding: 20px 8px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .68));
    display: flex; gap: 6px; justify-content: center;
    opacity: 0; transition: opacity .18s;
}
.image-item:hover .overlay { opacity: 1; }
.image-item .overlay .btn { padding: 5px 10px; font-size: 12px; }

/* ------------------------------------------------------------
   支持平台
   ------------------------------------------------------------ */
.section { padding: 52px 0; }
.section-alt { background: var(--white); }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--text-soft); margin: 0; }

.platform-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
}
.platform-item {
    background: var(--white); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 18px 14px; text-align: center;
    transition: all .18s;
}
.platform-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border); }
.platform-dot {
    width: 44px; height: 44px; border-radius: 13px; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 15px;
    line-height: 1; overflow: hidden; flex: 0 0 auto;
}
/* 平台图标为本地 SVG：统一尺寸并锁死纵横比，避免被拉伸或撑破圆角 */
.platform-dot img,
.platform-dot svg {
    width: 25px; height: 25px; display: block;
    object-fit: contain; max-width: 100%; max-height: 100%;
    pointer-events: none;
}
/* 兼容字体图标写法的插件（layui-icon-xxx） */
.platform-dot .layui-icon { font-size: 21px; line-height: 1; }
/* 既没有图片也没有字体图标时，退化为平台名首字 */
.platform-dot span { font-size: 15px; }
.platform-name { font-size: 14px; font-weight: 600; }
.platform-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ------------------------------------------------------------
   功能特性
   ------------------------------------------------------------ */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature-item {
    background: var(--white); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 26px 22px;
}
.feature-item .ico {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--primary-light); color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; font-size: 20px;
}
.feature-item h3 { font-size: 16px; margin-bottom: 7px; }
.feature-item p { color: var(--text-soft); font-size: 14px; margin: 0; }

/* ------------------------------------------------------------
   统计数据
   ------------------------------------------------------------ */
.stats-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px; margin-top: 30px;
}
.stat-item { text-align: center; }
.stat-num {
    font-size: 30px; font-weight: 800; letter-spacing: -.02em;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ------------------------------------------------------------
   套餐卡片
   ------------------------------------------------------------ */
.plan-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 20px; align-items: stretch;
}
.plan-card {
    position: relative;
    background: var(--white); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 24px;
    display: flex; flex-direction: column;
    transition: all .2s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.plan-card.is-recommend { border-color: var(--primary); box-shadow: var(--shadow-primary); }
.plan-flag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--gradient); color: #fff;
    font-size: 12px; font-weight: 600; padding: 4px 14px; border-radius: 20px;
    white-space: nowrap;
}
.plan-title { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.plan-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; min-height: 20px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.plan-price .now { font-size: 32px; font-weight: 800; color: var(--primary-dark); letter-spacing: -.02em; }
.plan-price .unit { font-size: 13px; color: var(--text-muted); }
.plan-price .was { font-size: 13.5px; color: var(--text-muted); text-decoration: line-through; }
.plan-saving { font-size: 12.5px; color: var(--success); font-weight: 600; margin-bottom: 16px; }
.plan-benefits { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.plan-benefits li {
    font-size: 13.5px; color: var(--text-soft);
    padding: 6px 0 6px 24px; position: relative;
}
.plan-benefits li::before {
    content: "✓"; position: absolute; left: 0; top: 6px;
    color: var(--success); font-weight: 700;
}

/* ------------------------------------------------------------
   页面标题区
   ------------------------------------------------------------ */
.page-head {
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
    padding: 34px 0 28px;
}
.page-head h1 { font-size: 24px; margin: 0 0 6px; }
.page-head p { color: var(--text-soft); margin: 0; font-size: 14px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ------------------------------------------------------------
   卡片与表单
   ------------------------------------------------------------ */
.card {
    background: var(--white); border: 1px solid var(--border-soft);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-head {
    padding: 18px 22px; border-bottom: 1px solid var(--border-soft);
    display: flex; align-items: center; gap: 12px;
}
.card-head h3 { margin: 0; font-size: 16px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 22px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.form-group label .req { color: var(--danger); margin-left: 2px; }
.form-control {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 14.5px; font-family: inherit; color: var(--text);
    outline: none; transition: border-color .16s, box-shadow .16s;
    background: var(--white);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, .1); }
.form-control:disabled { background: var(--border-soft); color: var(--text-muted); }
textarea.form-control { min-height: 90px; resize: vertical; line-height: 1.6; }
.form-hint { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 0; }
.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }

.auth-wrap { max-width: 420px; margin: 0 auto; }
.auth-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 34px 30px; }
.auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: 13.5px; margin-bottom: 26px; }
.auth-foot { text-align: center; font-size: 13.5px; color: var(--text-muted); margin-top: 20px; }

/* ------------------------------------------------------------
   用户中心布局
   ------------------------------------------------------------ */
.uc-layout { display: grid; grid-template-columns: 236px 1fr; gap: 24px; padding: 28px 0 56px; align-items: start; }
.uc-side { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; position: sticky; top: 84px; }
.uc-user { padding: 22px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.uc-avatar {
    width: 54px; height: 54px; border-radius: 50%; margin-bottom: 12px;
    background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center;
    font-size: 21px; font-weight: 700; overflow: hidden;
}
.uc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.uc-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.uc-badge {
    display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 20px;
    background: rgba(255, 255, 255, .22); font-weight: 600;
}
.uc-menu { list-style: none; margin: 0; padding: 8px; }
.uc-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 13px; border-radius: 9px; font-size: 14px;
    color: var(--text-soft); font-weight: 500;
}
.uc-menu a:hover { background: var(--border-soft); color: var(--text); }
.uc-menu a.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }

/* 概览统计 */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.overview-item { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px; }
.overview-item .num { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.overview-item .lbl { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ------------------------------------------------------------
   列表与表格
   ------------------------------------------------------------ */
.sy-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sy-table th {
    text-align: left; padding: 12px 14px; font-weight: 600; font-size: 13px;
    color: var(--text-soft); background: #fbfcfe;
    border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
.sy-table td { padding: 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.sy-table tr:last-child td { border-bottom: 0; }
.sy-table tbody tr:hover { background: #fafbff; }

.list-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.list-item:last-child { border-bottom: 0; }
.list-thumb {
    width: 74px; height: 74px; border-radius: 10px; overflow: hidden;
    flex-shrink: 0; background: var(--border-soft);
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-body { flex: 1; min-width: 0; }
.list-title { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; word-break: break-word; }
.list-meta { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

.badge {
    display: inline-block; font-size: 12px; font-weight: 600;
    padding: 2px 9px; border-radius: 6px; line-height: 1.6;
}
.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-muted { background: var(--border-soft); color: var(--text-muted); }

.empty {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty .ico { font-size: 42px; margin-bottom: 12px; opacity: .35; }
.empty p { margin: 0; font-size: 14px; }

/* ------------------------------------------------------------
   分页
   ------------------------------------------------------------ */
.sy-pager { margin-top: 26px; }
.sy-pager ul { list-style: none; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0; padding: 0; }
.sy-pager a, .sy-pager span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 11px;
    border: 1px solid var(--border); border-radius: 9px;
    font-size: 13.5px; color: var(--text-soft); background: var(--white);
}
.sy-pager a:hover { border-color: var(--primary); color: var(--primary-dark); }
.sy-pager .active a { background: var(--gradient); border-color: transparent; color: #fff; font-weight: 600; }
.sy-pager .disabled span { color: var(--text-muted); background: var(--bg); }

/* ------------------------------------------------------------
   收银台
   ------------------------------------------------------------ */
.pay-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 28px 0 56px; align-items: start; }
.order-summary { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; }
.order-amount { text-align: center; padding: 18px 0 22px; border-bottom: 1px dashed var(--border); margin-bottom: 20px; }
.order-amount .num { font-size: 38px; font-weight: 800; color: var(--danger); letter-spacing: -.02em; }
.order-amount .num small { font-size: 18px; font-weight: 600; }
.order-amount .lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.order-info { font-size: 13.5px; }
.order-info .row { display: flex; justify-content: space-between; padding: 8px 0; }
.order-info .row .k { color: var(--text-muted); }
.order-info .row .v { color: var(--text); font-weight: 500; text-align: right; max-width: 62%; word-break: break-all; }

.channel-list { display: flex; flex-direction: column; gap: 11px; }
.channel-item {
    display: flex; align-items: center; gap: 13px;
    padding: 15px 17px; border: 1.5px solid var(--border);
    border-radius: var(--radius); background: var(--white); cursor: pointer;
    transition: all .16s;
}
.channel-item:hover { border-color: var(--primary); background: #fafbff; }
.channel-item.active { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(99, 102, 241, .1); }
.channel-item input { display: none; }
.channel-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 17px; font-weight: 700;
}
.channel-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.channel-text { flex: 1; min-width: 0; }
.channel-name { font-size: 14.5px; font-weight: 600; }
.channel-desc { font-size: 12.5px; color: var(--text-muted); }
.channel-check {
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border);
    flex-shrink: 0; position: relative; transition: all .16s;
}
.channel-item.active .channel-check { border-color: var(--primary); background: var(--primary); }
.channel-item.active .channel-check::after {
    content: ""; position: absolute; left: 5px; top: 1.5px;
    width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.countdown { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 14px; }
.countdown b { color: var(--danger); font-weight: 600; }

/* 扫码支付 */
.qr-panel { text-align: center; padding: 26px 20px; }
.qr-box {
    width: 210px; height: 210px; margin: 0 auto 18px;
    border: 1px solid var(--border); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    background: var(--white); overflow: hidden; padding: 10px;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-tip { font-size: 14px; color: var(--text-soft); }
.qr-tip b { color: var(--primary-dark); }

/* ------------------------------------------------------------
   支付结果
   ------------------------------------------------------------ */
.result-panel { text-align: center; padding: 48px 24px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); max-width: 560px; margin: 36px auto; }
.result-icon {
    width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: #fff;
}
.result-icon.ok { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 10px 28px rgba(16, 185, 129, .32); }
.result-icon.wait { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 10px 28px rgba(245, 158, 11, .3); }
.result-icon.fail { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 10px 28px rgba(239, 68, 68, .3); }
.result-panel h2 { font-size: 21px; margin-bottom: 8px; }
.result-panel .desc { color: var(--text-soft); font-size: 14.5px; margin-bottom: 20px; }
.result-detail {
    background: var(--bg); border-radius: var(--radius); padding: 16px 20px;
    text-align: left; margin: 20px 0; font-size: 13.5px;
}
.result-detail .row { display: flex; justify-content: space-between; padding: 6px 0; gap: 12px; }
.result-detail .row .k { color: var(--text-muted); flex-shrink: 0; }
.result-detail .row .v { color: var(--text); font-weight: 500; text-align: right; word-break: break-all; }

/* ------------------------------------------------------------
   提示条 / 弹层
   ------------------------------------------------------------ */
.toast-wrap { position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 9px; align-items: center; pointer-events: none; }
.toast {
    background: var(--white); border-radius: 11px; padding: 12px 20px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft);
    font-size: 14px; display: flex; align-items: center; gap: 9px;
    animation: sy-toast-in .22s ease; max-width: 92vw;
}
@keyframes sy-toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ------------------------------------------------------------
   批量解析队列
   ------------------------------------------------------------ */
.batch-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid var(--border-soft);
    padding: 18px 22px 20px; margin-bottom: 18px;
}
.batch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.batch-title { font-size: 15.5px; font-weight: 600; color: var(--text); }
.batch-title span { color: var(--primary); font-variant-numeric: tabular-nums; }
.batch-progress {
    height: 7px; border-radius: 99px; background: var(--border-soft);
    margin: 13px 0 9px; overflow: hidden;
}
.batch-bar {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width .35s ease;
}
.batch-summary { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.batch-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.batch-item {
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    overflow: hidden; background: var(--bg, transparent);
}
.batch-item.is-running { border-color: var(--primary); }
.batch-item.is-ok .batch-status { color: var(--success); }
.batch-item.is-fail { border-color: var(--danger); }
.batch-item.is-fail .batch-status { color: var(--danger); }
.batch-item.is-skip { opacity: .55; }
.batch-item-head {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; font-size: 13px;
}
.batch-idx {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--border-soft); color: var(--text-soft);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
}
.is-running .batch-idx { background: var(--primary); color: #fff; }
.is-ok .batch-idx { background: var(--success); color: #fff; }
.is-fail .batch-idx { background: var(--danger); color: #fff; }
.batch-url {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; color: var(--text-soft); font-size: 12.5px;
    font-family: SFMono-Regular, Consolas, monospace;
}
.batch-status { flex-shrink: 0; font-weight: 600; color: var(--text-muted); font-size: 12.5px; }
.is-running .batch-status { color: var(--primary); }
.batch-item-body { border-top: 1px solid var(--border-soft); }
.batch-item-body .result-card { border: 0; box-shadow: none; border-radius: 0; }
.batch-item-error {
    padding: 12px 14px; font-size: 13px; color: var(--danger);
    background: rgba(239, 68, 68, .06);
}
.batch-done-tip {
    margin-top: 14px; padding: 10px 14px; border-radius: var(--radius);
    background: var(--border-soft); font-size: 13.5px; color: var(--text);
}

/* ------------------------------------------------------------
   结果卡增强：视频预览 / 封面下载 / 文案复制
   ------------------------------------------------------------ */
.video-preview { padding: 14px 22px 4px; }
.video-preview video {
    width: 100%; max-height: 480px; border-radius: var(--radius);
    background: #000; display: block;
}
.result-cover { position: relative; }
.result-cover .cover-dl {
    position: absolute; left: 8px; bottom: 8px;
    padding: 4px 10px; font-size: 12px; border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, .55); background: rgba(15, 23, 42, .55);
    color: #fff; cursor: pointer; backdrop-filter: blur(4px);
    transition: background .15s ease;
}
.result-cover .cover-dl:hover { background: rgba(15, 23, 42, .78); }
.copy-row { margin-top: 10px; }
.copy-btn {
    padding: 5px 14px; font-size: 12.5px; border-radius: 99px;
    border: 1px solid var(--border-soft); background: var(--bg, var(--border-soft));
    color: var(--text-soft); cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.copy-btn:hover { color: var(--primary); border-color: var(--primary); }

.notice-bar {
    background: linear-gradient(90deg, #eef2ff, #faf5ff);
    border-bottom: 1px solid var(--border-soft);
    font-size: 13.5px; color: var(--primary-dark);
    padding: 9px 0; text-align: center;
}

.modal-mask {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
    padding: 20px; backdrop-filter: blur(2px);
}
.modal-box {
    background: var(--white); border-radius: var(--radius-lg); padding: 26px;
    max-width: 460px; width: 100%; box-shadow: var(--shadow-lg);
    max-height: 88vh; overflow: auto;
}
.modal-box h3 { margin-bottom: 14px; }

/* ------------------------------------------------------------
   页脚
   ------------------------------------------------------------ */
.site-footer {
    background: var(--white); border-top: 1px solid var(--border-soft);
    padding: 40px 0 28px; margin-top: 20px;
    font-size: 13.5px; color: var(--text-muted);
}
.footer-grid { display: flex; gap: 44px; flex-wrap: wrap; margin-bottom: 26px; }
.footer-col h4 { font-size: 14px; color: var(--text); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border-soft); padding-top: 20px;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 13px;
}

/* ------------------------------------------------------------
   响应式
   ------------------------------------------------------------ */
@media (max-width: 900px) {
    .pay-layout { grid-template-columns: 1fr; }
    .uc-layout { grid-template-columns: 1fr; }
    .uc-side { position: static; }
    .uc-menu { display: flex; overflow-x: auto; gap: 6px; padding: 10px; }
    .uc-menu li { flex-shrink: 0; }
    .uc-menu a { white-space: nowrap; padding: 8px 14px; }
}

@media (max-width: 720px) {
    body { font-size: 14.5px; }
    .hero { padding: 40px 0 36px; }
    .hero h1 { font-size: 27px; }
    .hero .lead { font-size: 15px; }
    .parse-box { padding: 16px; border-radius: var(--radius); }
    .section { padding: 36px 0; }
    .result-head { flex-direction: column; gap: 14px; }
    .result-cover { width: 100%; height: 190px; }
    .quality-item { padding: 13px 16px; gap: 11px; }
    .site-nav { display: none; }
    .auth-card { padding: 26px 20px; }
    .footer-grid { gap: 26px; }
    .form-row { flex-direction: column; gap: 0; }
    .plan-grid { grid-template-columns: 1fr; }
    .image-grid { grid-template-columns: repeat(2, 1fr); padding: 14px; }
    .sy-table { font-size: 13px; }
    .sy-table th, .sy-table td { padding: 10px 8px; }
}

/* 移动端底部导航 */
.mobile-nav { display: none; }
@media (max-width: 720px) {
    .mobile-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-soft); z-index: 90;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mobile-nav a {
        flex: 1; text-align: center; padding: 9px 0 8px;
        font-size: 11.5px; color: var(--text-muted);
        display: flex; flex-direction: column; align-items: center; gap: 2px;
    }
    .mobile-nav a.active { color: var(--primary-dark); }
    .mobile-nav a .ico { font-size: 19px; line-height: 1; }
    body { padding-bottom: 62px; }
}

/* ------------------------------------------------------------
   主题切换按钮（header 内，明暗都可用）
   ------------------------------------------------------------ */
.theme-toggle {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-soft);
    cursor: pointer; font-size: 15px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: border-color .15s, background .15s, transform .15s;
    padding: 0;
}
.theme-toggle:hover { border-color: var(--primary); transform: rotate(12deg); }
.theme-toggle .ico-dark { display: none; }
html[data-theme="dark"] .theme-toggle .ico-light { display: none; }
html[data-theme="dark"] .theme-toggle .ico-dark { display: inline; }

/* ------------------------------------------------------------
   暗黑主题
   由 <html data-theme="dark"> 驱动；切换逻辑见 static/js/app.js，
   初始值由服务端按后台「前台主题模式」设置渲染，避免首屏闪变。
   ------------------------------------------------------------ */
html[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #a5b4fc;
    --primary-light: #26264f;
    --violet: #a78bfa;

    --text: #e2e8f0;
    --text-soft: #b3bdd1;
    --text-muted: #7c8798;
    --border: #2a3245;
    --border-soft: #222a3c;
    --bg: #10141f;
    --white: #171d2b;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow: 0 6px 24px rgba(0, 0, 0, .45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
    --shadow-primary: 0 10px 30px rgba(99, 102, 241, .2);
}

html[data-theme="dark"] body { background: var(--bg); }
html[data-theme="dark"] .site-header { background: rgba(16, 20, 31, .88); }
html[data-theme="dark"] .btn-outline { background: var(--white); color: var(--text-soft); }
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-primary:hover:not(:disabled),
html[data-theme="dark"] .btn-success,
html[data-theme="dark"] .brand-mark { color: #fff; }
html[data-theme="dark"] .section-alt { background: #121724; }
html[data-theme="dark"] .section-alt-gradient,
html[data-theme="dark"] .hero { background: radial-gradient(1200px 500px at 50% -80px, rgba(129, 140, 248, .16), transparent), var(--bg); }
html[data-theme="dark"] .mobile-nav { background: rgba(16, 20, 31, .96); }
html[data-theme="dark"] .auth-card { background: var(--white); }
html[data-theme="dark"] .uc-user { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
html[data-theme="dark"] .uc-user .uc-avatar,
html[data-theme="dark"] .uc-user .uc-name { background: rgba(255, 255, 255, .22); }
html[data-theme="dark"] .plan-card.is-recommend { border-color: var(--primary); }
html[data-theme="dark"] .topic-chip { background: var(--primary-light); color: var(--primary-dark); }
html[data-theme="dark"] .tag-warning { background: #3a2c10; color: #fbbf24; }
html[data-theme="dark"] .parse-input::placeholder { color: var(--text-muted); }
html[data-theme="dark"] a { color: var(--primary-dark); }
html[data-theme="dark"] .site-nav a:hover,
html[data-theme="dark"] .site-nav a.active { background: var(--primary-light); color: var(--primary-dark); }

/* ------------------------------------------------------------
   站点公告（notice 表：列表卡片 + 弹窗）
   ------------------------------------------------------------ */
.notice-card {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px 22px;
    box-shadow: var(--shadow-sm);
}
.notice-card-head { font-weight: 700; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.notice-item { padding: 10px 0; border-top: 1px dashed var(--border-soft); }
.notice-item:first-child { border-top: none; }
.notice-item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.notice-item-title { font-weight: 600; color: var(--text); }
.notice-item-date { color: var(--text-muted); font-size: 12.5px; margin-left: auto; }

.rich-content { color: var(--text-soft); font-size: 14px; line-height: 1.8; margin-top: 6px; overflow-wrap: break-word; }
.rich-content p { margin: 0 0 6px; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-content a { color: var(--primary); }
.rich-content ul, .rich-content ol { padding-left: 22px; margin: 4px 0; }
.rich-content blockquote {
    margin: 6px 0; padding: 8px 14px; border-left: 3px solid var(--primary);
    background: var(--border-soft); border-radius: 0 8px 8px 0; color: var(--text-soft);
}
.rich-content table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.rich-content th, .rich-content td { border: 1px solid var(--border-soft); padding: 6px 10px; }
.rich-content pre {
    background: var(--border-soft); border-radius: 8px; padding: 12px 14px;
    overflow: auto; font-size: 13px;
}

.modal-notice {
    position: fixed; inset: 0; z-index: 9999; padding: 20px;
    background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
}
.modal-notice-box {
    background: var(--white); color: var(--text);
    border: 1px solid var(--border-soft); border-radius: 16px;
    max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-notice-head {
    font-size: 16px; font-weight: 700;
    padding: 16px 20px; border-bottom: 1px solid var(--border-soft);
}
.modal-notice-body { padding: 16px 20px; max-height: 55vh; overflow: auto; margin-top: 0; }
.modal-notice-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 20px 16px; border-top: 1px solid var(--border-soft);
}
.modal-notice-remember {
    color: var(--text-muted); font-size: 13px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
