/* 页面banner */
.page-banner {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/forum-banner.png');
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    color: #fff;
    margin-bottom: 40px;
}

.page-banner h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 14px;
}

.breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ffd700;
}

/* 功能栏 */
.forum-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-box button {
    padding: 0 20px;
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-post {
    padding: 10px 30px;
    background: #c00;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-post:hover {
    background: #a00;
}

.view-mode {
    display: flex;
    gap: 10px;
}

.view-mode button {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.view-mode button:hover,
.view-mode button.active {
    background: #e5e5e5;
    color: #c00;
}

/* 论坛布局 */
.forum-layout {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 30px;
}

/* 左侧导航 */
.forum-nav {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.nav-section {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.nav-section:last-child {
    border-bottom: none;
}

.nav-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 10px;
}

.nav-section li a {
    display: flex;
    align-items: center;
    padding: 10px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-section li a:hover,
.nav-section li.active a {
    background: #f5f5f5;
    color: #c00;
}

.nav-section li i {
    margin-right: 10px;
    font-size: 20px;
}

.count {
    margin-left: auto;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    padding: 5px 10px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #c00;
    color: #fff;
}

/* 中间内容区 */
.forum-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.content-header h2 {
    font-size: 24px;
    color: #333;
}

.sort-options {
    display: flex;
    gap: 20px;
}

.sort-options a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sort-options a:hover,
.sort-options a.active {
    color: #c00;
}

/* 帖��列表 */
.post-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.user-level {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #f90;
    color: #fff;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 10px;
}

.post-info {
    flex: 1;
}

.post-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.post-title h3 {
    font-size: 18px;
}

.post-title h3 a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-title h3 a:hover {
    color: #c00;
}

.tag {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: #fff;
}

.tag.hot { background: #f00; }
.tag.discussion { background: #0c0; }

.post-subtitle {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 14px;
}

.post-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.post-preview p {
    flex: 1;
    color: #666;
    line-height: 1.6;
}

.preview-image {
    width: 120px;
    height: 80px;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.post-stats {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 右侧信息栏 */
.forum-sidebar > div {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* 用户卡片 */
.user-card {
    padding: 20px;
}

.user-header {
    text-align: center;
    margin-bottom: 20px;
}

.user-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.user-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.user-title {
    color: #999;
    font-size: 14px;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-item .num {
    display: block;
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

.stat-item .label {
    font-size: 12px;
    color: #999;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions a {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #f5f5f5;
    color: #666;
}

.btn-message {
    background: #c00;
    color: #fff;
}

.btn-edit:hover {
    background: #e5e5e5;
}

.btn-message:hover {
    background: #a00;
}

/* 热门帖子 */
.hot-posts {
    padding: 20px;
}

.hot-posts h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.hot-posts ul {
    list-style: none;
}

.hot-posts li {
    margin-bottom: 15px;
}

.hot-posts li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    text-decoration: none;
}

.hot-posts .rank {
    width: 20px;
    height: 20px;
    background: #f5f5f5;
    color: #666;
    text-align: center;
    line-height: 20px;
    border-radius: 4px;
    font-size: 12px;
}

.hot-posts li:nth-child(1) .rank { background: #f00; color: #fff; }
.hot-posts li:nth-child(2) .rank { background: #f90; color: #fff; }
.hot-posts li:nth-child(3) .rank { background: #fc0; color: #fff; }

.hot-posts .title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-posts .views {
    font-size: 12px;
    color: #999;
}

/* 活跃用户 */
.active-users {
    padding: 20px;
}

.active-users h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    text-decoration: none;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-item:hover {
    background: #f5f5f5;
}

.user-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-item .name {
    flex: 1;
}

.user-item .badge {
    font-size: 12px;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 10px;
    color: #666;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background: #c00;
    color: #fff;
    border-color: #c00;
} 