/* 全站布局修复 · 对齐 / 溢出 / 轮播 / 内页 */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  line-height: 1.5;
}

/* —— 轮播 —— */
.hero-section,
.an-hero {
  position: relative;
  isolation: isolate;
}

.hero-section .hero-slide,
.an-hero .hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-section .hero-slide.active,
.an-hero .hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.hero-tags span,
.tag-cloud span,
.tag-cloud a {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.3;
}

.hero-visual {
  display: block;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.75rem 0.75rem 0.6rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  font-size: 0.78rem;
  line-height: 1.3;
  pointer-events: none;
}

.hero-caption strong {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-caption em {
  font-style: normal;
  opacity: 0.85;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 0.35rem;
}

.movie-card h3,
.movie-card p {
  overflow-wrap: anywhere;
}

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

.movie-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.45;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.card-actions span {
  font-size: 0.72rem;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45%;
}

/* —— 区块标题 —— */
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.section-head > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.section-head h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.section-head a {
  font-size: 0.86rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.section-block {
  margin-bottom: 2rem;
  clear: both;
}

/* —— 分类卡片 —— */
.category-tile,
.overview-card {
  display: block;
  min-width: 0;
}

.category-tile strong,
.overview-main strong {
  display: block;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.category-tile span,
.overview-main span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.5;
}

.category-grid.large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

/* —— 分类色块（portal） —— */
.home-pop-cats__card {
  min-width: 0;
  text-align: left;
}

.home-pop-cats__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— 内页 —— */
.player-section {
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border-radius: 14px;
}

.player-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.content-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.prose-card p {
  line-height: 1.65;
  margin: 0 0 1rem;
}

.side-meta ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-meta li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
  font-size: 0.88rem;
}

.side-link {
  display: block;
  text-align: center;
  margin-top: 0.85rem;
  padding: 0.55rem;
  border-radius: 999px;
  font-weight: 700;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
}

.rank-panel .movie-grid {
  width: 100%;
}

.video-error[hidden] {
  display: none !important;
}

/* —— Portal 网格统一 —— */
.cq-card-grid,
.cq-card-grid--dense,
.cq-card-grid--wall {
  width: 100%;
  min-width: 0;
}

.cq-card-grid--hot-row {
  scrollbar-width: thin;
}

.cq-card-grid--hot-row::-webkit-scrollbar {
  height: 6px;
}

.tuy-card__title a {
  color: inherit;
}

.tuy-card__meta {
  flex-wrap: wrap;
}

/* —— 响应式 —— */
@media (max-width: 900px) {
  .category-grid.large {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero-section,
  .an-hero {
    min-height: 560px !important;
  }

  .hero-section .hero-slide,
  .an-hero .hero-slide {
    grid-template-columns: 1fr !important;
    overflow-y: auto;
    align-content: start;
    padding-bottom: 3.5rem !important;
  }

  .hero-visual {
    order: -1;
    max-height: 220px;
  }

  .hero-visual img {
    max-height: 220px;
    object-fit: cover;
  }
}

@media (max-width: 480px) {
  .hero-section,
  .an-hero {
    min-height: 500px !important;
  }
}
