:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --amber-300: #fcd34d;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
  --shadow-deep: 0 30px 80px rgba(2, 6, 23, 0.45);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(31, 41, 55, 0.96));
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red-600), var(--red-900));
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.35);
}

.brand-text {
  font-size: 20px;
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: #e5e7eb;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.6fr);
  align-items: center;
  gap: 48px;
  padding: 92px max(24px, calc((100vw - 1280px) / 2 + 24px)) 70px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(127, 29, 29, 0.55) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 220px;
  background: linear-gradient(180deg, transparent, #f8fafc);
}

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

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.page-hero span,
.detail-kicker,
.section-heading span,
.feature-panel span {
  display: inline-flex;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  color: var(--white);
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 700px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  margin: 0 0 22px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
}

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

.hero-poster {
  max-width: 380px;
  justify-self: end;
  border-radius: 28px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(18px);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
}

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

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 9px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.12;
}

.section-heading a {
  color: var(--red-700);
  font-weight: 800;
}

.center-heading {
  max-width: 780px;
  margin: 0 auto 24px;
  text-align: center;
  display: block;
}

.center-heading p {
  color: var(--slate-600);
  line-height: 1.8;
  margin: 12px 0 0;
}

.compact-heading {
  align-items: center;
}

.search-hero {
  margin-top: -34px;
  position: relative;
  z-index: 6;
}

.search-box {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.wide-search {
  max-width: 760px;
  margin: 0 auto;
}

.sticky-search {
  position: sticky;
  top: 82px;
  z-index: 20;
  margin-bottom: 28px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: #f8fafc;
  border-radius: 12px;
  padding: 0 16px;
  color: var(--slate-900);
  font-size: 16px;
}

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

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

.channel-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  color: var(--white);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--slate-900), var(--red-900));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.channel-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -60px;
  bottom: -80px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.channel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}

.channel-card strong {
  position: relative;
  z-index: 1;
  font-size: 22px;
}

.channel-card span {
  position: relative;
  z-index: 1;
  color: #e5e7eb;
  line-height: 1.7;
}

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

.all-movie-grid {
  align-items: start;
}

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--slate-900);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--white);
  background: rgba(220, 38, 38, 0.92);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--red-700);
}

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.6;
}

.tag-row span {
  color: var(--red-800);
  background: #fef2f2;
  border-color: #fee2e2;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.ranking-panel,
.feature-panel,
.content-card,
.meta-card,
.side-recommend {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-panel {
  padding: 26px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #fff1f2;
  transform: translateX(4px);
}

.rank-num {
  color: var(--red-700);
  font-size: 20px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-type {
  color: var(--slate-500);
  font-size: 13px;
}

.feature-panel {
  min-height: 380px;
  padding: 36px;
  color: var(--white);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(153, 27, 27, 0.94));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-panel h2 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 48px);
}

.feature-panel p {
  color: #e5e7eb;
  line-height: 1.8;
  margin: 0 0 26px;
}

.page-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 74px max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: var(--white);
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(127, 29, 29, 0.72)), var(--page-image, linear-gradient(135deg, #0f172a, #7f1d1d));
  background-size: cover;
  background-position: center;
}

.compact-page-hero {
  min-height: 280px;
  background: linear-gradient(135deg, var(--slate-900), var(--red-900));
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 720px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--slate-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--red-700);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  color: var(--white);
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(127, 29, 29, 0.58)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 68px 22px;
}

.detail-poster {
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-deep);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
}

.detail-info p {
  max-width: 840px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.8;
}

.detail-breadcrumb {
  color: #cbd5e1;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-shell {
  border-radius: var(--radius-xl);
  padding: 24px;
  color: var(--white);
  background: var(--slate-950);
  box-shadow: var(--shadow-deep);
}

.player-shell h2 {
  margin: 0 0 18px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(220, 38, 38, 0.18), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.38);
}

.content-card {
  padding: 26px;
}

.content-card h2,
.meta-card h2,
.side-recommend h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.9;
  font-size: 16px;
}

.inline-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-links a {
  color: var(--red-700);
  background: #fef2f2;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}

.detail-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 96px;
}

.meta-card,
.side-recommend {
  padding: 22px;
}

.meta-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.meta-card div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-200);
}

.meta-card dt {
  color: var(--slate-500);
  font-weight: 800;
}

.meta-card dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

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

.side-card-list .movie-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
}

.side-card-list .poster-link img {
  height: 100%;
}

.side-card-list .movie-card-body {
  padding: 12px;
}

.side-card-list .movie-card h3 {
  font-size: 15px;
}

.side-card-list .movie-card p,
.side-card-list .tag-row {
  display: none;
}

.ranking-page-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.wide-ranking {
  padding: 22px;
}

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

.site-footer {
  margin-top: 36px;
  color: #e5e7eb;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 22px;
}

.footer-inner p {
  max-width: 680px;
  color: #cbd5e1;
  line-height: 1.7;
}

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

.footer-links a {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .detail-layout,
  .ranking-page-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-slide {
    padding: 82px 20px 74px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .section-wrap {
    padding: 42px 16px;
  }

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

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

  .section-heading {
    display: block;
  }

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

  .search-box input {
    min-height: 46px;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 44px 16px;
  }

  .detail-poster {
    max-width: 220px;
  }

  .rank-list-large {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: block;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-type {
    display: none;
  }
}
