: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;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, .12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, .10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate-900);
  background: #f8fafc;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(2, 6, 23, .18);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  box-shadow: 0 10px 22px rgba(37, 99, 235, .34);
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 6px;
}

.desktop-nav {
  display: flex;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .82);
  font-weight: 700;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--white);
  background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, .10);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  flex-direction: column;
  align-items: stretch;
}

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

.hero-section {
  background: var(--slate-950);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 52px;
  align-items: center;
  padding: 86px max(32px, calc((100vw - 1180px) / 2)) 118px;
  color: var(--white);
  background-position: center;
  background-size: cover;
  transition: opacity .7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, .24), transparent 34%), radial-gradient(circle at 80% 18%, rgba(255, 255, 255, .08), transparent 28%);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
}

.eyebrow.light {
  background: var(--blue-100);
  color: var(--blue-700);
}

.hero-content h1 {
  margin: 22px 0 0;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.hero-content h2 {
  margin: 18px 0 12px;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.12;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(226, 232, 240, .94);
  font-size: 20px;
}

.hero-tags,
.tag-list,
.detail-tags,
.genre-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span,
.detail-tags a,
.genre-line span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(37, 99, 235, .10);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, .14);
  color: var(--white);
}

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

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  box-shadow: 0 16px 28px rgba(37, 99, 235, .30);
}

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

.btn-ghost-dark {
  color: var(--slate-800);
  background: var(--white);
  border: 1px solid var(--slate-200);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(2, 6, 23, .48);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--slate-800);
}

.hero-poster span {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 16px 30px rgba(37, 99, 235, .36);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, .16);
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  opacity: .65;
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  opacity: 1;
  background: var(--blue-500);
}

.feature-strip {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}

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

.feature-grid article {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #f8fafc;
  border: 1px solid var(--slate-200);
}

.feature-grid strong {
  display: block;
  color: var(--slate-900);
  font-size: 18px;
}

.feature-grid span {
  color: var(--slate-500);
  font-size: 14px;
}

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

.soft-bg {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.left-heading {
  text-align: left;
}

.section-heading h2,
.page-hero h1,
.detail-intro h1 {
  margin: 14px 0 10px;
  color: var(--slate-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--slate-600);
  font-size: 18px;
}

.left-heading p {
  margin-left: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(130px, 180px) minmax(130px, 180px) auto;
  gap: 12px;
  margin-bottom: 30px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.wide-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 160px) minmax(130px, 160px) minmax(130px, 180px);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--slate-800);
  background: #f8fafc;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, .18);
}

.movie-card.is-hidden {
  display: none;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--slate-200);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

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

.poster-badge,
.poster-year,
.rank-mark {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.poster-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  background: var(--blue-600);
}

.poster-year {
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, .76);
}

.rank-mark {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-card:hover .poster-play {
  opacity: 1;
  background: rgba(2, 6, 23, .34);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 56px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--slate-500);
  font-size: 13px;
}

.tag-list {
  margin-top: 12px;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, .20);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

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

.movie-card-compact {
  flex-direction: row;
}

.movie-card-compact .poster-wrap {
  width: 130px;
  min-width: 130px;
  aspect-ratio: 1;
}

.movie-card-compact .poster-year,
.movie-card-compact .tag-list {
  display: none;
}

.movie-card-compact h3 {
  min-height: auto;
  font-size: 16px;
}

.movie-card-compact p {
  min-height: auto;
}

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

.ranking-card {
  padding: 22px;
}

.ranking-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.ranking-card h2,
.side-card h2,
.content-card h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 22px;
}

.ranking-card-head a {
  color: var(--blue-700);
  font-weight: 900;
}

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

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

.rank-row:hover {
  transform: translateX(3px);
  background: #eef2ff;
}

.rank-row b {
  color: var(--blue-700);
  font-size: 18px;
}

.rank-row img {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-200);
}

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

.rank-row em {
  color: var(--slate-500);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 15% 20%, rgba(59, 130, 246, .32), transparent 28%), linear-gradient(135deg, var(--slate-900), #172554 62%, var(--slate-800));
}

.compact-hero {
  padding: 72px 0;
}

.page-hero h1,
.page-hero p {
  color: var(--white);
}

.page-hero p {
  margin-left: 0;
  color: rgba(226, 232, 240, .88);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: rgba(226, 232, 240, .78);
  font-size: 14px;
}

.crumbs a:hover {
  color: var(--white);
}

.category-overview-list {
  display: grid;
  gap: 28px;
  padding: 60px 0;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.category-overview-cover {
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.category-overview-cover span {
  font-size: 28px;
  font-weight: 900;
}

.category-overview-body {
  padding: 28px;
}

.category-overview-body h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-overview-body p {
  margin: 0 0 22px;
  color: var(--slate-600);
}

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

.detail-hero {
  padding: 54px 0;
  color: var(--white);
  background: radial-gradient(circle at 12% 22%, rgba(59, 130, 246, .30), transparent 32%), linear-gradient(135deg, var(--slate-950), #172554 60%, var(--slate-800));
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, .45);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--slate-800);
}

.detail-intro h1 {
  color: var(--white);
}

.detail-intro p {
  max-width: 820px;
  margin: 0 0 22px;
  color: rgba(226, 232, 240, .90);
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  font-weight: 800;
}

.detail-tags a {
  color: var(--white);
  background: rgba(255, 255, 255, .14);
}

.player-section {
  background: #f8fafc;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-soft);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, .16), rgba(2, 6, 23, .72));
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 18px 36px rgba(37, 99, 235, .40);
  font-size: 34px;
}

.play-text {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-weight: 900;
}

.content-card {
  margin-top: 24px;
  padding: 28px;
}

.content-card h2 + p {
  margin-top: 10px;
}

.content-card p {
  margin: 0 0 24px;
  color: var(--slate-700);
  font-size: 17px;
}

.genre-line {
  padding-top: 4px;
}

.side-card {
  padding: 22px;
}

.side-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

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

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

.sticky-rank {
  position: sticky;
  top: 92px;
}

.site-footer {
  color: rgba(226, 232, 240, .88);
  background: var(--slate-950);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, .18);
  text-align: center;
  color: rgba(226, 232, 240, .72);
}

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

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

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

  .sticky-rank {
    position: static;
  }
}

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

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

  .hero-slider {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 64px 20px 110px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
    transform: none;
  }

  .feature-grid,
  .footer-inner,
  .category-overview-card,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .wide-filter {
    grid-template-columns: 1fr;
  }

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

  .movie-list-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

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

  .category-overview-cover {
    min-height: 220px;
  }

  .detail-poster {
    width: min(240px, 70vw);
  }
}

@media (max-width: 540px) {
  .container,
  .header-inner,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content p,
  .detail-intro p {
    font-size: 16px;
  }

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

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

  .movie-card-compact .poster-wrap {
    width: 112px;
    min-width: 112px;
  }

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

  .compact-hero,
  .detail-hero {
    padding: 48px 0;
  }

  .rank-row {
    grid-template-columns: 28px 46px minmax(0, 1fr);
  }

  .rank-row em {
    display: none;
  }
}
