/* =========================================
   1. 全局基础变量与重置 (完美保留你的古风配色)
   ========================================= */
:root {
    --bg: #f7f2e4;        /* 网页大背景：米黄 */
    --paper: #faf7ee;     /* 头部卡片背景：浅米 */
    --ink: #2c2416;       /* 墨色主文字 */
    --ink-light: #6b5d4a; /* 诗词正文浅色字 */
    --muted: #9a8c76;     /* 作者、日期等辅助字 */
    --border: #d4c9a8;    /* 边框线 */
    --border-light: #e6dfc8; /* 虚线分隔线 */
    --seal: #b9493b;      /* 印章红色：用于标题线和悬停 */
    --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    
    line-height: 1.8;
}

a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--seal);
}

/* =========================================
   2. 头部排版 (已完美对齐下方的主体内容区)
   ========================================= */
.site-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.header-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo img {
    
    /* =========================================
   2. 头部排版 (已完美对齐下方的主体内容区)
   ========================================= 
    height: 40px;
    
    */
    
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    font-size: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.site-nav a:hover {
    background-color: var(--paper);
    color: var(--seal);
}

/* 限制网页主体最大宽度，确保Logo和内容严格对齐 */
.wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* =========================================
   3. 头部卡片排版 (古诗词文档库)
   ========================================= */
.head-layout {
    text-align: center;
    padding: 40px 20px;
    background: var(--paper);
    margin-bottom: 30px;
}

.site-branding {
    margin-bottom: 15px;
    font-size: 18px;
    letter-spacing: 4px;
    color: var(--ink);
}

.top-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 25px;
}

.top-links a {
    color: var(--muted);
}

.top-links a:hover {
    color: var(--seal);
}

.cat-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cat-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 34px;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--ink-light);
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 4px;
    transition: all 0.3s;
}

.cat-box:hover {
    border-color: var(--seal);
    color: var(--seal);
    background: #fff;
}

/* =========================================
   4. 列表排版 (首页诗词列表)
   ========================================= */
.section-title {
    font-size: 16px;
    letter-spacing: 4px;
    color: var(--ink);
    margin: 30px auto 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "◆";
    font-size: 8px;
    color: var(--seal);
    margin-right: 12px;
    position: relative;
    top: 1px;
}

.poem-item {
    padding: 25px 0;
    border-bottom: 1px dashed var(--border-light);
}

.poem-item:last-child {
    border-bottom: none;
}

.poem-item h2 {
    font-size: 21px;
    font-weight: normal;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.poem-item .meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}

.poem-item .excerpt {
    font-size: 11px;
    color: var(--ink-light);
    line-height: 1.6;
    word-break: break-all;
}

.poem-item .excerpt br {
    display: none;
}

/* =========================================
   5. 内容页排版 (诗词正文)
   ========================================= */
.poem-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.poem-header h1 {
    font-size: 24px;
    letter-spacing: 6px;
    font-weight: normal;
    margin-bottom: 12px;
    line-height: 1.6;
}

.poem-header .meta {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 2px;
}

.poem-text {
    font-size: 17px;
    line-height: 2;
    letter-spacing: 2px;
    padding: 0 10px;
    white-space: pre-wrap;
}

.poem-tags {
    margin-top: 2px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* =========================================
   6. 面包屑与分页
   ========================================= */
.breadcrumb {
    padding: 20px 0 10px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--muted);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 10px;
}

.breadcrumb a {
    color: var(--muted);
}

.pager {
    text-align: center;
    padding: 40px 0;
    font-size: 13px;
    color: var(--muted);
}

.pager a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    margin: 0 4px;
}

.pager a:hover {
    background: var(--seal);
    color: #fff;
    border-color: var(--seal);
}

/* =========================================
   7. 底部推荐板块样式 (完美排版)
   ========================================= */

/* 分隔线 */
.related-divider {
   /*  margin: 60px 0 40px;*/
    border-top: 2px dashed var(--border-light);
}

/* 整个板块 */
.related-section {
    margin-bottom: 50px;
}

/* 板块标题（带红色菱形点缀） */
.related-title {
    font-size: 16px;
    letter-spacing: 3px;
    color: var(--ink);
    margin-bottom: 25px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.related-title .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--seal);
    margin-right: 12px;
    transform: rotate(45deg);
    border-radius: 1px;
}

/* 列表基础美化（彻底去除原生圆点） */
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 列表单行排版 */
.related-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 15px;
    transition: background-color 0.2s;
}

/* 鼠标悬停时背景变浅米色 */
.related-list li:hover {
    background-color: var(--paper);
}

.related-list li:last-child {
    border-bottom: none;
}

/* 诗词标题样式 */
.related-list a {
    color: var(--ink-light);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 1px;
}

.related-list a:hover {
    color: var(--seal);
}

/* 右侧作者/栏目元数据 */
.related-meta {
    font-size: 13px;
    color: var(--muted);
    background-color: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 15px;
}