/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    background-attachment: fixed;
    line-height: 1.8;
    color: #333;
}

/* ========== 头部导航样式 ========== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #4CAF50;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: #4CAF50;
}

/* ========== 文章网格布局 ========== */
.articles-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

/* 文章卡片 */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.article-card .article-content {
    padding: 1.8rem;
}

/* 文章标题 */
.article-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.article-title a:hover {
    color: #4CAF50;
}

/* 文章摘要 */
.article-summary {
    color: #666;
    margin: 1rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 阅读更多 */
.read-more {
    display: inline-block;
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.read-more:hover {
    border-bottom-color: #4CAF50;
    padding-bottom: 0.3rem;
}

/* ========== 文章详情页 ========== */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.article-detail {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-detail .article-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.2;
}

/* 文章元信息 */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    font-size: 0.9rem;
    color: #888;
}

/* 文章内容 */
.article-content {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.8;
}

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

.article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #2c3e50;
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.8rem;
    color: #2c3e50;
}

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

.article-content blockquote {
    border-left: 4px solid #4CAF50;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

/* 返回按钮 */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #4CAF50;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* ========== 页脚 ========== */
.footer {
    background: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    color: #999;
    border-top: 1px solid #e0e0e0;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-detail {
        padding: 1.5rem;
    }
    
    .article-detail .article-title {
        font-size: 1.6rem;
    }
    
    .article-meta {
        gap: 0.8rem;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 1rem;
    }
    
    .logo a {
        font-size: 1.2rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
    
    .article-card .article-content {
        padding: 1.2rem;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
    
    .article-summary {
        font-size: 0.85rem;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card,
.article-detail {
    animation: fadeInUp 0.5s ease-out;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 8px;
    color: #999;
}

.empty-state a {
    color: #4CAF50;
    text-decoration: none;
}