:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(30, 41, 59, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --cyan: #22d3ee;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 4%, rgba(251, 191, 36, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(34, 211, 238, 0.12), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

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(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1240px, calc(100% - 28px));
  min-height: 70px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr minmax(230px, 320px);
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.site-logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 30px rgba(251, 191, 36, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--amber);
  background: rgba(148, 163, 184, 0.1);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.header-search,
.wide-search {
  position: relative;
}

.site-search,
.page-filter {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search:focus,
.page-filter:focus {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 80;
  display: none;
  max-height: 410px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: block;
}

.search-results a,
.search-empty {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-results a:last-child,
.search-empty:last-child {
  border-bottom: 0;
}

.search-results strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
}

.search-results span,
.search-empty {
  color: var(--muted);
  font-size: 12px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.28;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.55) 100%),
    radial-gradient(circle at 20% 42%, rgba(251, 191, 36, 0.22), transparent 34rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
  gap: 46px;
  align-items: center;
  padding: 78px 0 86px;
}

.hero-kicker,
.detail-kicker,
.page-title span,
.section-heading span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  color: #ffffff;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 20px);
}

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

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

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

.button.primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 16px 34px rgba(251, 191, 36, 0.22);
}

.button.ghost {
  border: 1px solid var(--line);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.6);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

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

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

.hero-dot.active {
  width: 54px;
  background: var(--amber);
}

.search-band {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.48);
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding: 28px 0;
}

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

.search-band h2 {
  font-size: 28px;
}

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

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

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  color: #ffffff;
  line-height: 1.15;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

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

.inline-heading {
  margin-bottom: 18px;
}

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

.category-movie-grid {
  align-items: stretch;
}

.movie-card {
  display: block;
  min-width: 0;
  height: 100%;
}

.movie-card article {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover article {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.52);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.movie-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.78) 100%);
}

.movie-year {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--amber);
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.movie-tags,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-tags {
  margin-top: 10px;
}

.movie-tags span,
.detail-tags span,
.filter-chip {
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(51, 65, 85, 0.45);
  font-size: 12px;
}

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

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

.category-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.74));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.48);
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.category-info {
  padding: 16px;
}

.category-info h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 20px;
}

.category-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 26px;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: auto 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateX(5px);
  border-color: rgba(251, 191, 36, 0.44);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.rank-card img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-card strong {
  display: block;
  color: #ffffff;
  line-height: 1.3;
}

.rank-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-main {
  padding: 42px 0 70px;
}

.page-title {
  max-width: 820px;
  margin-bottom: 32px;
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-title p {
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: rgba(251, 191, 36, 0.55);
  color: #111827;
  background: var(--amber);
}

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

.detail-main {
  padding: 34px 0 70px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.14), transparent 30rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

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

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-intro p {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--muted-strong);
  font-size: 18px;
}

.player-section {
  margin: 28px 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.82)),
    rgba(2, 6, 23, 0.08);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-orb {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: var(--amber);
  box-shadow: 0 18px 44px rgba(251, 191, 36, 0.28);
  font-size: 34px;
  padding-left: 5px;
}

.detail-content {
  display: grid;
  gap: 20px;
}

.detail-content article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.9;
}

.related-section {
  padding-bottom: 0;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
}

.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  padding: 38px 0;
}

.site-footer p {
  max-width: 420px;
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
  align-content: start;
}

.footer-links a {
  color: var(--muted-strong);
  font-size: 14px;
}

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

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

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

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

  .split-section,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .site-header-inner {
    grid-template-columns: auto auto;
    gap: 14px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    justify-self: end;
  }

  .site-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - 70px);
    overflow: auto;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.98);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .header-search {
    grid-column: 1 / -1;
    width: 100%;
    padding-bottom: 12px;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 46px;
  }

  .hero-poster {
    width: min(72vw, 330px);
    margin: 0 auto;
  }

  .search-band-inner,
  .filter-panel,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .ranking-page-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .site-footer-inner,
  .site-header-inner,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

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

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

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

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

  .movie-card p {
    display: none;
  }

  .detail-hero,
  .detail-content article {
    padding: 18px;
    border-radius: 20px;
  }

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

  .play-orb {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
