/* 清芳风格全局样式 */
:root {
    --primary-color: #4a8f29;
    --secondary-color: #6d9e3d;
    --light-color: #f8f9f7;
    --dark-color: #2c3e22;
    --text-color: #333;
    --accent-color: #8bc34a;
    --border-color: #d1e7c0;
    --shadow: 0 2px 15px rgba(74, 143, 41, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.8;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M30,30 Q50,20 70,30 T90,50 Q80,70 70,50 T30,30" fill="none" stroke="%23d1e7c0" stroke-width="0.5"/></svg>');
    background-size: 200px;
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 水墨风格头部 */
header {
    background-color: rgba(248, 249, 247, 0.95);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 3c-4.006 0-7 2.993-7 7.002 0 3.438 2.851 8.957 6.568 11.555C11.604 21.94 11.8 22 12 22s.396-.06.432-.443C16.149 18.959 19 13.44 19 10.002 19 5.993 16.006 3 12 3zm0 14a7 7 0 1 1 0-14 7 7 0 0 1 0 14zm0-10a3 3 0 1 0 0 6 3 3 0 0 0 0-6z"/></svg>');
    margin-right: 10px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* 主要内容区域 - 宣纸效果 */
.main-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 95%, rgba(210, 231, 192, 0.3) 100%);
    pointer-events: none;
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

/* 文章列表 - 竹简风格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(74, 143, 41, 0.15);
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--primary-color);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--secondary-color);
    margin-top: 15px;
}

/* 分类标签 - 叶子样式 */
.category-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: var(--border-color);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
    position: relative;
}

.category-tag::before {
    content: "🍃";
    margin-right: 5px;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px auto;
    display: block;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* 分页导航 - 竹节样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination a::before {
    content: "";
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 2px;
    background-color: var(--border-color);
}

/* 友情链接 - 竹篱样式 */
.friend-links {
    background-color: white;
    border-radius: 6px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 20px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: var(--border-color);
    border-radius: 15px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

.friend-links-container a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 页脚样式 - 竹林背景 */
footer {
    background-color: var(--dark-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    color: white;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(139, 195, 74, 0.3), transparent);
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
}