:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #eef2ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-dark: rgba(15, 23, 42, 0.78);
  --brand: #f59e0b;
  --brand-strong: #f97316;
  --accent: #7c3aed;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 45%, #f8fafc 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 1.45rem;
  background: linear-gradient(90deg, #facc15, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #facc15;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input {
  width: 180px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 6px 8px 12px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.header-search button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.header-search button,
.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.25);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  font-size: 1.2rem;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 10px;
  color: rgba(255, 255, 255, 0.85);
}

main {
  min-height: 60vh;
}

.home-hero,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.32), transparent 35%), linear-gradient(135deg, #0f172a 0%, #3b0764 50%, #111827 100%);
}

.home-hero {
  min-height: 720px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 48px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 132px;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide::before,
.page-hero::before,
.detail-hero::before,
.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, var(--detail-bg, var(--tile-image)));
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  filter: blur(2px) saturate(1.15);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.86));
}

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

.eyebrow {
  margin: 0 0 10px;
  color: #facc15;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  line-height: 1.9;
}

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

.hero-tags span,
.detail-tags span,
.tag-list span {
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 10px;
  font-size: 0.78rem;
}

.tag-list span {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

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

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dots button.active {
  width: 42px;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.hero-stats {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: min(980px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-stats div {
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.hero-stats strong {
  display: block;
  color: #facc15;
  font-size: 1.9rem;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.85rem;
}

.section-block {
  width: min(1240px, calc(100% - 32px));
  margin: 52px auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.06em;
}

.section-heading > a {
  color: var(--brand-strong);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #1e293b, #3b0764);
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
}

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

.category-tile span {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 6px;
  color: #facc15;
}

.category-tile em {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  font-style: normal;
}

.dark-section {
  width: 100%;
  max-width: none;
  margin: 64px 0;
  padding: 64px max(16px, calc((100vw - 1240px) / 2));
  color: #fff;
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 28%), linear-gradient(135deg, #0f172a, #111827 55%, #312e81);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dark-section .movie-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 7px 9px;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--brand-strong);
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.dark-section .movie-meta,
.dark-section .movie-line {
  color: rgba(255, 255, 255, 0.65);
}

.compact-card .movie-line {
  display: none;
}

.page-hero {
  min-height: 340px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 16px;
}

.simple-hero {
  background: radial-gradient(circle at top, rgba(249, 115, 22, 0.26), transparent 36%), linear-gradient(135deg, #0f172a, #312e81);
}

.simple-hero p {
  margin-left: auto;
  margin-right: auto;
}

.category-hero {
  text-align: left;
  place-items: center start;
  padding-left: max(16px, calc((100vw - 1240px) / 2));
}

.category-hero .page-hero-content {
  width: min(760px, calc(100% - 32px));
}

.filter-panel {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-row {
  display: flex;
  gap: 12px;
}

.filter-row input,
.filter-row select {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
}

.filter-row input {
  flex: 1;
}

.filter-count {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-cover img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: 18px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.category-overview-card p {
  color: var(--muted);
}

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

.small-link-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
}

.small-link-card img {
  width: 54px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.small-link-card strong,
.small-link-card em {
  display: block;
}

.small-link-card em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.detail-hero {
  min-height: 560px;
}

.detail-hero::before {
  opacity: 0.2;
}

.detail-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: center;
  min-height: 560px;
  padding: 72px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: #facc15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  margin-top: -80px;
  position: relative;
  z-index: 10;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 35px 90px rgba(2, 6, 23, 0.32);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.6));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  font-size: 2rem;
  box-shadow: 0 18px 50px rgba(249, 115, 22, 0.35);
}

.player-start strong {
  margin-top: 104px;
  font-size: 1rem;
}

.player-shell.playing .player-start {
  display: none;
}

.player-note {
  color: var(--muted);
  text-align: center;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.detail-article,
.detail-sidebox,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.detail-article p {
  color: #334155;
  line-height: 2;
}

.detail-sidebox dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px 14px;
}

.detail-sidebox dt {
  color: var(--muted);
}

.detail-sidebox dd {
  margin: 0;
  font-weight: 800;
}

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

.prev-next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.prev-next-links a {
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--brand-strong);
  background: #fff7ed;
  font-weight: 800;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table th,
.rank-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
}

.rank-table th {
  color: #475569;
  font-size: 0.86rem;
}

.rank-table a {
  color: #ea580c;
  font-weight: 800;
}

.site-footer {
  margin-top: 80px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 36px;
  padding: 54px 0;
}

.site-footer h3 {
  color: #facc15;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
}

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

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

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

  .header-search {
    margin-left: auto;
  }

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

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

@media (max-width: 860px) {
  .header-search {
    display: none;
  }

  .home-hero {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 46px 0 150px;
  }

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

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

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

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

  .detail-poster {
    width: min(280px, 80vw);
    margin: 0 auto;
  }

  .detail-info h1,
  .hero-content h1 {
    font-size: clamp(2.2rem, 15vw, 4rem);
  }

  .filter-row {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .brand-text {
    font-size: 1.15rem;
  }

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

  .category-grid,
  .rank-strip,
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .dark-section {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .player-section {
    margin-top: -40px;
  }
}
