/* 全局样式重置 */
* {
    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: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #666;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* 头部横幅 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #fff;
    color: #667eea;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

/* 主要内容区域 */
main {
    margin: 3rem auto;
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

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

.article-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.article-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.article-title a {
    color: #2c3e50;
}

.article-title a:hover {
    color: #667eea;
}

.article-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    display: inline-block;
}

.read-more:hover {
    color: #764ba2;
}

/* 关于预览区 */
.about-preview {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-content p {
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.8;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
}

.footer-links a {
    color: #ecf0f1;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: #667eea;
}

.备案信息 {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* 博客列表页样式 */
.blog-list {
    max-width: 900px;
    margin: 0 auto;
}

.blog-article {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.blog-article:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 关于页面样式 */
.about-section {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-section h2 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-section p,
.about-section ul {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-section ul {
    padding-left: 2rem;
}

.about-section li {
    margin-bottom: 0.5rem;
}

/* 文章详情页 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

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

.article-meta {
    color: #999;
    font-size: 0.95rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #444;
}

.article-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

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

.article-body code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.article-body pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    color: #ecf0f1;
}
