/* ================================================================
   RSS 智能播客阅读器 — 高端财经媒体风设计系统
   设计语言：The Economist / FT / 彭博终端
   主色：深黑 #0a0e14 + 品牌红 #e11d48
   字体：正文无衬线 + 标题衬线
   ================================================================ */

/* ---------- 1. Design Tokens ---------- */
:root, body.theme-dark {
  /* 背景分层 */
  --bg-page: #0a0e14;
  --bg-sidebar: #0d1117;
  --bg-surface: #11161f;
  --bg-elevated: #161c28;
  --bg-hover: #1a2030;
  --bg-selected: #1e2533;

  /* 边框 */
  --border-light: rgba(255,255,255,0.05);
  --border-strong: rgba(255,255,255,0.10);
  --border-accent: rgba(225,29,72,0.35);

  /* 强调色 */
  --accent: #e11d48;
  --accent-hover: #f43f5e;
  --accent-glow: rgba(225,29,72,0.12);
  --accent-soft: rgba(225,29,72,0.08);
  --star: #f59e0b;

  /* 文字层次 */
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-body: #d1d5db;

  /* 字体 */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: Georgia, "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "Times New Roman", serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;

  /* 几何：克制小倒角，不用大圆角 */
  --radius: 3px;
  --radius-sm: 2px;
  --radius-lg: 5px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.5);

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;

  /* 布局尺寸 */
  --sidebar-w: 230px;
  --list-w: 360px;
  --reader-max: 680px;
  --topbar-h: 52px;
  --player-h: 60px;
}

/* ---------- 2. Base Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body, html {
  height: 100%;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ---------- 3. Top Bar ---------- */
.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: 0 var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-sidebar);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.logo-icon {
  width: 18px;
  height: 18px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.searchbox {
  border-radius: var(--radius);
  flex: 1;
  max-width: 420px;
  height: 30px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md);
  color: var(--text-secondary);
}
.searchbox:focus-within { border-color: var(--border-accent); }
.searchbox svg { width: 14px; height: 14px; stroke: var(--text-muted); flex-shrink: 0; }
.searchbox input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12.5px;
  width: 100%;
}
.searchbox kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 1px 5px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--space-md); }

/* ---------- 4. Three-Pane Layout ---------- */
.body-container {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ---------- 5. Sidebar (Linear Refined Style - Default Dark Background) ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #090d14; /* Slightly darker slate black for that premium Linear backdrop */
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 6px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-family: var(--font-ui);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 8px;
  font-weight: 600;
  opacity: 0.5;
  margin-bottom: 0px;
}

.nav-item {
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  color: #a3a3a3;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  font-weight: 500;
  font-size: 12.5px;
  border-left: none;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-weight: 600;
}
.nav-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 1.6;
  color: #8c8c8c;
  transition: color 0.1s ease;
}
.nav-item:hover svg,
.nav-item.active svg {
  color: #ffffff;
}
.nav-item .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.feed-item {
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  color: #a3a3a3;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  font-size: 12px;
  font-weight: 500;
}
.feed-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.feed-item.active {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-weight: 600;
}
.feed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.feed-item-sync-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.1s ease, color 0.1s ease;
  padding: 2px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}
.feed-item:hover .feed-item-sync-btn {
  opacity: 0.6;
}
.feed-item-sync-btn:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.feed-item-sync-btn svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.2;
}
.feed-item .count {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
}

.btn-sidebar-add {
  width: 18px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.1s ease, color 0.1s ease;
  padding: 0;
}
.btn-sidebar-add:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.btn-sidebar-add svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

/* ---------- 6. Entry List ---------- */
.entry-list {
  width: var(--list-w);
  flex: 0 0 var(--list-w);
  border-right: 1px solid var(--border-light);
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.list-header {
  height: 44px;
  flex: 0 0 44px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.list-scroll { flex: 1; overflow-y: auto; }

.article-card {
  border-radius: var(--radius);
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  position: relative;
  transition: background 0.12s;
}
.article-card:hover { background: var(--bg-hover); }

/* Left selection indicator bar with NO border-radius */
.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background-color 0.1s ease;
  z-index: 2;
}

.article-card.selected::before {
  background: var(--accent);
}

.article-card.selected {
  /* Retain default/hover background, no custom select background change */
}

/* Column 2 Header Action Buttons (Linear style) */
.btn-header-action {
  background: none !important;
  border: none !important;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 4px;
  transition: background 0.1s ease, color 0.1s ease;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 5px;
  height: 22px;
  box-shadow: none !important;
}
.btn-header-action:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary) !important;
}
.btn-header-action svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.2;
}
.article-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 6px;
}
.article-card-feed {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-card-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}
.article-card-title {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
  font-weight: 550;
  margin-bottom: 5px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.article-card.read .article-card-title { color: var(--text-secondary); font-weight: 400; }
.unread-mark {
  width: 5px;
  height: 5px;
  background: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}
.article-card-snippet {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-star {
  position: absolute;
  right: var(--space-md);
  top: 14px;
  color: var(--star);
  font-size: 12px;
}

/* 列表内播放按钮 */
.btn-card-play {
  width: 14px;
  height: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 2px;
  transition: color 0.12s;
}
.btn-card-play:hover { color: var(--accent); }
.btn-card-play svg { width: 10px; height: 10px; fill: currentColor; }

/* 简报/任务卡片 */
.playlist-card {
  border-radius: var(--radius);
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  background: var(--bg-page);
  transition: background 0.12s;
}
.playlist-card:hover { background: var(--bg-hover); }
.playlist-card.active { background: var(--bg-selected); border-left: 2px solid var(--accent); }
.playlist-card-title {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.playlist-card-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}
.playlist-items-list {
  margin-top: var(--space-sm);
  padding-left: var(--space-sm);
  border-left: 1px solid var(--border-strong);
}
.playlist-item-row {
  border-radius: var(--radius-sm);
  padding: 6px var(--space-sm);
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.1s;
  margin-bottom: 2px;
}
.playlist-item-row:hover { background: var(--bg-hover); color: var(--text-primary); }
.playlist-item-row.active { color: var(--accent); font-weight: 600; }

/* 音波动画 */
.pulse-bar { display: inline-flex; align-items: flex-end; gap: 2px; width: 11px; height: 11px; flex-shrink: 0; }
.pulse-bar span { width: 2px; background: var(--accent); animation: pulse 0.8s infinite alternate; }
.pulse-bar span:nth-child(2) { animation-delay: 0.2s; }
.pulse-bar span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0% { height: 2px; } 100% { height: 10px; } }

/* ---------- 7. Reader Pane ---------- */
.reader-pane {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  position: relative;
}
/* Subtle top-edge accent line */
.reader-pane::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 60%);
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
}
.reader-inner {
  max-width: var(--reader-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) 120px;
  width: 100%;
}

/* Reader meta bar — more refined */
.reader-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: 11.5px;
  color: var(--text-secondary);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}
.reader-meta-back {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  margin-left: -6px;
  margin-right: 2px;
  border-radius: 4px;
  transition: all 0.12s;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reader-meta-back:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.reader-meta-back svg {
  width: 20px;
  height: 20px;
}
.reader-badge {
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--bg-page);
}

.reader-pane h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.35;
  margin-bottom: var(--space-lg);
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

/* Bilingual title refinements */
.reader-pane h1 .title-en {
  font-family: var(--font-serif);
}
.reader-pane h1 .title-zh {
  font-family: var(--font-ui);
  font-weight: 500;
}

.section-divider {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-top: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--space-xs);
}

/* Content typography */
.reader-content {
  animation: fadeInContent 0.2s ease;
}
@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.reader-content p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-body);
  margin-bottom: var(--space-md);
  letter-spacing: 0.01em;
}
.reader-content .para-en {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.reader-content .para-zh {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.reader-content h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

/* Bilingual paragraph pair */
.bilingual-paragraph {
  margin-bottom: 22px;
}

/* Podcast / Briefing reader items */
.podcast-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
}
.podcast-item:last-child {
  border-bottom: none;
}
.podcast-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.podcast-item-link {
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.1s;
}
.podcast-item-link:hover {
  color: var(--accent);
}
.podcast-item-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Empty state for podcast/jobs */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  letter-spacing: 0;
}
.empty-state p {
  font-size: 13px;
  line-height: 1.6;
}

/* Action buttons — icon row inside reader-meta, pushed to right */
.reader-actions {
  display: flex;
  gap: 0;
  margin-left: auto;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  padding: 0;
}
.action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.action-btn:active {
  transform: scale(0.92);
}
.action-btn.active {
  color: var(--star);
}
.action-btn.active svg {
  fill: var(--star);
  stroke: var(--star);
}
.action-btn svg {
  width: 15px;
  height: 15px;
}
.action-btn.is-playing {
  color: var(--accent);
}
.action-btn.is-playing svg {
  fill: var(--accent);
}
/* Hide the old kbd and label inside action buttons */
.action-btn kbd,
.action-btn .btn-label {
  display: none;
}

/* Empty state for reader */
.reader-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  padding: 40px 20px;
  text-align: center;
}
.reader-empty svg {
  width: 52px;
  height: 52px;
  stroke: var(--border-strong);
  margin-bottom: 16px;
  opacity: 0.6;
}
.reader-empty h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.reader-empty p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.6;
}

/* ---------- 8. Form Elements ---------- */
.form-group { margin-bottom: var(--space-md); }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  border-radius: var(--radius-sm);
  width: 100%;
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  color: var(--text-primary);
  padding: 9px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s;
}
.form-input:focus { border-color: var(--border-accent); }
select.form-input { cursor: pointer; }

.btn {
  border-radius: var(--radius);
  padding: 7px 16px;
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
  font-family: var(--font-ui);
  font-weight: 500;
}
.btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: white; }

.time-pill {
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}
.time-pill span { cursor: pointer; font-weight: 700; }

.pills-container { display: flex; flex-wrap: wrap; gap: 6px; }

.feed-edit-row {
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr) auto auto auto;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  border: 1px solid var(--border-light);
}
.feed-edit-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-edit-url { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

/* ---------- 9. Audio Player Bar (三栏模式底部) ---------- */
.audio-player-bar {
  height: var(--player-h);
  flex: 0 0 var(--player-h);
  border-top: 1px solid var(--border-light);
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  gap: var(--space-lg);
  z-index: 50;
}
.player-info { width: 220px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.player-info-title { font-size: 12px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-info-feed { font-size: 10.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.player-controls { display: flex; align-items: center; gap: var(--space-sm); margin-left: var(--space-lg); }
.player-btn {
  border-radius: var(--radius);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  transition: all 0.12s;
}
.player-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.player-btn svg { width: 16px; height: 16px; }
.player-btn.play-btn { background: var(--accent); color: white; }
.player-btn.play-btn:hover { background: var(--accent-hover); }

.player-timeline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}
.timeline-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--border-strong);
  outline: none;
  cursor: pointer;
}
.timeline-slider::-webkit-slider-thumb {
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--accent);
  cursor: pointer;
}
.timeline-slider::-moz-range-thumb {
  border-radius: var(--radius-sm);
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.player-options { display: flex; align-items: center; }
.rate-select {
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  outline: none;
}

/* ---------- 10. Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.modal-overlay.open { display: flex; }
.modal-card {
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  width: 100%;
  max-width: 420px;
}
.modal-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}
.modal-header h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.modal-content { padding: var(--space-lg); }
.modal-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

/* ---------- 12. Toast ---------- */
.toast {
  border-radius: var(--radius);
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 10px var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 12.5px;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 400;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast svg { width: 14px; height: 14px; stroke: var(--accent); }

/* ---------- 14. Light Theme ---------- */
body.theme-light {
  --bg-page: #fafbfc;
  --bg-sidebar: #f1f3f6;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #edf0f4;
  --bg-selected: #e2e7ee;
  --border-light: rgba(0,0,0,0.06);
  --border-strong: rgba(0,0,0,0.12);
  --border-accent: rgba(225,29,72,0.3);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-body: #1e293b;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.12);
}
body.theme-light ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }
body.theme-light ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }
body.theme-light .modal-overlay { background: rgba(0,0,0,0.35); }

/* Light theme reader refinements */
body.theme-light .reader-pane::before {
  opacity: 0.6;
}

/* ---------- Light Theme Sidebar Overrides ---------- */
body.theme-light .sidebar {
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}
body.theme-light .nav-label {
  color: #8c8c8c;
  opacity: 0.8;
}
body.theme-light .nav-item {
  color: #4b5563;
}
body.theme-light .nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #1f2937;
}
body.theme-light .nav-item.active {
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
}
body.theme-light .nav-item svg {
  color: #6b7280;
}
body.theme-light .nav-item:hover svg,
body.theme-light .nav-item.active svg {
  color: #111827;
}
body.theme-light .nav-item .count {
  color: #6b7280;
  background: rgba(0, 0, 0, 0.05);
}
body.theme-light .feed-item {
  color: #4b5563;
}
body.theme-light .feed-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #1f2937;
}
body.theme-light .feed-item.active {
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
}
body.theme-light .feed-item-sync-btn {
  color: #9ca3af;
}
body.theme-light .feed-item-sync-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}
body.theme-light .feed-item .count {
  color: #9ca3af;
}
body.theme-light .btn-sidebar-add {
  color: #6b7280;
}
body.theme-light .btn-sidebar-add:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #111827;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* ---------- Theme Toggle Button ---------- */
.btn-theme-toggle {
	  background: none;
	  border: none;
	  cursor: pointer;
	  color: var(--text-secondary);
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  width: 28px;
	  height: 28px;
	  border-radius: 4px;
	  transition: background 0.1s ease, color 0.1s ease;
	  padding: 0;
	}
	.btn-theme-toggle:hover {
		  background: var(--bg-hover);
		  color: var(--text-primary);
		}

	/* ---------- 15. Mobile Hamburger Button ---------- */
	.btn-mobile-menu {
	  display: none;
	  background: none;
	  border: none;
	  cursor: pointer;
	  color: var(--text-secondary);
	  padding: 4px;
	  width: 28px;
	  height: 28px;
	  align-items: center;
	  justify-content: center;
	  border-radius: 4px;
	  transition: background 0.1s ease, color 0.1s ease;
	  flex-shrink: 0;
	}
	.btn-mobile-menu:hover {
	  background: var(--bg-hover);
	  color: var(--text-primary);
	}
	.btn-mobile-menu svg {
	  width: 18px;
	  height: 18px;
	}

	/* ---------- 16. Sidebar Backdrop (mobile) ---------- */
	.sidebar-backdrop {
	  display: none;
	  position: fixed;
	  inset: 0;
	  z-index: 199;
	  background: rgba(0,0,0,0.5);
	}
	.sidebar-backdrop.open { display: block; }

		/* ---------- 17. Mobile Responsive (max-width: 768px) ---------- */
	@media (max-width: 768px) {
	  /* Show hamburger menu */
	  .btn-mobile-menu {
	    display: flex;
	  }

	  /* Hide search box on mobile */
	  .searchbox {
	    display: none;
	  }

	  /* Compact top bar */
	  .topbar {
	    padding: 0 8px;
	    gap: 8px;
	  }
	  .topbar-right {
	    gap: 4px;
	  }

	  /* Sidebar becomes a sliding drawer */
	  .sidebar {
	    position: fixed;
	    left: -260px;
	    top: 0;
	    width: 260px;
	    height: 100%;
	    z-index: 200;
	    transition: left 0.25s ease;
	    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
	    border-right: none;
	    padding: 12px 6px;
	  }
	  .sidebar.open {
	    left: 0;
	  }

	  /* Three-pane becomes single column */
	  .body-container {
	    position: relative;
	  }

	  .entry-list {
	    width: 100%;
	    flex: 0 0 100%;
	  }

	  .reader-pane {
	    width: 100%;
	    flex: 0 0 100%;
	    position: relative;
	  }

	  /* Toggle between list and reader view */
	  .mobile-list-mode .reader-pane {
	    display: none;
	  }
	  .mobile-reader-mode .entry-list {
	    display: none;
	  }

		  /* Compact list header */
	  .list-header {
	    padding: 0 12px;
	    height: 38px;
	    flex: 0 0 38px;
	    font-size: 10.5px;
	  }

	  /* Mobile article cards */
	  .article-card {
	    padding: 14px 14px;
	  }
	  .article-card-title {
	    font-size: 15px;
	  }
	  .article-card .title-zh {
	    font-size: 15px;
	  }
	  .article-card .title-en {
	    font-size: 13px !important;
	  }
	  .article-card-snippet {
	    font-size: 13px;
	    -webkit-line-clamp: 2;
	  }
	  .article-card-snippet .summary-zh {
	    font-size: 13px;
	  }
	  .article-card-snippet .summary-en {
	    font-size: 12px !important;
	  }
	  .article-card-feed {
	    font-size: 11px;
	  }
	  .article-card-time {
	    font-size: 11px;
	  }

	  /* Mobile reader refinements */
	  .reader-inner {
	    padding: 16px 14px 80px;
	  }
	  .reader-pane h1 {
	    font-size: 22px;
	    letter-spacing: -0.2px;
	  }
	  .reader-pane h1 .title-en {
	    font-size: 22px;
	  }
	  .reader-pane h1 .title-zh {
	    font-size: 17px;
	  }
	  .reader-content p {
	    font-size: 15px;
	    line-height: 1.8;
	  }
	  .reader-content .para-en {
	    font-size: 15px;
	  }
	  .reader-content .para-zh {
	    font-size: 14px;
	    line-height: 1.85;
	  }
	  .reader-meta {
		    margin-bottom: 12px;
		    padding-bottom: 10px;
		    overflow: hidden;
		  }
		  .reader-meta .reader-badge {
		    flex-shrink: 0;
		  }
		  .reader-meta > span:not(.reader-badge):not(.reader-badge *) {
		    overflow: hidden;
		    text-overflow: ellipsis;
		    white-space: nowrap;
		    min-width: 0;
		    flex-shrink: 1;
		  }

	  /* Compact player bar */
	  .audio-player-bar {
	    height: 48px;
	    flex: 0 0 48px;
	    padding: 0 8px;
	    gap: 8px;
	  }
	  .player-info {
	    width: auto;
	    flex: 1;
	    min-width: 0;
	  }
	  .player-controls {
	    margin-left: 0;
	    gap: 4px;
	  }
	  .player-btn {
	    width: 28px;
	    height: 28px;
	  }
	  .player-btn svg {
	    width: 14px;
	    height: 14px;
	  }
	  .player-timeline {
	    display: none;
	  }
	  .player-options {
	    display: none;
		  }

		  /* Mobile action buttons — smaller */
		  .action-btn {
		    width: 26px;
		    height: 26px;
		  }
		  .action-btn svg {
		    width: 14px;
		    height: 14px;
		  }
		  .reader-actions {
		    gap: 0;
		  }
		  /* Show back button in meta bar on mobile */
	  .reader-meta-back {
	    display: flex;
	  }

	  /* Compact form elements in settings */
	  .feed-edit-row {
	    grid-template-columns: 1fr;
	    gap: 6px;
	  }

	  /* Light theme sidebar mobile override */
	  body.theme-light .sidebar {
	    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
	  }

	  /* Toast position adjust for mobile */
	  .toast {
	    bottom: 60px;
	    max-width: 90vw;
	    font-size: 12px;
	    padding: 8px 16px;
	  }

	  /* Modal card for mobile */
	  .modal-card {
	    max-width: 90vw;
	    margin: 0 16px;
	  }

	  /* Compact settings feed edit cards */
	  .feed-edit-card {
	    padding: 10px !important;
	  }
	  .feed-edit-card > div:first-child {
	    flex-direction: column !important;
	    gap: 8px !important;
	  }
	  .feed-edit-card > div:first-child > div:last-child {
	    width: 100%;
	    flex-wrap: wrap;
	  }

	  /* Podcast playlist cards on mobile */
	  .playlist-card {
	    padding: 10px 12px;
	  }
	  .playlist-card-title {
	    font-size: 12.5px;
	  }
	}
