/* ============================================================
 * BBS论坛模板 样式表 v2 — 全面美化
 * 仿Discuz! X3 精致蓝白风格
 * ============================================================ */

:root {
    --primary:        #2b7ad9;
    --primary-dark:   #1a5fad;
    --primary-deeper: #12478a;
    --primary-light:  #5a9de6;
    --primary-bg:     #eef4fc;
    --primary-bg2:    #dceaf8;
    --accent:         #f0a030;
    --bg:             #eef1f6;
    --card-bg:        #ffffff;
    --border:         #d0d9e4;
    --border-light:   #e4e9f0;
    --border-lighter: #f0f3f7;
    --text:           #2c3e50;
    --text-light:     #5a6b7d;
    --text-muted:     #95a5b6;
    --link:           #2b7ad9;
    --link-hover:     #c0392b;
    --success:        #27ae60;
    --warning:        #f39c12;
    --danger:         #e74c3c;
    --radius:         8px;
    --radius-sm:      4px;
    --radius-lg:      12px;
    --shadow:         0 2px 12px rgba(42,122,217,.06);
    --shadow-hover:   0 4px 20px rgba(42,122,217,.1);
    --container:      980px;
    --nav-h:          46px;
    --topbar-h:       34px;
    --header-h:       72px;
    --transition:     .2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-width: 360px;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--link-hover); }
a:visited { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ============ 容器 ============ */
.bbs-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 12px;
}

.bbs-muted { color: var(--text-muted); }

.bbs-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
    background: #fff;
    border-radius: var(--radius);
    font-size: 15px;
}

/* ============ 顶部公告 ============ */
.bbs-topnotice {
    background: linear-gradient(90deg, #fffbe6 0%, #fff8e0 100%);
    border-bottom: 1px solid #ffe58f;
    color: #ad6800;
    font-size: 13px;
    padding: 7px 0;
    text-align: center;
}
.bbs-topnotice-inner { display: flex; align-items: center; justify-content: center; gap: 8px; }
.bbs-topnotice-icon { font-size: 15px; }
.bbs-topnotice-text { flex: none; }

/* ============ 顶部工具条 ============ */
.bbs-topbar {
    background: #1e2a3a;
    color: #8899aa;
    font-size: 12px;
    padding: 0;
    height: var(--topbar-h);
    line-height: var(--topbar-h);
}
.bbs-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.bbs-topbar-left .bbs-topbar-welcome { color: #aabbcc; font-size: 12px; }
.bbs-topbar-right { display: flex; align-items: center; gap: 6px; height: 100%; }
.bbs-topbar-right a {
    color: #8899aa;
    text-decoration: none;
    padding: 0 12px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition);
}
.bbs-topbar-right a:hover { color: #fff; background: rgba(255,255,255,.06); }
.bbs-topbar-user {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}
.bbs-topbar-user img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
}

/* ============ 站点头部 ============ */
.bbs-header {
    background: #fff;
    border-bottom: 3px solid var(--primary);
    height: var(--header-h);
    display: flex;
    align-items: center;
}
.bbs-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.bbs-logo { display: flex; align-items: center; gap: 12px; }
.bbs-logo-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.bbs-logo-text:hover { text-decoration: none; color: var(--primary-dark); }
.bbs-logo-sub {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
    border-left: 1px solid var(--border);
    padding-left: 12px;
    line-height: 1;
}
.bbs-logo img { max-height: 44px; }

.bbs-search { flex-shrink: 0; }
.bbs-search form {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    background: var(--border-lighter);
    border: 1px solid var(--border-light);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.bbs-search form:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(43,122,217,.12);
    background: #fff;
}
.bbs-search input {
    width: 240px;
    padding: 7px 16px;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: var(--text);
}
.bbs-search input::placeholder { color: var(--text-muted); }
.bbs-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background var(--transition);
    border-radius: 0 20px 20px 0;
}
.bbs-search button:hover { background: var(--primary-dark); }

/* ============ 主导航 ============ */
.bbs-nav {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    position: relative;
    z-index: 90;
}
.bbs-nav-list {
    display: flex;
    height: var(--nav-h);
    align-items: stretch;
}
.bbs-nav-list > li {
    position: relative;
}
.bbs-nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    color: rgba(255,255,255,.92);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition);
    white-space: nowrap;
}
.bbs-nav-list > li > a:hover,
.bbs-nav-list > li.active > a {
    background: rgba(0,0,0,.12);
    text-decoration: none;
    color: #fff;
}
.bbs-nav-list > li > a:visited { color: rgba(255,255,255,.92); }

.bbs-nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 170px;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
    z-index: 100;
    display: none;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.bbs-nav-dropdown:hover .bbs-nav-submenu { display: block; }
.bbs-nav-submenu li a {
    display: block;
    padding: 9px 18px;
    color: var(--text);
    font-size: 13px;
    transition: background var(--transition);
}
.bbs-nav-submenu li a:hover { background: var(--primary-bg); color: var(--primary); text-decoration: none; }

/* ============ 主体 ============ */
.bbs-main {
    min-height: 60vh;
    padding-top: 20px;
    padding-bottom: 24px;
}

.bbs-content-wrap {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 12px;
    align-items: start;
}

/* 主内容区占左栏 */
.bbs-content-wrap > .bbs-group,
.bbs-content-wrap > .bbs-thread-list,
.bbs-content-wrap > .bbs-welcome,
.bbs-content-wrap > .bbs-stats-bar,
.bbs-content-wrap > .bbs-breadcrumb,
.bbs-content-wrap > .bbs-thread-list-header,
.bbs-content-wrap > .bbs-thread-actions-top,
.bbs-content-wrap > .bbs-thread-meta-bar,
.bbs-content-wrap > .bbs-post,
.bbs-content-wrap > .bbs-replies,
.bbs-content-wrap > .bbs-reply-form-wrap,
.bbs-content-wrap > .bbs-pagination,
.bbs-content-wrap > .bbs-neighbor-wrap,
.bbs-content-wrap > .bbs-page-wrap,
.bbs-content-wrap > .bbs-404,
.bbs-content-wrap > .bbs-pw-wrap,
.bbs-content-wrap > .bbs-uc-header,
.bbs-content-wrap > .bbs-uc-nav,
.bbs-content-wrap > .bbs-uc-body,
.bbs-content-wrap > .bbs-custom-block,
.bbs-content-wrap > .bbs-thread-list-header + .bbs-thread-list {
    grid-column: 1 / 2;
}

.bbs-sidebar { grid-column: 2 / 3; }

/* ============================================================
 * 欢迎语
 * ============================================================ */
.bbs-welcome {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fff 100%);
    border: 1px solid var(--primary-bg2);
    border-left: 4px solid var(--primary);
    padding: 14px 20px;
    border-radius: var(--radius);
    color: var(--text);
    margin-bottom: 16px;
    font-size: 14px;
}

/* ============================================================
 * 统计条
 * ============================================================ */
.bbs-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    background: #fff;
    padding: 16px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    align-items: center;
    box-shadow: var(--shadow);
}
.bbs-stats-item { display: flex; align-items: baseline; gap: 6px; }
.bbs-stats-item .num {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.bbs-stats-item .lbl { font-size: 13px; color: var(--text-muted); }
.bbs-stats-welcome { margin-left: auto; }
.bbs-stats-welcome .num { font-size: 14px; font-weight: 500; }

/* ============================================================
 * 版块分组
 * ============================================================ */
.bbs-group {
    background: #fff;
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition);
}
.bbs-group:hover { box-shadow: var(--shadow-hover); }

.bbs-group-head {
    background: linear-gradient(135deg, #f8fafd 0%, #edf2f8 100%);
    padding: 12px 20px;
    border-bottom: 2px solid var(--primary-bg2);
    display: flex;
    align-items: center;
    gap: 12px;
}
.bbs-group-head h2 {
    font-size: 15px;
    color: var(--primary-deeper);
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}
.bbs-group-head h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.bbs-group-head h2 a { color: var(--primary-deeper); }
.bbs-group-head h2 a:hover { color: var(--primary); }
.bbs-group-desc { font-size: 12px; color: var(--text-muted); }

.bbs-group-body { padding: 0; }

.bbs-forum-row {
    display: grid;
    grid-template-columns: 56px minmax(220px, 1fr) 90px 90px minmax(190px, 230px);
    gap: 16px;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border-lighter);
    transition: background var(--transition);
}
.bbs-forum-row:last-child { border-bottom: none; }
.bbs-forum-row:hover { background: #fafcfe; }

.bbs-forum-icon { display: flex; align-items: center; justify-content: center; }
.bbs-forum-icon-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary-bg2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--transition);
    border: 1px solid rgba(43,122,217,.1);
}
.bbs-forum-row:hover .bbs-forum-icon-mark {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(43,122,217,.15);
}
.bbs-forum-icon-mark.closed { background: #f0f0f0; opacity: .65; border-color: var(--border-light); }

.bbs-forum-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
}
.bbs-forum-info h3 a { color: var(--text); }
.bbs-forum-info h3 a:hover { color: var(--primary); }
.bbs-forum-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.bbs-forum-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 1px 8px;
    font-size: 11px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 500;
}

.bbs-link-btn {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 2px;
    transition: background var(--transition);
}
.bbs-link-btn:hover { background: var(--primary-dark); text-decoration: none; }

.bbs-forum-stat {
    text-align: center;
    padding: 4px 0;
    border-left: 1px solid var(--border-lighter);
}
.bbs-forum-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.bbs-forum-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.bbs-forum-last {
    font-size: 12px;
    overflow: hidden;
    padding-left: 4px;
    border-left: 1px solid var(--border-lighter);
}
.bbs-last-title a {
    color: var(--text);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: color var(--transition);
}
.bbs-last-title a:hover { color: var(--primary); }
.bbs-last-meta {
    display: flex;
    gap: 6px;
    color: var(--text-muted);
    flex-wrap: wrap;
    font-size: 11px;
    align-items: center;
}
.bbs-last-author {
    color: var(--primary);
    font-weight: 500;
}
.bbs-last-date::before { content: '·'; margin-right: 4px; color: var(--border); }

/* ============================================================
 * 面包屑
 * ============================================================ */
.bbs-breadcrumb {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 10px 18px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
    box-shadow: var(--shadow);
}
.bbs-breadcrumb a { color: var(--primary); font-weight: 500; }
.bbs-breadcrumb .bbs-sep { margin: 0 8px; color: var(--border); }
.bbs-breadcrumb .bbs-current { color: var(--text); font-weight: 500; }

/* ============================================================
 * 帖子列表头部
 * ============================================================ */
.bbs-thread-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    margin-bottom: 8px;
}
.bbs-thread-list-title {
    font-size: 20px;
    color: var(--text);
    font-weight: 700;
}
.bbs-thread-actions-right { display: flex; gap: 8px; align-items: center; }

/* ============================================================
 * 帖子列表
 * ============================================================ */
.bbs-thread-list {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}
.bbs-thread-thead,
.bbs-thread-row {
    display: grid;
    grid-template-columns: 1fr 130px 130px 150px;
    gap: 10px;
    padding: 11px 20px;
    align-items: center;
}
.bbs-thread-thead {
    background: linear-gradient(180deg, #f8fafd 0%, #f0f4f9 100%);
    border-bottom: 2px solid var(--primary-bg2);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.bbs-thread-row {
    border-bottom: 1px solid var(--border-lighter);
    transition: background var(--transition);
}
.bbs-thread-row:last-child { border-bottom: none; }
.bbs-thread-row:hover { background: #fafcfe; }

.bbs-thread-row .col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.bbs-thread-flag { display: inline-block; flex-shrink: 0; }
.bbs-topflag {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}
.bbs-topflag-sort {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
}

.bbs-thread-title {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}
.bbs-thread-title:hover { color: var(--primary); }

.bbs-thread-comnum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary);
    padding: 0 7px;
    border-radius: 10px;
    font-size: 11px;
    min-width: 22px;
    height: 18px;
    font-weight: 600;
    flex-shrink: 0;
}
.bbs-edit-link {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 4px;
    flex-shrink: 0;
}
.bbs-edit-link:hover { color: var(--primary); }
.bbs-thread-sort-tag {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    flex-shrink: 0;
}

.bbs-thread-row .col-author {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}
.bbs-thread-author {
    display: block;
    color: var(--primary);
    margin-bottom: 2px;
    font-weight: 500;
}
.bbs-thread-date { color: var(--text-muted); font-size: 11px; }

.bbs-thread-row .col-stat {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}
.bbs-thread-replies, .bbs-thread-views { line-height: 1.6; }
.bbs-thread-replies strong, .bbs-thread-views strong { color: var(--text); font-weight: 600; }

.bbs-thread-row .col-last {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.bbs-thread-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* ============================================================
 * 帖子详情
 * ============================================================ */
.bbs-thread-actions-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0;
}
.bbs-thread-detail-title {
    font-size: 22px;
    color: var(--text);
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
}

.bbs-thread-meta-bar {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px 20px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--text-light);
    box-shadow: var(--shadow);
}
.bbs-thread-meta-item i {
    margin-right: 4px;
    font-style: normal;
    opacity: .6;
}

/* 楼主帖 / 回复 */
.bbs-post, .bbs-reply {
    background: #fff;
    border-radius: var(--radius);
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: 160px 1fr;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.bbs-post-side, .bbs-reply-avatar {
    background: linear-gradient(180deg, #f8fafd 0%, #f0f4f9 100%);
    border-right: 1px solid var(--border-light);
    padding: 20px 14px;
    text-align: center;
}
.bbs-post-avatar img,
.bbs-reply-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    margin: 0 auto 10px;
}
.bbs-post-author a {
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}
.bbs-post-author-meta {
    font-size: 12px;
    color: var(--text-muted);
}
.bbs-post-author-stat { margin-top: 4px; font-size: 12px; color: var(--text-muted); }

.bbs-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    margin-bottom: 4px;
    font-weight: 600;
}
.bbs-badge-admin { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; }
.bbs-badge-member { background: linear-gradient(135deg, #27ae60, #1e8449); color: #fff; }
.bbs-badge-guest { background: #bbb; color: #fff; }

.bbs-reply-avatar { padding: 14px 10px; }
.bbs-reply-avatar img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.bbs-post-main, .bbs-reply-main {
    padding: 18px 24px;
    min-width: 0;
}
.bbs-post-head, .bbs-reply-head {
    border-bottom: 1px solid var(--border-lighter);
    padding-bottom: 10px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}
.bbs-post-floor, .bbs-reply-floor {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}
.bbs-reply-author {
    color: var(--primary);
    font-weight: 600;
}
.bbs-reply-badge {
    background: var(--success);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.bbs-reply-badge-guest { background: #aaa; }
.bbs-post-date, .bbs-reply-date { color: var(--text-muted); }

.bbs-post-actions { margin-left: auto; }
.bbs-post-actions a,
.bbs-reply-actions a {
    color: var(--text-muted);
    margin-left: 12px;
    font-size: 12px;
    transition: color var(--transition);
}
.bbs-post-actions a:hover,
.bbs-reply-actions a:hover { color: var(--primary); }
.bbs-reply-actions { margin-left: auto; }

.bbs-post-content, .bbs-reply-content {
    color: var(--text);
    font-size: 15px;
    line-height: 1.85;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.bbs-post-content p,
.bbs-reply-content p { margin-bottom: 1em; }
.bbs-post-content img,
.bbs-reply-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.bbs-post-content pre,
.bbs-reply-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 16px;
    border-radius: var(--radius);
    overflow: auto;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.5;
}
.bbs-post-content blockquote,
.bbs-reply-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-bg);
    padding: 12px 16px;
    margin: 12px 0;
    color: var(--text-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.bbs-post-content h1,.bbs-reply-content h1 { font-size: 22px; margin: .8em 0 .4em; }
.bbs-post-content h2,.bbs-reply-content h2 { font-size: 19px; margin: .8em 0 .4em; }
.bbs-post-content h3,.bbs-reply-content h3 { font-size: 16px; margin: .6em 0 .3em; }

.bbs-post-cover { margin-bottom: 14px; }
.bbs-post-cover img {
    max-width: 100%;
    border-radius: var(--radius);
}

.bbs-post-foot {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-light);
}
.bbs-post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bbs-tag {
    display: inline-block;
    background: var(--border-lighter);
    color: var(--text-light);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    transition: all var(--transition);
}
.bbs-tag:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* 回复列表 */
.bbs-replies-head {
    background: #fff;
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 14px 20px;
    box-shadow: var(--shadow);
}
.bbs-replies-head h2 {
    font-size: 16px;
    color: var(--text);
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}
.bbs-replies-head h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.bbs-replies-body {
    background: var(--border-lighter);
    padding: 14px;
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}
.bbs-replies-body .bbs-empty {
    background: #fff;
    padding: 36px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ============================================================
 * 回复表单
 * ============================================================ */
.bbs-reply-form-wrap { margin-top: 16px; }
.bbs-reply-form {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}
.bbs-reply-form-title {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-bg);
    font-weight: 700;
}
.bbs-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.bbs-form-row input,
.bbs-form-row textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: #fff;
}
.bbs-form-row input { flex: 1; min-width: 120px; }
.bbs-form-row input:focus,
.bbs-form-row textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(43,122,217,.1);
}
.bbs-form-row textarea {
    width: 100%;
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}
.bbs-form-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.bbs-ubb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    background: var(--border-lighter);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-light);
    user-select: none;
    transition: all var(--transition);
    font-weight: 600;
}
.bbs-ubb:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-bg2); }

.bbs-verify-row { align-items: center; }
.bbs-verify-row input { max-width: 140px; }
.bbs-verify-row img { height: 38px; cursor: pointer; border-radius: var(--radius-sm); }

.bbs-form-submit { justify-content: flex-end; }

.bbs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    background: #fff;
    color: var(--text);
    line-height: 1.5;
    font-weight: 500;
    gap: 4px;
}
.bbs-btn:hover { text-decoration: none; }
.bbs-btn-primary {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #fff !important;
    border-color: var(--primary-dark);
    box-shadow: 0 2px 4px rgba(43,122,217,.2);
}
.bbs-btn-primary:hover {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px rgba(43,122,217,.3);
}
.bbs-btn-default {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}
.bbs-btn-default:hover { background: var(--border-lighter); }
.bbs-btn-disabled {
    background: var(--border-lighter);
    color: var(--text-muted) !important;
    cursor: not-allowed;
    border-color: var(--border-light);
    box-shadow: none;
}
.bbs-btn-block { display: flex; width: 100%; text-align: center; }

/* ============================================================
 * 分页
 * ============================================================ */
.bbs-pagination {
    text-align: center;
    padding: 20px 0;
    margin-top: 8px;
}
.bbs-pagination a,
.bbs-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 0 3px;
    color: var(--text);
    background: #fff;
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition);
}
.bbs-pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(43,122,217,.1);
}
.bbs-pagination .current,
.bbs-pagination a.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(43,122,217,.2);
}

/* ============================================================
 * 自定义分组框
 * ============================================================ */
.bbs-custom-block .bbs-custom-content {
    padding: 16px 22px;
    line-height: 1.8;
    color: var(--text);
    font-size: 14px;
}

/* ============================================================
 * 邻近文章
 * ============================================================ */
.bbs-neighbor-wrap {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}
.bbs-neighbor {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-light);
}
.bbs-neighbor span { color: var(--text-muted); margin-right: 4px; }

/* ============================================================
 * 静态页面
 * ============================================================ */
.bbs-page-wrap {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
}
.bbs-page-title {
    font-size: 24px;
    color: var(--text);
    margin-bottom: 14px;
    text-align: center;
    font-weight: 700;
}
.bbs-page-meta {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}
.bbs-page-meta span { margin: 0 8px; }
.bbs-page-cover { margin-bottom: 20px; text-align: center; }
.bbs-page-cover img { max-height: 360px; display: inline-block; border-radius: var(--radius); }
.bbs-page-tags { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--border-light); }

/* ============================================================
 * 404 / 密码页
 * ============================================================ */
.bbs-404 {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 72px 32px;
    text-align: center;
    box-shadow: var(--shadow);
}
.bbs-404-code {
    font-size: 108px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}
.bbs-404 h2 { margin-top: 12px; color: var(--text); font-weight: 700; }
.bbs-404-desc { color: var(--text-muted); margin: 12px 0 28px; }
.bbs-404-actions { display: flex; gap: 12px; justify-content: center; }

.bbs-pw-wrap {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
    max-width: 460px;
    margin: 48px auto;
    box-shadow: var(--shadow);
}
.bbs-pw-wrap h2 { color: var(--primary); margin-bottom: 14px; font-weight: 700; }
.bbs-pw-desc { color: var(--text-muted); margin-bottom: 18px; }
.bbs-pw-form {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.bbs-pw-form input[type="password"] {
    flex: 1;
    max-width: 260px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* ============================================================
 * 用户中心
 * ============================================================ */
.bbs-uc-header {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.bbs-uc-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.bbs-uc-info h1 { font-size: 22px; color: var(--text); margin-bottom: 8px; font-weight: 700; }
.bbs-uc-meta {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 13px;
    flex-wrap: wrap;
}
.bbs-uc-meta strong { color: var(--primary); }
.bbs-uc-bio { margin-top: 6px; color: var(--text-muted); font-size: 13px; }

.bbs-uc-nav {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.bbs-uc-nav a {
    padding: 12px 24px;
    color: var(--text);
    border-right: 1px solid var(--border-lighter);
    text-decoration: none;
    transition: all var(--transition);
    font-weight: 500;
    font-size: 14px;
}
.bbs-uc-nav a:hover { background: var(--primary-bg); text-decoration: none; color: var(--primary); }
.bbs-uc-nav a.active {
    background: var(--primary);
    color: #fff;
}

.bbs-uc-body {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.bbs-uc-section { margin-bottom: 28px; }
.bbs-uc-section:last-child { margin-bottom: 0; }
.bbs-uc-section-title {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-bg);
    font-weight: 700;
}

.bbs-uc-quick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.bbs-uc-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid transparent;
}
.bbs-uc-quick-item:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(43,122,217,.2);
    transform: translateY(-2px);
}
.bbs-uc-quick-icon { font-size: 28px; }

.bbs-uc-forum-list { display: grid; gap: 12px; }
.bbs-uc-forum-group {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}
.bbs-uc-forum-group h3 {
    background: var(--primary-bg);
    padding: 10px 16px;
    color: var(--primary-deeper);
    font-size: 14px;
    font-weight: 700;
}
.bbs-uc-forum-group ul { padding: 4px 0; }
.bbs-uc-forum-group li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border-lighter);
    transition: background var(--transition);
}
.bbs-uc-forum-group li:last-child a { border-bottom: none; }
.bbs-uc-forum-group li a:hover {
    background: #fafcfe;
    text-decoration: none;
    color: var(--primary);
}
.bbs-uc-forum-arrow { color: var(--text-muted); transition: transform var(--transition); }
.bbs-uc-forum-group li a:hover .bbs-uc-forum-arrow { transform: translateX(3px); color: var(--primary); }

.bbs-uc-post-tip {
    color: var(--text-light);
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    line-height: 1.7;
}
.bbs-uc-admin-tip {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: var(--radius);
    color: #ad6800;
    font-size: 13px;
}

.bbs-uc-profile { display: grid; gap: 0; }
.bbs-uc-profile-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-lighter);
}
.bbs-uc-profile-row:last-child { border-bottom: none; }
.bbs-uc-profile-row label { color: var(--text-muted); font-size: 13px; }
.bbs-uc-profile-avatar img { width: 56px; height: 56px; border-radius: 50%; }
.bbs-uc-profile-actions { display: flex; gap: 10px; margin-top: 16px; }

.bbs-thread-row-simple {
    grid-template-columns: 1fr 200px 140px !important;
}

/* ============================================================
 * 侧边栏
 * ============================================================ */
.bbs-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bbs-widget {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition);
}
.bbs-widget:hover { box-shadow: var(--shadow-hover); }

.bbs-widget-head {
    background: linear-gradient(135deg, #f8fafd 0%, #f0f4f9 100%);
    padding: 11px 16px;
    border-bottom: 2px solid var(--primary-bg2);
}
.bbs-widget-head h3 {
    font-size: 14px;
    color: var(--primary-deeper);
    font-weight: 700;
    position: relative;
    padding-left: 12px;
}
.bbs-widget-head h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.bbs-widget-body { padding: 14px 16px; }

.bbs-widget-stats { display: flex; flex-direction: column; gap: 10px; }
.bbs-widget-stat-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
    padding: 2px 0;
}
.bbs-widget-stat-line strong { color: var(--primary); font-weight: 700; }

.bbs-widget-list ul li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-lighter);
    font-size: 13px;
}
.bbs-widget-list ul li:last-child { border-bottom: none; }
.bbs-widget-list ul li a {
    display: block;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition);
}
.bbs-widget-list ul li a:hover { color: var(--primary); }
.bbs-widget-list-meta {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.bbs-widget-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #ccc;
    color: #fff;
    font-size: 11px;
    border-radius: 4px;
    margin-right: 6px;
    font-weight: 700;
}
.bbs-widget-rank-top { background: linear-gradient(135deg, #e74c3c, #c0392b); }

/* ============================================================
 * 友情链接 + 底部
 * ============================================================ */
.bbs-friendlinks {
    background: #fff;
    border-top: 1px solid var(--border-light);
    padding: 14px 0;
    font-size: 13px;
}
.bbs-friendlinks-title {
    color: var(--text-muted);
    margin-right: 8px;
    font-weight: 500;
}
.bbs-friendlinks a {
    color: var(--text-light);
    margin-right: 16px;
    transition: color var(--transition);
}
.bbs-friendlinks a:hover { color: var(--primary); }

.bbs-footer {
    background: linear-gradient(180deg, #1e2a3a 0%, #172231 100%);
    color: #7b8fa3;
    padding: 32px 0;
    margin-top: 0;
    font-size: 13px;
    text-align: center;
}
.bbs-footer a { color: #8ea4b8; transition: color var(--transition); }
.bbs-footer a:hover { color: #fff; }
.bbs-footer-copyright,
.bbs-footer-extra,
.bbs-footer-icp,
.bbs-footer-info {
    margin-bottom: 6px;
    line-height: 1.8;
}
.bbs-footer-extra { color: #5e7283; }
.bbs-footer-powered {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.06);
    font-size: 12px;
    color: #4a5d6f;
}
.bbs-footer-powered .bbs-footer-sep { margin: 0 10px; }

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 992px) {
    .bbs-content-wrap {
        grid-template-columns: 1fr;
    }
    .bbs-sidebar { grid-column: 1; }
    .bbs-forum-row {
        grid-template-columns: 48px 1fr auto;
        grid-template-areas:
            "icon info stat"
            "icon last last";
        gap: 8px 14px;
        padding: 14px 16px;
    }
    .bbs-forum-icon  { grid-area: icon; }
    .bbs-forum-info  { grid-area: info; }
    .bbs-forum-row > .bbs-forum-stat:nth-child(3) { grid-area: stat; border-left: none; padding: 0; text-align: right; }
    .bbs-forum-row > .bbs-forum-stat:nth-child(4) { display: none; }
    .bbs-forum-last  { grid-area: last; border-left: none; padding-left: 0; }
}

@media (max-width: 768px) {
    :root { --container: 100%; }
    .bbs-header-inner { flex-direction: column; align-items: stretch; gap: 10px; }
    .bbs-header { height: auto; padding: 12px 0; }
    .bbs-search form { width: 100%; }
    .bbs-search input { flex: 1; width: auto; }
    .bbs-nav-list { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .bbs-nav-list > li > a { padding: 0 14px; white-space: nowrap; font-size: 14px; }
    .bbs-thread-thead { display: none; }
    .bbs-thread-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 14px 16px;
    }
    .bbs-thread-row .col-author,
    .bbs-thread-row .col-stat,
    .bbs-thread-row .col-last {
        font-size: 12px;
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }
    .bbs-post, .bbs-reply {
        grid-template-columns: 1fr;
    }
    .bbs-post-side, .bbs-reply-avatar {
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        border-right: none;
        border-bottom: 1px solid var(--border-lighter);
        padding: 12px 16px;
    }
    .bbs-post-avatar img,
    .bbs-reply-avatar img {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
    }
    .bbs-post-author-meta { display: flex; gap: 8px; align-items: center; margin-top: 0; }
    .bbs-thread-list-title { font-size: 18px; }
    .bbs-thread-detail-title { font-size: 18px; }
    .bbs-topbar-right { gap: 0; }
    .bbs-content-wrap { padding: 0 10px; gap: 14px; }
    /* 移动端版块行进一步简化 */
    .bbs-forum-row {
        grid-template-columns: 44px 1fr;
        grid-template-areas:
            "icon info"
            "icon stat"
            "last last";
        gap: 6px 12px;
        padding: 12px 14px;
    }
    .bbs-forum-icon-mark { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
    .bbs-forum-row > .bbs-forum-stat:nth-child(3) {
        text-align: left;
        font-size: 12px;
    }
    .bbs-forum-stat-num { font-size: 14px; display: inline; }
    .bbs-forum-stat-num::after { content: ' 主题'; font-size: 11px; color: var(--text-muted); font-weight: 400; }
    .bbs-forum-stat-lbl { display: none; }
    .bbs-forum-last { padding-top: 6px; border-top: 1px dashed var(--border-lighter); }
}

@media (max-width: 480px) {
    .bbs-container { padding: 0 10px; }
    .bbs-content-wrap { padding: 0 8px; }
    .bbs-logo-text { font-size: 20px; }
    .bbs-stats-bar { gap: 14px; padding: 12px 16px; }
    .bbs-stats-item .num { font-size: 17px; }
    .bbs-uc-header { flex-direction: column; text-align: center; }
    .bbs-uc-meta { justify-content: center; }
    .bbs-uc-nav a { padding: 10px 14px; font-size: 13px; }
    .bbs-uc-profile-row { grid-template-columns: 80px 1fr; }
    .bbs-forum-row {
        grid-template-columns: 36px 1fr;
        grid-template-areas:
            "icon info"
            "icon stat"
            "last last";
        padding: 10px 12px;
        gap: 4px 10px;
    }
    .bbs-forum-icon-mark { width: 36px; height: 36px; font-size: 18px; border-radius: 8px; }
    .bbs-forum-info h3 { font-size: 14px; }
}
