/* ==========================================
   论坛首页专属样式 - bbs.css
   清理版本 - 已移除 plate.css 中的重复样式
   ========================================== */

/* CSS变量定义 */ 
:root {
    --primary-color: #3b82f6;
    --text-color: #333;
    --primary-rgb: 24, 144, 255;
}

/* 论坛主容器 */
.bbs-mian {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
}

/* ==========================================
   卡片组件
   ========================================== */
.bbs-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bbs-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.bbs-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bbs-card-body {
    padding: 20px;
}

/* 帖子卡片背景 */
.bbs-card-tz {
    background: white;
}

/* ==========================================
   论坛通用布局
   ========================================== */
.forum-overview, 
.latest-posts, 
.forum-intro, 
.top-posts, 
.posts-list {
    width: 100%;
}

/* ==========================================
   板块网格布局（首页使用）
   ========================================== */
.plate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.plate-item {
    display: flex;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.plate-item:hover {
    background-color: #f0f0f0;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.plate-icon {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    flex-shrink: 0;
}

.plate-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.plate-info {
    flex: 1;
}

.plate-name {
    margin: 0 0 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

.plate-desc {
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.4;
    max-height: 2.8em;
}

/* ==========================================
   帖子列表样式
   ========================================== */
.post-list {
    display: flex;
    flex-direction: column;
}

.post-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background-color: #f2f4f7;
}

.post-item.top-post {
    background-color: rgba(var(--primary-rgb), 0.05);
}

/* ==========================================
   帖子缩略图
   ========================================== */
.post-thumbnail {
    width: 160px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* 图片数量指示器 */
.image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 12px;
    padding: 4px 8px 4px 24px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 2;
}

.image-count::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h18V19z M8.5,13.5l2.5,3 l3.5-4.5l4.5,6H5L8.5,13.5z"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
}

/* ==========================================
   帖子内容区域
   ========================================== */
.post-right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

/* 用户信息 */
.post-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.post-user-avatar {
    flex-shrink: 0;
    margin-right: 8px;
}

.post-user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-name {
    max-width: 120px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    flex-shrink: 1;
    margin-right: 8px;
}


/* ==========================================
   帖子标题
   ========================================== */
.post-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
    word-break: break-word;
    display: block;
}

.post-title .post-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 5px;
    color: white;
    font-size: 0.7rem;
    border-radius: 3px;
    line-height: 1;
    vertical-align: top;
    margin-bottom: 0;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    display: inline;
    vertical-align: top;
    white-space: normal;
    word-break: break-all;
}

.post-tag i {
    margin-right: 2px;
}

/* ==========================================
   帖子标签颜色
   ========================================== */
.post-tag.essence-tag {
    background-color: #FFCC00;
    color: white;
}

.post-tag.admin-verify-tag {
    background-color: #9C27B0;
    color: white;
}

.post-tag.hot-tag {
    background-color: #ff6b6b;
    color: white;
}

.post-tag.top-tag {
    background-color: #FF0000;
    color: white;
}

.post-tag.new-tag {
    background-color: #4CAF50;
    color: white;
}

.post-tag.reward-tag {
    background-color: #ff9800;
    color: white;
}

.post-tag.recommend-tag {
    background-color: #17a2b8;
    color: white;
}

.post-tag.original-tag {
    background-color: #6f42c1;
    color: white;
}

/* ==========================================
   帖子内容预览
   ========================================== */
.post-excerpt {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 42px;
}

/* ==========================================
   帖子元数据
   ========================================== */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    font-size: 0.8rem;
    color: #777;
    margin-top: auto;
}

.post-meta a {
    color: #777;
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--primary-color);
}

.post-meta-item {
    display: flex;
    align-items: center;
}

.post-meta-item i {
    margin-right: 3px;
}

/* ==========================================
   分页导航
   ========================================== */
.bbs-list-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.bbs-list-pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: #f0f7ff;
    color: #3b82f6;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
}

.bbs-list-pagination-info {
    margin: 0 15px;
    color: var(--gray);
}

.bbs-list-pagination-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

.fa-angle-right {
    margin-left: 5px;
}

.fa-angle-left {
    margin-right: 5px;
}

/* ==========================================
   论坛轮播图
   ========================================== */
.forum-carousel {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.forum-carousel .carousel-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.forum-carousel .carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.forum-carousel .carousel-slide {
    min-width: 100%;
    height: 100%;
}

.forum-carousel .carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.forum-carousel .carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-carousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 15px;
}

.forum-carousel .carousel-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
}

.forum-carousel .carousel-prev,
.forum-carousel .carousel-next {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(3px);
}

.forum-carousel .carousel-indicators {
    display: flex;
    margin: 0 10px;
}

.forum-carousel .carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 3px;
    cursor: pointer;
}

.forum-carousel .carousel-indicator.active {
    background-color: white;
}

/* ==========================================
   论坛统计信息
   ========================================== */
.bbs-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #e5e7eb;
    text-align: center;
}

.bbs-stats .stats-item {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bbs-stats .stats-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    position: relative;
}

.bbs-stats .stats-num::after {
    content: "+";
    position: absolute;
    font-size: 1rem;
    top: 0;
    right: -12px;
}

.bbs-stats .stats-label {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ==========================================
   论坛介绍/公告
   ========================================== */
.forum-announcement {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
}

.forum-announcement p {
    margin-bottom: 1rem;
}

.forum-announcement ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    list-style-type: disc;
}

.forum-announcement li {
    margin-bottom: 0.5rem;
}

/* ==========================================
   待审核帖子/评论样式
   ========================================== */
.sh-pending-posts-section {
    margin-bottom: 20px;
}

.sh-pending-posts-section .bbs-card-header {
    background-color: #fff3e0;
}

.shbt {
    font-size: 0.9rem;
    font-weight: 500;
}

.sh-pending-post {
    background-color: #fffaf3;
    border: 1px solid #f0e0c0;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.sh-pending-post:last-child {
    margin-bottom: 0;
}

.sh-pending-badge {
    display: inline-block;
    background-color: #f39c12;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

.sh-pending-post .comment-content {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.sh-pending-post .post-info {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px !important;
}

.sh-pending-post .post-info a {
    text-decoration: none;
    font-weight: 500;
}

.sh-pending-post .post-info a:hover {
    text-decoration: underline;
}

.sh-pending-post .comment-text {
    margin: 8px 0;
    padding: 8px;
    background: #fff;
    border-radius: 3px;
    border-left: 3px solid #f0ad4e;
}

.sh-pending-post .comment-author {
    font-size: 12px;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

/* 待审核操作按钮 */
.sh-post-actions {
    display: flex;
    margin-top: 10px;
    gap: 8px;
    width: 100%;
}

.sh-post-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-post-actions .btn i {
    margin-right: 4px;
}

.sh-btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.sh-btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.sh-btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.sh-btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* ==========================================
   顶部操作区域
   ========================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    margin: 0;
    color: var(--text-color);
}

.section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.section-action {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.section-action:hover {
    color: var(--primary-color);
    background-color: #f0f7ff;
}

.section-action.active {
    color: var(--primary-color);
    background-color: #e6f4ff;
    font-weight: 600;
}

/* ==========================================
   响应式适配
   ========================================== */
@media (max-width: 768px) {
    /* 通用容器宽度调整 */
    .forum-overview, 
    .latest-posts, 
    .forum-intro, 
    .top-posts, 
    .posts-list {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 轮播图高度调整 */
    .forum-carousel .carousel-wrapper {
        height: 200px;
    }
    
    /* 板块网格单列显示 */
    .plate-grid {
        grid-template-columns: 1fr;
    }
    
    /* 帖子元数据间距减小 */
    .post-meta {
        gap: 5px;
    }
    
    /* 帖子列表垂直布局 */
    .post-item {
        flex-direction: column;
        padding: 12px 10px;
    }
    
    .post-thumbnail {
        width: 100%;
        height: 100px;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .post-right-content {
        width: 100%;
    }
    
    .post-thumbnail + .post-right-content {
        width: 100%;
    }
    
    .post-user-info {
        margin-bottom: 5px;
    }
    
    .post-title {
        margin-bottom: 5px;
        font-size: 1rem;
    }
    
    .post-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        max-height: 60px;
    }
    
    /* 分页容器换行显示 */
    .bbs-list-pagination-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .bbs-list-pagination-info {
        width: 100%;
        text-align: center;
        margin: 5px 0;
        order: -1;
    }
    
    .bbs-list-pagination-btn {
        margin: 5px 0;
    }
    
    /* 待审核操作按钮适配 */
    .sh-post-actions {
        gap: 5px;
    }
    
    .sh-post-actions .btn {
        font-size: 11px;
        padding: 5px 0;
    }
    
    .sh-post-actions .btn i {
        margin-right: 3px;
    }
    
    /* 论坛介绍适配 */
    .forum-intro .bbs-card-header h3 {
        font-size: 16px;
    }
    
    .forum-announcement p:first-child {
        font-size: 15px;
    }
    
    .forum-announcement ul {
        padding: 12px 12px 12px 30px;
    }
    
    .forum-announcement li {
        font-size: 14px;
    }
    
    
    .section-actions {
        width: 100%;
    }
}

