/* 青墨主题 — 保留配色，修正对齐与重叠 */

:root {
  --ink: #07151f;
  --ink-soft: #0b1c2c;
  --paper: #f3f7fa;
  --line: #d5e3ec;
  --cyan: #0ea5b7;
  --cyan-deep: #0b7285;
  --header-h: 64px;
  --page-gutter: 24px;
  --page-width: 1280px;
}

body {
  background: var(--stone-50);
  color: var(--stone-800);
}

img {
  background: linear-gradient(145deg, #0b1c2c, #0b7285);
}

.bg-amber-50 { background-color: #ecfeff !important; }
.bg-amber-100 { background-color: #cffafe !important; }
.bg-amber-600,
.bg-amber-600\/90,
.bg-amber-700,
.bg-amber-800,
.bg-amber-800\/95,
.bg-amber-900,
.bg-amber-900\/95 { background-color: #0ea5b7 !important; }
.bg-stone-50 { background-color: #f3f7fa !important; }
.bg-stone-100 { background-color: #e8f1f5 !important; }
.bg-stone-900 { background-color: #0b1c2c !important; }
.text-amber-50,
.text-amber-100,
.text-amber-200 { color: #ecfeff !important; }
.text-amber-600,
.text-amber-700 { color: #0b7285 !important; }
.border-amber-600,
.border-amber-700 { border-color: #0ea5b7 !important; }
.from-amber-50 { --tw-gradient-from: #ecfeff var(--tw-gradient-from-position); }
.from-amber-900 { --tw-gradient-from: #0b4c5c var(--tw-gradient-from-position); }
.to-amber-800 { --tw-gradient-to: #0b7285 var(--tw-gradient-to-position); }
.hover\:bg-amber-700:hover,
.hover\:bg-amber-200:hover { background-color: #0b7285 !important; }
.hover\:text-amber-400:hover,
.hover\:text-amber-50:hover,
.hover\:text-amber-800:hover { color: #22d3ee !important; }

/* ── 头部：固定 64px，饰条不占额外高度 ── */
.site-header {
  background:
    linear-gradient(90deg, #0b7285 0%, #0ea5b7 42%, #22d3ee 100%) top / 100% 3px no-repeat,
    rgba(243, 247, 250, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(7, 21, 31, 0.04);
}

.site-header::before {
  content: none;
}

.nav-shell {
  height: var(--header-h);
  max-width: var(--page-width);
  padding: 0 var(--page-gutter);
}

.brand {
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

.brand-mark {
  border-radius: 6px;
  background: linear-gradient(145deg, #22d3ee, #0b7285);
  box-shadow: 0 6px 14px rgba(14, 165, 183, 0.24);
}

.desktop-nav a,
.mobile-nav a {
  color: var(--stone-800);
  border-radius: 0;
  padding: 8px 14px 10px;
  border-bottom: 2px solid transparent;
  background: transparent;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  background: transparent;
  color: var(--cyan-deep);
  border-bottom-color: var(--cyan);
}

.mobile-toggle {
  background: #e8f1f5;
  border-radius: 6px;
}

.mobile-toggle span {
  background: var(--ink-soft);
}

.mobile-nav {
  background: rgba(243, 247, 250, 0.98);
  border-top: 1px solid var(--line);
}

.mobile-cats a {
  background: #e8f1f5;
  color: var(--stone-800);
  border-radius: 6px;
}

/* ── Hero：左对齐但不重叠，搜索条单独落在底部 ── */
.hero-carousel {
  height: 520px;
  background: var(--ink);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 21, 31, 0.88) 0%, rgba(7, 21, 31, 0.42) 55%, rgba(7, 21, 31, 0.12) 100%),
    radial-gradient(circle at 18% 70%, rgba(14, 165, 183, 0.22), transparent 42%);
}

.hero-content {
  top: auto;
  bottom: 132px;
  left: max(72px, calc((100% - var(--page-width)) / 2 + var(--page-gutter)));
  transform: none;
  text-align: left;
  width: min(640px, calc(100% - 120px));
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}

.hero-content p {
  margin: 0 0 16px;
  -webkit-line-clamp: 2;
}

.hero-kicker {
  border-radius: 4px;
  background: var(--cyan);
  box-shadow: none;
  margin-bottom: 14px;
}

.hero-tags,
.hero-actions {
  justify-content: flex-start;
}

.hero-tags {
  margin-bottom: 18px;
}

.tag {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #ecfeff;
  border: 1px solid rgba(165, 243, 252, 0.35);
}

.btn-primary,
.btn-ghost,
.more-link,
.inline-link {
  border-radius: 6px;
}

.btn-primary {
  box-shadow: 0 10px 22px rgba(14, 165, 183, 0.24);
}

.hero-arrow {
  border-radius: 6px;
  width: 40px;
  height: 40px;
}

.hero-dots {
  left: max(72px, calc((100% - var(--page-width)) / 2 + var(--page-gutter)));
  transform: none;
  bottom: 22px;
  justify-content: flex-start;
}

.hero-dot {
  border-radius: 2px;
  width: 16px;
  height: 4px;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--cyan);
}

.hero-search {
  left: max(72px, calc((100% - var(--page-width)) / 2 + var(--page-gutter)));
  transform: none;
  bottom: 48px;
  width: min(640px, calc(100% - 120px));
  border-radius: 8px;
  background: rgba(7, 21, 31, 0.5);
  border: 1px solid rgba(165, 243, 252, 0.28);
}

.hero-search button {
  border-radius: 6px;
}

/* ── 区块：统一 1280 栅格 ── */
.section {
  padding: 48px var(--page-gutter);
}

.section-soft,
.section-stone {
  padding-left: 0;
  padding-right: 0;
}

.section-soft > .section-head,
.section-soft > .movie-rail,
.section-soft > .movie-grid,
.section-soft > .featured-grid,
.section-stone > .section-title-center,
.section-stone > .category-grid {
  max-width: var(--page-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  box-sizing: border-box;
}

.section-head {
  align-items: center;
  margin-bottom: 22px;
}

.section-head h1,
.section-head h2,
.section-title-center h2,
.ch-results-head h2,
.play-more__head h2 {
  position: relative;
  padding-left: 14px;
}

.section-title-center {
  text-align: left;
}

.section-title-center h2 {
  display: inline-block;
}

.section-head h1,
.section-head h2,
.section-title-center h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  color: var(--stone-800);
  margin-bottom: 8px;
}

.section-head h1::before,
.section-head h2::before,
.section-title-center h2::before,
.ch-results-head h2::before,
.play-more__head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 4px;
  height: 0.78em;
  background: var(--cyan);
  border-radius: 1px;
}

.section-soft {
  background: #eef6f8;
}

.section-stone {
  background: #e8f1f5;
}

.section-tools button {
  border-radius: 6px;
  border-color: var(--line);
}

/* ── 卡片：恢复 4:3，避免竖海报把栅格撑乱 ── */
.movie-card,
.filter-card,
.rail-card,
.rank-item,
.story-card,
.side-card,
.category-panel,
.filter-panel,
.no-results,
.cat-overview-card,
.ch-toolbar,
.play-block,
.play-body__side {
  border-radius: 8px;
}

.movie-card {
  background: #fff;
  box-shadow: none;
  border: 1px solid var(--line);
  overflow: hidden;
}

.movie-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 183, 0.4);
  box-shadow: 0 12px 26px rgba(7, 21, 31, 0.08);
}

.poster-wrap {
  aspect-ratio: 4 / 3;
}

.card-badge,
.card-quality {
  border-radius: 4px;
  font-size: 11px;
}

.card-badge {
  left: 8px;
  top: 8px;
  padding: 4px 8px;
  background: var(--cyan);
}

.card-quality {
  right: 8px;
  bottom: 8px;
  border-radius: 4px;
}

.card-body {
  padding: 14px;
}

.card-body p {
  height: 42px;
}

.card-meta span {
  border-radius: 4px;
  background: #e8f1f5;
}

.featured-grid {
  align-items: stretch;
  grid-template-rows: 474px;
}

.featured-large,
.featured-copy span,
.featured-copy strong,
.category-card {
  border-radius: 8px;
}

.featured-large {
  min-height: 0;
  height: 100%;
}

.featured-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.featured-side .rail-card {
  height: 108px;
  min-height: 108px;
  max-height: 108px;
}

.featured-shade {
  background: linear-gradient(180deg, rgba(7, 21, 31, 0.12), rgba(7, 21, 31, 0.78));
}

.featured-copy span,
.featured-copy strong {
  border-radius: 4px;
}

.rail-card {
  box-shadow: none;
  border: 1px solid var(--line);
  min-height: 96px;
  align-items: stretch;
}

.rail-poster {
  width: 150px;
  flex: 0 0 150px;
  min-height: 96px;
}

.rail-info {
  padding: 10px 12px 10px 0;
  overflow: hidden;
}

.rail-info h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rail-info p {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rail-poster span {
  border-radius: 4px;
}

.play-more .rail-card--related .rail-poster {
  width: 88px;
  flex: 0 0 88px;
  min-height: 0;
}

.category-grid {
  gap: 16px;
}

.category-card {
  min-height: 220px;
  box-shadow: none;
  border: 1px solid rgba(14, 165, 183, 0.12);
}

.category-card span {
  background: linear-gradient(180deg, transparent, rgba(7, 21, 31, 0.86));
}

.rank-item {
  box-shadow: none;
  border: 1px solid var(--line);
}

.rank-item img {
  border-radius: 4px;
}

.rank-no,
.rank-item strong,
.play-pick__no {
  color: var(--cyan-deep);
  font-variant-numeric: tabular-nums;
}

/* ── 内页头图 ── */
.page-hero {
  background: linear-gradient(120deg, #07151f 0%, #0b1c2c 48%, #0b4c5c 100%);
  padding: 56px var(--page-gutter) 48px;
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5b7, transparent);
}

.page-hero > div {
  max-width: 960px;
  margin: 0 auto;
}

.page-hero span {
  border-radius: 4px;
  color: #a5f3fc;
}

.page-hero p {
  color: #b8cdd8;
}

.search-box input,
.search-box button,
.filter-row select,
.auth-shell input {
  border-radius: 6px;
  border-color: var(--line);
}

.search-box input:focus,
.ch-toolbar .search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 183, 0.16);
}

.channel-hero {
  min-height: 340px;
}

.channel-shade {
  background:
    linear-gradient(90deg, rgba(7, 21, 31, 0.88), rgba(7, 21, 31, 0.28)),
    radial-gradient(circle at 16% 80%, rgba(14, 165, 183, 0.28), transparent 46%);
}

/* ── 分类 / 频道页 ── */
.ch-page,
.play-page {
  background: var(--paper);
}

.ch-header {
  background: linear-gradient(125deg, #07151f 0%, #0e2433 58%, #0b4c5c 100%);
  padding-top: 28px;
  padding-bottom: 32px;
}

.ch-header__inner {
  align-items: center;
}

.ch-header__crumb,
.ch-header__crumb a,
.breadcrumbs a,
.channel-hero .breadcrumbs a {
  color: #a5f3fc;
}

.ch-stat {
  border-radius: 4px;
}

.ch-stat strong {
  color: #67e8f9;
}

.ch-header__visual {
  border-radius: 8px;
  border: 2px solid rgba(14, 165, 183, 0.4);
}

.ch-switcher {
  top: var(--header-h);
  background: rgba(243, 247, 250, 0.96);
  border-bottom: 1px solid var(--line);
}

.ch-pill,
.ch-chip,
.ch-page-btn,
.ch-page-num,
.ch-results-count {
  border-radius: 6px;
}

.ch-pill {
  border-color: var(--line);
  background: #fff;
}

.ch-pill:hover,
.ch-chip:hover,
.ch-page-btn:hover,
.ch-page-num:hover {
  border-color: #67e8f9;
  color: var(--cyan-deep);
  background: #ecfeff;
}

.ch-pill.is-active,
.ch-chip.is-active,
.ch-page-num.is-active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: none;
}

.ch-toolbar {
  box-shadow: none;
  border: 1px solid var(--line);
}

.ch-results-count {
  background: #ecfeff;
  color: var(--cyan-deep);
  border-color: rgba(14, 165, 183, 0.25);
}

.cat-overview-card {
  box-shadow: none;
  border: 1px solid var(--line);
}

.cat-overview-card:hover {
  border-color: rgba(14, 165, 183, 0.4);
}

.cat-overview-card__hero {
  height: 128px;
}

.cat-overview-card__hero::after {
  background: linear-gradient(180deg, transparent, rgba(7, 21, 31, 0.72));
}

.cat-overview-card__previews a {
  border-radius: 4px;
}

.cat-overview-card__link,
.info-shell .story-card a,
.story-card dd a,
.play-specs__row dd a,
.play-topbar__crumb a,
.play-side-link,
.play-theater__bar a,
.auth-shell a {
  color: var(--cyan-deep);
}

/* ── 播放页 ── */
.play-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.play-theater {
  background: #041018;
}

.play-theater__frame {
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(14, 165, 183, 0.22),
    0 28px 70px rgba(0, 0, 0, 0.5);
}

.play-theater__bar {
  border-radius: 6px;
}

.play-block,
.play-body__side {
  box-shadow: none;
  border: 1px solid var(--line);
}

.play-block--accent {
  background: linear-gradient(135deg, #ecfeff 0%, #fff 62%);
  border-color: rgba(14, 165, 183, 0.22);
}

.play-block h2::before {
  background: linear-gradient(180deg, #22d3ee, #0b7285);
  border-radius: 1px;
}

.play-pick:hover {
  background: #ecfeff;
}

.play-more .rail-card--related {
  border-color: var(--line);
  box-shadow: none;
  height: 132px;
}

/* ── 详情 / 信息 / 错误 / 登录 ── */
.detail-poster,
.movie-player,
.category-thumb {
  border-radius: 8px;
}

.player-message {
  background: rgba(14, 165, 183, 0.12);
  color: #cffafe;
  border-color: rgba(14, 165, 183, 0.28);
}

.auth-shell button[type="submit"] {
  border-radius: 6px;
  background: var(--cyan);
}

.error-shell .story-card pre {
  background: #e8f1f5;
  color: var(--cyan-deep);
  border-radius: 6px;
}

/* ── 底部 ── */
.site-footer {
  background: var(--ink);
  color: #b8cdd8;
  border-top: 3px solid var(--cyan);
}

.footer-grid,
.footer-bottom {
  max-width: var(--page-width);
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.footer-grid {
  padding-top: 40px;
}

.site-footer h3 {
  color: #ecfeff;
  position: relative;
  padding-bottom: 10px;
}

.site-footer h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--cyan);
}

.footer-links a {
  border-radius: 4px;
  background: transparent;
  border: 1px solid rgba(14, 165, 183, 0.28);
  color: #d5e3ec;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(14, 165, 183, 0.22);
  border-color: rgba(34, 211, 238, 0.5);
}

.footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #5a7382;
}

@media (max-width: 1100px) {
  .featured-grid {
    grid-template-rows: none;
  }

  .featured-large {
    min-height: 360px;
    height: auto;
  }

  .featured-side .rail-card {
    height: auto;
    min-height: 96px;
    max-height: none;
  }
}

@media (max-width: 820px) {
  :root {
    --page-gutter: 16px;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-content,
  .hero-search,
  .hero-dots {
    left: 16px;
    width: calc(100% - 32px);
  }

  .hero-content {
    bottom: 148px;
    transform: none;
  }

  .hero-search {
    bottom: 52px;
  }

  .section {
    padding: 40px var(--page-gutter);
  }

  .section-title-center {
    text-align: left;
  }
}

@media (max-width: 540px) {
  .hero-carousel {
    height: 600px;
  }

  .hero-content {
    bottom: 176px;
    top: auto;
  }

  .hero-search {
    display: flex;
    bottom: 56px;
  }

  .hero-search input {
    padding: 0 12px;
  }

  .poster-wrap {
    aspect-ratio: 4 / 3;
  }

  .rail-card {
    display: flex;
  }

  .rail-poster,
  .side-card .rail-poster {
    width: 120px;
    flex: 0 0 120px;
    height: auto;
    min-height: 84px;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.site-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 120;
  padding: 0.6rem 1rem;
  background: #0ea5b7;
  color: #fff;
}

.site-skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
