/* ========== 1. 重置与变量 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-body: #fafaf9;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text-main: #1e1e2a;
    --text-muted: #5e5e6e;
    --text-light: #8e8e9e;
    --border-light: #e6e6ea;
    --border-medium: #d4d4d8;
    --accent: #3b6e5c;
    --accent-hover: #2c5546;
    --accent-light: #e8f0ed;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.08);
    --radius-card: 20px;
    --radius-input: 40px;
    --radius-btn: 40px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: "Georgia", "Times New Roman", "Times", serif;
    --transition: all 0.2s ease;
}

/* ========== 2. 基础布局 ========== */
body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem 3rem;
    }
}

/* ========== 3. 头部样式 ========== */
.site-header {
    margin-bottom: 3rem;
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.site-title {
    font-size: 2.6rem;
    font-weight: 650;
    letter-spacing: -0.5px;
    font-family: var(--font-serif);
    margin-bottom: 0.5rem;
}

.site-title a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.site-title a:hover {
    color: var(--accent);
}

.site-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.3rem;
}

/* 导航菜单 */
.nav-menu {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-menu ul,
.nav-menu li,
.nav-menu .menu-item,
.nav-menu .menu-item-has-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0.3rem 0;
    position: relative;
}

.nav-menu a::before {
    display: none !important;
    content: none !important;
}

.nav-menu a:hover {
    color: var(--accent);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ========== 4. 搜索区域 ========== */
.search-section {
    margin-bottom: 2.5rem;
}

.search-form {
    display: flex;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-input);
    padding: 0.2rem 0.2rem 0.2rem 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.search-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 110, 92, 0.08);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.9rem 0;
    font-size: 1rem;
    outline: none;
    font-family: var(--font-sans);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 0 1.8rem;
    border-radius: var(--radius-btn);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.search-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* ========== 5. 分类筛选 ========== */
.cat-filter {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-medium);
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-btn);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.filter-btn:hover:not(.active) {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* ========== 6. 文章卡片（首页/归档列表） ========== */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 1.8rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.single-post {
    transform: none;
}

.single-post:hover {
    transform: none;
}

.post-title {
    font-size: 1.8rem;
    font-weight: 600;
    font-family: var(--font-serif);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.post-title a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--accent);
}

/* 文章元信息 */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-light);
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* 特色图片 */
.post-thumbnail {
    margin: 1.2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.post-thumbnail img:hover {
    transform: scale(1.02);
}

/* 文章摘要 */
.post-excerpt {
    color: var(--text-main);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 1rem 0 1.2rem;
}

/* 阅读更多按钮 */
.read-more {
    display: inline-block;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.read-more:hover {
    border-bottom-color: var(--accent);
}

/* ========== 7. 文章详情页（single.php） ========== */
.post-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-main);
}

.post-content h2 {
    margin: 1.5rem 0 0.8rem;
    font-size: 1.6rem;
    font-family: var(--font-serif);
}

.post-content h3 {
    margin: 1.2rem 0 0.6rem;
    font-size: 1.3rem;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.2rem;
    margin: 1.2rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content code {
    background: var(--bg-body);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--bg-body);
    padding: 1rem;
    border-radius: 12px;
    overflow-x: auto;
}

/* 文章标签 */
.post-tags {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tags a {
    background: var(--bg-body);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
}

.post-tags a:hover {
    background: var(--accent);
    color: white;
}

/* 文章上下篇导航 */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.post-nav a {
    text-decoration: none;
    color: var(--accent);
    transition: var(--transition);
}

.post-nav a:hover {
    color: var(--accent-hover);
}

/* ========== 8. 分页样式 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
    align-items: center;
}

.pagination .page-link,
.pagination .page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

.pagination .page-link:hover,
.pagination .page-number:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.pagination .page-number.current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    cursor: default;
}

.pagination .page-link.disabled {
    background: #f0f0f0;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.pagination .page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 4px;
    color: #999;
    font-size: 14px;
}

/* 手机端分页优化 */
@media (max-width: 560px) {
    .pagination {
        gap: 4px;
        margin: 20px 0;
        row-gap: 8px;
    }
    
    .pagination .page-link,
    .pagination .page-number {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .pagination .page-dots {
        min-width: 28px;
        height: 32px;
        font-size: 12px;
    }
}

/* ========== 9. 无结果提示 ========== */
.no-results {
    text-align: center;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-card);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.loading-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* ========== 10. 底部样式 ========== */
.site-footer {
    margin-top: 4rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ========== 11. 评论区域 ========== */
.comments-area {
    margin-top: 2rem;
    padding-top: 1rem;
}

.comments-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment,
.comment .comment {
    background: var(--bg-body);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-author .fn {
    font-weight: 600;
    font-size: 1rem;
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.reply {
    text-align: right;
}

.comment-reply-link {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* 嵌套评论 */
.children {
    list-style: none;
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-light);
}

/* 评论表单 */
.comment-respond {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-light);
}

.comment-reply-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    background: var(--bg-body);
    font-family: var(--font-sans);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 110, 92, 0.1);
}

.form-submit {
    margin-top: 1rem;
}

.submit {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.submit:hover {
    background: var(--accent-hover);
}

.comment-navigation {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
}

.nocomments {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* 响应式评论 */
@media (max-width: 600px) {
    .children {
        margin-left: 0.8rem;
        padding-left: 0.5rem;
    }
    
    .comment-respond {
        padding: 1rem;
    }
}

/* ========== 12. 递归树形归档页面（archive-page.php） ========== */
.archive-page {
    max-width: 880px;
    margin: 0 auto;
}

.archive-page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.archive-page-title {
    font-size: 2.2rem;
    font-family: var(--font-serif);
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.archive-page-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.archive-recursive {
    position: relative;
}

/* 年份节点 */
.recursive-year {
    position: relative;
    margin-bottom: 2rem;
}

.year-node {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.year-marker {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.2rem 0.5rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(59, 110, 92, 0.2);
}

.year-number {
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.year-badge {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: normal;
}

.year-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--border-light) 100%);
}

.year-children {
    margin-left: 2rem;
    padding-left: 1.5rem;
    border-left: 2px dashed var(--border-medium);
    position: relative;
}

/* 月份节点 */
.recursive-month {
    position: relative;
    margin-bottom: 1.5rem;
}

.month-node {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    position: relative;
}

.month-marker {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    padding: 0.3rem 1rem 0.3rem 1.2rem;
    border-radius: 30px;
    z-index: 2;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.month-marker:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.month-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
}

.month-badge {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
}

.month-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-medium) 0%, transparent 100%);
}

.recursive-month::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 1rem;
    width: 1rem;
    height: 1px;
    background: var(--border-medium);
}

/* 文章列表 */
.month-posts {
    list-style: none;
    margin: 0;
    padding: 0 0 0.5rem 0;
}

.post-leaf {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0 0.5rem 1rem;
    border-left: 1px solid var(--border-light);
    margin-left: 1.2rem;
    transition: var(--transition);
    position: relative;
}

.post-leaf::before {
    content: '';
    position: absolute;
    left: -0.25rem;
    top: 0.9rem;
    width: 6px;
    height: 6px;
    background: var(--border-medium);
    border-radius: 50%;
    transition: var(--transition);
}

.post-leaf:hover::before {
    background: var(--accent);
    transform: scale(1.3);
}

.post-leaf:hover {
    border-left-color: var(--accent);
    background: var(--accent-light);
    border-radius: 0 12px 12px 0;
}

.post-date {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
    background: var(--bg-body);
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
}

.post-title-link {
    flex: 1;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.88rem;
    transition: var(--transition);
}

.post-title-link:hover {
    color: var(--accent);
}

/* ========== 13. 标签云页面（tag-page.php） ========== */
.tags-page {
    max-width: 880px;
    margin: 0 auto;
}

.tags-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.tags-page-title {
    font-size: 2.2rem;
    font-family: var(--font-serif);
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.tags-page-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 标签云区域 */
.tag-cloud-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 2rem 1.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem 1.2rem;
}

.cloud-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.25s ease;
    padding: 0.2rem 0.4rem;
    border-radius: 20px;
    scroll-margin-top: 80px;
}

.cloud-tag .tag-count {
    font-size: 0.65em;
    background: var(--border-light);
    padding: 0.1rem 0.3rem;
    border-radius: 20px;
    color: var(--text-muted);
    transition: inherit;
}

.cloud-tag:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.cloud-tag:hover .tag-count {
    background: var(--accent);
    color: white;
}

/* 标签详情列表 */
.tag-details-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 1.8rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.tag-details-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    color: var(--text-main);
}

.tag-detail-card {
    margin-bottom: 1.2rem;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.tag-detail-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.tag-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: var(--bg-body);
    cursor: pointer;
    transition: var(--transition);
}

.tag-detail-header:hover {
    background: var(--accent-light);
}

.tag-info {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tag-icon {
    font-size: 1.1rem;
}

.tag-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.tag-name:hover {
    text-decoration: underline;
}

.tag-post-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--border-light);
    padding: 0.15rem 0.5rem;
    border-radius: 30px;
}

.tag-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 30px;
    transition: var(--transition);
}

.tag-toggle:hover {
    background: var(--border-light);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tag-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.tag-posts-list {
    display: none;
    padding: 0.5rem 0;
    background: var(--bg-card);
}

.tag-posts-list.show {
    display: block;
}

.post-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.6rem 1.2rem;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.post-item:hover {
    background: var(--bg-body);
    padding-left: 1.5rem;
}

.post-item .post-date {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
    background: var(--border-light);
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
}

.post-link {
    flex: 1;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition);
}

.post-link:hover {
    color: var(--accent);
}

.post-category {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--accent-light);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
}

.no-posts {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== 14. 响应式调整（全局） ========== */
@media (max-width: 680px) {
    .post-card {
        padding: 1.3rem;
    }
    
    .post-title {
        font-size: 1.45rem;
    }
    
    .search-form {
        padding-left: 1rem;
    }
    
    .search-btn {
        padding: 0 1.2rem;
    }
    
    .nav-menu {
        gap: 1.2rem;
    }
    
    .cat-filter {
        gap: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.9rem;
        font-size: 0.8rem;
    }
    
    /* 归档树形响应式 */
    .year-children {
        margin-left: 0.8rem;
        padding-left: 0.8rem;
    }
    
    .recursive-month::before {
        left: -0.8rem;
        width: 0.6rem;
    }
    
    .post-leaf {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .post-leaf .post-date {
        font-size: 0.65rem;
    }
    
    .post-leaf .post-title-link {
        font-size: 0.85rem;
    }
    
    .year-number {
        font-size: 1.1rem;
    }
    
    .month-name {
        font-size: 0.9rem;
    }
    
    /* 标签云响应式 */
    .tag-cloud-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .tag-details-wrapper {
        padding: 1.2rem;
    }
    
    .tag-detail-header {
        padding: 0.8rem 1rem;
    }
    
    .tag-info {
        gap: 0.5rem;
    }
    
    .tag-name {
        font-size: 0.95rem;
    }
    
    .post-item {
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.5rem 1rem;
    }
    
    .post-item:hover {
        padding-left: 1rem;
    }
    
    .post-item .post-date {
        font-size: 0.65rem;
    }
    
    .post-link {
        font-size: 0.85rem;
        width: 100%;
        order: 1;
    }
    
    .post-category {
        order: 2;
    }
}

@media (max-width: 480px) {
    .post-meta {
        gap: 0.8rem;
        font-size: 0.7rem;
    }
    
    .site-title {
        font-size: 2rem;
    }
}

/* ========== 15. 深色模式适配 ========== */
@media (prefers-color-scheme: dark) {
    .month-marker {
        background: var(--bg-card);
    }
    
    .post-leaf:hover {
        background: rgba(59, 110, 92, 0.15);
    }
}

/* ========== 16. 打印样式 ========== */
@media print {
    .search-section,
    .cat-filter,
    .pagination,
    .post-nav,
    .comments-area,
    .site-footer {
        display: none;
    }
    
    .post-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* ========== 17. 工具/全局 ========== */
html {
    scroll-behavior: smooth;
}