/* mother-diversity · harbor-cyan 结构壳 · 成品11 视觉以 site-craft 潮汐青瓷为准 */
:root {
  --div-accent: var(--hc-primary, #0ea5e9);
  --div-secondary: var(--hc-secondary, #0284c7);
  --div-highlight: var(--hc-accent, #14b8a6);
  --div-bg: var(--hc-bg, #fff);
  --div-surface: var(--hc-surface, #f0f9ff);
  --div-text: var(--hc-ink, #0c4a6e);
  --div-muted: var(--hc-muted, #64748b);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

.hc-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(880px 360px at 100% -8%, rgba(14, 165, 233, 0.1), transparent 58%),
    radial-gradient(640px 300px at 0% 4%, rgba(20, 184, 166, 0.07), transparent 52%),
    var(--hc-bg) !important;
  color: var(--hc-ink) !important;
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.55;
}

.hc-body img { display: block; max-width: 100%; height: auto; }
.hc-body a { color: var(--hc-primary); text-decoration: none; transition: color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.hc-body a:hover { color: var(--hc-secondary); }
.hc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* ── 顶栏：搜索优先双行 + 彩色分类胶囊 ── */
.hc-head {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.12);
}

.hc-head__search-row {
  border-bottom: 3px solid var(--hc-primary);
  background: linear-gradient(180deg, #fff 0%, var(--hc-surface) 100%);
}

.hc-head__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
}

.hc-head__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hc-ink) !important;
  font-weight: 900;
  flex-shrink: 0;
}

.hc-head__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--hc-primary), var(--hc-secondary));
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

.hc-head__brand {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--hc-primary) !important;
}

.hc-head__find {
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid var(--hc-line);
  background: #fff;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.1);
  min-width: 0;
}

.hc-head__find input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 11px 16px;
  font-size: 0.95rem;
  color: var(--hc-ink);
  background: transparent;
}

.hc-head__find-btn {
  border: 0;
  padding: 0 22px;
  background: var(--hc-cta);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.hc-head__find-btn:hover { filter: brightness(1.06); }

.hc-head__rank {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--hc-surface);
  border: 2px solid var(--hc-primary);
  color: var(--hc-primary) !important;
  font-weight: 800;
  font-size: 0.88rem;
  white-space: nowrap;
}

.hc-head__rank:hover {
  background: var(--hc-primary);
  color: #fff !important;
}

.hc-head__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--hc-surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.hc-head__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--hc-primary);
}

.hc-head__caps {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 18px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hc-head__caps a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--hc-ink) !important;
  background: var(--hc-surface);
  border: 2px solid transparent;
}

.hc-head__caps a:hover {
  border-color: var(--hc-primary);
  color: var(--hc-primary) !important;
  transform: translateY(-1px);
}

.hc-head__caps a[aria-current="page"] {
  background: var(--hc-primary);
  color: #fff !important;
  border-color: var(--hc-accent);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}

.hc-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 18px 56px;
}

/* ── 按钮 ── */
.hc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.94rem;
  border: 2px solid transparent;
}

.hc-btn--cta {
  background: linear-gradient(135deg, var(--hc-cta), #ea580c);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
}

.hc-btn--cta:hover { transform: translateY(-2px); filter: brightness(1.05); }

.hc-btn--line {
  background: #fff;
  border-color: var(--hc-primary);
  color: var(--hc-primary) !important;
}

.hc-btn--line:hover { background: var(--hc-surface); }

.hc-btn--block { width: 100%; margin-top: 10px; }

/* ── 首页 Banner：全宽条 + 统计块 ── */
.hc-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 28px 30px;
  border-radius: 20px;
  background: linear-gradient(125deg, var(--hc-primary) 0%, var(--hc-secondary) 55%, color-mix(in srgb, var(--hc-accent) 40%, var(--hc-secondary)) 100%);
  color: #fff;
  box-shadow: 0 20px 48px rgba(14, 165, 233, 0.28);
}

.hc-banner__eyebrow {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
  font-size: 0.82rem;
}

.hc-banner h1 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  line-height: 1.18;
  font-weight: 950;
}

.hc-banner__intro {
  margin: 0 0 18px;
  line-height: 1.75;
  opacity: 0.94;
  max-width: 36em;
  font-size: 0.98rem;
}

.hc-banner__cta { display: flex; flex-wrap: wrap; gap: 10px; }

.hc-banner__stats {
  display: grid;
  gap: 10px;
  align-content: center;
}

.hc-banner__stat {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hc-banner__stat strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.hc-banner__stat span { font-size: 0.82rem; opacity: 0.88; }

/* ── 分类胶囊行 ── */
.hc-caps-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--hc-line);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.08);
}

.hc-cap {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hc-cap:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }

.hc-cap--drama { background: var(--hc-primary); }
.hc-cap--romance { background: #ec4899; }
.hc-cap--suspense { background: #6366f1; }
.hc-cap--action { background: var(--hc-cta); }
.hc-cap--costume { background: var(--hc-accent); }
.hc-cap--comedy { background: #eab308; color: var(--hc-ink) !important; }
.hc-cap--all { background: var(--hc-ink); }

/* ── 区块标题 ── */
.hc-section { margin-bottom: 34px; }

.hc-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.hc-section__head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.28rem;
  font-weight: 950;
  color: var(--hc-ink);
}

.hc-section__head a {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--hc-cta) !important;
}

.hc-section__head a:hover { color: var(--hc-primary) !important; }

.hc-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 950;
  color: #fff;
}

.hc-badge--hot { background: var(--hc-cta); }
.hc-badge--new { background: var(--hc-primary); }
.hc-badge--rel { background: var(--hc-accent); }

/* ── 横滑 ── */
.hc-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.hc-scroll::-webkit-scrollbar { height: 7px; }
.hc-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--hc-primary) 45%, #ccc); border-radius: 999px; }

.hc-scroll .hc-card { flex: 0 0 168px; scroll-snap-align: start; }
.hc-scroll--rel .hc-card { flex: 0 0 156px; }

/* ── 网格 ── */
.hc-grid {
  display: grid;
  gap: 16px;
}

.hc-grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hc-grid--cat { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* ── 卡片：3:4 竖版海报 + 叠字信息 ── */
.hc-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--hc-line);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.08);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hc-card:hover {
  transform: translateY(-4px);
  border-color: var(--hc-primary);
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.18);
}

.hc-card__link { display: block; color: inherit !important; }

.hc-card__poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--hc-surface), #e0f2fe);
}

.hc-card__poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hc-card:hover .hc-card__poster img { transform: scale(1.05); }

.hc-card__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  background: var(--hc-cta);
  color: #fff;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.35);
}

.hc-card__play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, 0.85);
  color: #fff;
  font-size: 0.7rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hc-card:hover .hc-card__play { opacity: 1; transform: scale(1); }

.hc-card__info {
  padding: 10px 12px 12px;
  border-top: 3px solid var(--hc-primary);
}

.hc-card--compact .hc-card__info { border-top-color: var(--hc-accent); padding: 8px 10px 10px; }

.hc-card__info h3 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 900;
  color: var(--hc-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hc-card__info p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--hc-muted);
  font-weight: 700;
}

.hc-card__info p span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--hc-surface);
}

.hc-card__info p span:first-child {
  color: var(--hc-primary);
  background: color-mix(in srgb, var(--hc-primary) 12%, #fff);
}

/* ── 分类页：胶囊筛选 + 三列网格 ── */
.hc-cat-head {
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 18px;
  background: #fff;
  border-left: 6px solid var(--hc-cta);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.1);
}

.hc-cat-head h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 950;
  color: var(--hc-ink);
}

.hc-cat-head p {
  margin: 0;
  color: var(--hc-muted);
  line-height: 1.7;
  max-width: 48em;
}

.hc-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--hc-muted);
}

.hc-crumb a { color: var(--hc-primary) !important; }

.hc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--hc-surface);
  border: 2px solid var(--hc-line);
}

.hc-pills__group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 140px;
}

.hc-pills__label {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hc-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.hc-pills__input,
.hc-pills select {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--hc-line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.9rem;
  color: var(--hc-ink);
  background: #fff;
  outline: none;
  font-weight: 600;
}

.hc-pills__input:focus,
.hc-pills select:focus {
  border-color: var(--hc-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.hc-empty {
  padding: 28px;
  text-align: center;
  border-radius: 14px;
  background: #fff;
  color: var(--hc-muted);
  font-weight: 800;
  border: 2px dashed var(--hc-line);
}

/* ── 播放页：全宽播放器 + 信息条 + 双栏简介 ── */
.hc-play { margin-bottom: 24px; }

.hc-play__frame {
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
  border: 4px solid var(--hc-primary);
  box-shadow: 0 22px 52px rgba(14, 165, 233, 0.22);
}

.hc-play__frame video,
#movie-player {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  max-height: 72vh;
}

.hc-play__bar {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--hc-line);
}

.hc-play__bar h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.2rem, 2.8vw, 1.75rem);
  font-weight: 950;
  line-height: 1.25;
  color: var(--hc-ink);
}

.hc-play__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hc-play__meta li {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--hc-surface);
  color: var(--hc-primary);
}

.hc-play__meta li:nth-child(2) {
  background: color-mix(in srgb, var(--hc-cta) 12%, #fff);
  color: var(--hc-cta);
}

.hc-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  margin-bottom: 32px;
}

.hc-detail__synopsis {
  padding: 20px 22px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--hc-line);
}

.hc-detail__synopsis h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--hc-primary);
}

.hc-detail__synopsis p {
  margin: 0;
  color: var(--hc-muted);
  line-height: 1.85;
  font-size: 0.96rem;
}

.hc-side-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--hc-surface);
  border: 2px solid color-mix(in srgb, var(--hc-accent) 40%, var(--hc-line));
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.1);
}

.hc-side-card h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--hc-ink);
}

.hc-side-card dl {
  margin: 0 0 8px;
  display: grid;
  gap: 10px;
}

.hc-side-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--hc-line);
}

.hc-side-card dt {
  margin: 0;
  color: var(--hc-muted);
  font-weight: 700;
  font-size: 0.84rem;
}

.hc-side-card dd {
  margin: 0;
  text-align: right;
  font-weight: 900;
  color: var(--hc-ink);
  font-size: 0.84rem;
}

/* ── 页脚：波浪顶线 + 双栏 ── */
.hc-foot {
  margin-top: 24px;
  background: var(--hc-surface);
  position: relative;
}

.hc-foot__wave {
  height: 6px;
  background: linear-gradient(90deg, var(--hc-primary), var(--hc-accent), var(--hc-cta), var(--hc-primary));
}

.hc-foot__grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 18px 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
}

.hc-foot__brand strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.15rem;
  color: var(--hc-primary);
}

.hc-foot__brand p {
  margin: 0 0 8px;
  color: var(--hc-muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.hc-foot__tagline {
  font-weight: 800;
  color: var(--hc-ink) !important;
  font-size: 0.84rem !important;
}

.hc-foot__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.hc-foot__col h4 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--hc-ink);
}

.hc-foot__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.hc-foot__col a {
  color: var(--hc-muted) !important;
  font-weight: 700;
  font-size: 0.88rem;
}

.hc-foot__col a:hover { color: var(--hc-primary) !important; }

.hc-foot__bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 18px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  border-top: 1px solid var(--hc-line);
  color: var(--hc-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ── 兼容 rank/search/categories 旧页骨架 ── */
body.hc-body .movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.hc-body .filter-panel input,
body.hc-body .filter-panel select {
  border-color: var(--hc-line);
  border-radius: 999px;
}

body.hc-body .filter-panel input:focus,
body.hc-body .filter-panel select:focus {
  border-color: var(--hc-primary);
}

body.hc-body .primary-btn {
  background: linear-gradient(135deg, var(--hc-cta), #ea580c);
  color: #fff;
}

body.hc-body .ghost-btn {
  border: 2px solid var(--hc-primary);
  color: var(--hc-primary);
}

/* ── 移动端 ── */
@media (max-width: 1024px) {
  .hc-grid--home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hc-grid--cat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.hc-body .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hc-head__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px;
  }

  .hc-head__find { grid-column: 1 / -1; order: 3; }
  .hc-head__rank { display: none; }
  .hc-head__toggle { display: inline-flex; }

  .hc-head__caps {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0;
    border-top: 1px solid var(--hc-line);
  }

  .hc-head__caps.open { display: flex; }

  .hc-head__caps a { border-radius: 10px; justify-content: center; }

  .hc-banner { grid-template-columns: 1fr; padding: 22px; }
  .hc-banner__stats { grid-template-columns: repeat(3, 1fr); }
  .hc-detail { grid-template-columns: 1fr; }
  .hc-foot__grid { grid-template-columns: 1fr; }
  .hc-foot__links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .hc-main { padding: 16px 14px 44px; }
  .hc-banner__stats { grid-template-columns: 1fr; }
  .hc-caps-row { gap: 8px; padding: 12px; }
  .hc-cap { padding: 7px 12px; font-size: 0.82rem; }
  .hc-grid--home,
  .hc-grid--cat,
  body.hc-body .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hc-pills { border-radius: 16px; flex-direction: column; }
  .hc-pills__group { min-width: 0; }
  .hc-scroll .hc-card { flex-basis: 148px; }
  .hc-foot__links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.hc-card[hidden] { display: none !important; }
