/* ========== 首页 ========== */
.banner-wrap {
  margin: 6px var(--page-pad) 10px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #eee;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.banner-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
  pointer-events: none;
  z-index: 1;
}
.banner-wrap img { width: 100%; height: 100%; object-fit: cover; }
.banner-slide { display: block; width: 100%; height: 100%; }
.banner-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: #999; font-size: 13px;
}
.banner-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px; z-index: 2;
}
.banner-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.5); cursor: pointer;
}
.banner-dots span.active {
  background: #fff; width: 14px; border-radius: 3px;
}

/* 悬浮顶部 */
.top-sticky {
  position: sticky; top: 0; z-index: 20;
  background: var(--c-bg, #f7faf8);
  padding: 10px var(--page-pad) 8px;
  display: flex; flex-direction: row;
  align-items: center; justify-content: space-between;
  gap: 6px;
  transition: background 0.2s ease;
  max-width: var(--max-w, 480px);
  margin: 0 auto; left: 0; right: 0;
}
.main-cats {
  display: flex; flex-wrap: nowrap; gap: 6px;
  flex: 1 1 auto; justify-content: space-between;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.main-cats::-webkit-scrollbar { display: none; }
.main-cat {
  flex: 1 1 0; text-align: center;
  font-size: 13px; font-weight: 700;
  color: var(--c-text, #111);
  background: var(--c-bg-soft, #f0f9f2);
  padding: 6px 8px; border-radius: 999px;
  text-decoration: none; line-height: 1.2; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.main-cat:active { opacity: 0.85; transform: scale(0.97); }
.main-cats .main-cat:nth-child(1) { background: #ede9fe; color: #6d28d9; }
.main-cats .main-cat:nth-child(2) { background: #fee2e2; color: #dc2626; }
.main-cats .main-cat:nth-child(3) { background: #fef3c7; color: #d97706; }
.main-cats .main-cat:nth-child(4) { background: #dbeafe; color: #2563eb; }

.top-search-btn {
  flex: 0 0 auto;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; min-width: 48px; padding: 4px 6px;
  border-radius: 12px; text-decoration: none;
  color: var(--c-primary, #25b05e);
  font-size: 12px; font-weight: 700; line-height: 1.1;
  transition: background 0.2s ease, transform 0.15s ease;
}
.top-search-btn i { font-size: 22px; line-height: 1; }
.top-search-btn span { font-size: 12px; white-space: nowrap; }
.top-search-btn:active {
  transform: scale(0.94);
  background: var(--c-bg-soft, #f0f9f2);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .top-sticky { background: var(--c-bg, #121212); }
  html:not(.theme-light) .main-cat { background: #2a2a2a; color: #ddd; }
  html:not(.theme-light) .main-cats .main-cat:nth-child(1) { background: #3b2a5c; color: #c4b5fd; }
  html:not(.theme-light) .main-cats .main-cat:nth-child(2) { background: #4a1f1f; color: #fca5a5; }
  html:not(.theme-light) .main-cats .main-cat:nth-child(3) { background: #4a3a15; color: #fcd34d; }
  html:not(.theme-light) .main-cats .main-cat:nth-child(4) { background: #1e3a5f; color: #93c5fd; }
}
html.theme-dark .top-sticky { background: var(--c-bg, #121212); }
html.theme-dark .main-cat { background: #2a2a2a; color: #ddd; }
html.theme-dark .main-cats .main-cat:nth-child(1) { background: #3b2a5c; color: #c4b5fd; }
html.theme-dark .main-cats .main-cat:nth-child(2) { background: #4a1f1f; color: #fca5a5; }
html.theme-dark .main-cats .main-cat:nth-child(3) { background: #4a3a15; color: #fcd34d; }
html.theme-dark .main-cats .main-cat:nth-child(4) { background: #1e3a5f; color: #93c5fd; }

/* 分区标题 */
.home-section { margin: 0; padding: 0; }

.home-page .section-title,
.page .section-title {
  position: relative; display: block; width: 100%;
  font-size: 16px; font-weight: bold; text-align: right;
  padding: 14px var(--page-pad) 10px;
  color: var(--c-text, #111);
}
.home-page .section-title::after,
.page .section-title::after {
  content: ""; position: absolute;
  bottom: 6px; right: var(--page-pad);
  width: 30px; height: 3px;
  background: var(--c-primary, #25b05e);
  border-radius: 2px;
}
.home-page .section-more-link,
.page .section-more-link {
  position: absolute; left: var(--page-pad); top: 50%;
  transform: translateY(-50%);
  font-size: 12px; font-weight: normal;
  color: var(--c-primary, #25b05e);
  text-decoration: none; padding: 4px 6px; line-height: 1;
}
.home-page .section-more-link:active,
.page .section-more-link:active { opacity: 0.7; }

.section-more {
  padding: 4px var(--page-pad) 20px;
  text-align: center; min-height: 28px;
}
.section-more[hidden] { display: none; }
.section-more-tip {
  font-size: 12px; color: var(--c-muted, #999); line-height: 1.4;
}
.section-more.loading .section-more-tip { opacity: 0.7; }

.banner-wrap img,
.poster-card .cover img {
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}

.home-more-wrap {
  padding: 22px var(--page-pad) 32px;
  display: flex; justify-content: center;
}
.home-more-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 160px; height: 42px; padding: 0 28px;
  border-radius: 999px;
  background: var(--c-primary, #25b05e);
  color: #fff; font-size: 14px; font-weight: bold;
  text-align: center; text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 176, 94, 0.25);
  transition: opacity 0.2s ease, transform 0.1s ease;
  box-sizing: border-box;
}
.home-more-btn:active { opacity: 0.85; transform: scale(0.98); }

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .home-more-btn {
    box-shadow: 0 4px 14px rgba(37, 176, 94, 0.35);
  }
}
html.theme-dark .home-more-btn {
  box-shadow: 0 4px 14px rgba(37, 176, 94, 0.35);
}