/* ==========================================================================
   OPC 聚合接单平台 · PC 前台样式
   深色高级感 · 渐变主色 · 玻璃拟态
   ========================================================================== */

:root {
    --bg: #070b16;
    --bg-2: #0b1020;
    --card: rgba(20, 29, 52, .9);
    --card-2: rgba(16, 24, 45, .72);
    --line: rgba(120, 155, 255, .14);
    --line-strong: rgba(120, 155, 255, .3);
    --text: #dfe7f7;
    --muted: #8296bb;
    --p1: #5b8cff;
    --p2: #8b5cf6;
    --cyan: #22d3ee;
    --grad: linear-gradient(92deg, #5b8cff, #8b5cf6);
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 22px 48px -26px rgba(4, 10, 30, .95);
    --container: 1200px;
    /* --- 语义化令牌（供明暗主题切换） --- */
    --surface: var(--surface);
    --surface-2: var(--surface-2);
    --surface-3: rgba(255, 255, 255, .09);
    --text-2: var(--text-2);
    --text-3: var(--text-3);
    --text-chip: var(--text-chip);
    --option-bg: #0f1730;
    --hero-from: #101a36;
    --shadow-soft: 0 22px 48px -26px rgba(4, 10, 30, .95);
    --code-bg: rgba(8, 13, 26, .7);
}

* { box-sizing: border-box; }

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ---------------------------------------------------------------- 背景光晕 */
.site-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 600px at 50% -10%, var(--hero-from) 0%, var(--bg) 60%); }
.site-bg .glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.site-bg .glow-1 { width: 520px; height: 520px; background: rgba(91, 140, 255, .35); top: -160px; left: -120px; }
.site-bg .glow-2 { width: 480px; height: 480px; background: rgba(139, 92, 246, .3); top: 120px; right: -140px; }
.site-bg .glow-3 { width: 420px; height: 420px; background: rgba(34, 211, 238, .14); bottom: -180px; left: 30%; }

/* ---------------------------------------------------------------- 布局 */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.main-wrap { min-height: 60vh; padding-bottom: 40px; }
.gradient-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* ---------------------------------------------------------------- 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text);
    cursor: pointer; transition: .22s ease; white-space: nowrap; font-weight: 500;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--surface-3); }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 12px 26px -14px rgba(91, 140, 255, .9); }
.btn-primary:hover { box-shadow: 0 18px 34px -14px rgba(139, 92, 246, .95); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 15px 34px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------- 页头 */
.site-header {
    position: sticky; top: 0; z-index: 60;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    background: rgba(9, 14, 28, .62);
    border-bottom: 1px solid transparent; transition: .25s;
}
.site-header.scrolled { background: rgba(9, 14, 28, .88); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 22px; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 16px; letter-spacing: .3px; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
    position: relative; padding: 8px 16px; border-radius: 10px;
    color: var(--muted); font-size: 15px; transition: .2s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: #fff; }
.nav-link.active::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px;
    border-radius: 2px; background: var(--grad);
}

.header-search {
    display: flex; align-items: center; gap: 8px; margin-left: auto;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 12px; padding: 7px 14px; width: 260px; transition: .2s;
}
.header-search:focus-within { border-color: var(--line-strong); background: var(--surface-3); }
.header-search svg { color: var(--muted); flex-shrink: 0; }
.header-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); width: 100%; }
.header-search input::placeholder { color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.icon-btn {
    position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.dot-badge {
    position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-style: normal;
    display: inline-flex; align-items: center; justify-content: center;
}

.user-menu { position: relative; }
.user-trigger {
    display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    color: var(--text); cursor: pointer; transition: .2s;
}
.user-trigger:hover { border-color: var(--line-strong); }
.user-trigger img { width: 28px; height: 28px; border-radius: 9px; object-fit: cover; }
.user-trigger span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown-panel {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px;
    background: rgba(16, 24, 45, .98); border: 1px solid var(--line); border-radius: 14px;
    padding: 8px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: .2s; z-index: 80;
}
.user-menu.open .dropdown-panel, .js-dropdown.open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; transition: .18s; }
.dropdown-panel a:hover { background: rgba(120, 155, 255, .12); color: var(--text); }
.dropdown-sep { display: block; height: 1px; background: var(--line); margin: 6px 8px; }

.menu-toggle { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; padding: 9px; }
.menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 3px 0; }

/* ---------------------------------------------------------------- V 标识 / 标签 */
.v-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 50%; background: #3b82f6; color: #fff;
    font-size: 10px; font-weight: 700; line-height: 1;
}
.tag {
    display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 12px;
    background: rgba(120, 155, 255, .12); color: var(--text-chip); border: 1px solid var(--line);
}
.tag-urgent { background: rgba(239, 68, 68, .16); color: #fca5a5; border-color: rgba(239, 68, 68, .3); }
.tag-gold { background: rgba(234, 179, 8, .16); color: #fcd34d; border-color: rgba(234, 179, 8, .3); }
.tag-cyan { background: rgba(34, 211, 238, .14); color: #67e8f9; border-color: rgba(34, 211, 238, .3); }
.tag-green { background: rgba(16, 185, 129, .16); color: #6ee7b7; border-color: rgba(16, 185, 129, .3); }
.tag-gray { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .25); }

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; padding: 92px 0 64px; overflow: hidden; }
.hero-halo { position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.hero-halo--a { width: 560px; height: 560px; background: rgba(91, 140, 255, .3); top: -220px; left: -80px; }
.hero-halo--b { width: 480px; height: 480px; background: rgba(139, 92, 246, .28); top: -120px; right: -120px; }
.hero-inner { position: relative; text-align: center; max-width: 900px; }
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: 13px; letter-spacing: 1.5px;
    color: var(--text-chip); background: rgba(120, 155, 255, .1); border: 1px solid var(--line);
    backdrop-filter: blur(6px);
}
.hero-title { font-size: 58px; line-height: 1.18; margin: 22px 0 18px; font-weight: 800; letter-spacing: -.5px; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 660px; margin: 0 auto; }
.hero-actions { display: flex; justify-content: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-tags { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.hero-tags span { padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- 数据指标 */
.stats-strip { padding: 10px 0 20px; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; backdrop-filter: blur(10px);
}
.stat-item { background: var(--card-2); padding: 26px 20px; text-align: center; transition: .25s; }
.stat-item:hover { background: rgba(30, 42, 74, .85); }
.stat-num { font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------------------------------------------------------------- 区块 */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head.center { justify-content: center; text-align: center; }
.section-title { font-size: 28px; font-weight: 700; letter-spacing: -.3px; }
.section-sub { color: var(--muted); margin-top: 6px; }
.section-more { color: var(--p1); font-size: 14px; transition: .2s; }
.section-more:hover { color: var(--cyan); }

/* ---------------------------------------------------------------- 卡片 */
.card {
    display: block; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 20px; transition: .24s ease;
    backdrop-filter: blur(8px); overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.card-title { font-size: 17px; font-weight: 600; line-height: 1.45; transition: .2s; }
.card:hover .card-title { color: #fff; }
.card-desc { color: var(--muted); font-size: 14px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 24px; font-weight: 800; margin: 14px 0 10px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.author { display: flex; align-items: center; gap: 7px; min-width: 0; }
.author span { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-sm { width: 24px; height: 24px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.meta { display: flex; gap: 10px; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.card-sub { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-top: 10px; }
.card-cover { position: relative; height: 168px; margin: -20px -20px 16px; overflow: hidden; background: linear-gradient(135deg, #16203c, #243358); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.card:hover .card-cover img { transform: scale(1.05); }
.cover-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 26px; font-weight: 800; letter-spacing: 3px; color: rgba(255, 255, 255, .28); background: var(--grad); -webkit-background-clip: padding-box; }
.card-body { position: relative; }
.price b { font-size: 20px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price span { color: var(--muted); font-size: 12px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cate-card {
    display: flex; flex-direction: column; gap: 6px; padding: 20px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    transition: .24s; position: relative; overflow: hidden;
}
.cate-card::before {
    content: ''; position: absolute; inset: 0; opacity: 0;
    background: radial-gradient(220px 120px at 20% 0%, rgba(120, 155, 255, .22), transparent 70%);
    transition: .3s;
}
.cate-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.cate-card:hover::before { opacity: 1; }
.cate-ico {
    width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--c, #5b8cff), rgba(255, 255, 255, .12));
    box-shadow: 0 10px 22px -12px var(--c, #5b8cff);
}
.cate-name { font-weight: 600; font-size: 16px; margin-top: 4px; }
.cate-desc { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- AI 面板 */
.ai-panel {
    position: relative; display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px;
    background: linear-gradient(135deg, rgba(91, 140, 255, .16), rgba(139, 92, 246, .12)), var(--card);
    border: 1px solid var(--line-strong); border-radius: 24px; padding: 46px; overflow: hidden;
}
.ai-panel__glow { position: absolute; width: 420px; height: 420px; right: -80px; top: -120px; border-radius: 50%; background: rgba(139, 92, 246, .32); filter: blur(90px); }
.ai-panel__body { position: relative; }
.ai-panel__title { font-size: 36px; font-weight: 800; margin: 16px 0 12px; }
.ai-panel__desc { color: var(--muted); font-size: 16px; max-width: 520px; }
.ai-panel__chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 26px; }
.ai-panel__chips span { padding: 6px 14px; border-radius: 999px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.ai-panel__visual { position: relative; display: flex; align-items: center; justify-content: center; }
.ai-orb { width: 120px; height: 120px; border-radius: 50%; background: var(--grad); filter: blur(4px); box-shadow: 0 0 90px rgba(139, 92, 246, .8); animation: orbPulse 4s ease-in-out infinite; }
.ai-ring { position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 1px dashed var(--line-strong); animation: spin 22s linear infinite; }
@keyframes orbPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 特性 / 步骤 / CTA */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { text-align: left; }
.feature-ico { width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--grad); color: #fff; font-size: 15px; margin-bottom: 14px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step-card { position: relative; padding-top: 28px; }
.step-no { font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step-card h3 { font-size: 17px; margin: 10px 0 6px; }
.step-card p { color: var(--muted); font-size: 14px; }

.cta-box {
    position: relative; text-align: center; padding: 60px 30px; border-radius: 24px;
    background: linear-gradient(135deg, rgba(91, 140, 255, .18), rgba(139, 92, 246, .16)), var(--card);
    border: 1px solid var(--line-strong); overflow: hidden;
}
.cta-title { font-size: 34px; font-weight: 800; }
.cta-desc { color: var(--muted); margin: 12px 0 26px; }

.rich-text { color: var(--text-2); line-height: 1.9; }
.rich-text img { border-radius: var(--radius); margin: 14px 0; }
.block-image { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- 空状态 */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card-2); }
.empty-ico { font-size: 40px; margin-bottom: 10px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty-state p { margin-bottom: 16px; }
.empty-hint { text-align: center; padding: 30px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------------------------------------------------------------- 页脚 */
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: rgba(8, 12, 24, .7); backdrop-filter: blur(10px); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; padding: 44px 24px; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; max-width: 320px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 12px; }
.footer-brand b { font-size: 16px; }
.footer-brand p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 { font-size: 14px; margin-bottom: 4px; }
.footer-col a, .footer-col span { color: var(--muted); font-size: 13px; transition: .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }

/* ---------------------------------------------------------------- Toast */
.toast-box { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
    padding: 11px 22px; border-radius: 12px; background: rgba(16, 24, 45, .98);
    border: 1px solid var(--line-strong); color: var(--text); font-size: 14px;
    box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); transition: .3s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-color: rgba(16, 185, 129, .5); }
.toast-error { border-color: rgba(239, 68, 68, .5); }

/* ---------------------------------------------------------------- 分页 */
.pager { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 34px 0 0; flex-wrap: wrap; }
.pager .info { color: var(--muted); font-size: 13px; margin-right: 8px; }
.pager a, .pager span {
    min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; transition: .2s;
}
.pager a:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pager .cur { background: var(--grad); border-color: transparent; color: #fff; }
.pager .dis { color: var(--muted); opacity: .5; }

/* ---------------------------------------------------------------- 通用页面块 */
.page-head { padding: 34px 0 18px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.3px; }
.page-desc { color: var(--muted); margin-top: 8px; }
.page-crumb { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.page-crumb a:hover { color: var(--text); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(8px); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-title { font-size: 18px; font-weight: 700; }

.filter-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 20px; margin-bottom: 22px;
}
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: 7px 16px; border-radius: 999px; font-size: 14px; color: var(--muted);
    border: 1px solid var(--line); background: var(--surface); transition: .2s; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

.sort-links { display: flex; gap: 6px; margin-left: auto; }
.sort-links a { padding: 7px 14px; border-radius: 9px; font-size: 14px; color: var(--muted); transition: .2s; }
.sort-links a:hover { color: var(--text); background: var(--surface-2); }
.sort-links a.active { color: #fff; background: rgba(120, 155, 255, .16); }

/* ---------------------------------------------------------------- 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: span 2; }
.field label { font-size: 14px; color: var(--text-3); }
.field label b { color: #f87171; margin-left: 4px; }
.input, .textarea, .select {
    width: 100%; padding: 12px 14px; border-radius: 12px; color: var(--text);
    background: rgba(9, 14, 28, .7); border: 1px solid var(--line); outline: none; transition: .2s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(91, 140, 255, .14); }
.textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.select option { background: var(--option-bg); }
.field .tip { font-size: 12px; color: var(--muted); }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--line); cursor: pointer; color: var(--muted); font-size: 14px; transition: .2s; }
.radio-row input { accent-color: #8b5cf6; }
.radio-row label:hover { border-color: var(--line-strong); color: var(--text); }

/* ---------------------------------------------------------------- 详情页 */
.detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; margin-top: 20px; }
.detail-main { display: flex; flex-direction: column; gap: 20px; }
.detail-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.detail-title { font-size: 26px; font-weight: 800; line-height: 1.4; }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 12px; }
.detail-content { color: var(--text-2); line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.detail-content img { border-radius: var(--radius-sm); margin: 10px 0; }
.price-box { display: flex; align-items: baseline; gap: 8px; }
.price-box .num { font-size: 34px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kv-list { display: flex; flex-direction: column; gap: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv span:first-child { color: var(--muted); flex-shrink: 0; }
.kv span:last-child { text-align: right; }

.user-line { display: flex; align-items: center; gap: 12px; }
.user-line img { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; }
.user-line .name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.user-line .sub { color: var(--muted); font-size: 13px; }

.bid-item { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.bid-item:first-of-type { border-top: none; }
.bid-item img { width: 44px; height: 44px; border-radius: 13px; object-fit: cover; flex-shrink: 0; }
.bid-body { flex: 1; min-width: 0; }
.bid-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bid-price { font-size: 18px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.bid-content { color: var(--muted); font-size: 14px; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.bid-win { border-color: rgba(16, 185, 129, .4); }

/* ---------------------------------------------------------------- 用户中心 */
.user-layout { display: grid; grid-template-columns: 236px 1fr; gap: 22px; align-items: start; margin-top: 20px; }
.side-nav { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: sticky; top: 88px; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 10px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.side-user img { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; }
.side-nav a { display: block; padding: 11px 14px; border-radius: 11px; color: var(--muted); font-size: 14px; transition: .2s; }
.side-nav a:hover { color: var(--text); background: var(--surface-2); }
.side-nav a.active { color: #fff; background: rgba(120, 155, 255, .16); border-left: 2px solid var(--p1); }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat-card .n { font-size: 26px; font-weight: 800; }
.stat-card .l { color: var(--muted); font-size: 13px; margin-top: 4px; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { color: var(--muted); font-weight: 500; font-size: 13px; }
.table tbody tr:hover { background: rgba(120, 155, 255, .06); }
.table .mono { font-variant-numeric: tabular-nums; }

.list-row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: none; }
.list-row .thumb { width: 84px; height: 60px; border-radius: 12px; object-fit: cover; background: linear-gradient(135deg, #16203c, #243358); flex-shrink: 0; }
.list-row .body { flex: 1; min-width: 0; }
.list-row .row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-row .time { color: var(--muted); font-size: 13px; }

.msg-item { display: flex; gap: 12px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); margin-bottom: 12px; transition: .2s; }
.msg-item.unread { border-color: var(--line-strong); background: rgba(30, 42, 74, .8); }
.msg-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p1); margin-top: 8px; flex-shrink: 0; }
.msg-item .dot.read { background: transparent; border: 1px solid var(--line-strong); }
.msg-item h4 { font-size: 15px; }
.msg-item p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.msg-item .t { color: var(--muted); font-size: 12px; white-space: nowrap; }

.wallet-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wallet-card { position: relative; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line-strong); background: linear-gradient(135deg, rgba(91, 140, 255, .18), rgba(139, 92, 246, .14)), var(--card); overflow: hidden; }
.wallet-card .l { color: var(--muted); font-size: 13px; }
.wallet-card .n { font-size: 30px; font-weight: 800; margin-top: 6px; }

/* ---------------------------------------------------------------- 评论 */
.comment-item { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.comment-item:first-child { border-top: none; }
.comment-item img.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.comment-item .c-body { flex: 1; min-width: 0; }
.comment-item .c-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.comment-item .c-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.comment-item .c-time { color: var(--muted); font-size: 12px; }
.comment-item .c-text { margin-top: 6px; color: var(--text-2); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.comment-item .c-actions { margin-top: 8px; display: flex; gap: 14px; color: var(--muted); font-size: 13px; }
.comment-item .c-actions a:hover { color: var(--p1); }
.comment-children { margin-left: 52px; margin-top: 10px; border-left: 2px solid var(--line); padding-left: 14px; }

/* ---------------------------------------------------------------- 认证 / 登录 */
.auth-wrap { display: flex; justify-content: center; padding: 60px 0; }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 38px; backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 26px; font-weight: 800; }
.auth-head p { color: var(--muted); margin-top: 8px; font-size: 14px; }
.auth-foot { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14px; }
.auth-foot a { color: var(--p1); }
.auth-foot a:hover { color: var(--cyan); }

/* ---------------------------------------------------------------- AI 工作台 */
.ai-workbench { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; margin-top: 20px; }
.tool-list { display: flex; flex-direction: column; gap: 10px; }
.tool-card { text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: .2s; color: var(--text); width: 100%; }
.tool-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tool-card.active { border-color: transparent; background: linear-gradient(135deg, rgba(91, 140, 255, .22), rgba(139, 92, 246, .18)), var(--card); }
.tool-card b { display: block; font-size: 15px; }
.tool-card span { color: var(--muted); font-size: 12px; }
.ai-output { min-height: 320px; white-space: pre-wrap; word-break: break-word; color: var(--text-2); line-height: 1.9; font-size: 14px; }
.ai-placeholder { color: var(--muted); display: flex; align-items: center; justify-content: center; min-height: 280px; text-align: center; }

/* ---------------------------------------------------------------- 搜索 */
.search-block { margin-top: 22px; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.user-result { display: flex; gap: 12px; align-items: center; }
.user-result img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }

/* ---------------------------------------------------------------- 弹层 / 评分 */
.dialog-mask {
    position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
    background: rgba(4, 8, 18, .72); backdrop-filter: blur(6px); padding: 20px;
}
.dialog-mask .auth-card { margin: 0; max-height: 90vh; overflow: auto; }
.js-stars { display: inline-flex; gap: 4px; cursor: pointer; font-size: 22px; line-height: 1; }
.js-stars span { color: rgba(148, 163, 184, .45); transition: .15s; }
.js-stars span.on, .js-stars span.hover { color: #fbbf24; }
.stars-static { color: #fbbf24; letter-spacing: 2px; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1199px) {
    .hero-title { font-size: 46px; }
    .card-grid, .post-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .cate-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-wrap, .user-layout { grid-template-columns: 1fr; }
    .detail-side, .side-nav { position: static; }
    .ai-workbench { grid-template-columns: 1fr; }
    .header-search { width: 200px; }
    .footer-cols { gap: 40px; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-inner { height: 62px; gap: 12px; flex-wrap: nowrap; }
    .brand-text i { display: none; }
    .main-nav {
        position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: rgba(11, 16, 32, .99); border-bottom: 1px solid var(--line); padding: 12px;
        display: none;
    }
    .main-nav.open { display: flex; }
    .nav-link.active::after { display: none; }
    .nav-link.active { background: rgba(120, 155, 255, .16); }
    .header-search { display: none; }
    .menu-toggle { display: block; }
    .hero { padding: 60px 0 40px; }
    .hero-title { font-size: 32px; }
    .hero-sub { font-size: 15px; }
    .btn-lg { padding: 13px 24px; font-size: 15px; }
    .section-title { font-size: 22px; }
    .card-grid, .post-grid, .feature-grid, .cate-grid, .stats-grid, .steps-grid, .result-grid,
    .stat-cards, .wallet-cards, .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: span 1; }
    .ai-panel { grid-template-columns: 1fr; padding: 28px; }
    .ai-panel__visual { display: none; }
    .cta-title { font-size: 24px; }
    .footer-inner { flex-direction: column; gap: 26px; }
    .footer-cols { gap: 28px; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .sort-links { margin-left: 0; }
}


/* ==========================================================================
   明暗主题 —— 浅色主题覆盖
   由 <html data-theme="light"> 激活；切换按钮见 public/header.html
   ========================================================================== */

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f4f7fd;
    --bg-2: #e9eefa;
    --card: rgba(255, 255, 255, .94);
    --card-2: rgba(255, 255, 255, .8);
    --line: rgba(22, 42, 92, .12);
    --line-strong: rgba(22, 42, 92, .26);

    --text: #152038;
    --muted: #5f6f8f;

    --surface: rgba(20, 40, 90, .045);
    --surface-2: rgba(20, 40, 90, .075);
    --surface-3: rgba(20, 40, 90, .1);

    --text-2: #33405c;
    --text-3: #3c4a68;
    --text-chip: #3a5588;

    --option-bg: #ffffff;
    --hero-from: #dbe5fa;

    --shadow: 0 18px 42px -24px rgba(22, 42, 92, .3);
    --shadow-soft: 0 18px 42px -24px rgba(22, 42, 92, .3);
    --code-bg: rgba(236, 241, 250, .92);
}

/* 背景光晕减弱，避免浅色下发灰 */
html[data-theme="light"] .site-bg .glow { opacity: .22; }
html[data-theme="light"] .hero-halo { opacity: .5; }

/* 页头 */
html[data-theme="light"] .site-header { background: rgba(255, 255, 255, .82); }
html[data-theme="light"] .site-header.is-stuck { box-shadow: 0 10px 30px -22px rgba(22, 42, 92, .5); }

/* 卡片与阴影 */
html[data-theme="light"] .card { box-shadow: 0 14px 34px -26px rgba(22, 42, 92, .5); }
html[data-theme="light"] .card:hover { box-shadow: 0 22px 46px -26px rgba(22, 42, 92, .55); }

/* 标签：浅色底需要更深的文字色 */
html[data-theme="light"] .tag-blue,
html[data-theme="light"] .tag { color: #2f4f96; }
html[data-theme="light"] .tag-urgent { color: #c0392b; border-color: rgba(192, 57, 43, .28); }
html[data-theme="light"] .tag-gold { color: #a16207; border-color: rgba(161, 98, 7, .28); }
html[data-theme="light"] .tag-cyan { color: #0e7490; border-color: rgba(14, 116, 144, .26); }
html[data-theme="light"] .tag-green { color: #047857; border-color: rgba(4, 120, 87, .26); }
html[data-theme="light"] .tag-gray { color: #475569; border-color: rgba(71, 85, 105, .22); }

/* 表单控件 */
html[data-theme="light"] .input,
html[data-theme="light"] .textarea,
html[data-theme="light"] .select { background: #ffffff; }
html[data-theme="light"] .input::placeholder,
html[data-theme="light"] .textarea::placeholder { color: #9aa8c2; }

/* 侧边导航与列表 */
html[data-theme="light"] .side-nav a { color: #4d5f80; }
html[data-theme="light"] .side-nav a.active { color: #2f4f96; }

/* 代码 / 输出区 */
html[data-theme="light"] .ai-output,
html[data-theme="light"] .rich-text,
html[data-theme="light"] .detail-content { color: var(--text-2); }

/* 首屏徽章 */
html[data-theme="light"] .hero-badge { background: rgba(91, 140, 255, .1); color: #2f4f96; }

/* ---------------------------------------------------------------- 切换按钮 */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: .2s;
    padding: 0;
}

.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }

/* 深色下显示太阳（点击切到浅色），浅色下显示月亮 */
.theme-toggle .ico-sun { display: block; }
.theme-toggle .ico-moon { display: none; }
html[data-theme="light"] .theme-toggle .ico-sun { display: none; }
html[data-theme="light"] .theme-toggle .ico-moon { display: block; }


/* ==========================================================================
   高端化改版（Premium Refresh）
   去掉霓虹紫蓝渐变 / 彩色光晕 / 彩虹渐变字，
   改为中性色基底 + 单一强调色 + 精细描边 + 收敛的层次排版
   放在文件末尾以确保覆盖前面的默认样式
   ========================================================================== */

:root {
    /* —— 色板：中性石墨基底 —— */
    --bg: #0b0c0f;
    --bg-2: #101114;
    --card: #15171c;
    --card-2: #1a1c22;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .18);

    --text: #edeef2;
    --muted: #8b91a1;

    /* —— 单一强调色（去掉紫与青） —— */
    --p1: #4f6ef7;
    --p2: #4f6ef7;
    --cyan: #4f6ef7;
    --grad: linear-gradient(92deg, #4f6ef7, #4f6ef7);
    --gold: #d8b25e;

    --surface: rgba(255, 255, 255, .035);
    --surface-2: rgba(255, 255, 255, .055);
    --surface-3: rgba(255, 255, 255, .08);

    --hero-from: #0f1014;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 22px 50px -34px rgba(0, 0, 0, .95);
    --shadow-soft: 0 22px 50px -34px rgba(0, 0, 0, .95);
}

/* 浅色下的中性基底 */
html[data-theme="light"] {
    --bg: #f7f8fa;
    --bg-2: #eef0f4;
    --card: #ffffff;
    --card-2: #fafbfc;
    --line: rgba(16, 20, 32, .1);
    --line-strong: rgba(16, 20, 32, .2);
    --text: #14161c;
    --muted: #646b7a;
    --surface: rgba(16, 20, 32, .035);
    --surface-2: rgba(16, 20, 32, .055);
    --surface-3: rgba(16, 20, 32, .08);
    --hero-from: #eceef3;
    --shadow: 0 22px 46px -30px rgba(16, 20, 32, .3);
    --shadow-soft: 0 22px 46px -30px rgba(16, 20, 32, .3);
}

/* ---------------------------------------------------------------- 背景去光晕 */
.site-bg { background: radial-gradient(1100px 560px at 50% -14%, var(--hero-from) 0%, var(--bg) 62%); }
.site-bg .glow { display: none; }
.hero-halo { display: none; }

/* ---------------------------------------------------------------- 渐变文字收敛 */
.gradient-text {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text);
}
.card-price {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: var(--text);
    -webkit-text-fill-color: currentColor;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.2px;
}

/* ---------------------------------------------------------------- 按钮 */
.btn { border-radius: 10px; font-weight: 500; }
.btn:hover { transform: none; }
.btn-primary {
    background: var(--p1);
    border: 1px solid var(--p1);
    color: #fff;
    box-shadow: none;
}
.btn-primary:hover { background: #5f7bf8; border-color: #5f7bf8; box-shadow: 0 10px 24px -18px rgba(79, 110, 247, .9); }
.btn-lg { padding: 14px 30px; border-radius: 12px; }
.nav-link.active::after { background: var(--p1); }

/* ---------------------------------------------------------------- 页头 */
.site-header { background: rgba(11, 12, 15, .72); backdrop-filter: blur(14px); }
.site-header.scrolled { background: rgba(11, 12, 15, .94); }
html[data-theme="light"] .site-header { background: rgba(247, 248, 250, .82); }
html[data-theme="light"] .site-header.scrolled { background: rgba(247, 248, 250, .96); }
.nav-link.active { color: var(--text); }
.nav-link { font-size: 14.5px; }

/* ---------------------------------------------------------------- 首屏 */
.hero { padding: 88px 0 60px; }
.hero-badge {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .8px;
    padding: 6px 14px;
    border-radius: 999px;
}
.hero-title {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -1.2px;
    line-height: 1.16;
    color: var(--text);
    margin: 20px 0 16px;
}
.hero-sub { font-size: 17px; color: var(--muted); }
.hero-tags span { border-color: var(--line); color: var(--muted); background: var(--surface); }

/* ---------------------------------------------------------------- 数据指标 */
.stat-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.stat-item:hover { background: var(--card-2); }
.stat-num { font-size: 32px; font-weight: 700; letter-spacing: -.8px; color: var(--text); }
.stat-label { font-size: 13.5px; }

/* ---------------------------------------------------------------- 区块标题 */
.section { padding: 42px 0; }
.section-title { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.section-more { color: var(--muted); font-size: 13.5px; }
.section-more:hover { color: var(--text); }

/* ---------------------------------------------------------------- 卡片 */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card:hover .card-title { color: var(--text); }
.card-title { font-size: 16px; font-weight: 600; letter-spacing: -.1px; }
.card-cover { background: var(--bg-2); }
.cover-placeholder { background: var(--bg-2); color: var(--muted); letter-spacing: 2px; font-weight: 700; }

/* 分类卡：去掉彩色渐变大色块 */
.cate-ico {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border: 1px solid var(--line);
    font-weight: 600;
}
.cate-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.cate-card:hover { border-color: var(--line-strong); background: var(--card-2); }

/* ---------------------------------------------------------------- 标签收敛 */
.tag { border-radius: 6px; font-size: 12px; padding: 3px 9px; }
.tag-cyan { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.tag-gold { background: rgba(216, 178, 94, .13); color: var(--gold); border-color: rgba(216, 178, 94, .26); }
html[data-theme="light"] .tag-gold { color: #8a6d24; }
.v-badge { background: var(--gold) !important; color: #23180a; }
html[data-theme="light"] .v-badge { color: #fff; }

/* ---------------------------------------------------------------- AI 面板：去掉“AI味”装饰 */
.ai-panel__glow { display: none; }
.ai-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.ai-panel__visual { display: none; }
.ai-panel__title { color: var(--text); }
.ai-panel__chips span { background: var(--surface); border-color: var(--line); color: var(--muted); }

/* ---------------------------------------------------------------- CTA */
.cta-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.cta-title { color: var(--text); }

/* ---------------------------------------------------------------- 表单与其它 */
.input, .textarea, .select { border-radius: 10px; }
.side-nav a.active { color: var(--text); background: var(--surface-2); }
.side-nav a:hover { background: var(--surface-2); }
.pager a:hover, .pager .cur { background: var(--p1); border-color: var(--p1); color: #fff; }
