:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --dark: #020617;
  --slate: #334155;
  --accent: #111827;
  --accent-2: #475569;
  --radius: 18px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

body.is-nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, #020617, #475569);
  box-shadow: var(--shadow-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--slate);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
}

.hero-section {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: white;
  background: radial-gradient(circle at 20% 10%, #64748b, #0f172a 48%, #020617 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-visual {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.2)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(0.92);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 55%);
}

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

.hero-copy {
  max-width: 690px;
  padding: 90px 0 140px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-movie-title {
  font-size: clamp(28px, 4vw, 48px) !important;
  letter-spacing: -0.04em !important;
  color: #f8fafc;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #0f172a;
  background: white;
  box-shadow: var(--shadow-soft);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.text-link {
  min-height: 0;
  padding: 0;
  color: var(--accent);
}

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

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

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

.hero-card-strip {
  position: relative;
  z-index: 5;
  margin-top: -96px;
  margin-bottom: 72px;
}

.search-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}

.search-band h2,
.search-band p {
  margin: 0;
}

.search-band p {
  color: var(--muted);
}

.search-panel {
  display: flex;
  gap: 12px;
  width: 100%;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.search-panel input:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.18);
}

.search-panel button {
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--accent);
  cursor: pointer;
}

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

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

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-heading > a {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.72));
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: white;
  box-shadow: var(--shadow-soft);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
}

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

.movie-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.movie-title:hover {
  color: var(--accent-2);
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-line {
  margin-top: 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

.large-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 20px;
  color: white;
  box-shadow: var(--shadow-soft);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.78));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile strong {
  font-size: 20px;
  font-style: normal;
}

.category-tile em {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-style: normal;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 42px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.compact-rank-list .rank-row {
  grid-template-columns: 60px 34px minmax(0, 1fr);
}

.compact-rank-list .rank-row-action {
  display: none;
}

.rank-row-cover {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.rank-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-row-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--accent);
  text-align: center;
}

.rank-row-title {
  display: inline-block;
  font-weight: 800;
  font-size: 18px;
}

.rank-row-main p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-row-action {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  color: white;
  background: var(--accent);
  font-weight: 700;
}

.inner-hero {
  padding: 78px 0 64px;
  color: white;
  background: radial-gradient(circle at 12% 18%, #64748b, #1e293b 44%, #020617 100%);
}

.inner-hero .container {
  max-width: 980px;
}

.inner-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.inner-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 18px;
}

.inner-hero .search-panel {
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

.category-overview-list {
  padding: 54px 0;
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-mosaic img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-copy h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-copy p {
  margin: 0 0 16px;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(0.92);
  opacity: 0.42;
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 44px 0 54px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-meta {
  margin: 0 0 16px;
  color: #cbd5e1;
  font-size: 17px;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 19px;
}

.detail-copy .primary-button {
  margin-top: 22px;
}

.player-section {
  padding-top: 46px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: #020617;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: white;
  box-shadow: var(--shadow);
  font-size: 32px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 46px 0 10px;
  align-items: start;
}

.detail-article,
.detail-side-card {
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.detail-article h2,
.detail-side-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.detail-article p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 17px;
}

.detail-side-card dl {
  margin: 0 0 20px;
}

.detail-side-card dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-side-card dd {
  margin: 0 0 12px;
  font-weight: 700;
}

.empty-state {
  margin-top: 22px;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 64px;
  padding: 50px 0 22px;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 32px;
}

.footer-logo {
  color: white;
  font-size: 24px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 17px;
}

.site-footer p {
  max-width: 560px;
  margin: 14px 0 0;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: white;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

[hidden],
[data-movie-card].is-filtered {
  display: none !important;
}

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

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

  .split-section,
  .detail-content-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 74px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  body.is-nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero-section,
  .hero-content {
    min-height: 600px;
  }

  .hero-copy {
    padding: 70px 0 136px;
  }

  .hero-card-strip {
    margin-top: -72px;
  }

  .search-band,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .search-panel button {
    width: 100%;
  }

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

  .category-overview-card {
    padding: 16px;
  }

  .category-mosaic {
    grid-template-columns: repeat(4, 1fr);
  }

  .rank-row,
  .compact-rank-list .rank-row {
    grid-template-columns: 64px 34px minmax(0, 1fr);
  }

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

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

  .detail-article,
  .detail-side-card {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .container,
  .site-header-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .movie-grid.three-cols,
  .movie-grid.two-cols,
  .movie-grid.mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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

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