/* ===== 设计变量 ===== */
:root {
  --accent: #d1440f;
  --accent-strong: #a8330a;
  --accent-soft: #fdece1;
  --accent-soft-2: #ffd6b3;
  --teal: #0f8a7d;
  --teal-strong: #0b6b60;
  --teal-soft: #e0f5f1;
  --teal-soft-2: #bfe9e2;
  --gold: #f0a815;
  --text: #2a2420;
  --text-2: #5c5349;
  --text-light: #8f8577;
  --bg: #faf6ee;
  --card: #fffefb;
  --border: #e9e0d1;
  --border-soft: #f2ece0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(43, 32, 20, 0.06);
  --shadow-md: 0 8px 28px -8px rgba(43, 32, 20, 0.18);
  --max-w: 980px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.site-logo .wordmark {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}
.site-logo .wordmark span { color: var(--accent); }
.site-logo .tagline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--text-light);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--border-soft); }
.site-nav a.active {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

/* ===== 页面主体 ===== */
main { padding: 40px 0 72px; }

.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 4px 0 6px;
}
.page-desc { color: var(--text-light); margin: 0 0 28px; }

/* ===== 首页 Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1e3 0%, #ffe2df 45%, #e2f6f2 100%);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 56px 40px;
  margin-bottom: 32px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -15% -60% -25%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(209, 68, 15, 0.14), transparent);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -55% -20% auto auto;
  width: 55%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(15, 138, 125, 0.14), transparent);
  pointer-events: none;
}
.hero h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.hero p {
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto;
  font-size: 15.5px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 26px;
  position: relative;
}
.hero-stats .stat { text-align: center; min-width: 84px; }
.hero-stats .num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.hero-stats .stat:last-child .num { color: var(--teal); }
.hero-stats .label { font-size: 12.5px; color: var(--text-light); }

/* ===== 卡片 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  display: block;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.card:hover {
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft-2);
}

.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.card .meta { color: var(--text-light); font-size: 13px; margin-bottom: 10px; }
.card p { margin: 0; color: var(--text-2); font-size: 14px; }

.card .arrow {
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 14px;
  display: inline-block;
}

.card--teal:hover { border-color: var(--teal-soft-2); }
.card--teal .arrow { color: var(--teal); }

/* ===== 提示条 ===== */
.tip-box {
  margin-top: 28px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 14px;
  color: var(--text-2);
}
.tip-box strong { color: var(--accent-strong); }

/* ===== 返回链接 ===== */
.back-link {
  margin: 0 0 18px;
  font-size: 14px;
}
.back-link a { font-weight: 600; }

/* ===== 选项卡 / 筛选 chips ===== */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.chip {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(209, 68, 15, 0.28);
}

.chip.level { padding: 5px 14px; font-size: 13px; }

/* ===== 搜索框 ===== */
.search-box {
  width: 100%;
  max-width: 340px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 22px;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box::placeholder { color: var(--text-light); }
.search-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft-2);
}

/* ===== 系列信息 ===== */
.series-info {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 22px;
  margin-bottom: 22px;
  font-size: 14px;
  color: var(--text-2);
}
.series-info strong { color: var(--text); font-size: 15px; }

/* ===== 图书卡片 ===== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.book-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 15px 17px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft-2);
}
.book-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: none;
}

.book-card .title { font-size: 14.5px; font-weight: 650; display: block; line-height: 1.45; }
.book-card .meta { display: block; font-size: 12px; color: var(--text-light); margin-top: 3px; }
.book-card .badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft-2);
  border-radius: 999px;
  padding: 2px 11px;
}
.book-card.selected .badge { background: #fff; }
.book-card .badge.pending { color: var(--text-light); background: var(--border-soft); font-weight: 400; }

/* ===== 单词表面板 ===== */
.wordlist-panel {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
  margin-bottom: 22px;
}
.wordlist-panel h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.wordlist-panel .ch-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-strong);
  margin: 26px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.wordlist-panel .close-btn {
  float: right;
  border: none;
  background: var(--border-soft);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  line-height: 1;
  color: var(--text-light);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.wordlist-panel .close-btn:hover { background: var(--border); color: var(--text); }

table.words {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}
table.words th, table.words td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
table.words tr:last-child td { border-bottom: none; }
table.words th {
  color: var(--text-light);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.words td.en { font-weight: 650; }
table.words td.en .ipa { font-weight: 400; font-size: 12px; color: var(--text-light); }
table.words td.cn { white-space: normal; min-width: 140px; }
table.words td.ex { color: var(--text-2); font-size: 13px; }
table.words td.ex b { color: var(--accent); }

.empty-note {
  color: var(--text-light);
  font-size: 14px;
  padding: 32px 0;
  text-align: center;
}

/* ===== 播客：分级目录 ===== */
.tier-section { margin-bottom: 32px; }
.tier-heading { margin: 0 0 14px; }
.tier-heading h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }

.podcast-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
}
.podcast-card .card-art {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--border-soft);
}
.podcast-card .card-body { min-width: 0; }
.podcast-card h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; }
.podcast-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.podcast-card .arrow { margin-top: 10px; }
a.podcast-card:hover { border-color: var(--teal-soft-2); }
.podcast-card .arrow { color: var(--teal); }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.type-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-strong);
}
.tier-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}
.tier-badge.beginner { background: #e7f7ec; color: #15803d; }
.tier-badge.intermediate { background: #fef3e0; color: #b45309; }
.tier-badge.advanced { background: #e8f0fe; color: #1d4ed8; }

/* ===== 播客：详情 ===== */
.podcast-head {
  display: flex;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 22px;
}
.podcast-art {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--border-soft);
  box-shadow: var(--shadow-sm);
}
.podcast-info { min-width: 0; }
.podcast-head h2 { margin: 0 0 2px; font-size: 20px; letter-spacing: -0.01em; }
.podcast-head .meta { color: var(--text-light); font-size: 13px; margin-bottom: 8px; }
.podcast-head p { margin: 0 0 6px; color: var(--text-2); font-size: 14px; max-width: 720px; }
.podcast-head a { font-size: 13.5px; font-weight: 600; }

.episode {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 14px;
  transition: box-shadow 0.18s ease;
}
.episode:hover { box-shadow: var(--shadow-md); }
.episode.playing { border-color: var(--accent-soft-2); box-shadow: var(--shadow-md); }
.episode h3 { margin: 0 0 2px; font-size: 16px; font-weight: 700; }
.episode .meta { color: var(--text-light); font-size: 13px; margin-bottom: 12px; }
.episode .ep-desc {
  margin: -4px 0 14px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-play {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ep-play:hover { border-color: var(--accent); color: var(--accent); }
.ep-play.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(209, 68, 15, 0.28);
}
.ep-play .ep-icon { display: inline-flex; }
.ep-play .ep-icon svg { width: 14px; height: 14px; }

/* ===== 悬浮播放器 ===== */
body.player-open main { padding-bottom: 140px; }

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.player-inner {
  pointer-events: auto;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: 0 12px 40px -10px rgba(43, 32, 20, 0.28);
  padding: 12px 18px;
}

.pb-art {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--border-soft);
  display: none;
}

.pb-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(209, 68, 15, 0.35);
  transition: background 0.15s, transform 0.15s;
}
.pb-toggle:hover { background: var(--accent-strong); transform: scale(1.05); }
.pb-toggle svg { width: 20px; height: 20px; }

.pb-main { flex: 1; min-width: 0; }
.pb-title {
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.pb-progress { display: flex; align-items: center; gap: 10px; }
.pb-time {
  flex: none;
  font-size: 12px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
}
.pb-time:last-child { text-align: right; }

.pb-seek {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  margin: 0;
}
.pb-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(43, 32, 20, 0.3);
  transition: transform 0.15s;
}
.pb-seek::-webkit-slider-thumb:hover { transform: scale(1.2); }
.pb-seek::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(43, 32, 20, 0.3);
}
.pb-seek::-moz-range-track { height: 4px; border-radius: 999px; background: transparent; }

.pb-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.pb-btn {
  border: none;
  background: none;
  color: var(--text-light);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.pb-btn:hover { background: var(--border-soft); color: var(--text); }
.pb-rate { min-width: 44px; color: var(--accent); background: var(--accent-soft); }
.pb-rate:hover { background: var(--accent-soft-2); color: var(--accent-strong); }

/* 播客页整体采用 teal 作为收听场景的主色，与首页/书单页的橙色区分 */
.page-podcasts .chip.active,
.page-podcasts .ep-play.active {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(15, 138, 125, 0.28);
}
.page-podcasts .chip:hover,
.page-podcasts .ep-play:hover { border-color: var(--teal); color: var(--teal); }
.page-podcasts .episode.playing { border-color: var(--teal-soft-2); }
.page-podcasts .podcast-head a { color: var(--teal); }
.page-podcasts .podcast-head a:hover { color: var(--teal-strong); }
.page-podcasts .pb-toggle { background: var(--teal); box-shadow: 0 4px 12px rgba(15, 138, 125, 0.35); }
.page-podcasts .pb-toggle:hover { background: var(--teal-strong); }
.page-podcasts .pb-seek::-webkit-slider-thumb { background: var(--teal); }
.page-podcasts .pb-seek::-moz-range-thumb { background: var(--teal); }
.page-podcasts .pb-rate { color: var(--teal); background: var(--teal-soft); }
.page-podcasts .pb-rate:hover { background: var(--teal-soft-2); color: var(--teal-strong); }

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--card);
  padding: 26px 0;
  color: var(--text-light);
  font-size: 13px;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 12px;
}
.footer-links a { color: var(--text-light); }
.footer-links a:hover { color: var(--text); }

/* ===== 说明类页面（关于/联系/隐私/条款）===== */
.prose { max-width: 680px; }
.prose .updated { color: var(--text-light); font-size: 13px; margin: -10px 0 28px; }
.prose h2 { font-size: 18px; margin: 32px 0 10px; }
.prose h2:first-of-type { margin-top: 0; }
.prose p { margin: 0 0 14px; color: var(--text-2); }
.prose ul { margin: 0 0 14px; padding-left: 22px; color: var(--text-2); }
.prose li { margin-bottom: 6px; }
.prose a { font-weight: 600; }
.contact-box {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 26px;
  margin-bottom: 20px;
}
.contact-box .label { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.contact-box .value { font-size: 17px; font-weight: 700; }

/* ===== 小屏适配 ===== */
@media (max-width: 600px) {
  main { padding: 28px 0 56px; }
  .hero { padding: 36px 22px; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 8px 20px; }
  .page-title { font-size: 24px; }
  .site-nav a { padding: 6px 8px; font-size: 13px; }
  .wordlist-panel { padding: 18px 16px; }
  table.words { display: block; overflow-x: auto; }

  body.player-open main { padding-bottom: 170px; }
  .player-inner { flex-wrap: wrap; gap: 10px 12px; padding: 12px 14px; }
  .pb-main { order: -1; flex-basis: 100%; }
  .pb-toggle { width: 40px; height: 40px; }
  .pb-actions { flex: 1; justify-content: flex-end; }

  .podcast-art { width: 64px; height: 64px; border-radius: 12px; }
}
