/* ============================================
   YN RolePlay 论坛 — 浅色经典主题 (XenForo 风)
   参照: gta.world / roleplay.co.uk / eclipse-rp.net
   ============================================ */

:root {
    /* ---- 色板 (OLED 暗色 · 绿点缀, 沿用 Yn 后台设计语言) ---- */
    --page-bg: #020617;           /* 页面背景 (deepest) */
    --content-bg: #0f172a;        /* 卡片 */
    --card-alt: #0b1120;          /* 表格隔行 / 工具条 */
    --card-hover: #182238;        /* hover 抬升 */
    --header-top: #0b1120;        /* 顶栏 (暗色, 无蓝) */
    --header-bottom: #060d1d;
    --header-text: #edf2f7;
    --header-nav-hover: rgba(255, 255, 255, .08);
    --accent: #22c55e;            /* 主点缀 (绿) */
    --accent-dark: #16a34a;
    --accent-soft: rgba(34, 197, 94, .12);
    --text-1: #edf2f7;            /* 主文本 */
    --text-2: #94a3b8;            /* 次级文本 */
    --text-3: #64748b;            /* 弱化文本 */
    --border: #22304a;            /* 边框 */
    --border-strong: #33455f;     /* 强边框 / 分隔 */
    --category-bar: #182238;      /* 分类标题条 */

    /* ---- 语义色 (暗色透明底) ---- */
    --green: #4ade80;   --green-soft: rgba(34, 197, 94, .12);
    --red: #f87171;     --red-soft: rgba(248, 113, 113, .12);
    --orange: #fb923c;  --orange-soft: rgba(251, 146, 60, .12);
    --purple: #a78bfa;  --purple-soft: rgba(167, 139, 250, .12);
    --gray: #94a3b8;    --gray-soft: rgba(148, 163, 184, .12);
    --cyan: #22d3ee;    --cyan-soft: rgba(34, 211, 238, .12);

    --sticky-bg: rgba(251, 191, 36, .08);   /* 置顶帖底色 (暗金) */
    --sticky-border: rgba(251, 191, 36, .35);

    /* ---- 几何 ---- */
    --max-w: 1220px;
    --r-sm: 5px;
    --r-md: 8px;
    --r-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, .4);
    --transition: all .15s ease;

    /* ---- 字体 ---- */
    --font-sans: "Fira Sans", -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-mono: "Fira Code", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: rgba(34, 197, 94, .3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a3a52; border-radius: 6px; border: 2px solid var(--page-bg); background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #3a4d6b; border: 2px solid var(--page-bg); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 3px; }

.icon { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }

/* data-icon 注入图标的尺寸 (按使用场景) */
.node-icon svg { width: 20px; height: 20px; }
.bh-icon svg { width: 23px; height: 23px; }
.td-status svg { width: 15px; height: 15px; }
.composer-toolbar button svg { width: 15px; height: 15px; vertical-align: -3px; }
.wl-meta svg, .locked-tip svg, .auth-note svg, .widget-title svg { width: 12px; height: 12px; vertical-align: -2px; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* ============================================
   顶栏 Header
   ============================================ */
.site-header {
    background: linear-gradient(180deg, var(--header-top), var(--header-bottom));
    color: var(--header-text);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    display: flex; align-items: center; gap: 18px;
    height: 58px;
}
.logo {
    display: flex; align-items: center; gap: 9px;
    color: #fff; text-decoration: none;
    flex-shrink: 0;
}
.logo:hover { text-decoration: none; color: #fff; }
.logo-mark {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-name { font-size: 18px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.logo-sub { font-size: 11px; color: rgba(255, 255, 255, .6); font-weight: 400; line-height: 1; margin-top: 1px; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.main-nav a {
    color: rgba(255, 255, 255, .85); text-decoration: none;
    font-size: 14px; padding: 8px 12px; border-radius: var(--r-sm);
    transition: var(--transition); white-space: nowrap;
}
.main-nav a:hover { background: var(--header-nav-hover); color: #fff; text-decoration: none; }
.main-nav a.active { background: var(--header-nav-hover); color: #fff; font-weight: 600; }

.header-search { flex: 1; max-width: 260px; margin-left: auto; position: relative; }
.header-search input {
    width: 100%; height: 34px; padding: 0 12px 0 32px;
    border: 1px solid rgba(255, 255, 255, .28); border-radius: 6px;
    background: rgba(10, 28, 46, .35); color: #fff; font-size: 13px;
    transition: var(--transition);
}
.header-search input::placeholder { color: rgba(255, 255, 255, .55); }
.header-search input:focus {
    outline: none; border-color: rgba(255, 255, 255, .6);
    background: rgba(10, 28, 46, .55);
}
.header-search svg {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: rgba(255, 255, 255, .5); pointer-events: none;
}

.user-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 导航汉堡 (移动端) */
.nav-toggle {
    display: none; background: none; border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 6px; padding: 6px 8px; color: #fff; line-height: 0;
}

/* ============================================
   按钮
   ============================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 15px; font-size: 13.5px; font-weight: 500;
    border-radius: 6px; border: 1px solid transparent;
    transition: var(--transition); white-space: nowrap; line-height: 1.3;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-outline:hover { background: var(--header-nav-hover); color: #fff; }
.btn-ghost { background: var(--card-alt); border-color: var(--border); color: var(--text-1); }
.btn-ghost:hover { background: var(--card-hover); color: var(--text-1); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #247a48; color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }

/* ============================================
   布局
   ============================================ */
.page-wrap { padding: 20px 0 34px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.main-col { min-width: 0; }
.side-col { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 16px; }

/* ============================================
   面包屑
   ============================================ */
.crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--border-strong); margin: 0 2px; }
.crumbs .here { color: var(--text-1); font-weight: 600; }

/* ============================================
   卡片 & 区块
   ============================================ */
.card {
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card + .card { margin-top: 18px; }

.section-head {
    background: var(--category-bar);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex; align-items: center; gap: 10px;
}
.section-head .sec-title { font-size: 13px; font-weight: 700; color: var(--text-1); letter-spacing: .03em; }
.section-head .sec-desc { font-size: 12px; color: var(--text-3); }
.section-head .sec-toggle { margin-left: auto; color: var(--text-3); cursor: pointer; background: none; border: none; padding: 2px; }

/* ============================================
   欢迎块
   ============================================ */
.welcome {
    background:
        radial-gradient(900px 420px at 85% -20%, rgba(34, 197, 94, .10), transparent 60%),
        linear-gradient(160deg, #0d1b2e, #0b1120);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: #edf2f7; padding: 26px 28px 22px;
    position: relative; overflow: hidden;
    margin-bottom: 18px;
}
.welcome::after {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, .07), transparent 70%);
}
.welcome h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.welcome p { font-size: 13.5px; color: rgba(255, 255, 255, .82); max-width: 640px; }
.welcome-stats { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.welcome-stats .ws { text-align: center; }
.welcome-stats .ws b { display: block; font-size: 20px; font-weight: 700; line-height: 1.1; }
.welcome-stats .ws span { font-size: 11.5px; color: rgba(255, 255, 255, .65); }

/* ============================================
   板块索引表 (首页)
   ============================================ */
.node-table { width: 100%; border-collapse: collapse; }
.node-table th, .node-table td { padding: 11px 16px; text-align: left; vertical-align: middle; }
.node-table thead th {
    background: #0b1120; font-size: 11.5px; font-weight: 600;
    color: var(--text-3); text-transform: none; letter-spacing: .02em;
    border-bottom: 1px solid var(--border);
}
.node-table tbody tr { border-bottom: 1px solid #1a2736; }
.node-table tbody tr:last-child { border-bottom: none; }
.node-table tbody tr:hover { background: var(--card-hover); }

.node-main { display: flex; align-items: flex-start; gap: 13px; }
.node-icon {
    width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; line-height: 1;
    background: var(--card-alt); border: 1px solid var(--border); color: var(--text-2);
}
.node-icon.orange { background: var(--orange-soft); border-color: rgba(251, 146, 60, .35); color: var(--orange); }
.node-icon.green { background: var(--green-soft); border-color: rgba(34, 197, 94, .35); color: var(--green); }
.node-icon.red { background: var(--red-soft); border-color: rgba(248, 113, 113, .35); color: var(--red); }
.node-icon.purple { background: var(--purple-soft); border-color: rgba(167, 139, 250, .35); color: var(--purple); }
.node-icon.gray { background: var(--gray-soft); border-color: var(--border); color: var(--text-3); }

.node-title { font-size: 14.5px; font-weight: 600; color: var(--text-1); }
.node-title a { color: var(--text-1); }
.node-title a:hover { color: var(--accent); text-decoration: none; }
.node-desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.node-meta { display: flex; gap: 8px; margin-top: 5px; flex-wrap: wrap; }

.node-count { text-align: center; width: 70px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.node-count b { font-weight: 600; }
.node-count small { display: block; font-size: 11px; color: var(--text-3); }
.node-last { width: 230px; min-width: 210px; }
.last-post { display: flex; align-items: center; gap: 9px; }
.last-post .lp-info { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.last-post .lp-info a { color: var(--text-2); }
.last-post .lp-info a:hover { color: var(--accent); }
.last-post .lp-info b { font-weight: 500; color: var(--text-1); }
.empty-last { color: var(--text-3); font-size: 12.5px; }

/* 只读标签 */
.tag {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 500; padding: 1px 7px;
    border-radius: 4px; line-height: 1.5; white-space: nowrap;
}
.tag-lock { background: var(--gray-soft); color: var(--text-2); }
.tag-ic { background: var(--purple-soft); color: var(--purple); }
.tag-new { background: var(--green-soft); color: var(--green); }

/* ============================================
   板块页 (帖子列表)
   ============================================ */
.board-head { padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.board-head .bh-icon {
    width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 23px; background: var(--card-alt); border: 1px solid var(--border); color: var(--accent);
}
.board-head h1 { font-size: 18px; font-weight: 700; }
.board-head p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.board-tools {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    background: var(--card-alt); border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.board-tools .tool-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.thread-table { width: 100%; border-collapse: collapse; }
.thread-table th, .thread-table td { padding: 10px 14px; vertical-align: middle; }
.thread-table thead th {
    background: #0b1120; font-size: 11.5px; font-weight: 600;
    color: var(--text-3); border-bottom: 1px solid var(--border);
}
.thread-table tbody tr { border-bottom: 1px solid #1a2736; }
.thread-table tbody tr:hover { background: var(--card-hover); }
.thread-table tbody tr.sticky { background: var(--sticky-bg); }
.thread-table tbody tr.sticky:hover { background: rgba(251, 191, 36, .14); }
.thread-table tbody tr.locked td.td-title .t-title { color: var(--text-3); }

.td-status { width: 34px; text-align: center; font-size: 15px; color: var(--text-3); }
tr.sticky .td-status { color: #b8951d; }
.td-title { min-width: 240px; }
.t-title { font-size: 14px; font-weight: 500; color: var(--text-1); }
.t-title:hover { color: var(--accent); text-decoration: none; }
.t-badges { margin-left: 6px; display: inline-flex; gap: 4px; vertical-align: 1px; }
.t-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
tr.sticky .t-sub { color: #c9ad4e; }
.td-author { width: 130px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-counts { width: 110px; text-align: center; font-size: 12.5px; color: var(--text-2); }
.td-counts b { font-weight: 600; color: var(--text-1); }
.td-counts small { display: inline; font-size: 11px; color: var(--text-3); }
.td-counts small + small::before { content: "·"; margin: 0 3px; color: var(--border-strong); }
.td-last { width: 190px; font-size: 12px; }

/* 新帖高亮行内小圆点 */
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: 1px; }

/* 未登录提示条 */
.login-hint {
    margin: 12px 16px 6px; padding: 10px 14px; border-radius: 6px;
    background: var(--accent-soft); border: 1px solid rgba(34, 197, 94, .35);
    font-size: 13px; color: var(--accent);
}
.login-hint a { font-weight: 600; }

/* 表单错误提示 (醒目红色) */
.form-error {
    margin: 0 0 14px; padding: 10px 14px; border-radius: 6px;
    background: var(--red-soft); border: 1px solid rgba(248, 113, 113, .35);
    font-size: 13px; color: var(--red);
    display: flex; align-items: center; gap: 7px;
}

/* 未验证邮箱横幅 */
.verify-banner {
    background: rgba(251, 191, 36, .08);
    border-bottom: 1px solid var(--border);
    color: #fbbf24;
    font-size: 13px;
}
.verify-banner svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ============================================
   分页
   ============================================ */
.pagination { display: flex; align-items: center; gap: 5px; padding: 12px 16px; }
.pagination .pg {
    min-width: 30px; height: 30px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 6px;
    font-size: 12.5px; color: var(--text-2); background: var(--content-bg);
    transition: var(--transition);
}
.pagination .pg:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .pg.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pagination .pg.disabled { opacity: .45; pointer-events: none; }
.pagination .pg-info { font-size: 12px; color: var(--text-3); margin-right: 4px; }

/* ============================================
   帖子页 postbit
   ============================================ */
.thread-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.thread-head h1 { font-size: 20px; font-weight: 700; line-height: 1.35; }
.thread-head .th-sub { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.thread-head .th-sub .th-author { color: var(--accent); }

.post {
    display: flex; border-bottom: 1px solid var(--border);
}
.post:last-of-type { border-bottom: none; }

/* 左侧用户信息栏 */
.postbit {
    width: 190px; flex-shrink: 0; padding: 18px 16px 14px;
    background: var(--card-alt); border-right: 1px solid var(--border);
    text-align: center;
}
.pb-avatar {
    width: 62px; height: 62px; margin: 0 auto 10px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 25px; font-weight: 600; color: #fff;
    background: linear-gradient(145deg, #3b4a63, #2a3548);
    border: 2px solid #0f172a; box-shadow: 0 0 0 1px var(--border-strong), 0 2px 6px rgba(0,0,0,.4);
}
.pb-name { font-size: 14px; font-weight: 700; color: var(--text-1); word-break: break-all; }
.pb-name a { color: var(--text-1); }
.pb-name a:hover { color: var(--accent); text-decoration: none; }
.pb-group { margin: 7px 0 10px; }
.pb-detail { font-size: 11.5px; color: var(--text-3); line-height: 1.7; }
.pb-detail b { color: var(--text-2); font-weight: 500; }
.pb-detail .row { display: flex; justify-content: space-between; gap: 6px; }

/* 右侧正文 */
.post-main { flex: 1; min-width: 0; padding: 16px 20px 14px; }
.post-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 12px; color: var(--text-3); margin-bottom: 12px;
}
.post-num { font-weight: 600; color: var(--text-2); }
.post-date { color: var(--text-3); }
.post-edited {
    font-size: 11px; color: var(--text-3);
    border: 1px solid var(--border); border-radius: 4px;
    padding: 1px 6px; cursor: default;
}
.post-actions { margin-left: auto; display: flex; gap: 4px; }
.post-actions a, .post-actions button {
    font-size: 12px; color: var(--text-3); background: none; border: none;
    padding: 3px 8px; border-radius: 5px; transition: var(--transition);
}
.post-actions a:hover, .post-actions button:hover { background: var(--card-hover); color: var(--accent); text-decoration: none; }

.post-body { font-size: 14px; color: var(--text-1); word-wrap: break-word; }
.post-body p { margin-bottom: 10px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body blockquote {
    margin: 10px 0; padding: 9px 13px; border-left: 3px solid var(--accent);
    background: var(--accent-soft); border-radius: 0 6px 6px 0;
    color: var(--text-2); font-size: 13.5px;
}
.post-body code {
    font-family: var(--font-mono); font-size: 12.5px;
    background: var(--card-alt); border: 1px solid var(--border);
    border-radius: 4px; padding: 1px 6px;
}
.post-body pre {
    background: #0b1020; border: 1px solid var(--border); border-radius: 6px;
    padding: 10px 12px; overflow-x: auto; margin: 10px 0;
}
.post-body pre code { background: none; border: none; padding: 0; }
.post-body h1, .post-body h2, .post-body h3 { margin: 14px 0 8px; font-weight: 700; }
.post-body h1 { font-size: 18px; } .post-body h2 { font-size: 16.5px; } .post-body h3 { font-size: 15px; }
.post-body ul, .post-body ol { margin: 8px 0 10px; padding-left: 22px; }
.post-body li { margin-bottom: 4px; }
.post-body a { color: var(--accent); text-decoration: underline; }
.post-body img { max-width: 100%; border-radius: 6px; margin: 6px 0; }
.post-body hr { border: none; border-top: 1px solid var(--border-strong); margin: 14px 0; }
.post-body del, .post-body s { color: var(--text-3); }
.post-sign {
    margin-top: 18px; padding-top: 10px; border-top: 1px dashed var(--border-strong);
    font-size: 12px; color: var(--text-3);
}
.post-sign .sig-img { margin-top: 6px; border-radius: 6px; max-width: 100%; }

/* ============================================
   回复框
   ============================================ */
.reply-box { padding: 16px 20px; }
.reply-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.reply-box .locked-tip {
    padding: 11px 14px; border-radius: 6px; font-size: 13px;
    background: var(--gray-soft); border: 1px solid var(--border);
    color: var(--text-2);
}

/* 上一主题 / 下一主题 */
.th-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 12.5px; }
.th-nav a { color: var(--text-2); }
.th-nav a:hover { color: var(--accent); }

/* ============================================
   表单 (登录/注册/发帖)
   ============================================ */
.auth-wrap {
    max-width: 430px; margin: 30px auto 50px;
    display: flex; flex-direction: column; align-items: center;
}
.auth-card {
    width: 100%; background: var(--content-bg);
    border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-md); padding: 34px 34px 28px;
}
.auth-logo {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(145deg, #22c55e, #15803d);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 12px rgba(21, 128, 61, .35);
}
.auth-logo svg { width: 30px; height: 30px; color: #fff; }
.auth-card h1 { font-size: 20px; font-weight: 700; text-align: center; }
.auth-sub { font-size: 12.5px; color: var(--text-3); text-align: center; margin: 5px 0 22px; }

/* ---- 登录/注册 (参考 GTA World UCP 布局) ---- */
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head h1 { font-size: 23px; font-weight: 700; letter-spacing: .01em; }
.auth-head h4 { font-size: 13px; color: var(--text-3); font-weight: 400; margin-top: 4px; line-height: 1.5; }
.form-group-login { margin-bottom: 12px; }
.form-group-login .form-input { height: 44px; font-size: 14px; }
.form-links { display: flex; justify-content: flex-end; margin: 2px 0 14px; font-size: 12.5px; }
.btn-block-login { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14px; }
.useful-links { display: flex; gap: 20px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.useful-links a { color: var(--text-3); font-size: 12.5px; }
.useful-links a:hover { color: var(--accent); }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form-group label .req { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 9px 12px; font-size: 13.5px; color: var(--text-1);
    background: #0a101e; border: 1px solid var(--border); border-radius: 6px;
    transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); background: #0a101e;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.form-check input { margin-top: 2px; }
.form-check a { font-weight: 500; }

.auth-note {
    width: 100%; margin-top: 14px; padding: 11px 14px;
    border-radius: 6px; font-size: 12.5px; line-height: 1.6;
    background: var(--orange-soft); border: 1px solid #f1ddcc; color: var(--orange);
}
.auth-foot { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.auth-foot a { font-weight: 600; }

/* 发帖页 */
.composer { max-width: 820px; margin: 0 auto 40px; }
.composer .card { padding: 22px 24px 24px; }
.composer h1 { font-size: 19px; font-weight: 700; margin-bottom: 18px; }
.composer .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.composer-toolbar {
    display: flex; gap: 4px; padding: 7px 9px; margin-bottom: 10px;
    background: var(--card-alt); border: 1px solid var(--border); border-radius: 6px;
}
.composer-toolbar button {
    background: none; border: none; color: var(--text-2); font-size: 14px;
    width: 30px; height: 28px; border-radius: 5px; transition: var(--transition);
}
.composer-toolbar button:hover { background: #1c2a42; color: var(--accent); box-shadow: var(--shadow-sm); }
.composer-toolbar button.active { background: var(--accent); color: #04120b; }
.composer-toolbar button.busy { opacity: .5; pointer-events: none; }
.composer-toolbar button[data-preview] { width: auto; padding: 0 12px; font-size: 12.5px; }
.composer-sep {
    width: 1px; height: 18px; margin: 0 5px; align-self: center;
    background: var(--border-strong); opacity: .5;
}
.composer-hint {
    margin-top: 8px; font-size: 12px; color: var(--text-3); line-height: 1.8;
}
.composer-hint code {
    font-family: var(--font-mono); font-size: 11.5px;
    background: var(--card-alt); border: 1px solid var(--border);
    border-radius: 4px; padding: 1px 5px;
}

/* 预览容器 (隐藏时由 [hidden] 收起) */
.markdown-preview {
    min-height: 140px; padding: 14px 16px; margin-bottom: 10px;
    background: var(--card-alt); border: 1px solid var(--border); border-radius: 0 0 6px 6px;
    font-size: 14px; color: var(--text-1); word-wrap: break-word;
}
.markdown-preview[hidden] { display: none; }
.markdown-preview p { margin-bottom: 10px; }
.markdown-preview p:last-child { margin-bottom: 0; }
.markdown-preview blockquote {
    margin: 10px 0; padding: 9px 13px; border-left: 3px solid var(--accent);
    background: var(--accent-soft); border-radius: 0 6px 6px 0;
    color: var(--text-2); font-size: 13.5px;
}
.markdown-preview code {
    font-family: var(--font-mono); font-size: 12.5px;
    background: var(--card-alt); border: 1px solid var(--border);
    border-radius: 4px; padding: 1px 6px;
}
.markdown-preview pre {
    background: #0b1020; border: 1px solid var(--border); border-radius: 6px;
    padding: 10px 12px; overflow-x: auto; margin: 10px 0;
}
.markdown-preview pre code { background: none; border: none; padding: 0; }
.markdown-preview img { max-width: 100%; border-radius: 6px; }

/* 表情调色板 */
.emoji-palette {
    position: absolute; z-index: 999; display: grid;
    grid-template-columns: repeat(6, 1fr); gap: 2px;
    padding: 6px; background: var(--card); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.emoji-palette button {
    background: none; border: none; font-size: 19px; cursor: pointer;
    width: 34px; height: 32px; border-radius: 5px; transition: var(--transition);
}
.emoji-palette button:hover { background: #1c2a42; transform: scale(1.15); }

/* ============================================
   侧边栏
   ============================================ */
.widget { background: var(--content-bg); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.widget-title {
    padding: 10px 14px; font-size: 12.5px; font-weight: 700;
    background: var(--category-bar); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 7px;
}
.widget-body { padding: 12px 14px; }

.w-online { display: flex; flex-wrap: wrap; gap: 8px; }
.w-online .onl {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-2);
    background: var(--card-alt); border: 1px solid var(--border);
    padding: 3px 9px; border-radius: 999px;
}
.w-online .onl .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.w-online .onl.guest { opacity: .75; }
.w-online .onl.guest .dot { background: var(--gray); }

.w-list { list-style: none; }
.w-list li { padding: 7px 0; border-bottom: 1px dashed #24324a; }
.w-list li:last-child { border-bottom: none; padding-bottom: 0; }
.w-list a { font-size: 13px; color: var(--text-1); font-weight: 500; }
.w-list a:hover { color: var(--accent); text-decoration: none; }
.w-list .wl-meta { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.w-stats .st-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.w-stats .st-row span { color: var(--text-3); }
.w-stats .st-row b { font-weight: 600; color: var(--text-1); }

/* ============================================
   徽章 (用户组)
   ============================================ */
.badge {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 9px; border-radius: 999px; letter-spacing: .02em;
    white-space: nowrap; line-height: 1.6;
}
.badge-admin { background: var(--red-soft); color: var(--red); }
.badge-mod { background: var(--green-soft); color: var(--green); }
.badge-member { background: var(--cyan-soft); color: var(--cyan); }
.badge-pending { background: var(--gray-soft); color: var(--gray); }
.badge-ic { background: var(--purple-soft); color: var(--purple); }
.badge-staff { background: var(--orange-soft); color: var(--orange); }

/* 头像 (帖子内缩写) */
.avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

/* ============================================
   页脚
   ============================================ */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--content-bg);
    padding: 20px 0 26px; margin-top: 10px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner .f-left { font-size: 12.5px; color: var(--text-3); }
.footer-inner .f-left b { color: var(--text-2); }
.footer-links { display: flex; gap: 16px; font-size: 12.5px; }
.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--accent); }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1000px) {
    .layout { grid-template-columns: 1fr; }
    .side-col { position: static; }
    .header-search { max-width: 180px; }
    .node-last { display: none; }
    .node-count { width: 56px; }
}
@media (max-width: 820px) {
    .header-inner { height: auto; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
    .main-nav {
        order: 5; width: 100%; flex-wrap: wrap; gap: 0;
        border-top: 1px solid rgba(255,255,255,.15); padding-top: 6px; margin-left: 0;
        display: none;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 6px 10px; font-size: 13px; }
    .header-search { order: 4; max-width: none; flex-basis: 100%; margin-left: 0; }
    .nav-toggle { display: inline-flex; }
    .user-actions { margin-left: auto; }
    /* 板块表折叠成列表 */
    .node-table thead { display: none; }
    .node-table, .node-table tbody, .node-table tr, .node-table td { display: block; width: 100%; }
    .node-table tr { padding: 12px 14px; border-bottom: 1px solid #1a2736; }
    .node-table td { padding: 0; border: none; }
    .node-count { text-align: left; width: auto; margin-top: 8px; display: flex; gap: 16px; }
    .node-count small { display: inline; margin-left: 3px; }
    /* 帖子列表折叠 */
    .thread-table thead { display: none; }
    .thread-table, .thread-table tbody, .thread-table tr, .thread-table td { display: block; width: 100%; }
    .thread-table tr { padding: 12px 14px; border-bottom: 1px solid #1a2736; }
    .thread-table td { padding: 2px 0; border: none; }
    .td-author, .td-counts, .td-last { width: auto; }
    .td-counts { text-align: left; }
    .td-counts small { display: inline; margin-left: 3px; }
    /* postbit 移到顶部 */
    .post { flex-direction: column; }
    .postbit {
        width: 100%; border-right: none; border-bottom: 1px solid var(--border);
        display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 16px;
    }
    .pb-avatar { margin: 0; width: 46px; height: 46px; font-size: 19px; }
    .pb-detail { display: none; }
    .pb-group { margin: 3px 0 0; }
    .pb-right { text-align: left; }
    .welcome { padding: 20px 18px; }
    .composer .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .welcome-stats { gap: 18px; }
    .welcome-stats .ws b { font-size: 17px; }
    .post-main { padding: 14px 14px 12px; }
    .thread-head h1 { font-size: 17px; }
}

/* ============================================
   图片灯箱 (点击帖子图片放大)
   ============================================ */
.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(2, 6, 23, .95);
    display: flex; flex-direction: column;
}
.lb-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; color: var(--text-2);
    border-bottom: 1px solid var(--border);
}
.lb-title { font-size: 13px; }
.lb-zoom { margin-left: auto; display: flex; gap: 6px; }
.lb-zoom button, .lb-close {
    background: var(--card-alt); border: 1px solid var(--border); color: var(--text-1);
    border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 13px; transition: var(--transition);
}
.lb-zoom button:hover, .lb-close:hover { border-color: var(--accent); color: var(--accent); }
.lb-close { font-size: 17px; padding: 6px 15px; }
.lb-stage {
    flex: 1; display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 20px;
}
.lb-stage img {
    max-width: 100%; max-height: 100%; border-radius: 6px;
    object-fit: contain; user-select: none; transition: transform .08s ease;
}

/* ============================================
   白名单申请表 / 注册勾选
   ============================================ */
.agree-line {
    display: flex; align-items: center; gap: 8px;
    margin: 2px 0 14px; font-size: 13px; color: var(--text-2);
    cursor: pointer;
}
.agree-line input { width: 15px; height: 15px; accent-color: var(--accent); }
.agree-line a { color: var(--accent); }

.apply-q {
    padding: 13px 0; border-bottom: 1px dashed var(--border);
}
.apply-q:last-of-type { border-bottom: none; }
.apply-q-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.apply-q-desc { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.apply-options { display: flex; flex-direction: column; gap: 7px; }
.apply-opt {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 13.5px; color: var(--text-1); cursor: pointer;
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
    transition: var(--transition);
}
.apply-opt:hover { border-color: var(--accent); background: var(--card-hover); }
.apply-opt input { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.apply-opt span { line-height: 1.5; }

/* ============================================
   管理页 申请答题展示
   ============================================ */
.app-tr { background: transparent; }
.app-details { font-size: 13px; color: var(--text-2); }
.app-details summary {
    cursor: pointer; color: var(--accent); font-size: 12.5px;
    padding: 4px 0; user-select: none;
}
.app-details summary:hover { text-decoration: underline; }
.app-answers { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.app-line { display: grid; grid-template-columns: 220px 1fr; gap: 10px; }
.app-q { color: var(--text-3); font-size: 12px; padding-top: 2px; }
.app-a { color: var(--text-1); font-size: 12.5px; }
@media (max-width: 640px) { .app-line { grid-template-columns: 1fr; } }
