:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --card: #ffffff;
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --accent: #db2777;
  --hot: #f97316;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 36rem),
    radial-gradient(circle at top right, rgba(219, 39, 119, 0.10), transparent 30rem),
    var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.96), rgba(219, 39, 119, 0.96), rgba(239, 68, 68, 0.96));
  color: #fff;
  box-shadow: 0 16px 40px rgba(91, 33, 182, 0.25);
  backdrop-filter: blur(20px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  font-weight: 900;
}

.brand-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.main-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.page-search button,
.primary-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--hot));
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}

.nav-search button {
  padding: 8px 14px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: #0f1027;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 96px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(26px) brightness(0.45) saturate(1.25);
  transform: scale(1.08);
}

.hero::before,
.detail-hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(250, 204, 21, 0.20), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.82), rgba(190, 24, 93, 0.78));
  z-index: -1;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.10);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-label {
  background: rgba(255, 255, 255, 0.16);
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.10);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

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

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

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

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}

.ghost-button,
.section-link,
.text-link {
  border: 0;
  color: var(--primary-dark);
  background: rgba(124, 58, 237, 0.10);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(18px);
}

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

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-control button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  min-height: 10px;
  padding: 0;
  opacity: 0.55;
}

.hero-dot.active {
  width: 28px !important;
  border-radius: 999px;
  opacity: 1;
  background: #fff;
}

.intro-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  margin-top: -42px;
  padding: 30px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.intro-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
}

.intro-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

section.container {
  padding: 52px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--line);
}

.page-search {
  display: flex;
  gap: 10px;
}

.page-search input,
.filter-select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  outline: 0;
  padding: 0 16px;
}

.page-search input {
  flex: 1;
}

.page-search button {
  padding: 0 22px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

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

.category-card,
.category-overview-card,
.movie-card,
.ranking-row,
.player-card,
.detail-article,
.detail-side {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 214px;
  border-radius: 28px;
  padding: 24px;
  color: #fff;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.84));
  z-index: 1;
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-top: 82px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.16);
}

.poster-badge,
.score-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.poster-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.score-badge {
  right: 12px;
  color: #1f2937;
  background: var(--gold);
}

.card-content {
  padding: 16px;
}

.card-content h3,
.rank-info h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 950;
}

.card-content h3 a:hover,
.rank-info h3 a:hover {
  color: var(--primary);
}

.card-content p,
.rank-info p {
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.card-meta span {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 5px 8px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

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

.page-hero .container {
  position: relative;
  z-index: 1;
}

.slim-hero,
.search-hero,
.ranking-hero,
.category-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: 28px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 170px;
  overflow: hidden;
}

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

.category-overview-card > div:last-child {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 0;
  font-size: 24px;
}

.category-overview-card p {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-card span {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-radius: 22px;
  padding: 14px;
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 950;
}

.rank-cover img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.detail-hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 44px 0 70px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px) brightness(0.46) saturate(1.22);
  transform: scale(1.07);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

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

.detail-poster {
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

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

.detail-main {
  margin-top: -80px;
  position: relative;
  z-index: 2;
}

.player-card,
.detail-article,
.detail-side {
  border-radius: 28px;
}

.player-card {
  overflow: hidden;
  padding: 12px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(18px);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
  z-index: 4;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--hot));
  box-shadow: 0 20px 54px rgba(249, 115, 22, 0.42);
  font-size: 30px;
  padding-left: 4px;
}

.play-layer strong {
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 950;
}

.play-layer em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

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

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

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 950;
}

.detail-article p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.detail-tags {
  margin-top: 22px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
  font-weight: 800;
}

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

.is-filtered-out {
  display: none !important;
}

.no-results {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 50px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #312e81, #831843);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 30px;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
}

.footer-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
}

.footer-links a:hover {
  color: #fff;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    background: rgba(255, 255, 255, 0.12);
  }

  .nav-search {
    width: 100%;
    order: 5;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

  .hero,
  .hero-shell {
    min-height: 820px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

  .intro-panel,
  .section-heading,
  .filter-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-controls,
  .page-search {
    width: 100%;
  }

  .filter-select,
  .page-search button {
    flex: 1;
  }

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

  .detail-layout,
  .detail-content-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-row .text-link {
    grid-column: 3;
    justify-self: flex-start;
  }
}

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

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

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

  .ranking-row {
    grid-template-columns: 40px 68px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-size: 13px;
  }

  .rank-cover img {
    width: 68px;
  }

  .detail-main {
    margin-top: -42px;
  }
}
