:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(250, 204, 21, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --gold: #facc15;
  --gold-2: #eab308;
  --blue: #1e3a8a;
  --blue-2: #172554;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(250, 204, 21, 0.08), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.20), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0b1120 42%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.header-inner {
  width: min(1240px, calc(100% - 28px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #050505;
  background: var(--gold);
  box-shadow: 0 10px 26px rgba(250, 204, 21, 0.22);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-2);
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.10);
}

.top-search,
.mobile-search,
.search-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search {
  margin-left: auto;
  width: min(360px, 36vw);
}

.top-search input,
.mobile-search input,
.search-panel input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 12px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.search-panel input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.10);
}

.top-search button,
.mobile-search button,
.search-panel button,
.btn-primary,
.btn-ghost,
.ranking-action,
.text-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  white-space: nowrap;
  transition: 0.25s ease;
}

.top-search button,
.mobile-search button,
.search-panel button,
.btn-primary,
.ranking-action {
  color: #050505;
  background: var(--gold);
}

.top-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.btn-primary:hover,
.ranking-action:hover {
  background: #fde047;
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover,
.text-link:hover {
  color: var(--gold);
  border-color: var(--line-strong);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

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

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  overflow: hidden;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-bg::after {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: brightness(0.34) saturate(1.1);
}

.hero-bg::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, #020617 0%, transparent 36%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.62fr);
  align-items: center;
  gap: 42px;
  padding: 70px 0 96px;
}

.eyebrow,
.card-category,
.detail-category,
.card-year,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  color: #050505;
  background: var(--gold);
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.6vw, 54px);
  line-height: 1.08;
}

.hero p,
.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted-2);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-cloud span,
.detail-tags span,
.card-meta span,
.ranking-tags span,
.ranking-tags a {
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-tags span,
.tag-cloud span,
.detail-tags span {
  padding: 8px 12px;
  font-size: 13px;
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.hero-panel-info {
  padding: 22px;
}

.hero-panel-info strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.hero-panel-info span {
  color: var(--gold);
}

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

.hero-dot {
  width: 36px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

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

.section {
  padding: 76px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(23, 37, 84, 0.72), rgba(2, 6, 23, 0.92));
}

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

.section-title h2,
.content-block h2,
.detail-main h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.03em;
}

.section-title p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.70));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(250, 204, 21, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-card-2);
}

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

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 45%);
}

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  color: #050505;
  background: var(--gold);
}

.card-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.66);
}

.rank-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #050505;
  background: var(--gold);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title:hover {
  color: var(--gold);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.ranking-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span,
.ranking-tags span,
.ranking-tags a {
  padding: 6px 9px;
  font-size: 12px;
}

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

.compact-card .card-title {
  font-size: 15px;
}

.compact-card .card-body p {
  min-height: 42px;
  font-size: 13px;
}

.feature-list {
  display: grid;
  gap: 32px;
}

.feature-item {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 34px;
}

.feature-item:nth-child(even) {
  grid-template-columns: 1.1fr 0.9fr;
}

.feature-item:nth-child(even) .feature-cover {
  order: 2;
}

.feature-cover {
  display: block;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.feature-cover img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-cover:hover img {
  transform: scale(1.06);
}

.feature-copy h3 {
  margin: 14px 0;
  font-size: clamp(26px, 3vw, 40px);
}

.feature-copy h3 a:hover {
  color: var(--gold);
}

.feature-copy p {
  color: var(--muted-2);
  line-height: 1.8;
}

.rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
}

.rail .movie-card {
  width: 280px;
  flex: 0 0 280px;
  scroll-snap-align: start;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.category-cover {
  position: relative;
  display: grid;
  min-height: 190px;
  align-items: end;
  padding: 24px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(30, 58, 138, 0.38));
}

.category-cover strong {
  position: relative;
  z-index: 1;
  font-size: 28px;
}

.category-content {
  padding: 22px;
}

.category-content p {
  margin: 0 0 14px;
  color: var(--muted-2);
  line-height: 1.7;
}

.category-content ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.category-content li a {
  color: var(--muted);
}

.category-content li a:hover {
  color: var(--gold);
}

.text-link {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.page-hero {
  padding: 86px 0 54px;
  background:
    radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.10), transparent 30rem),
    linear-gradient(135deg, rgba(23, 37, 84, 0.86), rgba(2, 6, 23, 0.86));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 72px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 26px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.06);
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #050505;
  background: var(--gold);
}

.empty-state {
  display: none;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  color: var(--muted-2);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 92px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  transition: 0.24s ease;
}

.ranking-row:hover {
  transform: translateX(3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 60px rgba(250, 204, 21, 0.10);
}

.ranking-poster {
  display: block;
  width: 92px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

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

.ranking-number {
  color: var(--gold);
  font-size: 32px;
  font-weight: 950;
  text-align: center;
}

.ranking-title {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.ranking-title:hover {
  color: var(--gold);
}

.ranking-info p {
  margin: 0 0 12px;
  color: var(--muted-2);
  line-height: 1.7;
}

.detail-wrap {
  padding: 34px 0 80px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  position: relative;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #050505;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18));
  transition: 0.25s ease;
}

.player-cover span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  color: #050505;
  font-size: 36px;
  background: var(--gold);
  box-shadow: 0 18px 60px rgba(250, 204, 21, 0.34);
}

.movie-player.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
}

.movie-player.player-error .player-message {
  display: block;
}

.detail-side {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.detail-side h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.08;
}

.detail-category {
  padding: 8px 12px;
  color: #050505;
  background: var(--gold);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted-2);
}

.detail-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-side p,
.content-block p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.82;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 34px;
}

.content-block {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.70);
}

.content-block + .content-block {
  margin-top: 22px;
}

.content-block h2 {
  margin-bottom: 16px;
}

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

.related-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  transition: 0.24s ease;
}

.related-link:hover {
  background: rgba(250, 204, 21, 0.10);
}

.related-link img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.related-link strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-link span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 38px 0;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 22px;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.06);
}

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

.footer-bottom {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-card].is-hidden {
  display: none;
}

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

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

  .hero-content,
  .detail-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel img {
    height: 360px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

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

  .header-inner {
    height: 64px;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 72px 0 90px;
  }

  .hero-panel {
    display: none;
  }

  .section-title,
  .footer-grid,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .feature-item,
  .feature-item:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .feature-item:nth-child(even) .feature-cover {
    order: initial;
  }

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

  .ranking-poster {
    width: 72px;
  }

  .ranking-number,
  .ranking-action {
    display: none;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner {
    width: min(100% - 22px, 1200px);
  }

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

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

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

  .hero h2 {
    font-size: 30px;
  }

  .section {
    padding: 54px 0;
  }

  .detail-side,
  .content-block {
    padding: 20px;
  }

  .player-cover span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
