/* mother-diversity · azure-bolt · 热播仓 · 宝蓝快闪极简片库 */

:root {
  --ab-brand: #2563eb;
  --ab-brand-dark: #1d4ed8;
  --ab-cta: #f97316;
  --ab-cta-dark: #ea580c;
  --ab-hot: #06b6d4;
  --ab-bg: #f8fafc;
  --ab-surface: #ffffff;
  --ab-surface-2: #eff6ff;
  --ab-ink: #0f172a;
  --ab-muted: #64748b;
  --ab-line: rgba(37, 99, 235, 0.12);
  --ab-deep: #0f172a;
  --div-accent: #2563eb;
  --div-secondary: #f97316;
  --div-highlight: #06b6d4;
  --div-bg: #f8fafc;
  --div-surface: #ffffff;
  --div-text: #0f172a;
  --div-muted: #64748b;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body.body-ab {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 320px at 8% -6%, rgba(37, 99, 235, 0.07), transparent 58%),
    radial-gradient(700px 260px at 92% 0%, rgba(6, 182, 212, 0.06), transparent 52%),
    var(--ab-bg) !important;
  color: var(--ab-ink) !important;
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.55;
}

body.body-ab a { text-decoration: none; transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
body.body-ab img { display: block; max-width: 100%; }

.ab-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ── 极简顶栏 ── */
.ab-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ab-deep);
  border-bottom: 2px solid var(--ab-brand);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.35);
}

.ab-topbar__row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ab-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-weight: 900;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.ab-brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--ab-brand);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
}

.ab-topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  flex: 1;
  justify-content: center;
}

.ab-topnav a {
  padding: 6px 12px;
  border-radius: 4px;
  color: #cbd5e1 !important;
  font-weight: 600;
  font-size: 0.86rem;
}

.ab-topnav a:hover { color: #fff !important; background: rgba(37, 99, 235, 0.25); }

.ab-topnav a[aria-current="page"] {
  background: var(--ab-brand);
  color: #fff !important;
}

.ab-topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ab-search {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ab-search input {
  width: 160px;
  border: 0;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
  font-size: 0.84rem;
}

.ab-search input::placeholder { color: #94a3b8; }

.ab-search button {
  border: 0;
  padding: 7px 12px;
  background: var(--ab-cta);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.95rem;
}

.ab-topbar__hot {
  padding: 6px 12px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--ab-hot);
  color: var(--ab-hot) !important;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.ab-menu-btn {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  cursor: pointer;
}

.ab-drawer {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px 14px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ab-drawer.open { display: flex; }

.ab-drawer a {
  padding: 10px 12px;
  border-radius: 6px;
  color: #e2e8f0 !important;
  font-weight: 600;
  font-size: 0.9rem;
}

.ab-drawer a[aria-current="page"] { background: var(--ab-brand); color: #fff !important; }

.ab-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ── Hero 宝蓝快闪条 ── */
.ab-hero {
  position: relative;
  margin-bottom: 28px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(115deg, var(--ab-deep) 0%, #1e3a8a 45%, var(--ab-brand) 100%);
  color: #fff;
}

.ab-hero__inner {
  position: relative;
  z-index: 2;
  padding: 28px 24px 32px;
}

.ab-hero__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--ab-hot);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.ab-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  line-height: 1.22;
  font-weight: 900;
}

.ab-hero__sub {
  margin: 0 0 18px;
  max-width: 34rem;
  color: #bfdbfe;
  font-size: 0.95rem;
}

.ab-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

.ab-hero__flash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  animation: ab-flash 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ab-flash {
  0%, 100% { opacity: 0.3; transform: translateX(-30%); }
  50% { opacity: 0.8; transform: translateX(30%); }
}

@media (prefers-reduced-motion: reduce) { .ab-hero__flash { animation: none; opacity: 0.4; } }

/* ── 按钮 ── */
.ab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.88rem;
  border: 2px solid transparent;
}

.ab-btn--primary {
  background: var(--ab-cta);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
}

.ab-btn--primary:hover { background: var(--ab-cta-dark); }

.ab-btn--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff !important;
}

.ab-btn--wide { width: 100%; max-width: 220px; margin-top: 12px; }

/* ── 区块头 ── */
.ab-block { margin-bottom: 32px; }

.ab-block--alt {
  padding: 20px 18px;
  border-radius: 10px;
  background: var(--ab-surface);
  border: 1px solid var(--ab-line);
}

.ab-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ab-block__title { display: flex; align-items: center; gap: 10px; }

.ab-block__title h2 { margin: 0; font-size: 1.15rem; font-weight: 900; color: var(--ab-brand); }

.ab-block__bar {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--ab-brand);
}

.ab-block__bar--cyan { background: var(--ab-hot); }

.ab-block__more { color: var(--ab-brand) !important; font-weight: 700; font-size: 0.86rem; }

.ab-chip {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ab-chip--hot { background: var(--ab-hot); color: #fff; }

/* ── 等宽海报网格 ── */
.ab-wall {
  display: grid;
  gap: 12px;
}

.ab-wall--hot,
.ab-wall--feat,
.ab-wall--new,
.ab-wall--cat,
.ab-wall--related {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

/* ── 卡片：等宽 1:1 对比海报 + 底部渐变标题 ── */
.ab-tile__link { display: block; color: inherit; }

.ab-tile__frame {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ab-tile:hover .ab-tile__frame {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.ab-tile__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ab-tile__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--ab-hot);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  z-index: 2;
}

.ab-tile__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ab-cta);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.ab-tile:hover .ab-tile__play { opacity: 1; }

.ab-tile__cap {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.88));
  color: #fff;
}

.ab-tile__cap h3 {
  margin: 0 0 4px;
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ab-tile__meta {
  margin: 0;
  font-size: 0.68rem;
  color: #cbd5e1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── 迷你卡（相关推荐） ── */
.ab-mini__link { display: block; color: inherit; }

.ab-mini__frame {
  position: relative;
  margin: 0 0 6px;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(145deg, #dbeafe, #93c5fd);
}

.ab-mini__frame img { width: 100%; height: 100%; object-fit: cover; }

.ab-mini__badge {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--ab-hot);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
}

.ab-mini h3 {
  margin: 0 0 3px;
  font-size: 0.78rem;
  line-height: 1.28;
  font-weight: 800;
  color: var(--ab-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ab-mini__meta { margin: 0; font-size: 0.68rem; color: var(--ab-muted); }

/* ── 分类页 ── */
.ab-cathead { margin-bottom: 20px; }

.ab-cathead__row h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 900;
  color: var(--ab-brand);
}

.ab-cathead__desc { margin: 0; color: var(--ab-muted); font-size: 0.92rem; }

.ab-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--ab-muted);
}

.ab-crumb a { color: var(--ab-brand) !important; font-weight: 700; }

.ab-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ab-surface);
  border: 1px solid var(--ab-line);
}

.ab-chips__label {
  font-weight: 900;
  color: var(--ab-brand);
  font-size: 0.84rem;
  padding-right: 8px;
  border-right: 2px solid var(--ab-hot);
}

.ab-chips__search,
.ab-chips__select {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--ab-line);
  background: #fff;
  outline: none;
  font-size: 0.86rem;
}

.ab-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--ab-muted);
  background: var(--ab-surface);
  border-radius: 8px;
  border: 1px dashed var(--ab-line);
}

/* ── 播放页：全宽播放器 + 下方信息 ── */
.ab-play__screen { margin-bottom: 20px; }

.ab-play__frame {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 2px solid var(--ab-brand);
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.2);
}

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

.ab-play__error {
  margin-top: 10px;
  padding: 12px;
  border-radius: 6px;
  background: #fef2f2;
  color: #dc2626;
  text-align: center;
}

.ab-play__info {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 10px;
  background: var(--ab-surface);
  border: 1px solid var(--ab-line);
}

.ab-play__poster {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--ab-brand);
}

.ab-play__poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }

.ab-play__detail h1 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 900;
  color: var(--ab-ink);
}

.ab-play__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ab-play__tags span {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--ab-surface-2);
  color: var(--ab-brand);
}

.ab-play__channel { color: var(--ab-muted) !important; background: transparent !important; font-weight: 600 !important; }

.ab-play__synopsis {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 10px;
  background: var(--ab-surface);
  border-left: 3px solid var(--ab-cta);
}

.ab-play__synopsis h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ab-brand);
}

.ab-play__brief { margin: 0 0 10px; font-weight: 600; }

.ab-play__full { margin: 0; color: var(--ab-muted); line-height: 1.85; }

.ab-play__related { margin-top: 8px; }

/* ── 底部：双行极简 ── */
.ab-foot {
  margin-top: auto;
  background: var(--ab-deep);
  color: #94a3b8;
  border-top: 2px solid var(--ab-brand);
}

.ab-foot__links {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
}

.ab-foot__links a {
  color: #cbd5e1 !important;
  font-size: 0.84rem;
  font-weight: 600;
}

.ab-foot__links a:hover { color: var(--ab-hot) !important; }

.ab-foot__meta {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 16px 20px;
  text-align: center;
}

.ab-foot__meta strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 6px;
}

.ab-foot__meta p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #94a3b8;
}

.ab-foot__copy { font-size: 0.78rem; color: #64748b; }

/* ── 辅助页（搜索/榜单/分类总览） ── */
.page-hero.compact-hero {
  margin-bottom: 24px;
  padding: 24px 20px;
  border-radius: 10px;
  background: linear-gradient(115deg, var(--ab-deep), var(--ab-brand));
  color: #fff;
}

.page-hero.compact-hero h1 { margin: 6px 0; font-size: 1.5rem; font-weight: 900; }
.page-hero.compact-hero p { margin: 0; color: #bfdbfe; font-size: 0.92rem; }
.page-hero .eyebrow { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; color: var(--ab-hot); }

.section-block { margin-bottom: 28px; }

.section-block .filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ab-surface);
  border: 1px solid var(--ab-line);
}

.section-block .filter-panel input,
.section-block .filter-panel select {
  flex: 1;
  min-width: 130px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--ab-line);
  background: #fff;
  font-size: 0.86rem;
}

.section-block .movie-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.section-block .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-block .section-head h2 { margin: 0; font-size: 1.1rem; font-weight: 900; color: var(--ab-brand); }
.section-block .section-head a { color: var(--ab-brand) !important; font-weight: 700; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.category-grid.large { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.category-grid a,
.category-grid .category-tile {
  display: block;
  padding: 16px 14px;
  border-radius: 8px;
  background: var(--ab-surface);
  border: 1px solid var(--ab-line);
  font-weight: 800;
  color: var(--ab-brand) !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-grid a:hover { transform: translateY(-2px); border-color: var(--ab-cta); }

.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--ab-muted);
  background: var(--ab-surface);
  border-radius: 8px;
  border: 1px dashed var(--ab-line);
}

/* ── 响应式 ── */
@media (max-width: 960px) {
  .ab-topnav { display: none; }
  .ab-play__info { grid-template-columns: 100px 1fr; }
}

@media (max-width: 720px) {
  .ab-search { display: none; }
  .ab-topbar__hot { display: none; }
  .ab-menu-btn { display: grid; place-items: center; }
  .ab-hero__inner { padding: 22px 16px 26px; }
  .ab-wall--hot,
  .ab-wall--feat,
  .ab-wall--new,
  .ab-wall--cat,
  .ab-wall--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-play__info { grid-template-columns: 1fr; }
  .ab-play__poster { max-width: 140px; }
  .ab-chips { flex-direction: column; align-items: stretch; }
  .ab-foot__links { gap: 6px 14px; }
  .section-block .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
