/* 论坛列表页面样式 */

/* 面包屑导航 */
.breadcrumb {
    background: #f9f9f9;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb ol {
    display: flex;
    gap: 10px;
    list-style: none;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 10px;
    color: #999;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0066cc;
}

/* 页面标题和操作 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0066cc;
}

.page-header h1 {
    font-size: 1.8rem;
    color: #333;
}

.forum-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #0052a3;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
}

/* 内容布局 */
.content-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
}

/* 论坛分类 */
.forum-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.category-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-header h3 {
    font-size: 1.2rem;
    color: #333;
}

.category-header h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-header h3 a:hover {
    color: #0066cc;
}

.category-stats {
    font-size: 0.9rem;
    color: #999;
}

.category-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.category-topics {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-item {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.topic-item:hover {
    background: #f0f0f0;
}

.topic-item a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 5px;
}

.topic-item a:hover {
    color: #0066cc;
}

.topic-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
}

/* 热门帖子 */
.hot-topics {
    margin-bottom: 40px;
}

.hot-topics h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.topic-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.topic-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.topic-content {
    flex: 1;
}

.topic-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.topic-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topic-content h3 a:hover {
    color: #0066cc;
}

.topic-summary {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.topic-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
}

.topic-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 60px;
}

.reply-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0066cc;
}

.view-count {
    font-size: 0.9rem;
    color: #999;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* 论坛统计 */
.forum-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0066cc;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* 活跃用户 */
.active-users {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.active-users li {
    display: flex;
    gap: 10px;
    align-items: center;
}

.active-users img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-info a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 3px;
}

.user-info a:hover {
    color: #0066cc;
}

.user-level {
    font-size: 0.8rem;
    color: #999;
}

/* 论坛规则 */
.forum-rules {
    list-style: none;
}

.forum-rules li {
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.forum-rules li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: bold;
}

/* 快速链接 */
.sidebar-section ul {
    list-style: none;
}

.sidebar-section ul li {
    margin-bottom: 10px;
}

.sidebar-section ul li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.sidebar-section ul li a:hover {
    color: #0066cc;
}

/* 数据状态提示 */
.data-state {
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    color: #334155;
    font-size: 14px;
}

.data-state-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #0066cc;
    animation: pulseDotForum 1s ease-in-out infinite;
}

.data-state-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.retry-link {
    display: inline-block;
    margin-top: 8px;
    color: #0052a3;
    font-weight: 600;
    text-decoration: none;
}

.retry-link:hover {
    text-decoration: underline;
}

@keyframes pulseDotForum {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.82);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .forum-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .topic-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .topic-stats {
        flex-direction: row;
        justify-content: space-around;
        min-width: auto;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }
}