/* 全局样式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #e1e8ed;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.25rem;
}

.logo img {
    width: 32px;
    height: 32px;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

/* Hero 区域 */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 12px;
    margin: 2rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
}

/* 文章网格 */
.articles-section {
    margin: 3rem 0;
}

.articles-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.article-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-info {
    padding: 1.5rem;
}

.article-info h3 {
    margin-bottom: 0.75rem;
}

.article-info h3 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.article-info h3 a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* 文章详情 */
.article-detail {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2rem 0;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-body h2 {
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.article-body h3 {
    margin: 1.5rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1rem 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* 相关文章 */
.related-articles {
    margin: 3rem 0;
}

.related-articles h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.pagination-inner {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.page-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-ellipsis {
    color: var(--text-light);
}

/* 加载和错误状态 */
.loading,
.error,
.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.error {
    color: #e53e3e;
}

.error-message {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.error-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* 页脚 */
.site-footer {
    background: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.site-footer p {
    color: var(--text-light);
    margin: 0.5rem 0;
}

.disclaimer {
    font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-detail {
        padding: 1.5rem;
    }
    
    .article-header h1 {
        font-size: 1.75rem;
    }
}
