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

body {
    font-family: "宋体", "SimSun", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #faf8f5;
    font-size: 16px;
}

/* 头部导航样式 - 古典风格 */
header {
    background-color: #4a3c31;
    border-bottom: 3px solid #8b4513;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: #f4e4d4;
    font-family: "楷体", "KaiTi", serif;
}

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

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #d4c4b0;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.nav-menu a:hover {
    color: #fff;
    border-bottom-color: #d4a574;
}

/* 主要内容区域 - 古典设计 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
}

.homepage {
    text-align: center;
}

.homepage h1 {
    margin-bottom: 2rem;
    font-size: 2.8rem;
    color: #4a3c31;
    font-family: "楷体", "KaiTi", serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.content {
    max-width: 800px;
    background: #fff;
    padding: 2.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid #8b4513;
}

.content h1, .content h2, .content h3 {
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
    color: #4a3c31;
    font-family: "楷体", "KaiTi", serif;
}

.content h1 {
    font-size: 2.2rem;
    border-bottom: 2px solid #d4a574;
    padding-bottom: 0.5rem;
}

.content h2 {
    font-size: 1.8rem;
}

.content h3 {
    font-size: 1.4rem;
}

.content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    text-indent: 2em;
}

.content ul, .content ol {
    margin-bottom: 1.5rem;
    margin-left: 2em;
}

.content li {
    margin-bottom: 0.5rem;
}

.content blockquote {
    border-left: 4px solid #d4a574;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #666;
    font-style: italic;
    background: #f8f6f0;
    padding: 1rem 1.5rem;
    border-radius: 0 4px 4px 0;
}

/* 文章元信息 */
.post-meta {
    color: #8b7355;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

/* 底部样式 - 古典风格 */
footer {
    background-color: #4a3c31;
    border-top: 3px solid #8b4513;
    padding: 2rem 0;
    margin-top: 3rem;
    color: #d4c4b0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

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

.footer-container a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 首页文章列表样式 */
.posts-section {
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.posts-section h2 {
    color: #4a3c31;
    font-family: "楷体", "KaiTi", serif;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid #d4a574;
    padding-bottom: 0.5rem;
}

.post-summary {
    background: #fff;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid #8b4513;
}

.post-summary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.post-summary h3 a {
    color: #4a3c31;
    text-decoration: none;
    font-family: "楷体", "KaiTi", serif;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.post-summary h3 a:hover {
    color: #8b4513;
}

.post-meta {
    color: #8b7355;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.post-tags {
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    background: #d4a574;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    text-decoration: none;
    transition: background 0.3s;
}

.tag:hover {
    background: #8b4513;
}

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

.read-more {
    text-align: right;
    margin: 0;
}

.read-more a {
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.read-more a:hover {
    color: #4a3c31;
    text-decoration: underline;
}

/* 首页导航链接样式 */
.navigation-links {
    margin: 3rem auto;
    text-align: center;
    max-width: 600px;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, #8b4513 0%, #d4a574 100%);
    color: white;
    text-decoration: none;
    padding: 1.2rem 2rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: "楷体", "KaiTi", serif;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    transition: all 0.3s ease;
    border: 2px solid #8b4513;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
    background: linear-gradient(135deg, #a0522d 0%, #daa520 100%);
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-text {
    flex: 1;
    text-align: center;
}

.nav-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.nav-button:hover .nav-arrow {
    transform: translateX(5px);
}

/* 文章列表页样式 */
.posts-list-page {
    max-width: 900px;
    margin: 0 auto;
}

/* Section页面标题样式 */
.section-page h1 {
    font-size: 2.2rem;
    border-bottom: 2px solid #d4a574;
    padding-bottom: 0.5rem;
    color: #4a3c31 !important;
    font-family: "楷体", "KaiTi", serif;
    margin-bottom: 2rem;
}

.section-page {
    max-width: 800px;
    background: #fff;
    padding: 2.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid #8b4513;
    color: #333;
}

.posts-archive {
    margin-top: 3rem;
}

.post-item {
    background: #4a3c31;
    margin-bottom: 2.5rem;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid #8b4513;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-title {
    margin: 0 0 0.5rem 0;
    font-family: "楷体", "KaiTi", serif;
    font-size: 1.3rem !important;
    line-height: 1.3;
    color: #ffffff !important;
    margin-top: 0 !important;
}

.post-title a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #f0f0f0 !important;
}

.post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.post-date {
    font-weight: normal;
    color: #f0f0f0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #d4a574;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: background 0.3s ease;
}

.tag:hover {
    background: #8b4513;
}

.post-excerpt {
    color: #e0e0e0;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.post-footer {
    text-align: right;
    margin-top: 0;
}

.read-more {
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border: 2px solid #8b4513;
    border-radius: 5px;
    display: inline-block;
    transition: all 0.3s ease;
}

.read-more:hover {
    background: #8b4513;
    color: white;
    text-decoration: none;
    transform: translateX(3px);
}

/* 分页导航样式 */
.pagination {
    margin: 3rem 0 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination li {
    display: inline-block;
    list-style: none;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    margin: 0 0.2rem;
    border: 1px solid #8b4513;
    border-radius: 3px;
    color: #8b4513;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: "楷体", "KaiTi", serif;
    font-size: 0.9rem;
    background: #fff;
}

.pagination a:hover {
    background: #8b4513;
    color: white;
    border-color: #8b4513;
}

.pagination .active {
    background: #8b4513;
    color: white;
    border-color: #8b4513;
}

.pagination .disabled {
    color: #ccc;
    border-color: #ddd;
    cursor: not-allowed;
    background: transparent;
}

.pagination .disabled:hover {
    background: transparent;
    color: #ccc;
    border-color: #ddd;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .posts-list-page {
        padding: 0 1rem;
    }
    
    .post-item {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .post-title {
        font-size: 1.4rem;
    }
    
    .post-meta {
        font-size: 0.85rem;
    }
    
    .post-excerpt {
        font-size: 0.95rem;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.6rem;
    }
    
    .read-more {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 0.5rem 1rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .content {
        padding: 2rem 1.5rem;
    }
    
    .homepage h1 {
        font-size: 2.2rem;
    }
    
    .nav-button {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-arrow {
        transform: rotate(90deg);
    }
    
    .nav-button:hover .nav-arrow {
        transform: rotate(90deg) translateX(5px);
    }
    
    body {
        font-size: 15px;
    }
    
    /* 分页响应式设计 */
    .pagination {
        flex-wrap: wrap;
        gap: 0.2rem;
        margin: 2rem 0 1.5rem;
    }
    
    .pagination a, .pagination span {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        margin: 0.1rem;
    }
}

/* 特殊元素样式 */
.ming-dynasty {
    background: linear-gradient(135deg, #8b4513 0%, #d4a574 100%);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-weight: bold;
}

/* 标签样式 */
.tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.tag {
    display: inline-block;
    background: #d4a574;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    text-decoration: none;
    transition: background 0.3s;
}

.tag:hover {
    background: #8b4513;
}