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

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #e1e8ed;
    --code-bg: #f6f8fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background: #fff;
}

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

/* 头部 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

header nav {
    margin-top: 20px;
}

header nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255,255,255,0.2);
}

/* 主内容区 */
main {
    padding: 40px 0;
    min-height: 60vh;
}

/* Hero 区域 */
.hero {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.hero p {
    color: #666;
    font-size: 1.1rem;
}

/* 文章列表 */
.posts h3, .tags h3 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.post-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.post-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-card h4 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-card h4 a:hover {
    color: var(--primary-color);
}

.post-card .meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.post-card .excerpt {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: #2980b9;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--light-bg);
    color: var(--secondary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* 页脚 */
footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

footer p {
    margin: 5px 0;
}

footer .visitor-count {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 25px;
    }
    
    .post-card {
        padding: 20px;
    }
}
