/*
Theme Name: 内容管家辅助主题
Description: 专为「内容管家 (Content Auto Manager)」插件设计的官方配套主题，一套将自动化内容转化为SEO增长引擎的前端解决方案。 == 核心特色功能 (插件 + 主题) == *   **SEO矩阵 - 自动化二级域名站群**     自动为每篇文章创建独立的二级域名，无需手动配置，快速构建拥有海量收录潜力的SEO内容矩阵。 *   **专题聚合 - 一文一专题**     将单篇文章页升级为聚合“内容角度”、“用户价值”、“SEO关键词”的核心专题页，最大化单页信息密度与SEO价值。 *   **深度链接 - 关键词子频道**     自动为专题页下的每个关键词生成独立的聚合列表页，构建深度互链的“主题-关键词”内容簇，提升网站权重。 == 基础功能与优化 == * **内置SEO**: 提供XML网站地图生成器、自动Meta标签、Schema.org结构化数据。 * **集中控制**: 独立的“主题设置”面板，统一管理所有功能选项。 * **动态推荐**: 智能推荐相关文章，增加用户站内停留时间。 == 快速上手 == 1.  启用「内容管家」插件和本主题。 2.  访问后台“主题设置”页面，根据引导完成配置。 3.  内容发布后，在设置页面中生成`sitemap.xml`。
Version: 1.0.1
Author: kdjingpai.com
*/

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

/* 移动端优化基础样式 */
img {
    max-width: 100%;
    height: auto;
}

/* 确保配图区域的响应式容器 */
.hero-ad-code {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-ad-code img,
.hero-ad-code iframe {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* 表格基础样式 - 美观且响应式 */
.article-body table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    display: table;
    white-space: normal;
}

/* 表格容器 - 用于响应式处理 */
.article-body .table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* 表头样式 */
.article-body thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--card-background);
}

.article-body th {
    padding: 1rem 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    letter-spacing: 0.5px;
}

/* 表格单元格样式 */
.article-body td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 表格行样式 */
.article-body tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.article-body tbody tr:last-child {
    border-bottom: none;
}

/* 斑马纹效果 */
.article-body tbody tr:nth-child(even) {
    background: var(--background-color);
}

/* 悬停效果 */
.article-body tbody tr:hover {
    background: var(--hover-bg);
}

/* 表格内链接样式 */
.article-body table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.article-body table a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* 移动端响应式表格 - 重新布局 */
@media (max-width: 768px) {
    .article-body table,
    .article-body thead,
    .article-body tbody,
    .article-body th,
    .article-body td,
    .article-body tr {
        display: block;
        width: 100%;
    }

    /* 隐藏表头 */
    .article-body thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* 表格行样式 */
    .article-body tr {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 0;
        background: var(--card-background);
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    /* 表格单元格样式 */
    .article-body td {
        border: none;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        padding: 1rem 1rem 1rem 35%;
        font-size: 0.9rem;
        line-height: 1.5;
        min-height: 3rem;
        display: flex;
        align-items: center;
    }

    /* 最后一行不显示底部边框 */
    .article-body td:last-child {
        border-bottom: none;
    }

    /* 为每个单元格添加表头标签 */
    .article-body td:before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 30%;
        padding-right: 1rem;
        font-weight: 600;
        color: var(--primary-color);
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 特殊单元格标签映射 */
    .article-body td:nth-of-type(1):before { content: "指标类别"; }
    .article-body td:nth-of-type(2):before { content: "计算方式"; }
    .article-body td:nth-of-type(3):before { content: "数据来源"; }

    /* 通用备用标签 */
    .article-body td:not([data-label]):before {
        content: "项目";
        color: var(--text-muted);
    }

    /* 表格行悬停效果 */
    .article-body tr:hover {
        background: var(--hover-bg);
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }

    /* 移除斑马纹，改用卡片样式 */
    .article-body tbody tr:nth-child(even) {
        background: var(--card-background);
    }
}

/* 更小屏幕优化 */
@media (max-width: 480px) {
    .article-body td {
        padding: 0.8rem 0.8rem 0.8rem 40%;
        font-size: 0.85rem;
    }

    .article-body td:before {
        width: 35%;
        font-size: 0.8rem;
    }

    .article-body tr {
        margin-bottom: 0.8rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .article-body td {
        padding: 0.6rem 0.6rem 0.6rem 45%;
        font-size: 0.8rem;
    }

    .article-body td:before {
        width: 40%;
        font-size: 0.75rem;
    }

    .article-body tr {
        margin-bottom: 0.6rem;
        border-radius: 6px;
    }
}

iframe {
    max-width: 100%;
}

pre, code {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* CSS变量 - 默认蓝色主题 */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-color-rgb: 52, 152, 219;
    --secondary-color: #2c3e50;
    --accent-color: #667eea;
    --accent-color-rgb: 102, 126, 234;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --text-light: #888888;
    --border-color: #dee2e6;
    --hover-bg: #f1f3f4;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
}

/* 新增配色方案 */
body[data-theme='forest'] {
    --primary-color: #27ae60;
    --primary-dark: #229954; /* Derived */
    --primary-color-rgb: 39, 174, 96;
    --secondary-color: #1E392A;
    --accent-color: #27ae60; /* Using primary as accent for simplicity */
    --accent-color-rgb: 39, 174, 96;
    --background-color: #F9F9F9;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-muted: #adb5bd;
    --text-light: #888888; /* Default */
    --border-color: #dee2e6;
    --hover-bg: #e6f7e6; /* Light green */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #27ae60;
    --gradient-end: #1E392A;
}

body[data-theme='sunset'] {
    --primary-color: #e67e22;
    --primary-dark: #d35400;
    --primary-color-rgb: 230, 126, 34;
    --secondary-color: #424242;
    --accent-color: #ff9800;
    --accent-color-rgb: 255, 152, 0;
    --background-color: #FFF8F5;
    --card-background: #ffffff;
    --text-color: #424242;
    --text-muted: #9E9E9E;
    --text-light: #E0E0E0;
    --border-color: #E0E0E0;
    --hover-bg: #ffe8d6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #e67e22;
    --gradient-end: #d35400;
}

body[data-theme='midnight'] {
    --primary-color: #BB86FC;
    --primary-dark: #985EEB;
    --primary-color-rgb: 187, 134, 252;
    --secondary-color: #FFFFFF;
    --accent-color: #BB86FC;
    --accent-color-rgb: 187, 134, 252;
    --background-color: #121212;
    --card-background: #1E1E1E;
    --text-color: #E0E0E0;
    --text-muted: #888888;
    --text-light: #333333;
    --border-color: #333333;
    --hover-bg: #2a2a2a;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --gradient-start: #BB86FC;
    --gradient-end: #985EEB;
}

body[data-theme='oceanic'] {
    --primary-color: #00A896;
    --primary-dark: #00796B;
    --secondary-color: #023047;
    --accent-color: #00A896;
    --background-color: #F0F8FF;
    --card-background: #ffffff;
    --text-color: #023047;
    --text-muted: #6c757d;
    --text-light: #888888;
    --border-color: #dee2e6;
    --hover-bg: #e0f2f7;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #00A896;
    --gradient-end: #00796B;
}

body[data-theme='royal'] {
    --primary-color: #FFB703;
    --primary-dark: #E6A000;
    --secondary-color: #5A189A;
    --accent-color: #FFB703;
    --background-color: #F8F7FF;
    --card-background: #ffffff;
    --text-color: #240046;
    --text-muted: #6c757d;
    --text-light: #888888;
    --border-color: #dee2e6;
    --hover-bg: #f0e6ff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #FFB703;
    --gradient-end: #E6A000;
}

body[data-theme='monochrome'] {
    --primary-color: #000000;
    --primary-dark: #333333;
    --secondary-color: #212121;
    --accent-color: #000000;
    --background-color: #FFFFFF;
    --card-background: #F5F5F5;
    --text-color: #212121;
    --text-muted: #666666;
    --text-light: #888888;
    --border-color: #dee2e6;
    --hover-bg: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #000000;
    --gradient-end: #333333;
}

body[data-theme='sakura'] {
    --primary-color: #FF69B4;
    --primary-dark: #C71585;
    --secondary-color: #C71585;
    --accent-color: #FF69B4;
    --background-color: #FFF0F5;
    --card-background: #ffffff;
    --text-color: #555555;
    --text-muted: #888888;
    --text-light: #888888;
    --border-color: #dee2e6;
    --hover-bg: #ffe6f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #FF69B4;
    --gradient-end: #C71585;
}

body[data-theme='crimson'] {
    --primary-color: #D72638;
    --primary-dark: #A81F2C;
    --secondary-color: #141414;
    --accent-color: #D72638;
    --background-color: #F5F5F5;
    --card-background: #ffffff;
    --text-color: #141414;
    --text-muted: #666666;
    --text-light: #888888;
    --border-color: #dee2e6;
    --hover-bg: #ffe6e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #D72638;
    --gradient-end: #A81F2C;
}

body[data-theme='mint'] {
    --primary-color: #50C878;
    --primary-dark: #3D9960;
    --secondary-color: #004D40;
    --accent-color: #50C878;
    --background-color: #F0FFF0;
    --card-background: #ffffff;
    --text-color: #004D40;
    --text-muted: #6c757d;
    --text-light: #888888;
    --border-color: #dee2e6;
    --hover-bg: #e6ffe6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #50C878;
    --gradient-end: #3D9960;
}


/* 页面内容容器 */
.sitemap-container {
    background: var(--card-background);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    margin: 2rem 0;
}

.sitemap-title {
    font-size: 3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.sitemap-subtitle {
    font-size: 0.6em;
    color: var(--text-muted);
    font-weight: normal;
}

.sitemap-description {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.sitemap-list {
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.sitemap-item {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sitemap-item:hover {
    border-color: var(--primary-color);
    background: var(--background-color);
    transform: translateY(-1px);
}

.sitemap-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    display: block;
}

.sitemap-link:hover {
    color: var(--primary-color);
}

.sitemap-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* 通用样式类 */
.no-content-notice {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.error-404-container {
    text-align: center;
    padding: 3rem 2rem;
}

.error-404-title {
    font-size: 6rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.error-404-subtitle {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.error-404-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.error-404-button-container {
    margin: 2rem 0;
}

.error-404-button {
    background: var(--primary-color);
    color: var(--card-background);
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

.error-404-suggestions {
    margin-top: 3rem;
}

.error-404-suggestions-title {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.error-404-list {
    list-style: none;
    max-width: 400px;
    margin: 0 auto;
}

.error-404-item {
    margin: 0.8rem 0;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.error-404-item-link {
    text-decoration: none;
    color: var(--text-color);
}

.error-404-item-link:hover {
    color: var(--primary-color);
}






/* 容器和布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.site-header {
    background: var(--card-background);
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 20px;
}

.site-title {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* 网站标题文本样式 */
.site-title.site-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.site-title.site-text:hover {
    color: var(--primary-color);
}

/* 网站LOGO样式 */
.site-title.site-logo img {
    height: 70px;
    max-width: 280px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.site-title.site-logo:hover img {
    opacity: 0.8;
}

/* 导航菜单 */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 2rem;
    margin: 1rem 0;
    min-height: calc(100vh - 200px);
}

/* 右侧栏 */
.sidebar {
    background: var(--card-background);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.related-articles {
    list-style: none;
}

.related-articles li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.related-articles li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-articles a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.related-articles a:hover {
    color: var(--primary-color);
}


/* 文章内容区域 */
.article-content {
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    overflow: hidden;
}

/* 首屏专题头部 - 白色背景版本 */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--card-background);
    padding: 3rem 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hero-info > div {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hero-info .label {
    font-size: 0.9rem;
    opacity: 0.8;
    min-width: 80px;
}

.hero-info .value {
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 15px; /* 减小圆角 */
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-btn.primary {
    background: var(--card-background);
    color: var(--accent-color);
}

.hero-btn.primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.hero-btn.secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-btn.secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.topic-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.topic-actions .hero-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 12px; /* 小一些的圆角 */
    white-space: nowrap; /* 防止文字换行 */
    display: inline-block; /* 确保padding等属性生效 */
}

.topic-actions .hero-btn.primary {
    background: var(--primary-color);
    color: var(--card-background);
}

.topic-actions .hero-btn.secondary {
    background: var(--hover-bg);
    color: var(--secondary-color);
}

.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 500px;
    min-height: 400px; /* 增加占位区域高度 */
}



.placeholder-icon {
    font-size: 5rem;
}

.placeholder-text {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* 文章正文 */
.article-body {
    padding: 2.5rem;
    font-size: 1.2rem;
    line-height: 1.8;
}

.article-body h1 {
    margin: 2rem 0 1rem 0;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 3rem;
}

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin: 2rem 0 1rem 0;
    color: var(--secondary-color);
    font-weight: 600;
}

.article-body h2 {
    font-size: 1.8rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.article-body h3 {
    font-size: 1.4rem;
}

.article-body p {
    margin-bottom: 1.2rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-muted);
    background: var(--background-color);
    padding: 1rem 1.5rem;
    border-radius: 0 4px 4px 0;
}

.article-body code {
    background: var(--hover-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
}

.article-body pre {
    background: var(--secondary-color);
    color: var(--card-background);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

/* 文章内容中的超链接样式 */
.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    text-decoration-color: rgba(var(--primary-color-rgb), 0.6);
    transition: color 0.3s ease, text-decoration-color 0.3s ease, opacity 0.3s ease;
    font-weight: 500;
    border-radius: 2px;
    background: linear-gradient(to bottom, transparent 60%, rgba(var(--primary-color-rgb), 0.1) 60%);
    background-size: 100% 100%;
    background-position: 0 0;
}

.article-body a:hover {
    color: var(--accent-color);
    text-decoration-color: rgba(var(--accent-color-rgb), 0.8);
    background: linear-gradient(to bottom, transparent 60%, rgba(var(--accent-color-rgb), 0.15) 60%);
}

.article-body a:visited {
    color: var(--primary-color);
    opacity: 0.8;
}

.article-body a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

/* 文章内容中强调文本的超链接样式 */
.article-body strong a,
.article-body em a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    font-weight: 600;
}

/* 深色主题特殊处理 - 使用更亮的链接颜色 */
body[data-theme='dark'] .article-body a {
    color: #1976D2;
    text-decoration-color: rgba(25, 118, 210, 0.6);
    background: linear-gradient(to bottom, transparent 60%, rgba(25, 118, 210, 0.1) 60%);
}

body[data-theme='dark'] .article-body a:hover {
    color: #1565C0;
    text-decoration-color: rgba(21, 101, 192, 0.8);
    background: linear-gradient(to bottom, transparent 60%, rgba(21, 101, 192, 0.15) 60%);
}

body[data-theme='dark'] .article-body a:focus {
    outline-color: #1976D2;
}

/* 樱花主题特殊处理 - 更柔和的链接效果 */
body[data-theme='sakura'] .article-body a:hover {
    color: #C71585;
    text-decoration-color: rgba(199, 21, 133, 0.8);
    background: linear-gradient(to bottom, transparent 60%, rgba(255, 182, 193, 0.2) 60%);
}

/* 通栏首屏专题头部 */
.hero-section-fullwidth {
    background: linear-gradient(135deg, var(--background-color) 0%, var(--hover-bg) 100%);
    color: var(--secondary-color);
    padding: 2rem 2rem;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/* 确保通栏首屏专题头部在小屏幕下的适配 */
@media (max-width: 900px) {
    .hero-content {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-right {
        order: -1; /* 在移动端让图片显示在前面 */
    }
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hero-info > div {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hero-info .label {
    font-size: 0.9rem;
    opacity: 0.7;
    min-width: 80px;
    color: var(--text-muted);
}

.hero-info .value {
    font-size: 1rem;
    font-weight: 500;
    background: var(--card-background);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 300px;  /* 保持4:3的宽高比 */
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.hero-placeholder {
    width: 100%;
    max-width: 100%;
    height: 300px;
    background: var(--card-background);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    box-shadow: 0 4px 16px var(--shadow-color);
}

.placeholder-icon {
    font-size: 5rem;
    color: var(--text-muted);
}

.placeholder-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* 自定义代码容器样式 */
.hero-ad-code {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-ad-code img,
.hero-ad-code iframe {
    max-width: 100%;
    height: auto;
}

/* 专题导航区域 */
.topic-navigation {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.topic-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.topic-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--background-color);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.topic-tag:hover {
    background: var(--primary-color);
    color: var(--card-background);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.topic-tag.active {
    background: var(--secondary-color);
    color: var(--card-background);
    border-color: var(--secondary-color);
}



.no-related {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 子频道文章列表样式 */
.tag-articles-container {
    background: var(--card-background);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    margin: 2rem 0;
}

.tag-articles-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.tag-articles-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.tag-articles-list {
    display: grid;
    gap: 1.5rem;
}

.tag-article-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--card-background);
}

.tag-article-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px var(--shadow-color);
    transform: translateY(-2px);
}

.tag-article-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.tag-article-title a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.tag-article-title a:hover {
    color: var(--primary-color);
}

.tag-article-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tag-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.tag-article-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tag-article-similarity {
    background: var(--hover-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 通用样式类 */
.no-content-notice {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* 分页链接样式 */
.pagination-center {
    text-align: center;
    margin-top: 2rem;
    clear: both; /* 清除浮动 */
}

.pagination-center ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important; /* 居中对齐 */
    display: inline-block !important;
    text-align: center !important;
}

.pagination-center ul li {
    display: inline-block !important;
    margin: 0 0.2rem !important;
    background: transparent !important; /* 确保列表项没有背景 */
    border: none !important; /* 确保列表项没有边框 */
    padding: 0 !important; /* 移除可能的内边距 */
    float: none !important; /* 确保不浮动 */
}

.pagination-center ul li:hover {
    background: transparent !important; /* 确保悬停时列表项没有背景 */
}

.pagination-center ul li a,
.pagination-center ul li span {
    display: inline-block !important;
    padding: 0.5rem 0.8rem !important;
    text-decoration: none !important;
    border: 1px solid var(--border-color) !important;
    background: var(--card-background) !important; /* 强制白色背景 */
    color: var(--text-muted) !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    line-height: normal !important; /* 确保正常的行高 */
    margin: 0 !important; /* 确保没有外边距 */
    float: none !important; /* 确保没有浮动 */
    box-shadow: none !important; /* 移除可能的阴影 */
}

.pagination-center ul li a:hover,
.pagination-center ul li span:hover {
    background: var(--primary-color) !important; /* 强制悬停背景色 */
    color: var(--card-background) !important; /* 强制悬停文字颜色 */
    border-color: var(--primary-color) !important; /* 强制悬停边框颜色 */
}

.pagination-center .current,
.pagination-center ul li .current {
    background: var(--secondary-color) !important; /* 强制当前页背景色 */
    color: var(--card-background) !important; /* 强制当前页文字颜色 */
    border-color: var(--secondary-color) !important; /* 强制当前页边框颜色 */
}

.pagination-center .page-numbers.dots,
.pagination-center ul li .page-numbers.dots {
    border: none !important;
    background: transparent !important;
}

.pagination-center .page-numbers.prev,
.pagination-center .page-numbers.next,
.pagination-center ul li .page-numbers.prev,
.pagination-center ul li .page-numbers.next {
    background: var(--background-color) !important; /* 强制上一页/下一页背景色 */
    color: var(--text-muted) !important; /* 强制上一页/下一页文字颜色 */
}

.pagination-center .page-numbers.prev:hover,
.pagination-center .page-numbers.next:hover,
.pagination-center ul li .page-numbers.prev:hover,
.pagination-center ul li .page-numbers.next:hover {
    background: var(--primary-color) !important; /* 强制悬停背景色 */
    color: var(--card-background) !important; /* 强制悬停文字颜色 */
    border-color: var(--primary-color) !important; /* 强制悬停边框颜色 */
}

.sitemap-subtitle {
    font-size: 0.6em;
    color: var(--text-muted);
    font-weight: normal;
}

.sitemap-description {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* 网站地图页面样式 */

/* 页脚样式 */
.site-footer {
    background: var(--secondary-color);
    color: var(--card-background);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.site-footer p {
    margin: 0;
    opacity: 0.8;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.footer-link {
    color: var(--card-background);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-copyright {
    margin: 0;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-right {
        width: 100%;
        max-width: 100%;
        min-height: 300px;
    }

    .hero-content {
        max-width: 900px;
    }

    .hero-placeholder {
        max-width: 100%;
        height: 263px;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 移动端隐藏导航菜单，只显示网站标题 */
    .main-navigation {
        display: none;
    }

    /* 移动端网站标题居中显示 */
    .site-header .container {
        justify-content: center;
        text-align: center;
    }

    .sidebar {
        order: 2;
        margin-top: 1rem;
        position: static;
    }

    .hero-title {
        font-size: 2.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-right {
        width: 100%;
        max-width: 100%;
        min-height: 250px;
        margin: 0;
    }

    .article-body {
        padding: 2rem;
        font-size: 1.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }

    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .topic-tags {
        justify-content: center;
    }

    .tag-articles-container {
        padding: 1.5rem;
    }

    .tag-article-item {
        padding: 1rem;
    }

    .tag-article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .topic-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section-fullwidth {
        padding: 2rem 1rem;
    }

    .hero-content {
        padding: 0 12px;
    }

    .topic-nav-container {
        padding: 0 12px;
    }
}

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-right {
        max-width: 100%;
        min-height: 200px;
    }

    .hero-info .label {
        min-width: 60px;
        font-size: 0.8rem;
    }

    .hero-info .value {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }

    .article-body {
        padding: 1.8rem;
        font-size: 1.1rem;
    }

    .article-body h1 {
        font-size: 2.5rem;
    }

    .article-body h2 {
        font-size: 1.8rem;
    }

    .article-body h3 {
        font-size: 1.4rem;
    }

    .topic-navigation {
        padding: 0.8rem 0;
    }

    .topic-nav-container {
        padding: 0 12px;
    }

    .topic-tags {
        gap: 0.6rem;
    }

    .topic-tag {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    /* 移动端链接触摸优化 */
    .article-body a {
        padding: 2px 4px;
        margin: -2px -4px;
        text-decoration-thickness: 2px;
        text-underline-offset: 3px;
    }

    .article-body strong a,
    .article-body em a {
        text-decoration-thickness: 3px;
        text-underline-offset: 3px;
    }

    .tag-articles-container {
        padding: 1.2rem;
    }

    .tag-articles-title {
        font-size: 1.6rem;
    }

    .tag-article-title {
        font-size: 1.15rem;
    }

    .tag-article-item {
        padding: 1rem;
    }

    .hero-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    .topic-actions .hero-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero-content {
        padding: 0 10px;
    }

    .topic-nav-container {
        padding: 0 10px;
    }
}

    .hero-title {
        font-size: 2rem;
    }

    .hero-right {
        max-width: 100%;
        min-height: 180px;
    }

    .hero-placeholder {
        max-width: 100%;
        height: 150px;
    }

    .article-body {
        padding: 1.5rem;
        font-size: 1.05rem;
    }

    .article-body h1 {
        font-size: 2.2rem;
    }

    .article-body h2 {
        font-size: 1.8rem;
    }

    .article-body h3 {
        font-size: 1.4rem;
    }

    /* 小屏幕链接触摸优化 */
    .article-body a {
        padding: 3px 5px;
        margin: -3px -5px;
        text-decoration-thickness: 2px;
    }

    .tag-articles-title {
        font-size: 1.4rem;
    }

    .tag-article-title {
        font-size: 1.1rem;
    }

    .tag-article-excerpt {
        font-size: 0.85rem;
    }

    .topic-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .site-title.site-text {
        font-size: 1.3rem;
    }

    .site-title.site-logo img {
        height: 55px;
        max-width: 220px;
    }

    .hero-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }

    .hero-content {
        padding: 0 8px;
    }

    .topic-nav-container {
        padding: 0 8px;
    }
}

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-right {
        max-width: 100%;
        min-height: 160px;
    }

    .article-body {
        padding: 1.2rem;
        font-size: 1rem;
    }

    /* 最小屏幕链接触摸优化 */
    .article-body a {
        padding: 4px 6px;
        margin: -4px -6px;
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }

    .article-body h1 {
        font-size: 2rem;
    }

    .article-body h2 {
        font-size: 1.8rem;
    }

    .article-body h3 {
        font-size: 1.4rem;
    }

    .site-title.site-text {
        font-size: 1.2rem;
    }

    .site-title.site-logo img {
        height: 45px;
        max-width: 180px;
    }

    .topic-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

/* =============================================
   现代化首页样式
   ============================================= */

/* 首页图片区域 */
.home-hero-image {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 300px;
    max-height: 800px;
    overflow: hidden;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 图片遮罩层 - 使用主题配色进行美化处理 */
.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(var(--primary-color-rgb, 52, 152, 219), 0.2) 0%,
        rgba(var(--accent-color-rgb, 102, 126, 234), 0.1) 100%
    );
    pointer-events: none;
}

/* 可选：添加微妙的渐变边缘效果 */
.hero-image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        transparent 20%,
        transparent 80%,
        rgba(0, 0, 0, 0.05) 100%
    );
    pointer-events: none;
}


/* 首页主要内容区域 */
.home-main {
    padding: 4rem 0;
}

/* 当没有Hero区域时，增加顶部间距 */
body:not(.has-hero) .home-main {
    padding-top: 6rem;
}

/* 通用区域标题 */
.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 特色文章区域 */
.featured-posts {
    margin-bottom: 5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.featured-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px var(--shadow-color);
    border-color: var(--primary-color);
}

.featured-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.featured-image img,
.featured-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image img,
.featured-card:hover .featured-thumb {
    transform: scale(1.05);
}

.featured-image.placeholder {
    background: linear-gradient(45deg, var(--background-color), var(--hover-bg));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.featured-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    margin-bottom: 1rem;
}

.post-category a {
    display: inline-block;
    background: var(--primary-color);
    color: var(--card-background);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-category a:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.featured-title {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    line-height: 1.4;
}

.featured-title a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.featured-title a:hover {
    color: var(--primary-color);
}

.featured-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-read-time {
    position: relative;
    padding-left: 1rem;
}

.post-read-time::before {
    content: '⏱';
    position: absolute;
    left: 0;
}

/* 分类导航区域 */
.category-nav {
    margin-bottom: 5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 2px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 25px var(--shadow-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 最新文章网格 */
.recent-posts {
    margin-bottom: 3rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 25px var(--shadow-color);
    border-color: var(--primary-color);
}

.post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.post-image img,
.post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img,
.post-card:hover .post-thumb {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.9rem;
}


/* 无特色文章状态 */
.no-featured-posts {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 3rem;
}

.no-featured-posts p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* 空内容状态 */
.no-content {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
}

.no-content-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.no-content h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.no-content p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 首页响应式设计 */
@media (max-width: 768px) {
    .hero-image-container {
        height: 40vh;
        min-height: 200px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-card {
        padding: 1.5rem 1rem;
    }

    .category-icon {
        font-size: 2rem;
    }

    .category-name {
        font-size: 0.95rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-image img,
    .post-image img {
        height: 200px;
    }

    .hero-ad-code iframe,
    .hero-ad-code img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        height: 30vh;
        min-height: 150px;
    }

    .section {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .featured-title,
    .post-title {
        font-size: 1.1rem;
    }

    .featured-excerpt,
    .post-excerpt {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .post-meta {
        font-size: 0.8rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .featured-card:hover .featured-title::after,
    .post-card:hover .post-title::after {
        width: 80%;
    }
}

/* 平板优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero-content {
        max-width: 1000px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }

    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }
}