* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --cyan-700: #0e7490;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --cyan-100: #cffafe;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  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-950), var(--slate-900) 48%, var(--slate-800));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.28);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-600));
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  color: var(--white);
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: var(--slate-400);
  font-style: normal;
  font-size: 0.78rem;
  margin-top: 4px;
}

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

.nav-link,
.mobile-link {
  color: var(--slate-300);
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--white);
  background: rgba(148, 163, 184, 0.16);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.14);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.26), transparent 28%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 76vh;
  padding-bottom: 92px;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.hero-kicker,
.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-kicker {
  margin-bottom: 18px;
}

.hero-kicker a,
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--cyan-500);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-kicker a {
  padding: 6px 14px;
  font-size: 0.92rem;
}

.hero-kicker span {
  color: var(--slate-200);
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--slate-200);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions,
.detail-actions,
.intro-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  background: var(--cyan-500);
  color: var(--white);
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.34);
}

.primary-button:hover {
  background: var(--cyan-600);
  transform: translateY(-2px);
}

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

.ghost-button.dark {
  color: var(--slate-900);
  background: var(--white);
  border-color: var(--slate-200);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan-500);
}

.section {
  padding: 64px 0;
}

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

.section-heading h2,
.content-card h2,
.ranking-aside h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.15;
}

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

.eyebrow {
  margin: 0 0 10px;
  padding: 5px 11px;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.more-link {
  color: var(--cyan-700);
  font-weight: 800;
}

.more-link.light {
  color: var(--cyan-400);
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
  padding: 38px;
  margin-top: -42px;
  position: relative;
  z-index: 4;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.intro-panel h2,
.intro-panel p {
  margin-top: 0;
}

.intro-panel p:last-child {
  margin-bottom: 0;
  color: var(--slate-600);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.search-panel label {
  display: block;
  color: var(--slate-600);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.movie-search,
.sort-select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  padding: 0 14px;
  color: var(--slate-900);
  background: var(--slate-50);
  outline: 0;
}

.movie-search:focus,
.sort-select:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.filter-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--slate-50);
  color: var(--slate-700);
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-btn.is-active,
.filter-btn:hover {
  background: var(--cyan-500);
  color: var(--white);
  border-color: var(--cyan-500);
}

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

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

.movie-grid.single {
  grid-template-columns: 1fr;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-800);
}

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

.movie-card:hover .poster img,
.category-tile:hover img,
.category-cover:hover img,
.rank-thumb:hover img {
  transform: scale(1.06);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.72));
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.94);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: var(--slate-500);
  font-size: 0.84rem;
}

.card-meta a {
  color: var(--cyan-700);
  font-weight: 800;
}

.movie-card h3,
.rank-info h3 {
  margin: 10px 0 8px;
  color: var(--slate-900);
  font-size: 1.18rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
  color: var(--cyan-700);
}

.movie-card p,
.rank-info p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.94rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.78rem;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-width: thin;
}

.movie-list {
  display: grid;
  gap: 16px;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.movie-card.horizontal .poster {
  aspect-ratio: auto;
  min-height: 190px;
}

.dark-section {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.white-section {
  background: var(--white);
}

.category-section {
  background: linear-gradient(135deg, #ecfeff, var(--slate-100));
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.78));
}

.category-tile span,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
}

.category-tile span {
  bottom: 48px;
  font-size: 1.24rem;
  font-weight: 900;
}

.category-tile em {
  bottom: 20px;
  color: var(--slate-200);
  font-style: normal;
  font-size: 0.88rem;
}

.page-hero,
.detail-hero {
  background:
    radial-gradient(circle at 82% 16%, rgba(34, 211, 238, 0.28), transparent 26%),
    linear-gradient(135deg, var(--slate-950), var(--slate-900) 55%, var(--slate-800));
  color: var(--white);
}

.page-hero {
  padding: 82px 0;
}

.page-hero.slim {
  padding: 58px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  color: var(--slate-300);
  margin: 18px 0 0;
}

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

.page-hero-card {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.page-hero-card span,
.page-hero-card strong,
.page-hero-card em {
  display: block;
}

.page-hero-card span {
  color: var(--cyan-400);
  font-weight: 800;
}

.page-hero-card strong {
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1.1;
}

.page-hero-card em {
  margin-top: 12px;
  color: var(--slate-300);
  font-style: normal;
}

.category-overview-list {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: stretch;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.category-cover {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 18px;
  background: var(--slate-900);
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.8));
}

.category-cover span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 900;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 118px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.dark-section .rank-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.dark-section .rank-info h3,
.dark-section .card-meta,
.dark-section .rank-info p {
  color: var(--white);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-600));
  color: var(--white);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--slate-900);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.ranking-aside {
  position: sticky;
  top: 96px;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.ranking-aside h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.detail-hero {
  padding: 38px 0 52px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 30px;
  align-items: center;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: var(--slate-950);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--slate-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.72));
  color: var(--white);
  font-weight: 900;
  font-size: 1.12rem;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--cyan-500);
  box-shadow: 0 20px 44px rgba(6, 182, 212, 0.35);
  font-size: 2.1rem;
  padding-left: 5px;
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-300);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--cyan-400);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--slate-200);
}

.detail-one-line {
  color: var(--slate-200);
  font-size: 1.06rem;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.content-card p {
  margin: 14px 0 0;
  color: var(--slate-700);
}

.is-hidden-card {
  display: none !important;
}

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

  .mobile-menu-button {
    display: block;
  }

  .movie-grid,
  .movie-grid.four,
  .rank-grid.compact,
  .ranking-layout,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-layout {
    align-items: stretch;
  }

  .ranking-aside {
    position: static;
  }
}

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

  .brand-text em {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding-bottom: 76px;
  }

  .intro-panel,
  .search-panel,
  .movie-card.horizontal,
  .movie-grid,
  .movie-grid.four,
  .movie-grid.mini,
  .rank-grid.compact,
  .ranking-layout,
  .detail-grid,
  .detail-content,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 44px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro-panel {
    padding: 24px;
  }

  .intro-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .movie-card.horizontal .poster {
    aspect-ratio: 16 / 10;
    min-height: auto;
  }

  .rank-item {
    grid-template-columns: 44px 86px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .page-hero,
  .detail-hero {
    padding: 52px 0;
  }

  .player-card {
    border-radius: 18px;
  }

  .content-card {
    padding: 22px;
  }
}
