:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --amber: #d97706;
  --rose: #e11d48;
  --blue: #2563eb;
  --emerald: #059669;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 30px 70px rgba(15, 23, 42, 0.2);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
}

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

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

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-600), var(--slate-900));
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 12px;
}

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

.nav-link {
  position: relative;
  padding: 26px 0;
  color: var(--slate-600);
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--slate-900);
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--slate-900);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  width: 300px;
  padding: 4px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
}

.header-search input,
.mobile-search input,
.page-search input,
.page-filter input {
  width: 100%;
  min-width: 0;
  color: var(--slate-900);
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input {
  padding: 8px 12px;
}

.header-search button,
.mobile-search button,
.page-search button {
  padding: 8px 16px;
  color: var(--white);
  font-weight: 700;
  background: var(--slate-900);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  color: var(--slate-900);
  background: var(--slate-100);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto 16px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

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

.mobile-nav-link {
  padding: 12px 14px;
  color: var(--slate-600);
  font-weight: 700;
  border-radius: 12px;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--slate-900);
  background: var(--slate-100);
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--slate-100);
  border-radius: 14px;
}

.mobile-search input {
  padding: 8px 10px;
}

main {
  flex: 1;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.15)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.08) 50%, rgba(2, 6, 23, 0.35));
}

.hero-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 86px 0;
  color: var(--white);
}

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

.hero-kicker span {
  padding: 7px 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 850px;
  margin: 18px 0 18px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags span {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

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

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

.primary-button {
  color: var(--slate-900);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.primary-button.compact {
  min-height: 40px;
  padding: 0 16px;
  color: var(--white);
  background: var(--slate-900);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.52);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

.content-section {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 72px 0;
}

.section-white {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100% - var(--container)) / 2));
  padding-left: max(16px, calc((100% - var(--container)) / 2));
  background: var(--white);
}

.section-gradient {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100% - var(--container)) / 2));
  padding-left: max(16px, calc((100% - var(--container)) / 2));
  background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.sub-hero h1,
.detail-card h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading span,
.sub-hero p,
.category-card p,
.footer-brand p {
  display: block;
  margin-top: 10px;
  color: var(--slate-600);
  line-height: 1.7;
}

.section-more {
  flex-shrink: 0;
  padding: 10px 16px;
  color: var(--slate-700);
  font-weight: 800;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

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

.card-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.58));
}

.play-circle,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.play-circle {
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-circle {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  border-radius: 999px;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.detail-meta span {
  padding: 5px 8px;
  background: var(--slate-100);
  border-radius: 999px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags a {
  padding: 6px 9px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 700;
  background: var(--slate-100);
  border-radius: 8px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 210px 1fr;
}

.movie-card-wide .card-cover {
  height: 100%;
  min-height: 160px;
  aspect-ratio: auto;
}

.movie-card-mini {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-radius: 14px;
}

.movie-card-mini .card-cover {
  height: 100%;
  min-height: 108px;
  aspect-ratio: auto;
}

.movie-card-mini .card-body {
  padding: 12px;
}

.movie-card-mini h3 {
  margin-top: 8px;
  font-size: 15px;
}

.movie-card-mini p,
.movie-card-mini .tag-row {
  display: none;
}

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

.category-pill,
.category-card-main {
  display: grid;
  gap: 8px;
  padding: 22px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-pill:hover,
.category-card-main:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.category-pill strong {
  font-size: 19px;
}

.category-pill span {
  color: var(--slate-500);
  font-size: 13px;
  line-height: 1.6;
}

.sub-hero {
  color: var(--slate-900);
  background:
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(225, 29, 72, 0.14), transparent 24%),
    linear-gradient(135deg, var(--slate-100), var(--white));
}

.ranking-hero,
.search-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(217, 119, 6, 0.18), transparent 26%),
    linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.ranking-hero h1,
.ranking-hero p,
.search-hero h1,
.search-hero p {
  color: var(--white);
}

.sub-hero-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 74px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--slate-500);
  font-size: 14px;
  font-weight: 700;
}

.ranking-hero .breadcrumbs,
.search-hero .breadcrumbs {
  color: rgba(255, 255, 255, 0.76);
}

.page-filter,
.page-search {
  display: flex;
  width: min(100%, 640px);
  margin-top: 28px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.page-filter input,
.page-search input {
  padding: 12px 16px;
}

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

.category-card {
  display: grid;
  gap: 14px;
}

.category-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-700), var(--slate-950));
  border-radius: 12px;
}

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

.category-sample {
  display: grid;
  gap: 8px;
  padding: 0 8px;
}

.category-sample a {
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 700;
}

.detail-layout {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.detail-breadcrumbs {
  margin-bottom: 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.86fr);
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-card,
.detail-card,
.side-cover-card,
.side-section {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-950);
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--slate-950);
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.25));
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  width: 82px;
  height: 82px;
  padding-left: 6px;
  color: var(--slate-900);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.94);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover {
  background: var(--white);
  transform: scale(1.06);
}

.detail-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-meta {
  margin: 22px 0 18px;
}

.detail-tags {
  margin-bottom: 26px;
}

.text-block {
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.text-block + .text-block {
  margin-top: 24px;
}

.text-block h2,
.side-section h2,
.side-cover-card h2 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: 22px;
}

.text-block p,
.side-cover-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.85;
  text-align: justify;
}

.side-cover-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.side-cover-card div,
.side-section {
  padding: 18px;
}

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

.site-footer {
  margin-top: auto;
  color: var(--slate-300);
  background: var(--slate-900);
}

.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 50px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 42px;
}

.footer-logo .brand-mark {
  background: linear-gradient(135deg, var(--slate-500), var(--slate-800));
}

.footer-logo .brand-text strong {
  color: var(--white);
}

.footer-column h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.footer-column ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column a {
  color: var(--slate-300);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 18px 16px;
  color: var(--slate-500);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

[hidden] {
  display: none !important;
}

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

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-inner {
    min-height: 66px;
  }

  .hero {
    min-height: 620px;
  }

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

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text small {
    display: none;
  }

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

  .hero p {
    font-size: 16px;
  }

  .content-section,
  .sub-hero-inner,
  .detail-layout,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 24px, var(--container));
  }

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

  .movie-card-wide,
  .movie-card-mini {
    grid-template-columns: 1fr;
  }

  .movie-card-wide .card-cover,
  .movie-card-mini .card-cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .page-filter,
  .page-search {
    border-radius: 18px;
  }

  .page-search {
    flex-direction: column;
  }

  .player-start {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
