/* ===== 论坛共用 ===== */
.forum-page { margin-top: 20px; }

/* 分类Tab */
.forum-filter-tabs,
.forum-cat-tabs {
    display: flex; list-style: none; padding: 0; margin: 0 0 15px 0;
    border-bottom: 2px solid #e4e7ed; gap: 0; flex-wrap: wrap;
}
.forum-filter-tabs li,
.forum-cat-tabs li { margin: 0; }
.forum-filter-tabs li a,
.forum-cat-tabs li a {
    display: block; padding: 10px 20px; font-size: 14px; color: #606266;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all .2s;
}
.forum-filter-tabs li a:hover,
.forum-cat-tabs li a:hover { color: #409EFF; text-decoration: none; }
.forum-filter-tabs li.active a,
.forum-cat-tabs li.active a {
    color: #409EFF; border-bottom-color: #409EFF; font-weight: 600;
}

/* 版块标签 */
.forum-cat-tag {
    color: #409EFF; font-size: 12px; margin-right: 10px;
}
.forum-cat-tag:hover { color: #337ECC; text-decoration: none; }

.forum-stats-bar {
    background: #fff; border-radius: 6px; padding: 16px 24px;
    display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.forum-stats-bar span { font-size: 14px; color: #606266; }
.forum-stats-bar strong { color: #409EFF; margin-left: 4px; }

/* 版块卡片 */
.forum-cat-block {
    padding: 16px 20px; border-bottom: 1px solid #f0f0f0;
}
.forum-cat-block:last-child { border-bottom: none; }
.forum-cat-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.forum-cat-header > .fa { font-size: 20px; color: #409EFF; width: 24px; text-align: center; }
.forum-cat-name { font-size: 16px; font-weight: 600; color: #303133; }
.forum-cat-name:hover { color: #409EFF; text-decoration: none; }
.forum-cat-desc { font-size: 13px; color: #909399; flex: 1; }
.forum-cat-count { font-size: 12px; color: #C0C4CC; white-space: nowrap; }
.forum-cat-threads { padding-left: 34px; }
.forum-cat-titem { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; color: #606266; }
.forum-cat-titem:hover { color: #409EFF; text-decoration: none; }
.forum-cat-titem .text-muted { font-size: 12px; white-space: nowrap; margin-left: 12px; }

/* 发帖按钮 */
.forum-post-btn { margin-bottom: 0; padding: 10px 0; font-size: 16px; }

/* 侧边栏 */
.forum-side-item { padding: 10px 15px; }
.forum-side-item > a.ellipsis { display: block; color: #303133; font-size: 14px; margin-bottom: 4px; }
.forum-side-item > a:hover { color: #409EFF; text-decoration: none; }
.forum-side-meta { display: flex; justify-content: space-between; font-size: 12px; }

/* 帖子列表 */
.forum-thread-item {
    display: flex; padding: 14px 20px; border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.forum-thread-item:last-child { border-bottom: none; }
.forum-thread-top { background: #fdf6ec; }
.forum-thread-avatar {
    flex-shrink: 0; width: 40px; height: 40px; margin-right: 14px;
}
.forum-thread-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.forum-thread-content { flex: 1; min-width: 0; }
.forum-thread-title {
    font-size: 15px; font-weight: 500; color: #303133; display: block;
    margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.forum-thread-title:hover { color: #409EFF; text-decoration: none; }
.forum-thread-title .label { font-size: 12px; margin-right: 4px; }
.forum-thread-meta { font-size: 12px; color: #C0C4CC; }
.forum-thread-meta > * { margin-right: 12px; }
.forum-thread-meta a { color: #909399; }
.forum-thread-meta a:hover { color: #409EFF; text-decoration: none; }

/* 商家标识 + 等级徽章（通用） */
.forum-merchant-icon {
    color: #67c23a; font-size: 14px; margin-left: 4px; vertical-align: middle;
}
.forum-level-badge {
    display: inline-block; font-size: 12px; padding: 0 5px;
    border-radius: 3px; line-height: 18px; margin-left: 4px; vertical-align: middle;
    font-weight: normal;
}
.forum-level-default { background: #f0f2f5; color: #909399; }
.forum-level-info { background: #ecf5ff; color: #409EFF; }
.forum-level-warning { background: #fdf6ec; color: #e6a23c; }
.forum-level-danger { background: #fef0f0; color: #f56c6c; }

/* 侧边栏中商家徽章适配 */
.forum-side-reply-user .forum-merchant-icon { font-size: 12px; }
.forum-side-reply-user .forum-level-badge { font-size: 11px; padding: 0 4px; line-height: 16px; }
.forum-thread-last { color: #909399; }
.forum-thread-last b { color: #606266; }

/* 版块信息头 */
.forum-cat-info {
    display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff;
    border-radius: 6px; margin-bottom: 15px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.forum-cat-info .fa { color: #409EFF; }
.forum-cat-info h3 { margin: 0 0 4px 0; font-size: 20px; }
.forum-cat-info p { margin: 0; font-size: 13px; }

/* 帖子详情 */
.forum-thread-detail { padding: 24px 30px; }
.forum-thread-d-title { font-size: 22px; font-weight: 600; color: #303133; margin-bottom: 16px; line-height: 1.5; }
.forum-thread-d-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.forum-thread-d-avatar { width: 40px; height: 40px; border-radius: 50%; }
.forum-thread-d-content { font-size: 15px; line-height: 1.9; color: #303133; word-break: break-word; }
.forum-thread-d-content img { max-width: 100%; border-radius: 4px; }
.forum-thread-d-content p { margin-bottom: 12px; }

/* 回复列表 */
.forum-reply-item { display: flex; padding: 16px 20px; border-bottom: 1px solid #f5f5f5; }
.forum-reply-item:last-child { border-bottom: none; }
.forum-reply-avatar { flex-shrink: 0; margin-right: 14px; }
.forum-reply-avatar img { width: 36px; height: 36px; border-radius: 50%; }
.forum-reply-body { flex: 1; min-width: 0; }
.forum-reply-header { margin-bottom: 6px; font-size: 13px; }
.forum-reply-header strong { color: #409EFF; margin-right: 10px; }
.forum-reply-header .label { font-size: 12px; margin-left: 6px; }
.forum-reply-header .forum-reply-btn {
    font-size: 12px; color: #909399; margin-left: 10px;
}
.forum-reply-header .forum-reply-btn:hover { color: #409EFF; text-decoration: none; }
.forum-reply-quote {
    font-size: 12px; color: #909399; background: #f5f7fa; padding: 6px 10px;
    border-left: 3px solid #c0c4cc; border-radius: 3px; margin-bottom: 8px;
    word-break: break-all; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px;
}
.forum-reply-quote b { color: #606266; }
.forum-quote-jump {
    font-size: 12px; color: #409EFF; margin-left: auto; white-space: nowrap;
}
.forum-quote-jump:hover { color: #337ECC; text-decoration: none; }
.forum-reply-to-bar {
    font-size: 13px; color: #606266; background: #ecf5ff; padding: 8px 12px;
    border-radius: 4px 4px 0 0; display: flex; justify-content: space-between; align-items: center;
}
.forum-reply-to-bar b { color: #409EFF; }
.forum-reply-to-bar a { color: #909399; }
.forum-reply-to-bar a:hover { color: #f56c6c; text-decoration: none; }
.forum-reply-content { font-size: 14px; line-height: 1.8; color: #303133; word-break: break-word; }
.forum-reply-content img { max-width: 200px; border-radius: 4px; }
.forum-reply-content pre {
    background: #f5f7fa; border: 1px solid #e4e7ed; border-radius: 4px;
    padding: 12px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-all;
}
.forum-reply-content pre code { background: none; padding: 0; color: #303133; }
.forum-reply-content a { color: #409EFF; }
.forum-reply-content a:hover { color: #337ECC; }

/* 点赞 */
.forum-reply-actions { margin-top: 8px; }
.forum-like-btn {
    display: inline-flex; align-items: center; gap: 4px; font-size: 13px;
    color: #909399; padding: 4px 10px; border-radius: 20px; cursor: pointer;
    transition: all .2s; text-decoration: none;
}
.forum-like-btn:hover { color: #f56c6c; background: #fef0f0; text-decoration: none; }
.forum-like-btn.liked { color: #f56c6c; }
.forum-like-btn .fa { font-size: 14px; }

/* 帖子详情区域同样支持 */
.forum-thread-d-content { font-size: 15px; line-height: 1.9; color: #303133; word-break: break-word; }
.forum-thread-d-content img { max-width: 100%; border-radius: 4px; }
.forum-thread-d-content pre {
    background: #f5f7fa; border: 1px solid #e4e7ed; border-radius: 4px;
    padding: 12px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6;
}
.forum-thread-d-content pre code { background: none; padding: 0; color: #303133; }
.forum-thread-d-content a { color: #409EFF; }
.forum-thread-d-content a:hover { color: #337ECC; }

/* 表情 */
.forum-reply-tools { margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.forum-emoji-btn { font-size: 18px; color: #909399; text-decoration: none; }
.forum-emoji-btn:hover { color: #e6a23c; }
.forum-toolbar-btn { font-size: 16px; color: #909399; text-decoration: none; cursor: pointer; }
.forum-toolbar-btn:hover { color: #409EFF; }
.forum-reply-tools .faupload {
    border: none; background: none; padding: 0; line-height: 1; vertical-align: middle;
    font-size: 16px; color: #909399;
}
.forum-reply-tools .faupload:hover { color: #409EFF; }
.forum-emoji-panel {
    position: relative; margin-top: 4px; background: #fff; border: 1px solid #e4e7ed;
    border-radius: 6px; padding: 10px; display: flex; flex-wrap: wrap; gap: 4px;
    max-width: 420px; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.forum-emoji-item {
    font-size: 22px; cursor: pointer; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px; transition: background .15s;
}
.forum-emoji-item:hover { background: #ecf5ff; }

@media (max-width: 768px) {
    .forum-thread-avatar { display: none; }
    .forum-reply-avatar { display: none; }
    .forum-thread-detail { padding: 16px; }
}

/* 侧边栏-最新评论 */
.forum-side-reply { display: flex; align-items: flex-start; padding: 10px 15px; }
.forum-side-reply-avatar {
    flex-shrink: 0; margin-right: 10px; width: 32px; height: 32px;
}
.forum-side-reply-avatar img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}
.forum-side-reply-body { flex: 1; min-width: 0; }
.forum-side-reply-user { font-size: 12px; color: #C0C4CC; }
.forum-side-reply-user b { color: #606266; }

/* 侧边栏-活跃用户 */
.forum-active-users { display: flex; flex-wrap: wrap; gap: 8px; }
.forum-active-user img {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid #f0f0f0; transition: border-color .2s;
}
.forum-active-user:hover img { border-color: #409EFF; }
