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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
.header {
    background: white;
    padding: 40px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

.blog-title {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.blog-url {
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

.blog-url a {
    color: #3498db;
    text-decoration: none;
}

.blog-url a:hover {
    text-decoration: underline;
}

/* 搜索和标签区域 */
.controls {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

.search-box {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box:focus {
    border-color: #3498db;
}

.tags {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    padding: 6px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tag:hover,
.tag.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 博客列表 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.post-list {
    display: grid;
    gap: 20px;
}

.post-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.post-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.post-meta {
    display: flex;
    gap: 15px;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.post-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #ecf0f1;
    border-radius: 12px;
    font-size: 12px;
    color: #34495e;
}

.post-excerpt {
    color: #555;
    line-height: 1.8;
}

.no-results {
    text-align: center;
    color: #7f8c8d;
    padding: 40px;
    font-size: 16px;
}

/* 文章页面样式 */
.article-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-header {
    background: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-title {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.article-meta {
    color: #7f8c8d;
    font-size: 14px;
}

.article-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    line-height: 2;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin: 30px 0 15px;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 15px;
}

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

.back-home {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
}

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

/* 响应式设计 */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
    }
    
    .blog-title {
        font-size: 24px;
    }
    
    .article-header,
    .article-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
}