/* 论坛 BBS - 仿 bbs.esoua.com(ren天机模板:浅色蓝调) */
.bbs-page {
    --bbs-bg: #eef2f7;
    --bbs-card: #ffffff;
    --bbs-border: #dee2e6;
    --bbs-primary: #39afd1;
    --bbs-primary-dark: #2d8ea8;
    --bbs-text: #313a46;
    --bbs-muted: #6c757d;
    --bbs-radius: 8px;
    background: var(--bbs-bg);
    min-height: 60vh;
    padding: 0 0 40px;
    width: 100%;
    box-sizing: border-box;
}
body:has(.bbs-page) { background: #eef2f7; }
body:has(.bbs-page) .site-header { background: #ffffff; border-bottom: 1px solid #dee2e6; }
body:has(.bbs-page) .site-header .logo { color: #313a46; }
body:has(.bbs-page) .site-footer { background: #ffffff; color: #6c757d; border-top: 1px solid #dee2e6; }
body:has(.bbs-page) .friend-links a, body:has(.bbs-page) .friend-label { color: #6c757d; }
/* 论坛页面容器加宽(电脑端 1600) */
body:has(.bbs-page) main.container { max-width: 1600px; }

/* 论坛头部 */
.bbs-header {
    background: linear-gradient(135deg, #39afd1, #727cf5);
    padding: 30px 0;
    color: #fff;
}
.bbs-header-inner { max-width: 1600px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.bbs-title { font-size: 34px; font-weight: 700; margin: 0 0 4px; }
.bbs-subtitle { font-size: 16px; opacity: .9; margin: 0; }
.bbs-breadcrumb { font-size: 14px; color: rgba(255,255,255,.9); }
.bbs-breadcrumb a { color: #fff; text-decoration: none; }
.bbs-breadcrumb a:hover { text-decoration: underline; }
.bbs-actions { display: flex; align-items: center; gap: 10px; }
.bbs-user { font-size: 14px; background: rgba(255,255,255,.2); padding: 6px 12px; border-radius: 20px; }
.bbs-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    background: #fff;
    color: #313a46;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all .2s;
}
.bbs-btn:hover { border-color: #39afd1; color: #39afd1; }
.bbs-btn-primary { background: #39afd1; color: #fff; border-color: #39afd1; }
.bbs-btn-primary:hover { background: #2d8ea8; color: #fff; }

/* 主体 */
.bbs-body { max-width: 1600px; margin: 0 auto; padding: 28px 24px 0; width: 100%; box-sizing: border-box; }
.bbs-main { display: flex; flex-direction: column; gap: 20px; }

/* 版块卡片(电脑端一行两个,移动端单列) */
.bbs-forums { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.bbs-forum-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: all .2s;
}
.bbs-forum-card:hover { border-color: #39afd1; box-shadow: 0 4px 16px rgba(57,175,209,.15); transform: translateY(-2px); }
.bbs-forum-link { display: flex; align-items: center; gap: 14px; padding: 22px; text-decoration: none; color: #313a46; }
.bbs-forum-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, #e8f4f9, #e8e6fb);
    border-radius: 10px;
    flex-shrink: 0;
}
.bbs-forum-info { flex: 1; min-width: 0; }
.bbs-forum-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.bbs-forum-desc { font-size: 14px; color: #6c757d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbs-forum-stats { flex-shrink: 0; }
.bbs-stat-count { font-size: 13px; color: #39afd1; font-weight: 600; }

/* 区块 */
.bbs-section { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 18px; }
.bbs-section-title { font-size: 16px; font-weight: 600; color: #313a46; margin: 0 0 14px; padding-left: 10px; border-left: 4px solid #39afd1; }

/* 最新/热门筛选标签 */
.bbs-tabs { display: flex; gap: 8px; margin-bottom: 14px; border-bottom: 1px solid #f0f2f5; padding-bottom: 10px; }
.bbs-tab {
    padding: 6px 18px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: #f8fafc;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}
.bbs-tab:hover { border-color: #39afd1; color: #39afd1; }
.bbs-tab.active { background: #39afd1; border-color: #39afd1; color: #fff; font-weight: 600; }
.bbs-tab-panel { min-height: 60px; }

/* 帖子列表 */
.bbs-thread-list { list-style: none; margin: 0; padding: 0; }
.bbs-thread-item { padding: 10px 0; border-bottom: 1px solid #f0f2f5; display: flex; align-items: center; gap: 10px; }
.bbs-thread-item:last-child { border-bottom: none; }
.bbs-thread-title { flex: 1; color: #313a46; text-decoration: none; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbs-thread-title:hover { color: #39afd1; }
.bbs-thread-meta { color: #98a6ad; font-size: 12px; flex-shrink: 0; }
.bbs-thread-list-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    font-size: 13px; color: #6c757d;
    font-weight: 600;
}
.bbs-thread-list-header span:first-child { flex: 1; }
.bbs-th-col-author { width: 100px; color: #6c757d; font-size: 13px; }
.bbs-th-col-count { width: 60px; text-align: center; color: #39afd1; font-weight: 600; }
.bbs-th-col-time { width: 120px; text-align: right; color: #98a6ad; font-size: 12px; }
.bbs-thread-row .bbs-thread-title { flex: 1; }
.bbs-thread-row .bbs-th-col-author { width: 100px; }
.bbs-thread-row .bbs-th-col-count { width: 60px; text-align: center; }
.bbs-thread-row .bbs-th-col-time { width: 120px; text-align: right; }

/* 帖子页双列布局(左侧内容+右侧边栏) */
.bbs-thread-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
.bbs-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bbs-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.bbs-side-block {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 18px;
}
.bbs-side-title {
    font-size: 16px;
    font-weight: 600;
    color: #313a46;
    margin: 0 0 12px;
    padding-left: 10px;
    border-left: 4px solid #39afd1;
}
.bbs-side-desc { font-size: 13px; color: #6c757d; line-height: 1.6; margin: 0 0 12px; }
.bbs-side-btn { width: 100%; text-align: center; }
.bbs-side-author { display: flex; align-items: center; gap: 12px; }
.bbs-side-avatar {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: linear-gradient(135deg, #e8f4f9, #e8e6fb);
    border-radius: 50%;
}
.bbs-side-author-name { font-size: 14px; font-weight: 600; color: #39afd1; }
.bbs-side-author-time { font-size: 12px; color: #98a6ad; margin-top: 2px; }
.bbs-side-links { display: flex; flex-direction: column; gap: 10px; }
.bbs-side-links a { font-size: 14px; color: #313a46; text-decoration: none; }
.bbs-side-links a:hover { color: #39afd1; }

@media (max-width: 1024px) {
    .bbs-thread-layout { grid-template-columns: 1fr; }
    .bbs-sidebar { position: static; }
    /* 移动端:主体去掉左右 padding,与头部渐变条对齐同宽 */
    .bbs-body { padding-left: 0; padding-right: 0; }
}

/* 帖子详情 */
.bbs-post { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 24px; }
.bbs-post-title { font-size: 28px; color: #313a46; margin: 0 0 12px; }
.bbs-post-meta { display: flex; gap: 16px; font-size: 13px; color: #6c757d; padding-bottom: 14px; border-bottom: 1px solid #f0f2f5; margin-bottom: 18px; flex-wrap: wrap; }
.bbs-post-user { color: #39afd1; font-weight: 600; }
.bbs-post-content { font-size: 16px; line-height: 1.9; color: #313a46; word-break: break-word; }
.bbs-post-content h2, .bbs-post-content h3 { color: #313a46; margin: 18px 0 10px; }
.bbs-post-content p { margin-bottom: 14px; }
.bbs-post-content img { max-width: 100%; border-radius: 6px; }

/* 回复 */
.bbs-replies { display: flex; flex-direction: column; gap: 12px; }
.bbs-reply { display: flex; gap: 14px; background: #f8fafc; border: 1px solid #f0f2f5; border-radius: 8px; padding: 14px; }
.bbs-reply-side { flex-shrink: 0; width: 90px; text-align: center; }
.bbs-reply-user { display: block; font-size: 13px; color: #39afd1; font-weight: 600; word-break: break-all; }
.bbs-reply-floor { font-size: 12px; color: #98a6ad; }
.bbs-reply-body { flex: 1; min-width: 0; }
.bbs-reply-content { font-size: 15px; line-height: 1.8; color: #313a46; }
.bbs-reply-time { font-size: 12px; color: #98a6ad; margin-top: 8px; }

/* 回复框 */
.bbs-reply-box { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 18px; }
.bbs-reply-box textarea, .bbs-post-form textarea, .bbs-post-form input, .bbs-post-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #313a46;
    background: #fff;
    box-sizing: border-box;
}
.bbs-reply-box textarea:focus, .bbs-post-form textarea:focus, .bbs-post-form input:focus { border-color: #39afd1; outline: none; }
.bbs-login-tip { color: #6c757d; font-size: 14px; }
.bbs-login-tip a { color: #39afd1; }

/* 发帖表单 */
.bbs-post-form { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 24px; }
.bbs-form-title { font-size: 20px; color: #313a46; margin: 0 0 20px; }
.bbs-form-row { margin-bottom: 16px; }
.bbs-form-row label { display: block; font-size: 14px; color: #313a46; margin-bottom: 6px; font-weight: 600; }
.bbs-form-row select { width: 100%; padding: 10px; border: 1px solid #dee2e6; border-radius: 6px; font-size: 14px; }
.bbs-login-required { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 40px; text-align: center; color: #6c757d; }

/* 分页 */
.bbs-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 18px 0; }
.bbs-page-btn { padding: 7px 16px; background: #fff; border: 1px solid #dee2e6; border-radius: 6px; color: #313a46; text-decoration: none; font-size: 13px; }
.bbs-page-btn:hover { border-color: #39afd1; color: #39afd1; }
.bbs-page-info { color: #6c757d; font-size: 13px; }
.bbs-empty { text-align: center; color: #98a6ad; padding: 30px 0; font-size: 14px; }

@media (max-width: 768px) {
    .bbs-th-col-author, .bbs-th-col-time { display: none; }
    /* 移动端:版块保持两列,卡片紧凑布局 */
    .bbs-forum-link { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 10px; }
    .bbs-forum-icon { width: 44px; height: 44px; font-size: 24px; }
    .bbs-forum-info { text-align: center; }
    .bbs-forum-name { font-size: 15px; }
    .bbs-forum-desc { display: none; }
}
/* 登录/注册页 */
.bbs-auth-box {
    max-width: 420px;
    margin: 20px auto 60px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.bbs-auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.bbs-auth-tab {
    flex: 1;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8fafc;
    color: #6c757d;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
}
.bbs-auth-tab.active {
    background: #39afd1;
    color: #fff;
    border-color: #39afd1;
    font-weight: 600;
}
.bbs-auth-form { display: block; }
.bbs-auth-form .bbs-form-row { margin-bottom: 18px; }
.bbs-auth-form input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    color: #313a46;
}
.bbs-auth-form input:focus { border-color: #39afd1; outline: none; }
.bbs-auth-submit { width: 100%; padding: 12px; font-size: 16px; }
.bbs-auth-msg { min-height: 20px; margin: 12px 0 0; font-size: 13px; color: #f96868; }
.bbs-auth-tip { text-align: center; font-size: 13px; color: #98a6ad; margin-top: 16px; }
