:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --white: #ffffff;
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 22px 60px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  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(--secondary-800);
  background: linear-gradient(180deg, var(--secondary-50), var(--white));
}

body.home {
  background: var(--white);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: var(--secondary-800);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.8);
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

body.home .site-header:not(.is-scrolled) {
  color: var(--white);
  background: transparent;
  box-shadow: none;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding-left: 2px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-weight: 600;
  color: currentColor;
  opacity: 0.86;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

body.home .site-header:not(.is-scrolled) .menu-button {
  background: rgba(255, 255, 255, 0.18);
}

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

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: var(--white);
  border-top: 1px solid var(--secondary-200);
}

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

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

.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.hero-slider {
  position: relative;
  height: 80vh;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--secondary-900);
}

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

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

.hero-image,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--secondary-800);
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 780px;
  padding-top: 76px;
}

.hero-type,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow {
  color: var(--primary-700);
  background: var(--primary-50);
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

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

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

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

.tag-list span {
  color: var(--secondary-700);
  background: var(--secondary-100);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.detail-meta,
.movie-meta {
  color: var(--secondary-500);
}

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

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

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

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.button.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.button.full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  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.is-active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 72px 0;
}

.section-heading {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 34px;
  text-align: center;
}

.section-heading.align-left {
  justify-items: start;
  text-align: left;
}

.section-heading h2,
.page-hero h1,
.ranking-card h2,
.cta-card h2 {
  margin: 0;
  color: var(--secondary-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.cta-card p {
  max-width: 720px;
  margin: 0;
  color: var(--secondary-600);
  line-height: 1.75;
}

.section-heading.light h2,
.section-heading.light p {
  color: var(--white);
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-hover);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--secondary-200);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

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

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding-left: 4px;
  border-radius: 999px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.65);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.movie-info {
  display: grid;
  gap: 10px;
  padding: 17px;
}

.movie-info h3 {
  margin: 0;
  color: var(--secondary-900);
  font-size: 18px;
  line-height: 1.4;
}

.movie-info h3 a:hover {
  color: var(--primary-600);
}

.movie-info p {
  display: -webkit-box;
  min-height: 47px;
  margin: 0;
  overflow: hidden;
  color: var(--secondary-600);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  justify-content: space-between;
  font-size: 13px;
}

.hot-section {
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

.horizontal-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.rail-item {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

.category-sections {
  display: grid;
  gap: 42px;
}

.category-block {
  padding: 26px;
  border: 1px solid var(--secondary-200);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
}

.category-block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.category-block-head h3 {
  margin: 0 0 8px;
  color: var(--secondary-900);
  font-size: 26px;
}

.category-block-head p {
  margin: 0;
  color: var(--secondary-600);
}

.category-block-head a {
  color: var(--primary-600);
  font-weight: 800;
  white-space: nowrap;
}

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

.latest-rank-section {
  background: var(--secondary-100);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.ranking-card,
.cta-card,
.filter-panel,
.content-card,
.ranking-table-wrap {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 26px;
}

.ranking-card ol {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.ranking-card li a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 3px 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--secondary-50);
}

.rank-number {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  font-size: 13px;
  font-weight: 900;
}

.rank-title {
  color: var(--secondary-900);
  font-weight: 800;
}

.rank-meta {
  color: var(--secondary-500);
  font-size: 12px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 36%),
    var(--white);
}

.page-main {
  padding-top: 76px;
}

.page-hero {
  position: relative;
  padding: 86px 0 54px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.88)),
    var(--secondary-900);
}

.page-hero h1 {
  color: var(--white);
  margin: 16px 0 12px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--secondary-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 118px;
  overflow: hidden;
  background: var(--secondary-200);
}

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

.category-card-body {
  padding: 20px;
}

.category-card-body span {
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 900;
}

.category-card-body h2 {
  margin: 8px 0;
  color: var(--secondary-900);
  font-size: 24px;
}

.category-card-body p {
  margin: 0;
  color: var(--secondary-600);
  line-height: 1.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  padding: 24px;
}

.filter-panel h2 {
  margin: 12px 0 0;
  color: var(--secondary-900);
}

.filter-controls {
  display: flex;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  min-height: 46px;
  border: 1px solid var(--secondary-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--secondary-700);
  background: var(--white);
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.filter-result {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--secondary-500);
}

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

.ranking-table-wrap {
  overflow-x: auto;
  padding: 24px;
}

.ranking-table-wrap h2 {
  margin: 0 0 18px;
  color: var(--secondary-900);
}

.ranking-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--secondary-200);
  text-align: left;
}

.ranking-table th {
  color: var(--secondary-600);
  background: var(--secondary-50);
  font-size: 13px;
}

.ranking-table a {
  color: var(--primary-700);
  font-weight: 800;
}

.detail-page {
  background: var(--secondary-50);
}

.detail-hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: var(--white);
  background: var(--secondary-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(2px);
  transform: scale(1.02);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 116px;
  padding-bottom: 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-intro {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  background: var(--secondary-800);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy {
  display: grid;
  gap: 18px;
  max-width: 820px;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.75;
}

.player-section {
  padding-top: 42px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: var(--shadow-hover);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-card.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 6px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--white);
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

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

.player-overlay small,
.player-status {
  color: rgba(255, 255, 255, 0.76);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  font-size: 13px;
}

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

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 14px 0 12px;
  color: var(--secondary-900);
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: var(--secondary-600);
  line-height: 1.9;
}

.site-footer {
  color: #cbd5e1;
  background: var(--secondary-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 36px;
  padding: 54px 0 34px;
}

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

.site-footer p {
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

.site-footer a:hover {
  color: var(--primary-100);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid,
  .compact-grid,
  .library-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout,
  .detail-intro,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .nav-bar {
    min-height: 66px;
  }

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

  .hero-slider {
    height: 76vh;
    min-height: 520px;
  }

  .hero-content {
    padding-top: 66px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

  .movie-grid,
  .movie-grid.two-col,
  .compact-grid,
  .library-grid,
  .category-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .category-block,
  .filter-panel,
  .cta-card {
    padding: 20px;
  }

  .category-block-head,
  .filter-panel,
  .cta-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .category-block-head,
  .cta-card {
    display: grid;
  }

  .filter-controls {
    flex-direction: column;
  }

  .detail-hero-inner {
    padding-top: 96px;
  }

  .detail-intro {
    gap: 22px;
  }

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

  .player-play-icon {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
