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

body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* 页头样式 */
#header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav {
    padding: 20px 0;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.menu {
    display: flex;
    list-style: none;
}

.menu li {
    margin-left: 30px;
}

.menu li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.menu li a:hover {
    color: #666;
}

/* 主内容区 */
#main {
    padding: 60px 0;
}

/* 文章列表样式 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.article-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.article-item:last-child {
    border-bottom: none;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

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

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

.article-excerpt {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.7;
}

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

.meta-sep {
    margin: 0 5px;
}

.article-category a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-category a:hover {
    color: #666;
}

/* 分页样式 */
.pagination {
    margin-top: 60px;
    text-align: center;
}

.page-nav {
    display: inline-flex;
    list-style: none;
    gap: 10px;
}

.page-nav li a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-nav li a:hover,
.page-nav li.active a {
    background-color: #f5f5f5;
    border-color: #ddd;
}

/* 文章详情页样式 */
.post-detail {
    margin-bottom: 60px;
}

.post-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

.post-meta {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 40px;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
    margin: 30px 0 15px;
    font-weight: 600;
}

.post-content h1 { font-size: 24px; }
.post-content h2 { font-size: 22px; }
.post-content h3 { font-size: 20px; }
.post-content h4 { font-size: 18px; }
.post-content h5 { font-size: 16px; }
.post-content h6 { font-size: 14px; }

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.post-content blockquote {
    border-left: 4px solid #eee;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
}

/* 上一篇/下一篇导航 */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin: 60px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-prev, .nav-next {
    flex: 1;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-prev a, .nav-next a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-prev a:hover, .nav-next a:hover {
    color: #666;
}

.arrow-left, .arrow-right {
    margin: 0 5px;
}

/* 评论区样式 */
.comments {
    margin-top: 60px;
}

.comments-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.comments-list {
    margin-bottom: 40px;
}

.comment-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
}

.comment-reply {
    margin-top: 10px;
}

.comment-reply a {
    font-size: 12px;
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-reply a:hover {
    color: #666;
}

.comment-form {
    margin-top: 40px;
}

.comment-form-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.comment-form-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.comment-form-textarea textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
}

.comment-form-submit {
    margin-top: 20px;
    text-align: right;
}

.submit-btn {
    padding: 10px 30px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #555;
}

/* 页脚样式 */
#footer {
    background-color: #f5f5f5;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
    font-size: 14px;
    color: #999;
}

.footer-content p {
    margin-bottom: 5px;
}

.footer-content a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .menu li {
        margin-left: 0;
    }
    
    .post-nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-prev, .nav-next {
        text-align: center;
    }
    
    .comment-form-fields {
        grid-template-columns: 1fr;
    }
}