/* ============================================
   唐诗赏析 · 样式表
   古典水墨 · 宣纸质感设计
   ============================================ */

:root {
  --ink: #2b2b2b;              /* 墨色 */
  --ink-light: #5a5a52;        /* 淡墨 */
  --paper: #f5f0e6;            /* 宣纸色 */
  --paper-deep: #ede5d4;       /* 深宣纸 */
  --card: #fdfaf3;             /* 卡片色 */
  --accent: #9e3b32;           /* 朱砂红 */
  --accent-soft: #b5544b;      /* 浅朱砂 */
  --gold: #a8843c;             /* 泥金 */
  --line: #d8cdb8;             /* 淡线 */
  --shadow: 0 2px 14px rgba(80, 70, 50, .10);
  --serif: "STKaiti", "KaiTi", "楷体", "STSong", "SimSun", "宋体", "Noto Serif SC", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 25%, rgba(168, 132, 60, .05) 0, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(158, 59, 50, .04) 0, transparent 45%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: rgba(158, 59, 50, .18); }

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 230, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fdf6ec;
  font-size: 26px;
  font-weight: bold;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(253, 246, 236, .35), var(--shadow);
}

.logo-text {
  font-size: 24px;
  letter-spacing: 6px;
  font-weight: bold;
}

.site-nav { display: flex; gap: 8px; }

.site-nav a {
  text-decoration: none;
  color: var(--ink-light);
  padding: 8px 18px;
  font-size: 17px;
  letter-spacing: 2px;
  border-radius: 999px;
  transition: all .25s ease;
}

.site-nav a:hover {
  color: var(--accent);
  background: rgba(158, 59, 50, .08);
}

main { flex: 1; }

/* ============================================
   首页 · 英雄区
   ============================================ */

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 48px;
  text-align: center;
}

.hero-title {
  font-size: clamp(44px, 8vw, 76px);
  letter-spacing: 18px;
  text-indent: 18px;
  font-weight: bold;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(168, 132, 60, .15);
}

.hero-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 22px auto 18px;
  color: var(--gold);
}

.hero-sep::before,
.hero-sep::after {
  content: "";
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-sep::after { background: linear-gradient(90deg, var(--gold), transparent); }

.hero-sep span { font-size: 15px; letter-spacing: 4px; }

.hero-quote {
  font-size: 20px;
  color: var(--ink-light);
  letter-spacing: 4px;
}

.hero-quote cite {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-style: normal;
  color: var(--gold);
  letter-spacing: 2px;
}

/* ---------- 朝代分隔诗行 ---------- */

.section-divider {
  max-width: 1080px;
  margin: 24px auto 40px;
  text-align: center;
  color: var(--ink-light);
  font-size: 17px;
  letter-spacing: 6px;
}

.section-divider span {
  display: inline-block;
  padding: 0 26px;
  position: relative;
}

.section-divider span::before,
.section-divider span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: var(--line);
}

.section-divider span::before { right: 100%; }
.section-divider span::after { left: 100%; }

/* ---------- 诗歌网格 ---------- */

.poem-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.poem-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 28px 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  box-shadow: var(--shadow);
}

.poem-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -55% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(158, 59, 50, .06), transparent 70%);
  pointer-events: none;
}

.poem-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-soft);
  box-shadow: 0 10px 26px rgba(80, 70, 50, .16);
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.card-title { font-size: 24px; font-weight: bold; letter-spacing: 2px; }

.card-no {
  font-size: 13px;
  color: var(--gold);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 10px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.card-author {
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 2px;
}

.card-verses {
  color: var(--ink-light);
  font-size: 17px;
  line-height: 2;
  letter-spacing: 1px;
}

.card-tags {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 13px;
  color: var(--ink-light);
  background: var(--paper-deep);
  border-radius: 4px;
  padding: 2px 10px;
  letter-spacing: 1px;
}

/* ============================================
   详情页
   ============================================ */

.poem-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.poem-hero { text-align: center; padding-bottom: 8px; }

.poem-hero .dynasty {
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--gold);
}

.poem-hero h1 {
  font-size: clamp(36px, 6vw, 52px);
  letter-spacing: 10px;
  text-indent: 10px;
  margin: 6px 0 10px;
}

.poem-hero .author {
  font-size: 19px;
  color: var(--accent);
  letter-spacing: 3px;
}

.poem-hero .genre {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-light);
  letter-spacing: 2px;
}

/* ---------- 诗句展示 ---------- */

.verse-panel {
  position: relative;
  margin: 34px 0 44px;
  padding: 46px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.verse-panel::before {
  content: "詩";
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 68px;
  color: rgba(158, 59, 50, .07);
  font-weight: bold;
  pointer-events: none;
}

.verse-line {
  font-size: clamp(21px, 3.4vw, 27px);
  letter-spacing: 5px;
  line-height: 2.2;
}

.verse-line.punch {
  color: var(--accent);
  font-weight: bold;
}

/* ---------- 赏析各区块 ---------- */

.section { margin-bottom: 42px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 23px;
  letter-spacing: 5px;
  margin-bottom: 18px;
  color: var(--ink);
}

.section-title .num {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fdf6ec;
  font-size: 15px;
  border-radius: 50%;
  letter-spacing: 0;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.note-list { list-style: none; }

.note-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 17px;
}

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

.note-term {
  color: var(--accent);
  font-weight: bold;
  letter-spacing: 1px;
}

.trans-text,
.appr-text {
  font-size: 18px;
  line-height: 2.1;
  letter-spacing: 1px;
  text-align: justify;
}

.appr-text {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
}

/* ---------- 上一篇 / 下一篇 ---------- */

.poem-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 52px;
}

.poem-nav a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all .25s ease;
  box-shadow: var(--shadow);
}

.poem-nav a:hover {
  border-color: var(--accent-soft);
  transform: translateY(-3px);
}

.poem-nav .nav-label {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 2px;
}

.poem-nav .nav-title { font-size: 19px; font-weight: bold; letter-spacing: 2px; }

.poem-nav a.next { text-align: right; align-items: flex-end; }

.poem-nav a.disabled {
  opacity: .4;
  pointer-events: none;
}

.back-home {
  display: block;
  width: max-content;
  margin: 36px auto 0;
  color: var(--accent);
  text-decoration: none;
  font-size: 17px;
  letter-spacing: 3px;
  padding: 10px 34px;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  transition: all .25s ease;
}

.back-home:hover {
  background: var(--accent);
  color: #fdf6ec;
}

/* ============================================
   页脚
   ============================================ */

.site-footer {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  background: rgba(237, 229, 212, .55);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 24px 30px;
  text-align: center;
}

.footer-title {
  font-size: 21px;
  letter-spacing: 8px;
  font-weight: bold;
}

.footer-sub {
  margin: 8px 0 14px;
  color: var(--ink-light);
  font-size: 14px;
  letter-spacing: 2px;
}

.footer-icp a {
  color: var(--ink-light);
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 1px;
}

.footer-icp a:hover { color: var(--accent); }

/* ============================================
   响应式
   ============================================ */

@media (max-width: 640px) {
  .logo-text { font-size: 20px; letter-spacing: 4px; }
  .site-nav a { padding: 6px 12px; font-size: 15px; }
  .hero { padding-top: 48px; }
  .poem-card { padding: 22px 20px 18px; }
  .verse-panel { padding: 34px 18px; }
  .appr-text { padding: 20px 18px; }
  .poem-nav { grid-template-columns: 1fr; }
  .poem-nav a.next { text-align: left; align-items: flex-start; }
}
