:root {
  --bg: #080a12;
  --bg-elev: rgba(18, 22, 36, 0.78);
  --bg-card: rgba(20, 25, 42, 0.62);
  --bg-card-hover: rgba(28, 35, 58, 0.76);
  --border: rgba(226, 218, 255, 0.10);
  --border-strong: rgba(226, 218, 255, 0.22);
  --text: #f0ece3;
  --text-muted: #9ea6bd;
  --text-dim: #6f7892;
  --accent: #c4b5fd;
  --accent-warm: #e6c391;
  --accent-glow: rgba(196, 181, 253, 0.18);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(114, 96, 188, 0.22), transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(230, 195, 145, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  padding-bottom: 120px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.18s ease, opacity 0.18s ease; }
a:hover { color: var(--accent-warm); }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  box-shadow: 0 0 12px var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
}
.nav a { color: var(--text-muted); }
.nav a:hover, .nav a.active { color: var(--text); }

.hero {
  display: grid;
  grid-template-columns: 184px 1fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 34px;
}
.cover-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 40px var(--accent-glow);
  aspect-ratio: 1 / 1;
}
.cover-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.hero-desc {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.hero-meta strong { color: var(--text-muted); font-weight: 500; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}
.pill-btn:hover {
  background: rgba(196, 181, 253, 0.14);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.pill-btn.primary {
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.24), rgba(230, 195, 145, 0.2));
  border-color: rgba(196, 181, 253, 0.45);
}

.channels-box {
  margin: 0 0 38px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.channels-box summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.channels-box summary::-webkit-details-marker { display: none; }
.channels-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.83rem;
}
.channel-chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(196, 181, 253, 0.1);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.section-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ep-card {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ep-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}
.ep-card.is-playing {
  border-color: rgba(196, 181, 253, 0.55);
  box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.2), 0 12px 32px rgba(0, 0, 0, 0.35);
}
.ep-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.play-circle {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(196, 181, 253, 0.4);
  background: radial-gradient(circle at 30% 30%, rgba(196, 181, 253, 0.28), rgba(196, 181, 253, 0.08));
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, box-shadow 0.18s ease;
  margin-top: 2px;
}
.play-circle:hover {
  transform: scale(1.06);
  background: rgba(196, 181, 253, 0.32);
  box-shadow: 0 0 18px var(--accent-glow);
}
.ep-main { flex: 1; min-width: 0; }
.ep-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.ep-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(196, 181, 253, 0.14);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.75rem;
}
.ep-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.38;
}
.ep-title a { color: var(--text); }
.ep-title a:hover { color: var(--accent-warm); }
.ep-summary {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.93rem;
}
.ep-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.83rem;
}
.ep-actions a, .ep-actions button {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}
.ep-actions a:hover, .ep-actions button:hover { color: var(--accent); }

.ep-notes-preview {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  color: #dfd8cc;
  font-size: 0.96rem;
  line-height: 1.9;
}
.ep-notes-preview p { margin: 0 0 0.45em; }

/* Single episode page */
.crumb {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.article-card {
  padding: 28px 30px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.article-title {
  margin: 6px 0 12px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
}
.poetry-body {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 2.0;
  color: #ece6da;
}
.poetry-body p { margin: 0 0 0.45em; }
.transcript-box {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.55);
  border: 1px solid var(--border);
}
.transcript-box summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
}
.transcript-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--serif);
  font-size: 0.94rem;
  line-height: 1.9;
  color: var(--text-muted);
  margin: 14px 0 0;
}
.ep-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  font-size: 0.9rem;
}

/* Sticky Audio Player */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(11, 14, 24, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-strong);
  padding: 12px 18px 14px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}
.player-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px 18px;
  align-items: center;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
}
.ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.ctrl-btn.main {
  width: 42px;
  height: 42px;
  border-color: var(--accent);
  background: rgba(196, 181, 253, 0.22);
}
.player-track { min-width: 0; }
.player-now {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.player-ep-title {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-time {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.seek-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}
.seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.player-extras {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mini-select {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
}
.mini-select:hover { border-color: var(--accent); color: var(--text); }
.sleep-badge {
  font-size: 0.75rem;
  color: var(--accent-warm);
  font-variant-numeric: tabular-nums;
}

.footer {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.84rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(22, 27, 46, 0.96);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.86rem;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all 0.22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .cover-wrap { width: 156px; margin: 0 auto; }
  .hero-meta, .btn-row { justify-content: center; }
  .player-inner { grid-template-columns: 1fr; gap: 10px; }
  .player-controls, .player-extras { justify-content: center; }
  .article-card { padding: 20px 18px; }
}
