/* 论坛页面专用样式 */

.forum-header {
    background: linear-gradient(135deg, rgba(61, 178, 255, 0.1) 0%, rgba(255, 189, 57, 0.1) 100%);
    padding: 40px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.forum-content {
    padding: 40px 20px;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.forum-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.forum-title p {
    color: #666;
    font-size: 1.1rem;
}

.forum-actions .btn-primary {
    background: linear-gradient(135deg, #3DB2FF 0%, #2A9BFF 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 178, 255, 0.3);
}

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

.posts-panel {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e1e5e9;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    background: transparent;
    border: 1px solid #e1e5e9;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.filter-tab:hover,
.filter-tab.active {
    background: #3DB2FF;
    color: white;
    border-color: #3DB2FF;
}

.sort-select {
    background: white;
    border: 1px solid #e1e5e9;
    color: #666;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* 帖子列表 */
.posts-list {
    padding: 0;
}

.post-card {
    border-bottom: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.post-card:hover {
    background: rgba(61, 178, 255, 0.02);
}

.post-card.featured {
    background: linear-gradient(135deg, rgba(61, 178, 255, 0.05) 0%, rgba(255, 189, 57, 0.05) 100%);
    border-left: 4px solid #3DB2FF;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.user-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.user-badge {
    background: #3DB2FF;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 8px;
}

.post-time {
    font-size: 12px;
    color: #999;
}

.post-actions-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-follow {
    background: #3DB2FF;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-follow:hover {
    background: #2A9BFF;
}

.btn-more {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-more:hover {
    background: #f8f9fa;
    color: #333;
}

.post-content {
    padding: 0 24px 20px;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
}

.post-images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-images img:hover {
    transform: scale(1.05);
}

.more-images {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    background: rgba(61, 178, 255, 0.1);
    color: #3DB2FF;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #3DB2FF;
    color: white;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px 20px;
}

.post-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 14px;
}

.stat-item i {
    color: #999;
}

.post-actions {
    display: flex;
    gap: 16px;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.action-btn:hover {
    background: rgba(61, 178, 255, 0.1);
    color: #3DB2FF;
}

.action-btn.liked {
    color: #ff6b6b;
}

.action-btn.liked i {
    color: #ff6b6b;
}

/* 加载更多 */
.load-more {
    padding: 24px;
    text-align: center;
}

.btn-load-more {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    color: #666;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.btn-load-more:hover {
    background: #3DB2FF;
    color: white;
    border-color: #3DB2FF;
}

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

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

/* 热门话题 */
.trending-topics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.topic-item:hover {
    background: rgba(61, 178, 255, 0.05);
}

.topic-rank {
    background: #3DB2FF;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.topic-item:nth-child(1) .topic-rank {
    background: #FFBD39;
}

.topic-item:nth-child(2) .topic-rank {
    background: #4CAF50;
}

.topic-item:nth-child(3) .topic-rank {
    background: #FF9800;
}

.topic-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.topic-count {
    font-size: 12px;
    color: #999;
}

/* 推荐用户 */
.recommended-users {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-item .user-avatar {
    width: 40px;
    height: 40px;
}

.user-item .user-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.user-followers {
    font-size: 12px;
    color: #999;
}

.btn-follow-small {
    background: #3DB2FF;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-follow-small:hover {
    background: #2A9BFF;
}

/* 最新活动 */
.activities {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.activity-item:hover {
    background: rgba(61, 178, 255, 0.05);
}

.activity-icon {
    width: 32px;
    height: 32px;
    background: rgba(61, 178, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3DB2FF;
    font-size: 14px;
}

.activity-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.activity-content p {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 11px;
    color: #999;
}

/* 模态框样式 */
.modal-content.large {
    max-width: 600px;
}

.create-post-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-upload {
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload:hover {
    border-color: #3DB2FF;
    background: rgba(61, 178, 255, 0.05);
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666;
}

.upload-area i {
    font-size: 24px;
    color: #999;
}

.tags-input {
    position: relative;
}

.suggested-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.tag-suggestion {
    background: rgba(61, 178, 255, 0.1);
    color: #3DB2FF;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-suggestion:hover {
    background: #3DB2FF;
    color: white;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 评论样式 */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #e1e5e9;
}

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

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    gap: 16px;
}

.comment-action {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.comment-action:hover {
    color: #3DB2FF;
}

.comment-form {
    border-top: 1px solid #e1e5e9;
    padding-top: 20px;
}

.comment-input {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-input textarea {
    flex: 1;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px;
    resize: vertical;
    font-family: inherit;
}

.comment-input textarea:focus {
    outline: none;
    border-color: #3DB2FF;
    box-shadow: 0 0 0 3px rgba(61, 178, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .sidebar-card {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .forum-header {
        padding: 20px;
    }
    
    .forum-title h1 {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .post-header {
        padding: 16px 20px 12px;
    }
    
    .post-content {
        padding: 0 20px 16px;
    }
    
    .post-footer {
        padding: 0 20px 16px;
    }
    
    .post-images {
        grid-template-columns: 1fr;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .action-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .forum-content {
        padding: 20px 10px;
    }
    
    .container {
        padding: 0;
    }
    
    .posts-panel {
        border-radius: 0;
    }
    
    .sidebar-card {
        border-radius: 0;
        padding: 16px;
    }
    
    .post-header {
        padding: 12px 16px 8px;
    }
    
    .post-content {
        padding: 0 16px 12px;
    }
    
    .post-footer {
        padding: 0 16px 12px;
    }
    
    .user-info {
        gap: 8px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .post-content h3 {
        font-size: 1.1rem;
    }
    
    .post-stats {
        gap: 12px;
    }
    
    .stat-item {
        font-size: 12px;
    }
}

/* 滚动条样式 */
.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
