:root {
  --bg: #0a0c11;
  --bg-2: #0e1118;
  --surface: #141922;
  --surface-2: #1a2030;
  --surface-3: #20283a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e7eaf0;
  --text-2: #c2c8d6;
  --muted: #8b93a7;
  --primary: #6d7cff;
  --primary-2: #8b5cf6;
  --accent: #22d3ee;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(109,124,255,.16), rgba(34,211,238,.12));
  --danger: #f87171;
  --ok: #34d399;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
  --shadow-hover: 0 14px 40px rgba(99,102,241,.28);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ===== 亮色主题（默认深色，[data-theme="light"] 切换） ===== */
[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --surface-3: #e6eaf3;
  --border: rgba(15, 23, 42, .10);
  --border-strong: rgba(15, 23, 42, .18);
  --text: #1a2233;
  --text-2: #3a4458;
  --muted: #6b7488;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --accent: #0891b2;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.12), rgba(34,211,238,.08));
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.08);
  --shadow-hover: 0 14px 40px rgba(99,102,241,.20);
}
[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 600px at 85% -15%, rgba(34,211,238,.10), transparent 60%),
    radial-gradient(1000px 560px at -8% -5%, rgba(99,102,241,.12), transparent 55%),
    linear-gradient(rgba(15,23,42,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.04) 1px, transparent 1px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 85% -15%, rgba(34,211,238,.10), transparent 60%),
    radial-gradient(1000px 560px at -8% -5%, rgba(109,124,255,.14), transparent 55%),
    linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
  transition: background-color .25s ease, color .25s ease;
}

a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

/* 全屏自适应：大屏铺满，小屏自动收边 */
.container { max-width: 1680px; width: 100%; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }

/* ===== 顶部导航（暗色玻璃） ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 17, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.02em; white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.logo-slogan { font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* 顶部公告条 */
.announce-bar { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--grad-soft); color: var(--text); font-size: 16px; border-bottom: 1px solid var(--border); overflow: hidden; }
.announce-icon { flex: none; }
.announce-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: 0 6px 20px rgba(99,102,241,.5); flex: none;
}
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { margin-left: 0; color: var(--text-2); font-size: 18px; font-weight: 500; padding: 9px 15px; border-radius: 10px; transition: background .15s ease, color .15s ease; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.admin-link { color: #fff; background: var(--grad); box-shadow: 0 6px 18px rgba(99,102,241,.4); }
.nav a.admin-link:hover { color: #fff; filter: brightness(1.08); }
.nav-user { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px;
  box-shadow: 0 4px 14px rgba(99,102,241,.4); flex: none;
}
.btn-sm { padding: 9px 18px; font-size: 18px; }

/* ===== 主体 ===== */
/* 与导航栏(.container)保持一致的左右内边距，避免正文贴边 */
.main { padding: clamp(24px, 3vw, 40px) clamp(16px, 3vw, 40px) clamp(48px, 6vw, 72px); min-height: 62vh; }
.page-title { font-size: 30px; margin: 0 0 22px; font-weight: 800; letter-spacing: -.02em; }
.section-title {
  font-size: 20px; margin: 34px 0 18px; padding-left: 14px; position: relative; font-weight: 700; color: var(--text);
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--grad);
}

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: clamp(36px, 5vw, 60px) clamp(24px, 4vw, 48px); margin-bottom: 40px;
  background: linear-gradient(135deg, #18164a 0%, #221a52 45%, #0a3a4a 100%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(10px); opacity: .6; }
.hero::before { width: 360px; height: 360px; right: -80px; top: -140px; background: radial-gradient(circle, rgba(139,92,246,.7), transparent 70%); }
.hero::after { width: 300px; height: 300px; left: -70px; bottom: -140px; background: radial-gradient(circle, rgba(34,211,238,.55), transparent 70%); }
.hero-title { position: relative; font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin: 0 0 12px; letter-spacing: -.025em; color: #fff; }
.hero-sub { position: relative; margin: 0 0 26px; color: rgba(255,255,255,.8); font-size: 18px; }
.hero-search { position: relative; display: flex; gap: 12px; max-width: 680px; flex-wrap: wrap; }
.hero-search input {
  flex: 1; min-width: 240px; padding: 15px 18px; border: 1px solid var(--border-strong); border-radius: 12px; font-size: 18px; font-family: inherit;
  background: rgba(255,255,255,.08); color: #fff; outline: none; transition: border-color .15s ease, background .15s ease;
}
.hero-search input::placeholder { color: rgba(255,255,255,.55); }
.hero-search input:focus { border-color: var(--primary); background: rgba(255,255,255,.12); }
.hero-search .btn { background: #fff; color: #4f46e5; font-weight: 700; padding: 15px 28px; }
.hero-search .btn:hover { background: #eef0ff; }

/* ===== 版块卡片（大屏多列自适应） ===== */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.board-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; color: var(--text); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.board-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .28s ease;
}
.board-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); text-decoration: none; }
.board-card:hover::before { transform: scaleX(1); }
.board-card h3 { margin: 0; font-size: 20px; font-weight: 700; }
.board-card p { margin: 0; color: var(--muted); font-size: 18px; flex: 1; }
.board-card .count {
  font-size: 18px; color: var(--accent); font-weight: 600; background: rgba(34,211,238,.12);
  padding: 4px 13px; border-radius: 999px; align-self: flex-start;
}

/* ===== 主题列表 ===== */
.thread-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.thread-item { display: flex; gap: 16px; padding: 19px 22px; border-bottom: 1px solid var(--border); transition: background .15s ease; }
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: linear-gradient(90deg, rgba(109,124,255,.08), transparent); }
.thread-avatar {
  width: 48px; height: 48px; border-radius: 14px; background: var(--grad-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: none; border: 1px solid var(--border-strong);
}
.thread-body { flex: 1; min-width: 0; }
.thread-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thread-title { font-size: 19px; font-weight: 600; color: var(--text); transition: color .15s ease; }
.thread-title:hover { color: var(--accent); }
.thread-meta { font-size: 18px; color: var(--muted); margin-top: 9px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.thread-meta a { color: var(--muted); font-weight: 500; }
.thread-meta a:hover { color: var(--primary); }
.thread-replies { margin-left: auto; color: var(--accent); font-weight: 600; background: rgba(34,211,238,.12); padding: 4px 14px; border-radius: 999px; font-size: 18px; }
.empty { color: var(--muted); padding: 22px; font-size: 18px; }

/* ===== 徽章 ===== */
.badge { display: inline-flex; align-items: center; font-size: 18px; font-weight: 600; padding: 3px 11px; border-radius: 999px; }
.badge.pin { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #4a2c00; }
.badge.lock { background: rgba(255,255,255,.1); color: var(--text-2); }
.badge.danger { background: rgba(248,113,113,.18); color: var(--danger); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff; border: none; border-radius: 12px; padding: 13px 26px;
  font-size: 18px; font-weight: 600; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: 0 8px 22px rgba(99,102,241,.4);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(99,102,241,.5); filter: brightness(1.06); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-ghost { display: inline-block; margin-left: 10px; color: var(--muted); font-size: 18px; }
.notice { color: var(--text-2); font-size: 18px; background: rgba(109,124,255,.08); padding: 16px 18px; border-radius: 12px; border: 1px dashed var(--border-strong); }
.notice.ok { font-size: 15px; color: #1a7f37; background: rgba(46,160,67,.10); border-color: rgba(46,160,67,.35); }
.notice.warn { font-size: 15px; color: #9a6700; background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.4); }
.notice.danger { font-size: 15px; color: #cf222e; background: rgba(229,72,77,.10); border-color: rgba(229,72,77,.35); }
.pay-apply { margin-top: 22px; }
.pay-apply .admin-form { max-width: 100%; }
/* 会员中心：我的发布 / 我的回复 区块 */
.mc-section { margin-top: 26px; }
.mc-section .section-title { display: flex; align-items: center; gap: 8px; }
.count-badge { font-size: 13px; font-weight: 700; color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); border-radius: 999px; padding: 2px 10px; }
.reply-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.reply-item { padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.reply-thread { font-weight: 700; color: var(--text); text-decoration: none; }
.reply-thread:hover { color: var(--primary); }
.reply-content { margin: 6px 0 6px; color: var(--text-2); font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.pay-apply-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pay-apply-head .mc-sub { margin: 4px 0 0; }
.pay-apply-head .btn { flex: none; }
.pay-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
@media (max-width: 520px) { .pay-apply-head { flex-direction: column; align-items: stretch; } }

/* 会员页：收款二维码 + 凭证上传 */
.pay-qr { text-align: center; margin: 18px 0 22px; }
.pay-qr img { width: 220px; max-width: 70%; border-radius: 14px; border: 1px solid var(--border); background: #fff; padding: 10px; }
.pay-qr-tip { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.proof-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.proof-preview { display: block; max-width: 240px; margin-top: 10px; border-radius: 12px; border: 1px solid var(--border); }
.qr-msg { color: var(--primary); font-size: 13px; }

/* ===== 分页（前后台统一） ===== */
.pager { margin: 24px 0; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pager a { display: inline-block; background: var(--surface); border: 1px solid var(--border); padding: 8px 16px; border-radius: 8px; font-size: 14px; color: var(--text-2); transition: border-color .15s, color .15s; }
.pager a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pager .pager-info { font-size: 14px; color: var(--muted); padding: 8px 4px; }

/* ===== 表单 / 登录 / 注册 ===== */
.auth-box, .form-box { max-width: 560px; margin: 48px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 36px; box-shadow: var(--shadow); }
.auth-box form label, .form-box form label, .admin-form label { display: block; margin-bottom: 18px; font-size: 18px; color: var(--muted); font-weight: 500; }
.auth-box input, .form-box input, .form-box textarea, .admin-form input, .admin-form textarea, .admin-form select {
  display: block; width: 100%; margin-top: 8px; padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: 11px;
  font-size: 18px; font-family: inherit; background: var(--bg-2); color: var(--text); transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-box input:focus, .form-box input:focus, .form-box textarea:focus, .admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109,124,255,.22); background: var(--surface);
}
.error { background: rgba(248,113,113,.12); color: var(--danger); padding: 13px 16px; border-radius: 11px; font-size: 18px; margin-bottom: 18px; border: 1px solid rgba(248,113,113,.3); }
.alt { margin-top: 18px; font-size: 18px; color: var(--muted); }
.alt a { font-weight: 600; }

/* ===== 发表新帖（全屏自适应） ===== */
.compose { max-width: 1120px; width: 100%; margin: 40px auto; }
.compose-head { margin-bottom: 26px; }
.compose-head .back-link { display: inline-block; margin-bottom: 12px; font-size: 17px; color: var(--muted); }
.compose-head .back-link:hover { color: var(--primary); }
.compose-head .page-title { margin: 0; }
.compose-sub { margin: 8px 0 0; font-size: 17px; color: var(--muted); }
.compose-form .field { margin-bottom: 22px; }
.field-label { display: block; margin-bottom: 10px; font-size: 17px; font-weight: 600; color: var(--text-2); }

/* 版块：卡片式单选 */
.board-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.board-chip { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; padding-right: 54px; border: 1.5px solid var(--border-strong); border-radius: 16px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .12s ease; }
.board-chip:hover { border-color: var(--primary); transform: translateY(-1px); }
.board-chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }

/* 版块选择指示器（明显的“选择点”） */
.board-chip .chip-radio { position: absolute; top: 18px; right: 18px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--bg-2); box-sizing: border-box; display: grid; place-items: center; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.board-chip .chip-radio::after { content: "✓"; font-size: 14px; line-height: 1; font-weight: 700; color: #fff; opacity: 0; transform: scale(.5); transition: opacity .15s ease, transform .15s ease; }
.board-chip:has(input:checked) .chip-radio { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px rgba(109,124,255,.22); }
.board-chip:has(input:checked) .chip-radio::after { opacity: 1; transform: scale(1); }

.board-chip .chip-name { font-size: 19px; font-weight: 700; color: var(--text); }
.board-chip .chip-desc { font-size: 14px; line-height: 1.45; color: var(--muted); }
.board-chip:has(input:checked) { border-color: var(--primary); background: var(--grad-soft); box-shadow: 0 0 0 3px rgba(109,124,255,.18); }
.board-chip:has(input:checked) .chip-name { font-weight: 800; }

/* 标题输入框：更大、聚焦更明显 */
.compose-form input[type="text"] { display: block; width: 100%; padding: 18px 20px; border: 1.5px solid var(--border-strong); border-radius: 14px; font-size: 21px; font-family: inherit; background: var(--surface); color: var(--text); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.compose-form input[type="text"]::placeholder { color: var(--muted); font-size: 19px; }
.compose-form input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(109,124,255,.20); background: var(--surface); }

/* 编辑器在发表页更高 */
.compose .rte-area { min-height: 340px; }

/* 拖拽上传区 */
.dropzone { margin-top: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 28px; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--bg-2); color: var(--muted); text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--grad-soft); color: var(--text); }
.dropzone .dz-icon { font-size: 30px; line-height: 1; }
.dropzone .dz-text { font-size: 17px; }
.dropzone .dz-text b { color: var(--primary); }
.dropzone .dz-hint { font-size: 14px; }

.compose-actions { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.compose-actions .btn-lg { padding: 14px 36px; font-size: 19px; }
.compose-actions .btn-ghost { font-size: 17px; }

/* ===== 主题详情 ===== */
.thread-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow); }
.page-view .page-title { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.page-meta { margin-bottom: 18px; font-size: 15px; color: var(--muted); }
.thread-detail-title { margin: 0 0 16px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text); }
.thread-content { margin-top: 18px; font-size: 18px; color: var(--text-2); line-height: 1.8; }
.thread-content p { margin: 0 0 14px; }

/* ===== 回复 ===== */
.reply-section { margin-top: 34px; }
.reply-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 19px 22px; margin-bottom: 16px; box-shadow: var(--shadow); display: flex; gap: 16px; }
.reply-avatar { width: 44px; height: 44px; border-radius: 13px; background: var(--grad-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; border: 1px solid var(--border-strong); font-size: 20px; }
.reply-main { flex: 1; min-width: 0; }
.reply-meta { font-size: 18px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.reply-meta a { color: var(--text); font-weight: 600; }
.reply-content { font-size: 18px; color: var(--text-2); line-height: 1.8; }
.reply-form { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.reply-form .btn { margin-top: 14px; }
.btn-danger { background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; }
.btn-danger:hover { box-shadow: 0 12px 30px rgba(239,68,68,.45); filter: brightness(1.06); color: #fff; }
.admin-actions { margin-top: 18px; }
.inline-form { display: inline-block; margin: 12px 0 0; }
.reply-del { margin-top: 12px; }
.content-locked { margin-top: 18px; padding: 22px 24px; border: 1px dashed var(--border-strong); border-radius: 16px; background: var(--surface); text-align: center; color: var(--muted); }
.content-locked .lock-title { font-size: 19px; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.content-locked .lock-hint { margin: 0; font-size: 16px; }
.content-locked .lock-hint a { color: var(--primary); font-weight: 600; }
.reply-content.content-locked { text-align: left; padding: 12px 16px; font-size: 16px; }

/* ===== 会员 / 付费墙 / 权限徽章 ===== */
.lock-badge { display: inline-block; margin-left: 6px; font-size: 13px; opacity: .85; }
.perm-badge { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; vertical-align: middle; }
.perm-badge.member { background: rgba(34,211,238,.16); color: var(--accent); }
.perm-badge.paid { background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #3a2a00; }
.role-badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; vertical-align: middle; }
.role-badge.admin { background: rgba(109,124,255,.18); color: var(--primary); }
.role-badge.vip { background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #3a2a00; }
.badge.vip { background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #3a2a00; }
.nav-vip { color: var(--accent) !important; font-weight: 700; }
.content-locked.paywall { max-width: 560px; margin: 22px auto 0; padding: 30px 28px; }
.content-locked.paywall .lock-title { font-size: 21px; }
.content-locked.paywall .btn-primary { margin-top: 14px; }
.content-locked.paywall .btn-ghost { margin-left: 12px; }
/* 会员页：全屏自适应，整体单列（状态卡/申请卡上下堆叠） */
.membership-page { max-width: 1200px; margin: 0 auto; }
.mc-grid { display: flex; flex-direction: column; gap: 22px; align-items: stretch; }
.membership-card { padding: 28px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.membership-card.is-paid { border-color: rgba(245,158,11,.5); background: linear-gradient(135deg, rgba(245,158,11,.10), rgba(34,211,238,.06)); }
.mc-head { display: flex; align-items: center; gap: 18px; }
.mc-icon { font-size: 46px; line-height: 1; }
.mc-title { margin: 0 0 4px; font-size: 22px; }
.mc-sub { margin: 0; color: var(--muted); font-size: 15px; }
.mc-perks { margin: 22px 0; display: grid; gap: 10px; }
.perk { padding: 12px 16px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 16px; }
.mc-action { text-align: center; }
.mc-price { font-size: 26px; font-weight: 800; color: var(--primary); margin: 0 0 14px; }
.mc-note { margin: 14px auto 0; max-width: 460px; color: var(--muted); font-size: 14px; line-height: 1.6; }
/* 会员页：各档套餐价格（卡片式清晰展示） */
.plan-info { margin-top: 6px; text-align: left; }
.plan-info-title { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; text-align: center; }
.plan-info-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan-info-list li {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; border: 1px solid var(--border-strong); border-radius: 14px;
  background: var(--surface-2); transition: border-color .15s, transform .15s;
}
.plan-info-list li:hover { border-color: var(--primary); transform: translateY(-2px); }
.pi-label { font-size: 14px; color: var(--muted); }
.pi-price { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1; }
@media (max-width: 760px) { .plan-info-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .plan-info-list { grid-template-columns: 1fr; } }

/* 会员页：注册成功欢迎横幅 */
.mc-welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(34,211,238,.10)); border: 1px solid rgba(99,102,241,.35); margin-bottom: 18px; flex-wrap: wrap; }
.mc-welcome-text h2 { margin: 0 0 4px; font-size: 20px; }
.mc-welcome-text p { margin: 0; color: var(--text-2); }

/* 会员页：开通流程步骤指示器 */
.mc-steps { display: flex; gap: 8px; margin: 0 0 22px; }
.mc-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; color: var(--muted); font-size: 14px; }
.mc-step::before { content: ""; position: absolute; top: 16px; left: -50%; width: 100%; height: 2px; background: var(--border-strong); z-index: 0; }
.mc-step:first-child::before { display: none; }
.mc-step .dot { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--surface-2); border: 2px solid var(--border-strong); color: var(--muted); position: relative; z-index: 1; }
.mc-step.done .dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.mc-step.done::before { background: #16a34a; }
.mc-step.done { color: var(--text-2); }
.mc-step.active .dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.18); }
.mc-step.active { color: var(--text); font-weight: 600; }

/* 会员页：开通面板内可选时长（与上方「会员套餐价格（参考）」风格一致） */
.plan-select { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 14px; }
.plan-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border: 1px solid var(--border-strong); border-radius: 14px; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s, transform .15s; }
.plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt:hover { border-color: var(--primary); transform: translateY(-2px); }
.plan-opt.checked { border-color: var(--primary); background: rgba(99,102,241,.10); box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
.po-label { font-size: 14px; color: var(--muted); }
.po-price { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1; }
.pay-account { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.pay-account strong { color: var(--text); }
.pay-preview { font-size: 14px; color: var(--muted); margin: 12px 0 12px; padding: 10px 14px; background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.25); border-radius: 10px; }
.pay-preview strong { color: var(--primary); font-size: 15px; }
@media (max-width: 760px) { .plan-select { grid-template-columns: repeat(2, 1fr); } }

/* 首页：免费会员升级横幅 */
.home-upgrade { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(245,158,11,.14), rgba(99,102,241,.10)); border: 1px solid rgba(245,158,11,.4); margin-bottom: 18px; flex-wrap: wrap; }
.home-upgrade-text { display: flex; flex-direction: column; gap: 2px; }
.home-upgrade-text strong { font-size: 17px; }
.home-upgrade-text span { color: var(--muted); font-size: 14px; }

/* 开通时长：明确单列套餐单选（提升优先级以覆盖 admin.css 中 .admin-form label/input） */
.admin-form .plan-list { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; width: 100%; }
.admin-form .plan-option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer; font-size: 16px; background: var(--bg-2); color: var(--text); transition: border-color .15s ease, background .15s ease; }
.admin-form .plan-option:hover { border-color: var(--primary); }
.admin-form .plan-option input { width: auto; display: inline-block; margin: 0; }
.admin-form .plan-text { display: flex; flex-direction: column; line-height: 1.35; }
.admin-form .plan-label { font-weight: 600; color: var(--text); }
.admin-form .plan-price { font-size: 14px; color: var(--muted); }
.admin-form .plan-option:has(input:checked) { border-color: var(--primary); background: rgba(109,124,255,.10); }
.btn-primary { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(99,102,241,.45); filter: brightness(1.06); color: #fff; }
.btn-renew { background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; }
.btn-renew:hover { box-shadow: 0 12px 30px rgba(239,68,68,.45); filter: brightness(1.06); color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 17px; }
.paywall-board { max-width: 640px; margin: 10px auto; }

/* ===== 富文本编辑器 ===== */
.rte { border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; margin-top: 8px; background: var(--bg-2); box-shadow: var(--shadow); }
.rte-toolbar { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.rte-btn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 8px; padding: 7px 14px; font-size: 18px; cursor: pointer; line-height: 1.2; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.rte-btn:hover { background: rgba(109,124,255,.16); border-color: var(--primary); color: #fff; }
.rte-btn:disabled { opacity: .6; cursor: default; }
.rte-hint { margin-left: auto; font-size: 18px; color: var(--muted); }
.rte-area { min-height: 200px; max-height: 520px; overflow-y: auto; padding: 16px; outline: none; font-size: 18px; line-height: 1.8; color: var(--text); }
.rte-area:empty:before { content: attr(data-placeholder); color: var(--muted); }
.rte-area img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; display: block; box-shadow: var(--shadow); }
.post-img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; display: block; box-shadow: var(--shadow); }
.thread-content img, .reply-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; display: block; box-shadow: var(--shadow); }

/* ===== 个人主页 ===== */
.profile { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.profile .page-title { margin: 0; color: var(--text); }
.profile-avatar { width: 72px; height: 72px; border-radius: 22px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 29px; box-shadow: 0 8px 24px rgba(99,102,241,.45); flex: none; }
.muted { color: var(--muted); font-size: 18px; }
.profile-info { flex: 1; min-width: 200px; }

/* ===== 搜索 ===== */
.search-form { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search-form input { flex: 1; min-width: 240px; padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 12px; font-size: 18px; background: var(--surface); color: var(--text); }
.search-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109,124,255,.22); }

/* ===== 页脚 ===== */
.site-footer { text-align: center; color: var(--muted); font-size: 18px; padding: 36px; margin-top: 28px; border-top: 1px solid var(--border); }
.site-footer a { color: var(--muted); }
.footer-links { margin-bottom: 12px; font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; }
.footer-links-title { color: var(--muted); }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--primary); }
.footer-slogan { margin: 0 0 6px; color: var(--muted); font-size: 16px; }

/* ===== 主题切换按钮 ===== */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  cursor: pointer; font-size: 18px; display: grid; place-items: center;
  transition: border-color .15s ease, background .15s ease;
}
.theme-toggle:hover { border-color: var(--primary); }

/* 移动端汉堡按钮：桌面端默认隐藏 */
.nav-toggle {
  display: none;
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== 首页双栏布局 ===== */
.home-block { margin-bottom: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 24px; box-shadow: var(--shadow); color: var(--text-2); font-size: 17px; line-height: 1.75; }
.home-block p { margin: 0 0 10px; }
.home-block p:last-child { margin-bottom: 0; }
.home-grid { display: grid; grid-template-columns: 264px 1fr; gap: 24px; align-items: start; }
.board-sidebar {
  position: sticky; top: 86px; align-self: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow);
}
.sidebar-title { font-size: 18px; margin: 0 0 14px; padding-left: 13px; position: relative; font-weight: 700; }
.sidebar-title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: var(--grad); }
.board-nav { display: flex; flex-direction: column; gap: 4px; }
.board-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; border-radius: 10px; color: var(--text-2); font-size: 18px; transition: background .15s ease, color .15s ease;
}
.board-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.board-link-count { font-size: 14px; color: var(--accent); font-weight: 600; background: rgba(34,211,238,.12); padding: 2px 10px; border-radius: 999px; flex: none; }
.feed .section-title { margin-top: 0; }

/* ===== 代码块（highlight.js） ===== */
.thread-content pre, .reply-content pre, .rte-area pre {
  margin: 16px 0; border-radius: 12px; overflow: auto; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.thread-content pre code.hljs, .reply-content pre code.hljs, .rte-area pre code {
  display: block; padding: 16px 18px; font-size: 15px; line-height: 1.6; border-radius: 12px;
}

/* ===== 面包屑 ===== */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; font-size: 17px; color: var(--muted); }
.breadcrumb a { color: var(--muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .crumb-sep { color: var(--border-strong); }
.breadcrumb .crumb-current { color: var(--text); font-weight: 600; }

/* ===== 响应式 ===== */
@media (max-width: 880px) {
  .home-grid { grid-template-columns: 1fr; }
  .board-sidebar { position: static; }
}
@media (max-width: 760px) {
  .hero { padding: 34px 22px; }
  .board-grid { grid-template-columns: 1fr; }
  .thread-item { gap: 12px; }
  .thread-avatar { width: 42px; height: 42px; font-size: 18px; }
  .reply-avatar { width: 40px; height: 40px; font-size: 18px; }

  /* 导航栏：汉堡按钮 + 全宽下拉菜单 */
  .nav-toggle { display: flex; }
  .header-inner { height: 58px; gap: 10px; }
  .logo { font-size: 19px; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 16px 14px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { font-size: 16px; padding: 11px 12px; text-align: left; }
  .nav-user { margin-left: 0; }
}
