/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #0a58ca;
}

/* 头部样式 */
header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .nav-link {
    color: #555;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

header .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

header .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* 文章卡片样式 */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.object-fit-cover {
    object-fit: cover;
}

/* 广告样式 */
.ad-container {
    display: block;
    width: 100%;
    overflow: hidden;
    position: relative;
    text-align: center;
}

.ad-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ad-placeholder {
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    border-radius: 0.25rem;
}

/* 文章内容样式 */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    color: #555;
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin: 1.5rem 0;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* 页面内容样式 */
.page-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.page-content h1, .page-content h2, .page-content h3, .page-content h4, .page-content h5, .page-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.page-content p {
    margin-bottom: 1.5rem;
}

/* 分页样式 */
.pagination {
    justify-content: center;
}

.page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}

/* 悬浮广告样式 */
.position-fixed.bottom-0.start-0.end-0 {
    z-index: 1030;
}

/* 评论样式 */
.comment-form {
    margin-bottom: 2rem;
}

.comment-list {
    margin-top: 2rem;
}

.comment-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-meta {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.comment-content {
    margin-bottom: 0.5rem;
}

.comment-actions {
    font-size: 0.875rem;
}

/* 搜索结果样式 */
.search-result-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.search-result-excerpt {
    margin-bottom: 0.5rem;
    color: #555;
}

.search-result-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 面包屑导航样式 */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

/* 标签样式 */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* 按钮样式 */
.btn {
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0a58ca;
    border-color: #0a53be;
}

/* 表单样式 */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 加载中动画 */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}