* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

header {
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

nav a {
    color: #007bff;
    text-decoration: none;
    margin: 0 1rem;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.article-meta {
    margin: 1rem 0;
    color: #6c757d;
}

.article-meta span {
    margin-right: 1rem;
}

.tags {
    margin: 1rem 0;
}

.tag {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    color: #495057;
}

.article-content {
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-articles {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.related-articles h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.related-articles ul {
    list-style: none;
}

.related-articles li {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
}

.related-articles a {
    text-decoration: none;
    color: inherit;
}

.related-articles h4 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

.article-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.article-preview {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-preview h2 a {
    color: #2c3e50;
    text-decoration: none;
}

.article-preview h2 a:hover {
    color: #007bff;
}

.meta {
    color: #6c757d;
    margin: 0.5rem 0;
}

.meta span {
    margin-right: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    margin-top: 3rem;
}

.error-container {
    max-width: 600px;
    margin: 4rem auto;
    padding: 0 1rem;
    text-align: center;
}

.error-content h1 {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.back-home {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: background-color 0.3s;
}

.back-home:hover {
    background: #0056b3;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb .current {
    color: #495057;
    font-weight: 500;
}

/* 首页优化 */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.nav-menu a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.intro-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
}

.intro-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* 文章摘要 */
.article-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* 侧边栏 */
.sidebar {
    max-width: 300px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.hot-tags {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    text-decoration: none;
    color: #495057;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.tag-link:hover {
    background: #007bff;
    color: white;
}

/* 文章页面增强 */
.content-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-left: 4px solid #007bff;
    margin-bottom: 2rem;
    border-radius: 0 0.25rem 0.25rem 0;
}

.table-of-contents {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    position: sticky;
    top: 2rem;
}

.table-of-contents h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: #007bff;
    text-decoration: none;
    padding: 0.25rem 0;
    display: block;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

/* 文章操作区域 */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.rating .stars {
    color: #ffc107;
    font-size: 1.2rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.share-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    color: white;
    font-size: 0.875rem;
}

.share-btn.weibo {
    background: #e6162d;
}

.share-btn.wechat {
    background: #07c160;
}

/* 评论区域 */
.comments-section {
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comments-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* 分页导航样式 */
.pagination {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #007bff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
    justify-content: center;
}

.pagination-btn:hover:not(.disabled) {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    text-decoration: none;
}

.pagination-btn.disabled {
    color: #6c757d;
    background: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #007bff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-number:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    text-decoration: none;
}

.pagination-number.current {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    font-weight: 600;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .intro-section {
        padding: 1rem;
    }
    
    .intro-section h2 {
        font-size: 1.5rem;
    }
}

/* 页脚增强 */
.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-nav {
    display: flex;
    gap: 1rem;
}

.footer-nav a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-nav a:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .pagination-numbers {
        order: 2;
        justify-content: center;
        margin: 0;
    }
    
    .prev-btn {
        order: 1;
    }
    
    .next-btn {
        order: 3;
    }
    
    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .pagination-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }
    
    .pagination-ellipsis {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 480px) {
    .pagination-numbers {
        gap: 0.25rem;
    }
    
    .pagination-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
    
    .pagination-ellipsis {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
}
