/* 少儿吟诵网 — 全局样式
   风格：水墨青 + 米白 + 赭石
   字体：思源宋体（备选：楷体 / 系统中文宋体）
*/

:root {
  --color-bg: #f8f5ee;          /* 宣纸米白 */
  --color-surface: #fffdf7;     /* 卡片背景 */
  --color-ink: #2b2a26;         /* 墨色文字 */
  --color-ink-soft: #6b6860;    /* 次级文字 */
  --color-accent: #5a7d6a;      /* 水墨青 */
  --color-accent-deep: #3d5a47;
  --color-seal: #a93226;        /* 印章红 */
  --color-border: #e6dec9;
  --shadow: 0 2px 12px rgba(60, 50, 30, .06);
  --radius: 10px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "Songti SC",
               "PingFang SC", "Microsoft YaHei", serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--color-accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== 顶栏 ========== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 10;
  box-shadow: var(--shadow);
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--color-seal); color: white;
  font-size: 18px; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.brand .title { font-size: 20px; font-weight: 600; letter-spacing: 2px; }
.brand .subtitle { font-size: 12px; color: var(--color-ink-soft); margin-top: 2px; letter-spacing: 4px; }

.nav { display: flex; gap: 8px; }
.nav a {
  padding: 8px 14px; border-radius: 6px;
  font-size: 15px; color: var(--color-ink-soft);
}
.nav a:hover, .nav a.active {
  background: var(--color-accent); color: white; text-decoration: none;
}

/* ========== 主体 ========== */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.hero {
  text-align: center;
  padding: 60px 24px 48px;
  background: linear-gradient(180deg, #fffdf7 0%, #f3ede0 100%);
  border-radius: var(--radius);
  margin-bottom: 40px;
  border: 1px solid var(--color-border);
}
.hero h1 {
  font-size: 36px; margin: 0 0 12px;
  letter-spacing: 6px;
  color: var(--color-ink);
}
.hero .lead {
  font-size: 18px; color: var(--color-ink-soft);
  margin: 0 auto 24px; max-width: 640px;
}
.hero .stat {
  display: inline-flex; gap: 32px;
  margin-top: 24px;
  padding: 14px 28px;
  background: var(--color-surface);
  border-radius: 30px;
  border: 1px solid var(--color-border);
}
.hero .stat .num { font-size: 22px; color: var(--color-accent-deep); font-weight: 600; }
.hero .stat .lbl { font-size: 13px; color: var(--color-ink-soft); }

/* ========== 作品卡片 ========== */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 32px 0 16px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}
.section-title h2 {
  margin: 0; font-size: 22px; letter-spacing: 2px;
}
.section-title .more { font-size: 14px; color: var(--color-ink-soft); }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.work-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(60, 50, 30, .12);
  text-decoration: none;
}
.work-card .thumb {
  aspect-ratio: 16/9;
  background: #d4cbb0 center/cover no-repeat;
  position: relative;
}
.work-card .thumb::after {
  content: "▶";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; padding-left: 3px;
  opacity: .85;
}
.work-card .duration {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,.65); color: white;
  font-size: 12px; padding: 2px 8px; border-radius: 4px;
}
.work-card .body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.work-card .title {
  font-size: 18px; font-weight: 600; margin: 0 0 4px;
  color: var(--color-ink);
}
.work-card .meta {
  font-size: 13px; color: var(--color-ink-soft);
  margin-bottom: 8px;
}
.work-card .meta .dot { margin: 0 6px; opacity: .5; }
.work-card .brief {
  font-size: 14px; color: var(--color-ink-soft);
  margin: 4px 0 12px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; padding: 2px 8px;
  background: #efe8d4; color: var(--color-accent-deep);
  border-radius: 12px;
}

/* ========== 筛选条 ========== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 22px;
}
.filter-bar button {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px 14px; border-radius: 18px;
  font-size: 14px; color: var(--color-ink-soft);
  cursor: pointer; font-family: inherit;
}
.filter-bar button:hover { color: var(--color-accent-deep); }
.filter-bar button.active {
  background: var(--color-accent); color: white;
  border-color: var(--color-accent);
}

/* ========== 作品详情页 ========== */
.work-detail {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}
.work-detail .player {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--color-border);
}
.work-detail .player video {
  width: 100%; border-radius: 6px; display: block;
  background: #000;
}
.work-detail .info h1 {
  margin: 0 0 6px; font-size: 30px; letter-spacing: 4px;
}
.work-detail .info .meta { color: var(--color-ink-soft); margin-bottom: 18px; }
.work-detail .info h3 {
  font-size: 16px; color: var(--color-accent-deep);
  margin: 18px 0 8px;
  border-left: 3px solid var(--color-accent);
  padding-left: 10px;
}
.work-detail .info .poem {
  font-size: 18px; line-height: 2.1;
  background: #f3ede0; padding: 14px 18px;
  border-radius: 8px;
  white-space: pre-line;
}

/* 「用我的声音朗读」入口 */
.voice-swap-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 22px;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 2px;
  box-shadow: 0 4px 14px rgba(120, 144, 156, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.voice-swap-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(120, 144, 156, .45);
}

/* ========== 关于页 / 通用文章 ========== */
.article {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 36px 40px;
  border: 1px solid var(--color-border);
  max-width: 760px; margin: 0 auto;
}
.article h1 { letter-spacing: 4px; }
.article h2 {
  color: var(--color-accent-deep);
  margin-top: 28px;
  border-left: 4px solid var(--color-accent);
  padding-left: 12px;
}

/* ========== 页脚 ========== */
.site-footer {
  background: #2a2925;
  color: #c4bba0;
  padding: 28px 24px;
  margin-top: 40px;
  font-size: 14px;
}
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.site-footer a { color: #d4cbb0; margin: 0 8px; }
.site-footer .copyright { margin-top: 6px; color: #8a8170; font-size: 13px; }
.site-footer .beian { margin-top: 4px; }
.site-footer .beian a { margin: 0 6px; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .work-detail { grid-template-columns: 1fr; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .hero h1 { font-size: 28px; }
  .main { padding: 24px 16px 48px; }
  .article { padding: 24px 22px; }
}
