/* ============================================
   古诗词 · 高端扁平化设计系统
   明亮 · 靛蓝紫渐变 · 大圆角 · 柔和阴影
   ============================================ */

:root {
  /* 主色：靛蓝 → 紫罗兰渐变 */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --accent: #8b5cf6;
  --accent-light: #f5f3ff;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  /* 文字 */
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;

  /* 背景与卡片 */
  --bg: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-2: #f1f5f9;

  /* 尺寸 */
  --header-h: 68px;
  --max: 1200px;
  --gap: 24px;
  --radius: 16px;
  --radius-sm: 12px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 2px 8px rgba(15,23,42,.05), 0 10px 28px rgba(15,23,42,.07);
  --shadow-lg: 0 16px 40px rgba(79,70,229,.18);

  /* 字体 */
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;

  /* 动效 */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* ===== Layout ===== */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gap); }
.fl { float: left; }
.fr { float: right; }
.row { display: flex; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-center { display: flex; align-items: center; justify-content: center; }
.column-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mt30 { margin-top: 30px; }
.mt40 { margin-top: 40px; }
.pt30 { padding-top: 30px; }

/* ===== Header（玻璃拟态） ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226,232,240,.8);
  height: var(--header-h);
}

.header-main {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 渐变 LOGO */
.logo-box {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 2px;
}

.logo-text span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 3px;
  margin-top: -2px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 1px;
  border-radius: 12px;
  transition: all .2s var(--ease);
}

.nav a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav a.hover {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 14px rgba(99,102,241,.32);
}

/* Mobile header */
.wap-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.wap-header-main { padding: 12px 16px; }
.wap-header .logo-mark { width: 34px; height: 34px; font-size: 18px; }
.wap-header .logo-text { font-size: 16px; }

.wap-nav {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wap-nav::-webkit-scrollbar { display: none; }

.wap-nav a {
  flex-shrink: 0;
  padding: 7px 18px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .2s var(--ease);
}

.wap-nav a:hover,
.wap-nav a.hover {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}

/* ===== Main ===== */
.main { min-height: 70vh; padding: 40px 0 64px; }

/* ===== Hero（渐变） ===== */
.hero {
  position: relative;
  background: var(--grad);
  border-radius: 24px;
  padding: 72px 56px;
  margin-bottom: 48px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 62%);
  pointer-events: none;
}

.hero::after {
  content: "詩";
  position: absolute;
  right: 56px;
  bottom: -30px;
  font-family: var(--serif);
  font-size: 260px;
  font-weight: 900;
  color: rgba(255,255,255,.08);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; max-width: 580px; }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin-bottom: 20px;
}

.hero-label::before {
  content: "";
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,.7);
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 800;
  color: #fff;
  line-height: 1.22;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.hero h1 em { font-style: normal; color: #fde68a; }

.hero-desc {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255,255,255,.82);
  margin-bottom: 34px;
  max-width: 440px;
}

.hero-actions { display: flex; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 999px;
  transition: all .25s var(--ease);
  cursor: pointer;
}

.btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}

.btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.22);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ===== Section Header ===== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title .num {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 8px;
  letter-spacing: 0;
}

.section-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .2s var(--ease);
}

.section-more:hover { color: var(--primary); gap: 8px; }

/* ===== Poet Grid ===== */
.poet-section { margin-bottom: 52px; }

.famous-poet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.poet-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 28px 16px;
}

.poet-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.poet-item .icon {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: all .3s var(--ease);
}

.poet-item:hover .icon {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 14px 28px rgba(99,102,241,.28);
}

.poet-item .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 1px;
  transition: color .2s var(--ease);
}

.poet-item:hover .title { color: var(--primary); }

/* ===== Poetry Tabs + Cards ===== */
.poetry-section { margin-bottom: 52px; }

.famous-poetry {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.poetry-nav {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  background: var(--line-2);
  border-radius: 14px;
  margin-bottom: 28px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.poetry-nav .item {
  padding: 9px 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 10px;
  transition: all .22s var(--ease);
  letter-spacing: 2px;
}

.poetry-nav .item:hover { color: var(--primary); }

.poetry-nav .item.active {
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 5px 14px rgba(99,102,241,.32);
}

/* Poetry Cards Grid */
.poetry-lists {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.poetry-lists .item {
  background: var(--bg);
  padding: 24px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}

.poetry-lists .item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.poetry-lists .item:hover {
  background: var(--card);
  border-color: var(--line);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.poetry-lists .item:hover::before { transform: scaleX(1); }

.poetry-lists .item .title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s var(--ease);
}

.poetry-lists .item:hover .title { color: var(--primary-dark); }

.poetry-lists .item .text {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 1px;
  padding: 3px 10px;
  background: var(--primary-light);
  border-radius: 999px;
  margin-bottom: 14px;
}

.poetry-lists .item .name p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Load more */
.poetry-more {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  margin-top: 8px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 1px;
  transition: all .22s var(--ease);
  background: transparent;
}

.poetry-more:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.poetry-more .icon { width: 15px; height: 15px; }

.nav_body { display: none; }
.nav_body[style*="grid"] { display: grid; }

/* ===== Page Header ===== */
.poet-lists-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.poet-lists-header .line {
  width: 5px;
  height: 30px;
  background: var(--grad);
  border-radius: 4px;
}

.poet-lists-header .title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 4px;
}

/* ===== Category: Poet Cards ===== */
.poet-lists-main {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.poet-lists-main > .item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  transition: all .25s var(--ease);
}

.poet-lists-main > .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.poet-lists-main > .item > a {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.poet-lists-main .left { flex-shrink: 0; text-align: center; }

.poet-lists-main .left .avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease);
}

.poet-lists-main > .item:hover .left .avatar {
  transform: scale(1.05);
}

.poet-lists-main .left .dynasty {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  letter-spacing: 1px;
}

.poet-lists-main .right { flex: 1; min-width: 0; }

.poet-lists-main .right .label {
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poet-lists-main .right .label .title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 2px;
  transition: color .2s var(--ease);
}

.poet-lists-main > .item:hover .right .label .title { color: var(--primary-dark); }

.poet-lists-main .right .label .see {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 999px;
}

.poet-lists-main .right .label .see .icon { width: 14px; height: 14px; }

.poet-lists-main .right .content {
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Poet Info (List page) ===== */
.poet-lists-main > .poet-info {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  gap: 32px;
  align-items: center;
}

.poet-lists-main > .poet-info .left {
  flex-shrink: 0;
  text-align: center;
}

.poet-lists-main > .poet-info .left .avatar {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.poet-lists-main > .poet-info .left .dynasty {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 18px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  letter-spacing: 2px;
  box-shadow: 0 6px 14px rgba(99,102,241,.3);
}

.poet-lists-main > .poet-info .right { flex: 1; }
.poet-lists-main > .poet-info .right .label { margin: 0 0 14px 0; }
.poet-lists-main > .poet-info .right .label .title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--ink);
}

.poet-lists-main > .poet-info .right .content {
  font-size: 14px;
  line-height: 2;
  color: var(--ink-2);
  -webkit-line-clamp: unset;
}

/* ===== Poem List ===== */
.poem-lists {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.poem-lists .item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all .25s var(--ease);
  display: block;
}

.poem-lists .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.poem-lists .item .item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 14px;
}

.poem-lists .item .item-header .title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  transition: color .2s var(--ease);
}

.poem-lists .item:hover .item-header .title { color: var(--primary-dark); }

.poem-lists .item .item-header .text {
  flex-shrink: 0;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  letter-spacing: 1px;
}

.poem-lists .item .item-body {
  font-size: 13px;
  line-height: 2;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Pagination ===== */
.page {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 0 8px;
}

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination li {
  background: var(--card) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  transition: all .18s var(--ease);
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pagination li:hover {
  border-color: var(--primary) !important;
  transform: translateY(-2px);
}

.pagination li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2) !important;
}

.pagination li.active {
  background: var(--grad) !important;
  border-color: transparent !important;
  box-shadow: 0 5px 14px rgba(99,102,241,.32);
}

.pagination li.active a { color: #fff !important; font-weight: 600; }

/* ===== Footer ===== */
.footer {
  background: #0f172a;
  color: rgba(255,255,255,.5);
  padding: 48px 0 36px;
  margin-top: 64px;
  border-top: 3px solid transparent;
  border-image: var(--grad) 1;
}

.footer > .title {
  font-size: 13px !important;
  line-height: 2 !important;
  text-align: center;
  color: rgba(255,255,255,.55) !important;
}

.footer > .title a { color: rgba(255,255,255,.5); }
.footer > .title a:hover { color: #a5b4fc; }

.footer .fooNav {
  position: fixed !important;
  bottom: 32px !important;
  right: 32px !important;
  z-index: 99;
}

.footer .fooNav .top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--grad);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  transition: all .25s var(--ease);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

.footer .fooNav .top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.footer .fooNav .top:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(99,102,241,.4);
}

.footer .fooNav img {
  width: 20px !important;
  height: 20px !important;
  filter: brightness(10);
}

/* ===== Search ===== */
/* 导航栏搜索框 */
.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--line-2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 5px 0 16px;
  transition: all .2s var(--ease);
}
.search-box:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--ink);
  width: 150px;
  padding: 8px 0;
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  transition: all .2s var(--ease);
}
.search-box button:hover { transform: scale(1.06); }

.wap-search { margin: 0 16px 10px; }
.wap-search input { width: 100%; }

/* 搜索页 */
.search-hero { text-align: center; padding: 36px 20px 28px; }
.search-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 3px;
}
.search-sub { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.search-form {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 28px auto 0;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 22px;
  transition: all .2s var(--ease);
}
.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  padding: 10px 0;
}
.search-form input::placeholder { color: var(--ink-3); }
.search-form button {
  padding: 10px 26px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 999px;
  transition: all .2s var(--ease);
}
.search-form button:hover { box-shadow: 0 6px 16px rgba(99,102,241,.35); }

.search-result { margin-top: 12px; }
.search-stat {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.search-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.search-item {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: all .22s var(--ease);
}
.search-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}
.si-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.si-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.si-poet {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 12px;
  border-radius: 999px;
}
.si-content {
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-item em {
  font-style: normal;
  color: var(--primary-dark);
  font-weight: 700;
}
.search-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--ink-3);
  font-size: 15px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 13px;
  color: var(--ink-3);
  padding: 0 0 22px;
}

.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--ink); font-weight: 500; }

/* ===== Detail Page ===== */
.detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 48px 44px;
  box-shadow: var(--shadow-sm);
}

.detail-head { text-align: center; margin-bottom: 30px; }
.poem-title {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 3px;
}
.poem-author { margin-top: 14px; color: var(--ink-2); font-size: 15px; }
.poem-author a {
  color: var(--primary);
  font-weight: 600;
  padding: 3px 14px;
  background: var(--primary-light);
  border-radius: 999px;
}
.dynasty { margin-left: 8px; color: var(--ink-3); }

/* 区块 */
.block { margin-top: 34px; }
.block.poem-main-block { margin-bottom: 56px; }
.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}
.block-title::before {
  content: "";
  width: 5px;
  height: 20px;
  background: var(--grad);
  border-radius: 4px;
}

/* 诗词正文工具栏 */
.poem-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.ptool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .2s var(--ease);
}
.ptool svg { width: 14px; height: 14px; flex-shrink: 0; }
.ptool:hover { border-color: var(--primary); color: var(--primary); }
.ptool.on {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 5px 14px rgba(99,102,241,.3);
}
.ptool.on:hover { color: #fff; }

/* 诗词正文（简洁居中排版） */
.poem-wrap {
  padding: 26px 16px;
  text-align: center;
}
.poem-body { display: inline-block; text-align: center; }
.poem-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.poem-line-empty { height: 22px; }

.poem-char {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 44px;
  position: relative;
}
.poem-char .py {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  height: 26px;
  line-height: 26px;
  letter-spacing: 0;
  white-space: nowrap;
}
.poem-char .hz {
  font-size: 38px;
  font-family: var(--serif);
  line-height: 1.4;
  color: var(--ink);
  font-weight: 700;
}
.poem-char .hz .punc {
  font-size: 20px;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 2px;
}

/* 注释标记（简洁下划线） */
.poem-char.has-annot { cursor: help; }
.poem-char.has-annot .hz {
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary);
}
.poem-char.has-annot::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  padding: 7px 13px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: 280px;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all .2s var(--ease);
}
.poem-char.has-annot:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}

/* 切换状态 */
.poem-wrap.no-pinyin .poem-char .py { visibility: hidden; }
.poem-wrap.no-annot .poem-char.has-annot .hz { color: inherit; border-bottom: none; }
.poem-wrap.no-annot .poem-char.has-annot { cursor: default; }
.poem-wrap.no-annot .poem-char.has-annot::after { display: none; }

/* 注释卡片 */
.annot-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.annot-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: all .22s var(--ease);
}
.annot-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--grad);
}
.annot-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.annot-item .w { color: var(--primary-dark); font-weight: 700; font-size: 15px; }
.annot-item .v { color: var(--ink-2); font-size: 13px; margin-top: 5px; line-height: 1.7; }

/* 文本内容 */
.content-text { font-size: 15px; color: var(--ink-2); line-height: 2.1; white-space: pre-wrap; }

/* 音频视频 */
.media-box {
  background: var(--line-2);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.media-box audio, .media-box video { width: 100%; border-radius: 8px; }
.download-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 18px;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s var(--ease);
}
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(99,102,241,.35); }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp .5s var(--ease) forwards; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

::selection { background: var(--primary); color: #fff; }

/* ===== Responsive: Tablet ===== */
@media screen and (max-width: 1024px) {
  .hero { padding: 48px 36px; border-radius: 20px; }
  .hero h1 { font-size: 38px; }
  .hero::after { font-size: 190px; right: 16px; }
  .poet-grid { grid-template-columns: repeat(4, 1fr); gap: 22px 12px; }
  .poetry-lists { grid-template-columns: repeat(3, 1fr); }
  .poet-lists-main { grid-template-columns: 1fr; }
  .poem-lists { grid-template-columns: 1fr; }
  .famous-poet, .famous-poetry { padding: 24px; }
  .nav a { padding: 0 14px; font-size: 13px; }
}

/* ===== Responsive: Mobile ===== */
@media screen and (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .main { padding: 24px 0 40px; }

  .header { display: none; }
  .wap-header { display: block; }

  .hero { padding: 36px 24px; margin-bottom: 32px; border-radius: 18px; }
  .hero h1 { font-size: 30px; letter-spacing: 2px; }
  .hero-desc { font-size: 13px; }
  .hero::after { font-size: 130px; right: -10px; bottom: -14px; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; width: 100%; }

  .section-title { font-size: 20px; }
  .famous-poet, .famous-poetry { padding: 20px 16px; }
  .poet-grid { grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
  .poet-item .icon { width: 56px; height: 56px; border-radius: 16px; }
  .poet-item .title { font-size: 12px; }

  .poetry-nav .item { padding: 8px 18px; font-size: 14px; }
  .poetry-lists { grid-template-columns: 1fr; gap: 12px; }
  .poetry-lists .item { padding: 18px 16px; }
  .search-list { grid-template-columns: 1fr; }
  .search-title { font-size: 26px; }
  .search-hero { padding: 24px 16px 20px; }
  .search-form input { font-size: 14px; }

  .poet-lists-main > .item { padding: 20px; }
  .poet-lists-main > .item > a { gap: 16px; }
  .poet-lists-main .left .avatar { width: 60px; height: 60px; border-radius: 16px; }
  .poet-lists-main .right .label .title { font-size: 17px; }

  .poet-lists-main > .poet-info {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
    gap: 20px;
  }
  .poet-lists-main > .poet-info .left .avatar { width: 84px; height: 84px; border-radius: 20px; }

  .poem-lists .item { padding: 18px 20px; }
  .poet-lists-header .title { font-size: 22px; letter-spacing: 2px; }

  .detail { padding: 24px 18px; border-radius: 16px; }
  .poem-title { font-size: 26px; }
  .poem-wrap { padding: 18px 10px; }
  .poem-line { gap: 6px; }
  .poem-char { min-width: 42px; }
  .poem-char .py { font-size: 15px; height: 22px; line-height: 22px; }
  .poem-char .hz { font-size: 28px; }
  .annot-list { grid-template-columns: 1fr; }

  .footer { padding: 32px 0 24px; }
  .footer .fooNav { bottom: 16px !important; right: 16px !important; }
  .footer .fooNav .top { width: 42px; height: 42px; }
}

/* ===== WAP compat ===== */
.wap-poet-lists-main { display: none; }

@media screen and (max-width: 640px) {
  .wap-poet-lists-main { display: block; }
  .wap-poet-lists-main .item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 20px;
    margin-bottom: 14px;
    text-align: center;
  }
  .wap-poet-lists-main .item .avatar {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 18px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
  }
  .wap-poet-lists-main .item .title { margin-top: 12px; }
  .wap-poet-lists-main .item .title .text {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 2px;
  }
  .wap-poet-lists-main .item .title .line {
    width: 28px;
    height: 3px;
    background: var(--grad);
    border-radius: 3px;
    margin: 8px auto 0;
  }
  .wap-poet-lists-main .item .dynasty {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--grad);
    border-radius: 999px;
    letter-spacing: 1px;
  }
  .wap-poet-lists-main .item .content {
    font-size: 13px;
    line-height: 1.9;
    color: var(--ink-3);
    margin-top: 14px;
    text-align: left;
  }
  .poem-wap-lists .item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
  }
  .poem-wap-lists .item .title {
    font-family: var(--serif) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--ink) !important;
    text-align: center !important;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-2);
  }
  .poem-wap-lists .item .item-body {
    font-size: 13px !important;
    line-height: 2 !important;
    color: var(--ink-3) !important;
  }
}

/* ===== 打印样式（标准 A4 学习打印模板） ===== */
@media print {
  @page {
    size: A4;
    margin: 18mm 16mm;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .header, .wap-header, .footer, .fooNav,
  .breadcrumb, .poem-toolbar, .no-print { display: none !important; }

  .main { min-height: 0; padding: 0; }
  .container { max-width: 100%; padding: 0; }

  .detail {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  .detail-head { margin-bottom: 20px; text-align: center; }
  .poem-title { font-size: 26pt; color: #000; letter-spacing: 2px; }
  .poem-author { color: #333; font-size: 13pt; }
  .poem-author a { color: #000; background: none; font-weight: 700; }
  .dynasty { color: #333; }

  .block { margin-top: 18px; }
  .block:not(.poem-main-block) { display: none !important; }
  .block.poem-main-block { margin-bottom: 0 !important; }
  .block-title { color: #000; font-size: 14pt; }
  .block-title::before { background: #000; }

  /* 正文：打印改用 block/inline-block，确保正常输出 */
  .poem-wrap {
    padding: 10px 0;
    text-align: center;
  }
  .poem-body { display: block; }
  .poem-line {
    display: block;
    text-align: center;
    margin-bottom: 12px;
  }
  .poem-char {
    display: inline-block;
    text-align: center;
    min-width: 52px;
    vertical-align: top;
    position: static;
  }
  .poem-char .py {
    display: block;
    color: #333;
    font-size: 13pt;
    height: 20pt;
    line-height: 20pt;
  }
  .poem-char .hz {
    display: block;
    color: #000;
    font-size: 26pt;
    line-height: 1.4;
  }
  .poem-char .hz .punc { color: #333; font-size: 14pt; margin-left: 1px; }

  .poem-char.has-annot .hz { border-bottom: 1.5px solid #000; }
  .poem-char.has-annot::after { display: none !important; }

  .annot-list { grid-template-columns: 1fr; gap: 6px; }
  .annot-item {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: none;
  }
  .annot-item::before { background: #000; }
  .annot-item .w { color: #000; }
  .annot-item .v { color: #333; }

  .content-text { color: #000; font-size: 11pt; line-height: 1.8; }
  .media-box { display: none !important; }

  a { color: #000 !important; text-decoration: none !important; }
}
