:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #111827;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --orange-400: #fb923c;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 14px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.2);
}

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

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--white);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-400));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fb7185, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  color: #e2e8f0;
}

.desktop-nav a,
.mobile-panel a {
  transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  border-radius: 999px;
}

.nav-search input,
.mobile-search input {
  width: 220px;
  padding: 10px 14px;
  color: var(--white);
  background: rgba(51, 65, 85, 0.95);
}

.nav-search button,
.mobile-search button,
.large-search button {
  border: 0;
  cursor: pointer;
  color: var(--white);
  border-radius: 999px;
  background: var(--rose-500);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-search button {
  padding: 10px 16px;
}

.nav-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-btn:hover {
  background: var(--rose-600);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(120deg, var(--slate-950), var(--slate-700));
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.44), rgba(15, 23, 42, 0.72));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  width: min(650px, calc(100% - 48px));
  transform: translateY(-50%);
}

.hero-kicker,
.section-kicker,
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--rose-500);
}

.hero-kicker {
  padding: 8px 14px;
  margin-bottom: 18px;
}

.section-kicker {
  padding: 5px 11px;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.pill {
  padding: 7px 13px;
  margin-bottom: 12px;
  font-size: 13px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 620px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.detail-title-row,
.section-heading,
.detail-meta,
.card-meta,
.hero-meta {
  display: flex;
  align-items: center;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.primary-btn,
.ghost-btn,
.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: var(--rose-500);
  box-shadow: 0 18px 30px rgba(244, 63, 94, 0.28);
}

.ghost-btn,
.outline-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover,
.outline-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.65);
}

.hero-meta,
.detail-meta,
.card-meta {
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

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

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

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

.section-block,
.category-strip,
.ranking-section,
.category-list-page,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-block,
.category-strip,
.ranking-section,
.category-list-page {
  padding: 64px 0;
}

.soft-block,
.category-strip,
.ranking-section {
  width: 100%;
  padding-right: max(16px, calc((100% - 1180px) / 2));
  padding-left: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(90deg, #fff1f2, #fffbeb);
}

.ranking-section {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  color: var(--white);
}

.section-heading {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}

.section-link {
  color: var(--rose-600);
  font-weight: 700;
}

.section-heading.light .section-link,
.ranking-section .section-link {
  color: #fecdd3;
}

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

.category-movie-grid {
  align-items: stretch;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-900);
}

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

.movie-card:hover img,
.wide-card:hover img,
.related-card:hover img,
.side-link:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-badge,
.card-year {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  color: var(--white);
  font-size: 12px;
  border-radius: 999px;
}

.card-badge {
  top: 10px;
  left: 10px;
  background: var(--rose-500);
}

.card-year {
  right: 10px;
  bottom: 10px;
  background: rgba(2, 6, 23, 0.75);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--rose-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-500);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta span {
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 180px));
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.compact-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 180px);
}

.filter-bar input,
.filter-bar select,
.large-search input {
  width: 100%;
  padding: 13px 16px;
  color: var(--gray-900);
  background: var(--gray-100);
}

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

.category-tile,
.category-card-large a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  min-height: 150px;
  padding: 22px;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.category-tile span,
.category-copy h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
}

.category-tile em,
.category-copy p,
.wide-card em,
.rank-copy em,
.related-card em,
.side-link em {
  display: block;
  color: var(--gray-500);
  font-style: normal;
}

.wide-scroll {
  display: grid;
  grid-auto-columns: minmax(280px, 340px);
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.wide-card {
  display: block;
  scroll-snap-align: start;
}

.wide-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: var(--slate-900);
  box-shadow: var(--shadow-card);
}

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

.wide-poster span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: var(--white);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
}

.wide-card strong {
  display: block;
  font-size: 18px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 48px 90px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.rank-number {
  color: #fecdd3;
  font-size: 26px;
  font-weight: 900;
}

.rank-item img {
  width: 90px;
  height: 58px;
  object-fit: cover;
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease;
}

.rank-copy strong,
.rank-copy em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.rank-copy strong {
  -webkit-line-clamp: 1;
}

.rank-copy em {
  color: #cbd5e1;
  -webkit-line-clamp: 2;
}

.rank-tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.78);
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 12% 20%, rgba(244, 63, 94, 0.38), transparent 28%), linear-gradient(120deg, var(--slate-950), var(--slate-700));
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 19px;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  height: 150px;
  overflow: hidden;
  background: var(--slate-900);
}

.category-covers img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.category-copy {
  padding: 24px;
}

.category-copy span {
  color: var(--rose-600);
  font-weight: 800;
}

.detail-shell {
  padding: 32px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--gray-500);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.player-card,
.detail-card,
.side-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 22px;
  color: var(--white);
  text-align: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.18));
}

.player-overlay.is-hidden {
  display: none;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-400));
  box-shadow: 0 24px 44px rgba(244, 63, 94, 0.35);
  font-size: 26px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(20px, 3vw, 34px);
}

.detail-card {
  padding: 28px;
  margin-bottom: 24px;
}

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

.detail-title-row h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-title-row .outline-btn {
  color: var(--rose-600);
  border-color: #fecdd3;
  background: #fff1f2;
  white-space: nowrap;
}

.detail-meta {
  margin-bottom: 28px;
}

.detail-meta span {
  color: var(--gray-700);
  background: var(--gray-100);
}

.text-section {
  padding: 22px 0;
  border-top: 1px solid var(--gray-200);
}

.text-section h2,
.tag-section h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.text-section p {
  margin: 0;
  color: var(--gray-700);
  white-space: pre-line;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 7px 12px;
  color: var(--gray-700);
  border-radius: 999px;
  background: var(--gray-100);
}

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

.related-card,
.side-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  transition: background 0.2s ease;
}

.related-card:hover,
.side-link:hover {
  background: #fff1f2;
}

.related-card img,
.side-link img {
  flex: 0 0 auto;
  width: 112px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.related-card strong,
.side-link strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-900);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-side {
  position: relative;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 20px;
}

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

.empty-state {
  display: none;
  padding: 48px;
  color: var(--gray-500);
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.empty-state.is-visible {
  display: block;
}

.large-search {
  max-width: 760px;
  margin-bottom: 26px;
}

.large-search input {
  min-height: 52px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.large-search button {
  min-height: 52px;
  padding: 0 24px;
}

.search-status {
  margin-bottom: 20px;
  color: var(--gray-700);
  font-weight: 800;
}

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

  .mobile-toggle {
    display: flex;
  }

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 64px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    top: 52%;
  }

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

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

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

  .filter-bar,
  .compact-filter {
    grid-template-columns: 1fr;
  }

  .rank-item a {
    grid-template-columns: 42px 78px 1fr;
  }

  .rank-tag {
    display: none;
  }

  .detail-card {
    padding: 20px;
  }

  .category-covers {
    height: 120px;
  }

  .category-covers img {
    height: 120px;
  }
}

@media (max-width: 520px) {
  .section-block,
  .category-strip,
  .ranking-section,
  .category-list-page,
  .detail-shell {
    width: min(100% - 20px, 1180px);
  }

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

  .hero-content {
    left: 16px;
    width: calc(100% - 32px);
  }

  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-search input {
    width: 100%;
  }
}
