:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --yellow-300: #fde047;
  --yellow-400: #facc15;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--red-600), var(--red-700));
  box-shadow: 0 10px 28px rgba(153, 27, 27, 0.22);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--red-800);
  background: var(--yellow-300);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.nav-link {
  position: relative;
  padding: 21px 0;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--yellow-300);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--red-700);
}

.mobile-nav-inner {
  display: grid;
  gap: 4px;
  padding: 10px 0 14px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 570px;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.25), transparent 30%), linear-gradient(135deg, var(--red-900), var(--red-700) 52%, var(--slate-950));
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.10)), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18), transparent 28%);
}

.hero-inner {
  position: relative;
  min-height: 570px;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.65fr;
  align-items: center;
  gap: 48px;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--yellow-300);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(18px, 2.2vw, 25px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--red-800);
  background: #fee2e2;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy .hero-tags span,
.page-hero .hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: var(--gray-800);
  background: var(--yellow-400);
  box-shadow: 0 16px 30px rgba(250, 204, 21, 0.28);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  padding: 10px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 34px -22px -22px 34px;
  z-index: -1;
  border-radius: 30px;
  background: rgba(250, 204, 21, 0.35);
  filter: blur(8px);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 96px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--yellow-300);
}

.hero-search {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  display: flex;
  max-width: 620px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-panel input {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: var(--gray-800);
  background: var(--white);
  font-size: 16px;
}

.hero-search button {
  min-width: 108px;
  border: 0;
  color: var(--gray-800);
  background: var(--yellow-400);
  font-weight: 900;
  cursor: pointer;
}

.feature-strip {
  margin-top: -28px;
  position: relative;
  z-index: 2;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.strip-grid div {
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  text-align: center;
}

.strip-grid strong {
  color: var(--red-700);
  font-size: 30px;
  line-height: 1;
}

.strip-grid span {
  color: var(--gray-500);
  font-weight: 700;
}

.section-block {
  padding: 72px 0;
}

.section-soft {
  background: linear-gradient(135deg, var(--gray-50), #fff1f2);
}

.section-dark {
  color: var(--white);
  background: var(--slate-800);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.left {
  margin-left: 0;
  text-align: left;
}

.section-heading h2 {
  margin: 0 0 10px;
  color: var(--gray-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-dark .section-heading h2 {
  color: var(--white);
}

.section-heading p {
  margin: 0;
  color: var(--gray-500);
  font-size: 18px;
}

.section-dark .section-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.filter-panel {
  max-width: 720px;
  margin: 0 auto 28px;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.movie-grid,
.mini-grid,
.category-grid {
  display: grid;
  gap: 20px;
}

.movie-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--soft-shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-200), #fee2e2);
}

.poster-wrap img,
.rank-card img,
.category-card img,
.detail-cover img,
.channel-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform 0.25s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0);
  font-size: 42px;
  opacity: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  background: rgba(0, 0, 0, 0.34);
}

.card-content {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-meta {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--gray-800);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-content p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dark-grid .movie-card,
.section-dark .movie-card {
  color: var(--white);
  background: var(--slate-900);
}

.section-dark .card-title {
  color: var(--white);
}

.category-card {
  position: relative;
  min-height: 210px;
  display: flex;
  align-items: end;
  overflow: hidden;
  padding: 20px;
  border-radius: 22px;
  color: var(--white);
  background: var(--slate-900);
  box-shadow: var(--soft-shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.58;
  transition: transform 0.25s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.category-card span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.category-card strong {
  font-size: 24px;
}

.category-card small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

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

.rank-card {
  position: relative;
  min-height: 102px;
  display: grid;
  grid-template-columns: 54px 68px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
}

.rank-card:hover {
  transform: translateY(-3px);
}

.rank-number {
  color: var(--red-700);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-card img {
  width: 68px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background: var(--gray-200);
}

.rank-info {
  display: grid;
  gap: 4px;
}

.rank-info strong {
  color: var(--gray-800);
  font-size: 16px;
}

.rank-info small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-500);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.section-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--red-700);
  font-weight: 900;
}

.page-hero {
  padding: 76px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-900), var(--red-600));
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  align-items: center;
  gap: 36px;
}

.channel-hero img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.breadcrumb-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 14px;
  white-space: nowrap;
}

.breadcrumb a:hover {
  color: var(--red-700);
}

.detail-layout {
  display: grid;
  gap: 28px;
  padding: 42px 0 72px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: var(--red-800);
  background: var(--yellow-400);
  font-size: 38px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.play-overlay.is-hidden {
  display: none;
}

.player-message {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  transform: translate(-50%, -50%);
  color: var(--white);
  background: rgba(127, 29, 29, 0.86);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
}

.player-card.player-error .player-message {
  display: block;
}

.detail-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: var(--gray-200);
}

.detail-info h1 {
  color: var(--gray-800);
}

.lead {
  margin: 18px 0;
  color: var(--gray-700);
  font-size: 20px;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  color: var(--gray-500);
  font-weight: 700;
}

.detail-meta a {
  color: var(--red-700);
}

.text-panel {
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.text-panel h2 {
  margin: 0 0 14px;
  color: var(--gray-800);
  font-size: 28px;
}

.text-panel p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.related-block {
  padding: 24px 0 0;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: var(--slate-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-links a:hover {
  color: var(--yellow-300);
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .split-layout,
  .full-rank {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero-carousel,
  .hero-inner {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 72vw);
  }

  .hero-dots {
    bottom: 104px;
  }

  .strip-grid,
  .footer-grid,
  .page-hero-grid,
  .detail-card {
    grid-template-columns: 1fr;
  }

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

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

  .detail-cover {
    width: min(220px, 100%);
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search button {
    min-height: 48px;
  }

  .movie-grid,
  .mini-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-content {
    padding: 11px;
  }

  .card-title {
    font-size: 14px;
  }

  .rank-card {
    grid-template-columns: 44px 58px 1fr;
    gap: 10px;
  }
}
