/* content.css */

.article-content-wrapper {
    background-color: var(--main); /* 使用变量 */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.article-content-wrapper h1 {
    font-size: 2.5em;
    color: var(--text); /* 使用变量 */
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    font-size: 0.9em;
    color: var(--text-light); /* 使用变量 */
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border); /* 使用变量 */
    padding-bottom: 15px;
}

.article-meta span {
    margin-right: 20px;
}

/* 广告位占位符样式 */
.ad-placement-top {
    text-align: center;
    margin-bottom: 30px;
    background-color: var(--bg); /* 使用变量 */
    border: 1px dashed var(--border); /* 使用变量 */
    padding: 20px;
    border-radius: 5px;
    color: var(--text-light); /* 使用变量 */
    font-size: 1em;
    min-height: 141px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .ad-placement-top {
    text-align: center;
    margin-bottom: 30px;
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    padding: 20px;
    border-radius: 5px;
    color: #6c757d;
    font-size: 1em;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
} */

.article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.article-body p {
    font-size: 1.1em;
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: var(--text); /* 使用变量 */
}

.article-body h2,
.article-body h3 {
    color: var(--text); /* 使用变量 */
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-body ul {
    list-style: disc inside;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

/* 上一篇/下一篇导航样式 */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    margin-bottom: 40px; /* 底部留出更多空间 */
    border-top: 1px solid var(--border); /* 使用变量 */
    border-bottom: 1px solid var(--border); /* 使用变量 */
    padding: 20px 0;
}

.article-navigation a {
    text-decoration: none;
    color: var(--accent); /* 使用变量 */
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px; /* 文字和箭头之间的间距 */
}

.article-navigation a:hover {
    color: var(--accent); /* 使用变量 (保持与 accent 一致，或定义 --accent-hover) */
}

.article-navigation .prev-article::before {
    content: '←'; /* 左箭头 */
    font-size: 1.2em;
}

.article-navigation .next-article::after {
    content: '→'; /* 右箭头 */
    font-size: 1.2em;
}

/* 相关文章部分样式 */
.related-articles {
    margin-top: 40px;
    border-top: 1px solid var(--border); /* 使用变量 */
    padding-top: 30px;
}

.related-articles h3 {
    color: var(--text); /* 使用变量 */
    margin-bottom: 20px;
    font-size: 1.8em; /* 标题字体 */
}

.related-articles ul {
    list-style: none;
    padding: 0;
    display: grid; /* 使用Grid布局 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 自适应列 */
    gap: 20px; /* 卡片间距 */
}

.related-articles li {
    margin-bottom: 0; /* 移除列表项默认间距 */
}

.related-articles li a {
    display: block;
    text-decoration: none;
    color: var(--text); /* 使用变量 */
    background-color: var(--main); /* 使用变量 */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; /* 确保卡片高度一致 */
    box-sizing: border-box; /* 包含padding */
}

.related-articles li a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.related-articles li a strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: var(--accent); /* 使用变量 */
}

.related-articles li a span {
    display: block;
    font-size: 0.85em;
    color: var(--text-light); /* 使用变量 */
}

/* 新增：底部最新文章/随机文章面板样式 */
.latest-articles-panel {
    background-color: var(--main); /* 使用变量 */
    padding: 30px;
    margin-top: 40px; /* 与上方内容的间距 */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.latest-articles-panel h3 {
    color: var(--text); /* 使用变量 */
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em; /* 标题字体 */
}

.latest-articles-panel ul {
    list-style: none;
    padding: 0;
}

.latest-articles-panel ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border); /* 使用变量 */
}

.latest-articles-panel ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.latest-articles-panel ul li a {
    text-decoration: none;
    color: var(--text); /* 使用变量 */
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.latest-articles-panel ul li a:hover {
    color: var(--accent); /* 使用变量 */
}

.latest-articles-panel ul li a .date {
    font-size: 0.85em;
    color: var(--text-light); /* 使用变量 */
    flex-shrink: 0;
    margin-left: 15px; /* 与标题的间距 */
}


/* 移动设备适配 */
@media (max-width: 768px) {
    .article-content-wrapper {
        padding: 20px;
    }

    .article-content-wrapper h1 {
        font-size: 1.8em;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-meta span {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .article-body p {
        font-size: 1em;
    }

    .ad-placement-top {
        padding: 15px;
        min-height: 80px;
        font-size: 0.9em;
    }

    .article-navigation {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .article-navigation .prev-article,
    .article-navigation .next-article {
        width: 100%;
        text-align: left;
    }

    .article-navigation .prev-article::before {
        margin-right: 5px;
    }
    .article-navigation .next-article::after {
        margin-left: 5px;
    }

    .related-articles {
        padding-top: 20px;
        margin-top: 30px;
    }
    .related-articles h3,
    .latest-articles-panel h3 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .related-articles ul {
        grid-template-columns: 1fr; /* 移动端堆叠 */
    }

    .related-articles li a {
        padding: 12px;
    }
    .related-articles li a strong {
        font-size: 1em;
    }
    .latest-articles-panel {
        padding: 20px;
        margin-top: 30px;
    }
    .latest-articles-panel ul li a {
        flex-direction: column; /* 标题和日期堆叠 */
        align-items: flex-start;
        gap: 5px;
    }
    .latest-articles-panel ul li a .date {
        font-size: 0.85em;
        color: var(--text-light); /* 使用变量 */
        margin-left: 0;
        text-align: left;
    }
}