:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(168, 85, 247, 0.22);
  --line-strong: rgba(168, 85, 247, 0.38);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --purple: #a855f7;
  --purple-soft: #c084fc;
  --pink: #ec4899;
  --red: #ef4444;
  --blue: #60a5fa;
  --gold: #facc15;
  --radius: 24px;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.22), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(236, 72, 153, 0.16), transparent 28%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #000000 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  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.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.35);
}

.brand-text,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, var(--purple-soft), #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: #d1d5db;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  padding: 10px 13px;
  font-size: 15px;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-search-form {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-search-form input,
.page-filter input,
.search-page-form input {
  width: 250px;
  border: 1px solid rgba(168, 85, 247, 0.36);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  outline: none;
  padding: 11px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search-form input:focus,
.page-filter input:focus,
.search-page-form input:focus {
  border-color: var(--purple-soft);
  box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.16);
  background: rgba(255, 255, 255, 0.13);
}

.site-search-form button,
.search-page-form button {
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  padding: 11px 16px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.25);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
}

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

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 68%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 86px;
  max-width: 720px;
  z-index: 2;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.poster-badge,
.category-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #f5f3ff;
  background: rgba(88, 28, 135, 0.56);
  padding: 4px 11px;
  font-size: 13px;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.hero-content p,
.page-hero p,
.movie-card p,
.detail-line,
.detail-article p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-content p {
  max-width: 650px;
  font-size: 18px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 16px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 16px 36px rgba(168, 85, 247, 0.32);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.42);
}

.primary-button:hover,
.ghost-button:hover,
.category-card:hover,
.movie-card:hover,
.ranking-card:hover {
  transform: translateY(-3px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: var(--purple);
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

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

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

.eyebrow {
  display: inline-flex;
  color: var(--purple-soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-side h2 {
  margin: 0;
  color: #fff;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
  color: var(--purple-soft);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.82));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 24px 56px rgba(168, 85, 247, 0.16);
}

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

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.ranking-card:hover img {
  transform: scale(1.06);
}

.poster-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 54%);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.52);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.28);
}

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

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 19px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: #d8b4fe;
}

.movie-card p {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.tag-row span {
  min-height: 24px;
  border-color: rgba(168, 85, 247, 0.28);
  background: rgba(168, 85, 247, 0.15);
  color: #ddd6fe;
  font-size: 12px;
}

.highlight-panel {
  width: min(1280px, calc(100% - 32px));
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.64), rgba(15, 23, 42, 0.76));
  box-shadow: var(--shadow);
}

.featured-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.featured-list {
  display: grid;
  gap: 18px;
}

.large-card {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
}

.large-card .poster-link {
  aspect-ratio: 4 / 5;
}

.compact-card,
.horizontal-card {
  display: grid;
  grid-template-columns: 132px 1fr;
}

.compact-card .poster-link,
.horizontal-card .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.12));
}

.category-card strong,
.category-card em,
.category-count {
  position: absolute;
  z-index: 2;
  left: 20px;
}

.category-card strong {
  bottom: 54px;
  color: #fff;
  font-size: 24px;
}

.category-card em {
  right: 20px;
  bottom: 20px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.category-count {
  top: 18px;
  background: rgba(0, 0, 0, 0.48);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 30px;
  align-items: start;
}

.rank-panel,
.detail-side,
.detail-article {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 24px;
}

.rank-list,
.ranking-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 42px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.rank-list img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-number {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.rank-copy strong,
.ranking-copy strong {
  display: block;
  color: #fff;
  line-height: 1.35;
}

.rank-copy em,
.ranking-copy em,
.ranking-copy small {
  display: block;
  color: var(--subtle);
  font-style: normal;
  line-height: 1.6;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 32px auto 0;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 0%, rgba(168, 85, 247, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.76), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 42px;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
}

.page-hero p {
  max-width: 760px;
  margin-top: 16px;
  font-size: 18px;
}

.page-filter input {
  width: min(440px, 80vw);
}

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

.ranking-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel);
  transition: transform 0.2s ease, border 0.2s ease;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 86px 110px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.ranking-card img {
  width: 110px;
  height: 146px;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.big-rank {
  color: rgba(250, 204, 21, 0.9);
  font-size: 38px;
  font-weight: 900;
  text-align: center;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #000;
}

.detail-bg,
.detail-veil {
  position: absolute;
  inset: 0;
}

.detail-veil {
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.76) 38%, rgba(0, 0, 0, 0.2) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.12));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 38px;
  align-items: end;
  padding: 70px 0;
}

.detail-poster img {
  width: 330px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #d8b4fe;
}

.breadcrumb em {
  color: #fff;
  font-style: normal;
}

.detail-copy h1 {
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1;
  margin-bottom: 16px;
}

.detail-line {
  max-width: 820px;
  margin: 0 0 20px;
  font-size: 20px;
}

.detail-tags {
  margin: 20px 0 28px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-disc {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 20px 56px rgba(168, 85, 247, 0.42);
  font-size: 34px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-body-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 26px;
  align-items: start;
}

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

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

.article-heading {
  margin-top: 32px;
}

.detail-side dl {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.detail-side dd {
  margin: -12px 0 0;
  color: #fff;
  line-height: 1.6;
}

.search-page-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-page-form input {
  width: min(480px, 70vw);
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 18px;
}

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

.footer-links a {
  padding: 8px 12px;
}

[data-filter-hidden="true"] {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .site-search-form {
    display: none;
  }

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

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

  .featured-layout,
  .split-section,
  .detail-body-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    padding: 20px;
  }
}

@media (max-width: 820px) {
  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 72px;
  }

  .hero-content h1,
  .detail-copy h1 {
    font-size: 42px;
  }

  .hero-control {
    display: none;
  }

  .content-section {
    padding: 38px 0;
  }

  .section-heading,
  .compact-hero {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .four-cols,
  .three-cols,
  .two-cols,
  .category-grid,
  .wide-category-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .large-card,
  .compact-card,
  .horizontal-card,
  .ranking-card a {
    grid-template-columns: 1fr;
  }

  .compact-card .poster-link,
  .horizontal-card .poster-link {
    aspect-ratio: 2 / 3;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: end;
  }

  .detail-poster img {
    width: 220px;
  }
}

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

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

  .hero-carousel {
    height: 520px;
  }

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

  .hero-actions,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button,
  .search-page-form button,
  .search-page-form input {
    width: 100%;
  }

  .four-cols,
  .three-cols,
  .two-cols,
  .category-grid,
  .wide-category-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .compact-hero {
    padding: 28px;
  }

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

  .detail-hero,
  .detail-inner {
    min-height: auto;
  }

  .detail-inner {
    padding: 46px 0;
  }
}
