﻿/* 全局调整 */
.lightbbs-container {
    padding: 2rem 0;
    min-height: 80vh;
}

/* 分类侧边栏 */
.category-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

    .category-card .card-header {
        background-color: #0d6efd;
        color: white;
        border-bottom: none;
        font-weight: 600;
    }

.category-list .list-group-item {
    border: none;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
}

    .category-list .list-group-item:hover {
        background-color: #f8f9fa;
        padding-left: 1.5rem;
    }

.category-list a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
}

    .category-list a:hover {
        color: #0d6efd;
    }

/* 帖子列表卡片 */
.posts-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

    .posts-card .card-header {
        background-color: #f8f9fa;
        border-bottom: 1px solid #eee;
        font-weight: 600;
    }

    .posts-card .btn-primary {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
        border-radius: 4px;
    }

/* 帖子表格样式 */
.posts-table {
    font-size: 0.9rem;
}

    .posts-table th {
        border-top: none;
        color: #666;
        font-weight: 500;
        padding: 1rem;
    }

    .posts-table td {
        padding: 1rem;
        vertical-align: middle;
        border-color: #f0f0f0;
    }

    .posts-table tr:hover {
        background-color: #f8f9fa;
    }

/* 🔥 核心：用户头像样式（和帖子详情页一致） */
.user-avatar {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    background-color: rgb(38, 142, 217) /*#0d6efd*/;
    overflow: hidden;
}

    .user-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .user-avatar span {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    /* 小头像适配（我的帖子/我的点赞模块） */
    .user-avatar.small-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

/* 帖子元信息（作者/分类/时间） */
.post-card-meta {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-author {
    color: #0d6efd;
    font-weight: 500;
}

.meta-split {
    color: #dee2e6;
    font-size: 12px;
}

/* 最后更新信息 */
.post-card-update {
    font-size: 12px;
    color: #4b525396;
    padding-left: 2px;
}

/* 帖子统计信息（阅读/评论/点赞） */
.post-card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

/* 适配统计徽章，新增图标间距 */
.stat-badge i {
    font-size: 11px;
    margin-right: 3px;
}

.post-title a {
    color: #212529;
    text-decoration: none;
    font-weight: 500;
}

    .post-title a:hover {
        color: #0d6efd;
        text-decoration: underline;
    }

/* 空数据提示 */
.empty-alert {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 2rem;
    text-align: center;
    font-size: 1rem;
}

/* 统计数字样式 */
.stat-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 10rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.view-count {
    background-color: #e7f5ff;
    color: #4dabf7;
}

.comment-count {
    background-color: #f0f8fb;
    color: #3bc9db;
}

.like-count {
    background-color: #fff5f5;
    color: #f76707;
}

/* 我的帖子/我的点赞模块通用样式 */
.my-module-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1.5rem;
}

    .my-module-card .card-header {
        background-color: #0d6efd;
        color: white;
        border-bottom: none;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.my-module-list .list-group-item {
    border: none;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #f0f0f0;
}

    .my-module-list .list-group-item:last-child {
        border-bottom: none;
    }

.my-module-list .post-meta {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.3rem;
}

.my-module-empty {
    padding: 1.5rem;
    text-align: center;
    color: #6c757d;
}

.my-module-more {
    font-size: 0.85rem;
    color: white;
    text-decoration: none;
    background-color: rgba(255,255,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

    .my-module-more:hover {
        color: white;
        background-color: rgba(255,255,255,0.3);
    }

/* 我的点赞模块专属样式 */
.my-liked-card .card-header {
    background-color: #fd7e14; /* 橙色主题，区分我的帖子 */
}

.my-liked-list .post-meta .like-time {
    color: #fd7e14;
    font-weight: 500;
}

/* 卡片式帖子列表容器 */
.post-card-list {
    width: 100%;
}

/* 单个帖子卡片项 */
.post-card-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

/* 鼠标悬停效果，保留原有风格 */
.post-card-item:hover {
    background-color: #f8f9fa;
}

/* 卡片式头像放大优化 */
.post-card-item .user-avatar {
    width: 66px;
    height: 66px;
    font-size: 22px;
    border: 2px solid #f5f5f5;
}

/* 右侧帖子内容区（自动填充剩余宽度） */
.post-card-content {
    flex: 1;
    min-width: 0; /* 防止内容溢出时挤压头像 */
}

/* 帖子标题 */
.post-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

    .post-card-title a {
        color: #212529;
        text-decoration: none;
    }

        .post-card-title a:hover {
            color: #0d6efd;
            text-decoration: underline;
        }

/* 移动端适配 */
@media (max-width: 767.98px) {
    .post-card-item {
        padding: 14px 16px;
        gap: 14px;
    }

        .post-card-item .user-avatar {
            width: 48px;
            height: 48px;
            font-size: 20px;
        }

    .post-card-title {
        font-size: 15px;
    }

    .post-card-meta {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .post-card-stats {
        gap: 6px;
    }

    .stat-badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.75rem;
    }

    /* 表格式头像移动端适配 */
    .posts-table .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
