/* Listening index page (v3 — search + recent + streak) */

.listening-main { max-width: 1200px; }

/* ---------- Streak pill ---------- */
.streak-pill { background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); }
.streak-pill .sp-num { color: #c2410c; }
.streak-pill.streak-hot {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
  border-color: #fbbf24;
}

/* ---------- Recent row ---------- */
.recent-row {
  margin-bottom: 22px;
  background: linear-gradient(135deg, #eff6ff 0%, #ede9fe 100%);
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid #c7d2fe;
}
.rr-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.rr-title { font-size: 14px; font-weight: 700; color: #1e3a8a; }
.rr-clear {
  background: transparent; border: none;
  color: #6b7280; cursor: pointer;
  font-size: 12px; font-family: inherit;
  padding: 4px 10px; border-radius: 6px;
}
.rr-clear:hover { background: rgba(255,255,255,0.7); color: #1f2937; }
.recent-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.recent-card {
  display: flex; align-items: center; gap: 10px;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none; color: inherit;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.recent-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,23,42,0.08);
  border-color: #c7d2fe;
}
.rc-band {
  background: linear-gradient(135deg, #2c6cf6 0%, #6f5af6 100%);
  color: #ffffff;
  font-size: 10px; font-weight: 800;
  padding: 4px 8px; border-radius: 6px;
  flex-shrink: 0;
}
.rc-info { flex: 1; min-width: 0; }
.rc-title {
  font-size: 13px; font-weight: 600; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rc-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.rc-arrow { color: #94a3b8; flex-shrink: 0; }

/* ---------- Search ---------- */
.search-row { margin-bottom: 18px; }
.search-box {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 14px;
  max-width: 480px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus-within {
  border-color: #2c6cf6;
  box-shadow: 0 0 0 3px rgba(44,108,246,0.12);
}
.search-box svg { color: #94a3b8; flex-shrink: 0; }
#searchInput {
  flex: 1;
  border: none; outline: none;
  font-family: inherit; font-size: 14px;
  color: #1f2937; background: transparent;
}
#searchInput::placeholder { color: #94a3b8; }
.search-clear {
  background: #f1f5f9;
  border: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 14px; font-weight: 700; color: #6b7280;
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-clear:hover { background: #e2e8f0; color: #1f2937; }

/* ---------- Band Bar ---------- */
.band-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 800px) {
  .band-bar { grid-template-columns: repeat(2, 1fr); }
}
.band-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}
.band-btn:hover { border-color: #2c6cf6; transform: translateY(-1px); }
.band-btn.active {
  background: linear-gradient(135deg, #2c6cf6 0%, #6f5af6 100%);
  border-color: #2c6cf6;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(44, 108, 246, 0.25);
}
.bb-score {
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #2c6cf6;
  line-height: 1;
}
.band-btn.active .bb-score { color: #ffffff; }
.bb-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bb-label { font-size: 13px; font-weight: 700; color: #111827; }
.band-btn.active .bb-label { color: #ffffff; }
.bb-cefr { font-size: 11px; color: #6b7280; line-height: 1.4; }
.band-btn.active .bb-cefr { color: rgba(255, 255, 255, 0.82); }

/* ---------- Filter Row ---------- */
.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.topic-tab {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.topic-tab:hover { background: #f9fafb; color: #111827; }
.topic-tab.active { background: #2c6cf6; color: #ffffff; border-color: #2c6cf6; }
.tt-count { font-size: 11px; opacity: 0.75; margin-left: 4px; }

.demo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}
.demo-toggle input { accent-color: #2c6cf6; cursor: pointer; }

/* ---------- Grid ---------- */
.listen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.listen-card {
  display: flex;
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.listen-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  border-color: #e0e7ff;
}
.listen-card.lc-empty { opacity: 0.7; }
.listen-card.lc-empty:hover { opacity: 1; }

.lc-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c6cf6 0%, #6f5af6 100%);
  color: #ffffff;
}
.lc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.lc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.lc-badge.demo { background: #d1fae5; color: #047857; }
.lc-badge.skel { background: #f3f4f6; color: #6b7280; }
.lc-badge.compr { background: #fef3c7; color: #92400e; }
.lc-badge.band-mini { background: linear-gradient(135deg, #2c6cf6 0%, #6f5af6 100%); color: #ffffff; }
.lc-topic { font-size: 11px; color: #6b7280; }

.lc-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lc-title-cn {
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lc-meta { font-size: 11px; color: #94a3b8; display: flex; gap: 6px; align-items: center; }
.lc-dot { color: #cbd5e1; }

/* ---------- CBT Entry banner ---------- */
.cbt-entry { margin-bottom: 22px; }
.cbt-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 30%, rgba(255,255,255,0.18) 0%, transparent 55%),
    linear-gradient(135deg, #0b3d91 0%, #1e40af 35%, #4338ca 75%, #6d28d9 100%);
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 12px 32px -8px rgba(67, 56, 202, 0.45);
  transition: transform .2s, box-shadow .2s;
}
.cbt-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.04) 0 1px, transparent 1px 60px);
  pointer-events: none;
}
.cbt-banner:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(67,56,202,.55); }
.cbt-banner-left { position: relative; z-index: 1; flex: 1; min-width: 0; }
.cbt-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}
.cbt-title { font-size: 26px; font-weight: 800; margin: 10px 0 6px; letter-spacing: 0.5px; }
.cbt-desc { font-size: 13.5px; opacity: 0.92; line-height: 1.5; margin-bottom: 12px; }
.cbt-stats { display: flex; gap: 22px; font-size: 12.5px; opacity: 0.92; }
.cbt-stats strong { font-size: 17px; font-weight: 800; margin-right: 4px; color: #fef3c7; }
.cbt-banner-right { position: relative; z-index: 1; opacity: 0.65; flex-shrink: 0; }
.cbt-go {
  position: absolute;
  bottom: 22px; right: 26px;
  background: rgba(255,255,255,0.95);
  color: #4338ca;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  z-index: 2;
  transition: transform .15s;
}
.cbt-banner:hover .cbt-go { transform: translateX(4px); }
@media (max-width: 640px) {
  .cbt-banner-right { display: none; }
  .cbt-go { position: static; align-self: flex-start; margin-top: 8px; }
  .cbt-banner { flex-direction: column; align-items: flex-start; }
}
