/* ============================================================
   MacCMS 2025 · Type/Listing Page Styles
   分类页: 头部 / 筛选 / 结果网格 / 空状态
   ============================================================ */

/* ── Result Header ── */
.result-header {
  padding: clamp(24px, 4vh, 48px) var(--page-padding) 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.result-header__breadcrumb {
  font-size: 0.72rem; color: var(--text-tertiary); margin-bottom: 8px;
}
.result-header__breadcrumb a { color: var(--text-tertiary); }
.result-header__breadcrumb .sep { margin: 0 6px; }
.result-header__title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--text-primary);
}
.result-header__desc {
  font-size: 0.8rem; color: var(--text-secondary);
  margin-top: 8px; max-width: 60ch;
}

/* ── Result Grid ── */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: clamp(10px, 1.5vw, 16px);
}

/* ── Result Card ── */
.result-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out);
  cursor: pointer;
}
.result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  z-index: var(--z-card-hover);
}
.result-card__poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-surface);
}
.result-card__poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.result-card:hover .result-card__poster img { transform: scale(1.04); }
.result-card__badge {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 6px; border-radius: var(--radius-sm);
  font-size: var(--fs-c2); font-weight: var(--fw-semibold);
  letter-spacing: 0.04em; z-index: 2;
  background: rgba(255,255,255,0.12); color: var(--text-primary);
}
.result-card__info {
  padding: clamp(6px, 1vw, 10px) clamp(8px, 1.2vw, 12px);
}
.result-card__title {
  font-size: var(--fs-h1); font-weight: var(--fw-semibold);
  color: var(--text-primary); line-height: 1.4;
}
.result-card__meta {
  font-size: var(--fs-c1); color: var(--text-secondary);
  margin-top: 4px;
  display: flex; gap: var(--space-sm); flex-wrap: wrap;
}
.result-card__meta-item {
  display: flex; align-items: center; gap: 3px;
}

/* ── Progress Bar ── */
.result-progress {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: clamp(14px, 2vw, 22px);
  font-size: 0.75rem; color: var(--text-tertiary);
}
.result-progress strong {
  color: var(--text-secondary); font-weight: 500;
}

/* ── Mood Filter (page-specific overrides) ── */
.result-header .mood-filter {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: clamp(12px, 2vw, 20px);
}

/* ── Sort Bar ── */
.sort-bar {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: clamp(10px, 1.5vw, 16px);
}
.sort-bar::-webkit-scrollbar { display: none; }

/* ── 搜索页/聚合页 共享样式 (从 search.html 内联迁移) ── */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(155px, 100%), 1fr));
  gap: clamp(8px, 1.2vw, 14px);
  margin-bottom: 24px;
}
.result-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  display: block;
  transition: transform .2s, box-shadow .2s;
}
.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
.result-card__poster {
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-surface);
}
.result-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.result-card__info {
  padding: 8px 10px 10px;
}
.result-card__title {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.result-card__meta {
  font-size: .7rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  display: flex;
  gap: 6px;
}
.result-card__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  background: rgba(0,0,0,.65);
  border-radius: 4px;
  font-size: .65rem;
  color: #fff;
}
@media (max-width: 479px) {
  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── 聚合列表页公共样式 (actor/area/director/genre/tags/year/douban) ── */
.page-hero {
  padding: clamp(24px, 4vh, 48px) 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.page-sub {
  font-size: .8rem;
  color: var(--text-secondary);
}
.breadcrumb {
  font-size: .72rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: .8rem;
  color: var(--text-tertiary);
}
.sep {
  margin: 0 4px;
}
.text-muted {
  color: var(--text-secondary);
}
.text-em {
  color: var(--text-primary);
}
.section-pad {
  padding: 24px 0;
}

/* ── 分类聚合页·情绪导航 (genre.html) ── */
.mood-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: clamp(10px, 1.5vw, 16px) 0;
}
.mood-bar a {
  padding: 6px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  font-size: .78rem;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}
.mood-bar a:hover,
.mood-bar a.active {
  border-color: rgba(232,168,56,.3);
  color: #E8A838;
}

/* ── 标签聚合页·导航胶囊 (tags.html) ── */
.tag-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tag-pills a {
  padding: 4px 12px;
  background: rgba(45,200,168,.1);
  border-radius: 12px;
  font-size: .7rem;
  color: #2DC8A8;
  text-decoration: none;
  transition: all .15s;
}
.tag-pills a:hover,
.tag-pills a.active {
  background: rgba(45,200,168,.25);
  color: #fff;
}

/* ── 标签聚合页·结果卡片微调 (tags.html) ── */
.result-card__meta span {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
