/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin-right: 1.5rem;
}

.nav-menu a {
    display: block;
    padding: 1rem 0;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    border-bottom: 3px solid transparent;
}

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

/* 主要内容区域 */
.main-content {
    padding: 2rem 0;
    min-height: 60vh;
}

/* 文章卡片 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

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

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

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* 单篇文章页面 */
.article-single {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

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

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

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

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

.article-body h2 {
    color: #444;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.article-body h3 {
    color: #555;
    margin: 1.5rem 0 0.8rem;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #444;
    margin-top: 1.5rem;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu li {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .article-single {
        padding: 1rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }