:root {
  color-scheme: dark;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --yellow-400: #facc15;
  --orange-500: #f97316;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-lg: 0 22px 55px rgba(2, 6, 23, 0.32);
  --shadow-md: 0 14px 35px rgba(15, 23, 42, 0.18);
  --header-height: 78px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--slate-950);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-100);
  background:
    radial-gradient(circle at 8% 12%, rgba(37, 99, 235, 0.2), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(249, 115, 22, 0.15), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #f8fafc 42%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.76));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.36);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.brand-copy small {
  color: var(--slate-300);
  font-size: 12px;
  margin-top: 4px;
}

.site-header.is-scrolled .brand-copy strong,
.site-header.is-scrolled .nav-link {
  color: var(--slate-900);
}

.site-header.is-scrolled .brand-copy small {
  color: var(--slate-600);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.88;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-400);
  opacity: 1;
}

.nav-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.site-header.is-scrolled .nav-toggle {
  color: var(--slate-900);
  background: rgba(15, 23, 42, 0.08);
}

.home-main {
  background: #f8fafc;
}

.page-main {
  padding-top: calc(var(--header-height) + 28px);
  background: #f8fafc;
  min-height: 75vh;
  color: var(--slate-900);
}

.hero-slider {
  position: relative;
  min-height: 600px;
  height: 72vh;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.26) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.35), transparent 45%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  width: min(1180px, calc(100% - 32px));
  color: #fff;
}

.hero-content > * {
  max-width: 660px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
}

.hero-kicker::before,
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.hero-content h1,
.hero-content h2 {
  margin: 14px 0 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content h2 + p,
.hero-content h1 + h2 + p {
  margin-top: 20px;
}

.hero-content p {
  color: var(--slate-200);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.78;
  margin-bottom: 0;
}

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

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

.hero-tags span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(37, 99, 235, 0.72);
  backdrop-filter: blur(10px);
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.32);
}

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

.btn.ghost.dark {
  color: var(--slate-900);
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

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

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

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

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

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

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

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

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

.content-section.darker {
  width: 100%;
  max-width: none;
  padding: 70px max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
}

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

.section-heading.centered {
  display: block;
  max-width: 760px;
  margin: 0 auto 26px;
  text-align: center;
}

.section-heading.slim {
  display: block;
  margin-bottom: 22px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-panel h2 {
  margin: 10px 0 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.darker .section-heading h2,
.darker .section-heading p,
.darker .section-link {
  color: #fff;
}

.section-heading p,
.page-hero p {
  color: var(--slate-600);
  line-height: 1.8;
  margin: 12px 0 0;
}

.section-link,
.text-link {
  color: var(--blue-600);
  font-weight: 800;
}

.tool-bar {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 14px;
  margin-bottom: 28px;
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-500);
  font-weight: 900;
}

.search-box input,
.tool-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: var(--slate-900);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  outline: none;
}

.search-box input {
  padding: 0 16px 0 42px;
}

.tool-bar select {
  padding: 0 14px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--slate-900);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--slate-200);
}

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

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

.poster-shade,
.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.78));
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-600);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-meta span,
.detail-meta span {
  color: var(--blue-700);
  background: #dbeafe;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
  color: var(--blue-600);
}

.movie-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 66px;
  overflow: hidden;
  color: var(--slate-600);
  line-height: 1.55;
  margin: 10px 0 0;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--slate-700);
  background: var(--slate-100);
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

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

.category-card strong,
.category-card small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

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

.category-card small {
  bottom: 18px;
  color: var(--slate-200);
  line-height: 1.45;
}

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

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

.rank-list.compact {
  gap: 12px;
}

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px 54px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--slate-900);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: var(--slate-200);
}

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

.rank-number {
  color: var(--blue-600);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.rank-info h3 {
  margin: 0;
  font-size: 18px;
}

.rank-info p {
  margin: 8px 0 10px;
  color: var(--slate-600);
  line-height: 1.55;
}

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

.small-card p {
  -webkit-line-clamp: 2;
  min-height: 44px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-radius: var(--radius-xl);
  padding: 58px;
  color: var(--slate-900);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.9)),
    radial-gradient(circle at 90% 20%, rgba(37, 99, 235, 0.18), transparent 32%);
  box-shadow: var(--shadow-md);
}

.category-hero,
.ranking-hero {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(29, 78, 216, 0.84)),
    radial-gradient(circle at 82% 18%, rgba(250, 204, 21, 0.22), transparent 24%);
  color: #fff;
}

.category-hero h1,
.category-hero p,
.ranking-hero h1,
.ranking-hero p {
  color: #fff;
}

.mini-actions {
  margin-top: 22px;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.category-overview-image {
  display: block;
  overflow: hidden;
  height: 210px;
  background: var(--slate-200);
}

.category-overview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-overview-card h2 {
  margin: 0 0 10px;
}

.category-overview-card p {
  color: var(--slate-600);
  line-height: 1.7;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 34px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9)),
    radial-gradient(circle at 90% 14%, rgba(250, 204, 21, 0.22), transparent 26%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.detail-poster img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.46);
}

.detail-info {
  align-self: center;
}

.detail-kicker {
  color: var(--yellow-400);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.detail-info h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 56px);
}

.detail-one-line {
  color: var(--slate-200);
  font-size: 18px;
  line-height: 1.8;
  margin: 18px 0;
}

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

.wide-tags span {
  color: var(--slate-100);
  background: rgba(255, 255, 255, 0.12);
}

.player-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto 0;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.player-panel .section-heading h2 {
  color: #fff;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.video-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(2, 6, 23, 0.5));
  cursor: pointer;
}

.video-start span {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.42);
  font-size: 34px;
  padding-left: 5px;
}

.video-start.is-hidden {
  display: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.text-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.text-panel h2 {
  font-size: 26px;
}

.text-panel p {
  color: var(--slate-700);
  line-height: 1.9;
  margin: 14px 0 0;
}

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

.related-card p {
  -webkit-line-clamp: 2;
  min-height: 44px;
}

.block-link {
  width: 100%;
  margin-top: 16px;
}

.site-footer {
  background: var(--slate-950);
  color: var(--slate-300);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 34px;
}

.footer-brand {
  display: inline-block;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.footer-inner p {
  max-width: 620px;
  color: var(--slate-400);
  line-height: 1.7;
  margin: 0;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--slate-500);
  font-size: 14px;
}

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

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

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

  .split-section,
  .detail-text {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 68px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(var(--header-height) - 6px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-lg);
  }

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

  .site-nav .nav-link {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .site-header.is-scrolled .site-nav .nav-link {
    color: #fff;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-slider {
    min-height: 560px;
    height: 82vh;
  }

  .hero-content {
    transform: translate(-50%, -42%);
  }

  .hero-arrow {
    display: none;
  }

  .tool-bar {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .cards-home,
  .category-list,
  .side-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

  .page-hero {
    padding: 34px 22px;
  }

  .rank-card {
    grid-template-columns: 74px 44px 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .content-section {
    width: min(100% - 24px, 1180px);
    padding: 40px 0;
  }

  .movie-grid,
  .cards-home,
  .category-list,
  .side-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-tags span:nth-child(n + 5) {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .rank-card {
    grid-template-columns: 64px 36px 1fr;
    gap: 12px;
  }

  .rank-info p {
    display: none;
  }
}
