/* 论坛专用样式 */

/* 论坛首页样式 */
.forum-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.forum-category-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.forum-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* 帖子列表样式 */
.post-item {
    transition: background-color 0.2s ease;
}

.post-item:hover {
    background-color: #f8f9fa;
}

.post-title {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.post-title:hover {
    color: #007bff;
}

.post-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 帖子详情页样式 */
.post-content {
    line-height: 1.6;
    font-size: 1rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }
.post-content h5 { font-size: 1.1rem; }
.post-content h6 { font-size: 1rem; }

.post-content p {
    margin-bottom: 1rem;
}

.post-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0 5px 5px 0;
}

.post-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content code {
    background-color: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875rem;
    color: #d63384;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* 回复样式 */
.reply-item {
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
}

.reply-item:hover {
    border-left-color: #007bff;
}

.reply-content {
    line-height: 1.5;
}

.reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* 发帖/编辑表单样式 */
.forum-form {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 标签样式 */
.tag-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

/* 状态标签样式 */
.status-pinned {
    background-color: #ffc107;
    color: #212529;
}

.status-locked {
    background-color: #dc3545;
    color: white;
}

.status-hot {
    background-color: #dc3545;
    color: white;
}

.status-new {
    background-color: #28a745;
    color: white;
}

/* 用户信息卡片 */
.user-info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.user-stat-item {
    flex: 1;
}

.user-stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.user-stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 分页样式 */
.pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* 搜索框样式 */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .forum-stats {
        margin-bottom: 1rem;
    }
    
    .user-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-meta {
        font-size: 0.8rem;
    }
    
    .reply-avatar {
        width: 32px;
        height: 32px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: #333;
    color: white;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

/* 模态框样式 */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-weight: 600;
    color: #495057;
}

/* 按钮样式增强 */
.btn-forum {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-forum:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

/* 面包屑导航增强 */
.breadcrumb-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* 侧边栏样式 */
.sidebar-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.sidebar-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .forum-form {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .post-content {
        color: #e2e8f0;
    }
    
    .post-content blockquote {
        background-color: #4a5568;
        color: #cbd5e0;
    }
    
    .post-content pre {
        background-color: #4a5568;
        border-color: #718096;
    }
}
