/* lehuajinfu 站点补丁 — 移动端 / 页脚联系 / 错误页 / 信息页 */

.nav-shell,
.mobile-nav,
.footer-grid,
.footer-bottom,
.section,
.page-hero > div,
.ch-header {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

body.nav-open {
  overflow: hidden;
}

.breadcrumbs a,
.channel-hero .breadcrumbs a {
  color: var(--amber-100);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #fff;
}

.site-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--stone-300);
}

.site-contact__icon {
  width: 1rem;
  height: 1rem;
  fill: #2aabee;
  filter: drop-shadow(0 4px 10px rgba(42, 171, 238, 0.3));
  animation: tgFloat 2.6s ease-in-out infinite;
  transform-origin: 55% 45%;
}

@keyframes tgFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-6deg);
  }
  45% {
    transform: translate3d(4px, -6px, 0) rotate(8deg);
  }
}

.info-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.info-shell .story-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.75;
  color: var(--stone-600);
}

.info-shell .story-card a {
  color: var(--amber-700);
  font-weight: 700;
  text-decoration: none;
}

.error-shell {
  max-width: 720px;
  margin: 3rem auto;
  padding: 0 1rem 3rem;
}

.error-shell .story-card pre {
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--stone-100);
  border-radius: 12px;
  color: #b45309;
  white-space: pre-wrap;
  font-size: 0.82rem;
  overflow-x: auto;
}

.auth-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.auth-shell .story-card h1 {
  margin-top: 0;
}

.auth-shell input {
  width: 100%;
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.auth-shell button[type='submit'] {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: var(--amber-600);
  color: #fff;
  padding: 12px;
  font-weight: 800;
  cursor: pointer;
}

.auth-shell a {
  color: var(--amber-700);
  font-weight: 700;
}

.page-hero .hero-actions .btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

@media (max-width: 820px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-large {
    min-height: 280px;
  }

  .movie-rail {
    scroll-snap-type: x mandatory;
  }

  .rail-cell {
    scroll-snap-align: start;
  }
}

@media (max-width: 540px) {
  .hero-content {
    top: 40%;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(22px, 8vw, 34px);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
  }

  .page-hero {
    padding: 64px 16px;
  }

  .page-hero h1 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .category-panel {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-grid {
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-contact__icon,
  .play-theater__live i {
    animation: none;
  }

  .hero-slide,
  .hero-dot,
  .movie-card,
  .rail-card,
  .rank-item {
    transition: none;
  }
}

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

.ch-header {
  background: linear-gradient(135deg, var(--stone-900) 0%, #292524 55%, #78350f 100%);
  color: #fff;
  padding: 28px max(16px, env(safe-area-inset-left)) 32px max(16px, env(safe-area-inset-right));
}

.ch-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: end;
}

.ch-header__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber-200);
  margin-bottom: 12px;
}

.ch-header__crumb a {
  color: var(--amber-100);
  text-decoration: none;
}

.ch-header__crumb a:hover {
  color: #fff;
}

.ch-header__title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 950;
  line-height: 1.15;
  margin: 0 0 10px;
}

.ch-header__lead {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
  max-width: 640px;
  font-size: 1rem;
}

.ch-header__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ch-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
  font-weight: 800;
}

.ch-stat strong {
  color: var(--amber-300);
}

.ch-header__visual {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16/10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(251, 191, 36, 0.35);
}

.ch-header__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ch-switcher {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: rgba(250, 250, 249, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e7e5e4;
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
}

.ch-switcher__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ch-switcher__inner::-webkit-scrollbar {
  display: none;
}

.ch-pill {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: var(--stone-600);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ch-pill:hover {
  border-color: var(--amber-300);
  color: var(--amber-800);
  background: var(--amber-50);
}

.ch-pill.is-active {
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.28);
}

.ch-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-left)) 48px max(16px, env(safe-area-inset-right));
}

.ch-toolbar {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 18px;
  margin-bottom: 22px;
  display: grid;
  gap: 14px;
}

.ch-toolbar .search-box {
  display: flex;
  gap: 10px;
}

.ch-toolbar .search-box input {
  flex: 1;
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  padding: 13px 15px;
  outline: none;
  color: var(--stone-800);
  font-size: 0.95rem;
}

.ch-toolbar .search-box input:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.ch-toolbar .search-box button {
  border-radius: 14px;
  border: 1px solid #e7e5e4;
  background: var(--stone-50);
  padding: 12px 18px;
  color: var(--stone-700);
  font-weight: 700;
  cursor: pointer;
}

.ch-toolbar .search-box button:hover {
  background: var(--amber-50);
  color: var(--amber-800);
}

.ch-filters {
  display: grid;
  gap: 10px;
}

.ch-filters__label {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-500);
}

.ch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ch-chip {
  border: 1px solid #e7e5e4;
  background: var(--stone-50);
  color: var(--stone-600);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.ch-chip:hover {
  border-color: var(--amber-300);
  color: var(--amber-800);
}

.ch-chip.is-active {
  background: var(--amber-600);
  border-color: var(--amber-600);
  color: #fff;
}

.ch-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ch-results-head h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  color: var(--stone-800);
}

.ch-results-head p {
  margin: 4px 0 0;
  color: var(--stone-500);
  font-size: 0.9rem;
}

.ch-results-count {
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--amber-50);
  color: var(--amber-800);
  font-weight: 800;
  font-size: 0.86rem;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.ch-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e7e5e4;
}

.ch-page-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.ch-page-btn,
.ch-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: var(--stone-700);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ch-page-num {
  min-width: 40px;
  padding: 0;
}

.ch-page-btn:hover,
.ch-page-num:hover {
  border-color: var(--amber-400);
  color: var(--amber-800);
  background: var(--amber-50);
}

.ch-page-num.is-active {
  background: var(--amber-600);
  border-color: var(--amber-600);
  color: #fff;
  pointer-events: none;
}

.ch-page-btn.is-disabled,
.ch-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  color: var(--stone-400);
  font-weight: 800;
}

.ch-page-btn.is-disabled {
  border: 1px solid #f5f5f4;
  background: #fafaf9;
  cursor: not-allowed;
}

/* ── 分类总览页 ── */
.cat-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.cat-overview-card {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cat-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.1);
}

.cat-overview-card__hero {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.cat-overview-card__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-overview-card__hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 60%);
}

.cat-overview-card__hero h2 {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.cat-overview-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cat-overview-card__body p {
  margin: 0 0 14px;
  color: var(--stone-600);
  font-size: 0.9rem;
  line-height: 1.65;
}

.cat-overview-card__previews {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.cat-overview-card__previews a {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 2/3;
  display: block;
}

.cat-overview-card__previews img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-overview-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cat-overview-card__count {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--stone-500);
}

.cat-overview-card__link {
  color: var(--amber-700);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}

/* ── 播放页 ── */
.play-page {
  background: var(--stone-50);
}

.play-topbar {
  background: #fff;
  border-bottom: 1px solid #e7e5e4;
  padding: 14px max(16px, env(safe-area-inset-left)) 16px max(16px, env(safe-area-inset-right));
}

.play-topbar__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.play-topbar__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--stone-500);
  margin-bottom: 8px;
}

.play-topbar__crumb a {
  color: var(--amber-700);
  text-decoration: none;
}

.play-topbar__crumb a:hover {
  color: var(--amber-900);
}

.play-topbar__title {
  margin: 0;
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 950;
  color: var(--stone-900);
  line-height: 1.3;
}

.play-theater {
  background: #0c0a09;
  padding: 20px max(16px, env(safe-area-inset-left)) 36px max(16px, env(safe-area-inset-right));
}

.play-theater__wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.play-theater__frame {
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.15),
    0 30px 80px rgba(0, 0, 0, 0.55);
  background: #000;
}

.play-theater__video {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  background: #000;
}

.play-theater__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--stone-300);
  font-size: 0.86rem;
  font-weight: 700;
}

.play-theater__bar strong {
  color: #fff;
  font-weight: 900;
}

.play-theater__bar a {
  margin-left: auto;
  color: var(--amber-400);
  text-decoration: none;
  font-weight: 800;
}

.play-theater__bar a:hover {
  color: var(--amber-300);
}

.play-theater__sep {
  opacity: 0.4;
}

.play-theater__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  font-size: 0.78rem;
  font-weight: 900;
}

.play-theater__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
  animation: playPulse 1.8s ease-in-out infinite;
}

@keyframes playPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.85);
  }
}

.play-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px max(16px, env(safe-area-inset-left)) 20px max(16px, env(safe-area-inset-right));
}

.play-body__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.play-body__main {
  display: grid;
  gap: 18px;
}

.play-block {
  background: #fff;
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #f5f5f4;
}

.play-block--accent {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 60%);
  border-color: rgba(217, 119, 6, 0.15);
}

.play-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--stone-800);
}

.play-block h2::before {
  content: '';
  width: 4px;
  height: 1.1em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--amber-500), var(--amber-700));
  flex-shrink: 0;
}

.play-block p {
  margin: 0;
  color: var(--stone-600);
  line-height: 1.9;
  font-size: 1rem;
}

.play-specs {
  margin: 0;
  display: grid;
  gap: 0;
}

.play-specs__row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f4;
}

.play-specs__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.play-specs__row dt {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--stone-500);
}

.play-specs__row dd {
  margin: 0;
  font-weight: 700;
  color: var(--stone-800);
  line-height: 1.6;
}

.play-specs__row dd a {
  color: var(--amber-700);
  text-decoration: none;
}

.play-body__side {
  position: sticky;
  top: 80px;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #f5f5f4;
}

.play-body__side h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--stone-800);
}

.play-pick-list {
  display: grid;
  gap: 10px;
}

.play-pick {
  display: grid;
  grid-template-columns: 28px 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.15s;
}

.play-pick:hover {
  background: var(--amber-50);
}

.play-pick__no {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--amber-600);
  text-align: center;
}

.play-pick__poster {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 2/3;
}

.play-pick__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-pick__info h3 {
  margin: 0 0 4px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--stone-800);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.play-pick__info p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--stone-500);
}

.play-side-link {
  display: block;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f5f5f4;
  color: var(--amber-700);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  text-align: center;
}

.play-more {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-left)) 48px max(16px, env(safe-area-inset-right));
}

.play-more__head {
  margin-bottom: 18px;
}

.play-more__head h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  color: var(--stone-800);
}

.play-more__head p {
  margin: 0;
  color: var(--stone-500);
  font-size: 0.92rem;
}

.play-more .movie-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: max(16px, env(safe-area-inset-left));
  scroll-padding-right: max(16px, env(safe-area-inset-right));
  padding: 4px max(16px, env(safe-area-inset-right)) 16px 2px;
  margin: 0 calc(-1 * max(16px, env(safe-area-inset-left)));
  padding-left: max(16px, env(safe-area-inset-left));
  scrollbar-width: none;
}

.play-more .movie-rail::-webkit-scrollbar {
  display: none;
}

.play-more .rail-cell {
  flex: 0 0 292px;
  scroll-snap-align: start;
}

.play-more .rail-card--related {
  height: 132px;
  align-items: stretch;
  border: 1px solid #f0eeec;
  box-shadow: 0 4px 14px rgba(41, 37, 36, 0.06);
}

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

.play-more .rail-card--related .rail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-more .rail-card--related .rail-info {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 12px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.play-more .rail-card--related .rail-info h3 {
  margin: 0;
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
}

.play-more .rail-card--related .rail-info p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
}

.play-more .rail-card--related .rail-info div {
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 960px) {
  .ch-header__inner {
    grid-template-columns: 1fr;
  }

  .ch-header__visual {
    max-height: 200px;
    aspect-ratio: auto;
  }

  .play-body__grid {
    grid-template-columns: 1fr;
  }

  .play-body__side {
    position: static;
  }
}

@media (max-width: 640px) {
  .ch-switcher {
    top: 64px;
  }

  .ch-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .ch-chips::-webkit-scrollbar {
    display: none;
  }

  .ch-chip {
    flex: 0 0 auto;
  }

  .ch-pagination {
    gap: 8px;
  }

  .ch-page-btn {
    flex: 1;
    min-width: 0;
  }

  .ch-page-list {
    order: 3;
    width: 100%;
    margin-top: 4px;
  }

  .cat-overview-card__previews {
    grid-template-columns: repeat(3, 1fr);
  }

  .play-theater__bar a {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }

  .play-specs__row {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}
