:root {
  --primary-50: #e6f1ff;
  --primary-100: #b3d9ff;
  --primary-600: #0059c0;
  --primary-700: #00438d;
  --accent-500: #ff6b00;
  --neutral-50: #f8f9fa;
  --neutral-100: #e9ecef;
  --neutral-200: #dee2e6;
  --neutral-300: #ced4da;
  --neutral-400: #adb5bd;
  --neutral-500: #6c757d;
  --neutral-600: #495057;
  --neutral-700: #343a40;
  --neutral-800: #212529;
  --neutral-900: #0d1117;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-soft-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
  --radius-xl: 18px;
  --radius-2xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(222, 226, 230, 0.72);
  box-shadow: 0 4px 18px rgba(13, 17, 23, 0.08);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-600);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0, 89, 192, 0.22);
}

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

.nav-link {
  color: var(--neutral-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.site-search-form input {
  width: 220px;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--neutral-800);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-form input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(0, 89, 192, 0.1);
}

.site-search-form button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search-form button,
.btn-primary {
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 14px 26px rgba(0, 89, 192, 0.18);
}

.btn-light {
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.9);
}

.site-search-form button:hover,
.btn:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--neutral-800);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
  background: #ffffff;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel-inner {
  display: grid;
  gap: 12px;
  padding: 16px 0 20px;
}

.mobile-link {
  padding: 8px 0;
  color: var(--neutral-700);
  font-weight: 700;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--neutral-900);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-500);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  width: min(680px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-tags {
  margin: 22px 0 0;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 750;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.tag-row span {
  color: var(--primary-700);
  background: var(--primary-50);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

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

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

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

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

.hero-dot.active {
  width: 30px;
  background: #ffffff;
}

.section-block {
  padding: 72px 0;
}

.alt-block {
  background: #ffffff;
}

.section-heading,
.split-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
}

.section-heading.no-padding {
  padding-bottom: 18px;
}

.section-heading h2,
.split-heading h2,
.content-card h2,
.side-card h2,
.ranking-aside h2 {
  margin: 0;
  color: var(--neutral-900);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

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

.category-card {
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #ffffff, var(--primary-50));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
  display: block;
  color: var(--primary-700);
  font-size: 20px;
  font-weight: 850;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--neutral-600);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-2xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--neutral-100);
}

.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-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(255, 107, 0, 0.92);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.movie-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--neutral-500);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 8px 0 8px;
  color: var(--neutral-900);
  font-size: 19px;
  line-height: 1.25;
}

.movie-card h2 a:hover {
  color: var(--primary-600);
}

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

.two-column {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 34px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-number {
  color: var(--accent-500);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy strong {
  color: var(--neutral-900);
  font-size: 15px;
}

.rank-copy em {
  color: var(--neutral-500);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 18% 24%, rgba(255, 107, 0, 0.34), transparent 30%), linear-gradient(135deg, var(--neutral-900), var(--primary-700));
}

.compact-hero {
  padding: 78px 0;
}

.page-hero-inner {
  max-width: 850px;
}

.page-hero p:not(.eyebrow) {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.category-overview-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card img,
.category-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-overview-card img {
  object-fit: cover;
}

.category-layer {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1));
}

.category-overview-card strong,
.category-overview-card p {
  position: relative;
  z-index: 2;
  display: block;
  margin-left: 24px;
  margin-right: 24px;
}

.category-overview-card strong {
  margin-top: 140px;
  font-size: 26px;
  line-height: 1.2;
}

.category-overview-card p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--neutral-600);
  font-size: 13px;
  font-weight: 750;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--neutral-800);
  background: #ffffff;
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(0, 89, 192, 0.1);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 28px;
  align-items: start;
}

.ranking-aside {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-2xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-list.slim .rank-item {
  grid-template-columns: 36px 52px 1fr;
  padding: 8px;
}

.rank-list.slim .rank-item img {
  width: 52px;
  height: 68px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--neutral-900);
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: 0.48;
}

.detail-shade {
  background: linear-gradient(90deg, rgba(13, 17, 23, 0.92), rgba(13, 17, 23, 0.68)), linear-gradient(0deg, rgba(13, 17, 23, 0.88), transparent 60%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 36px 0 64px;
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-head-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 250px;
  aspect-ratio: 2 / 3;
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-2xl);
  object-fit: cover;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.detail-one-line {
  max-width: 850px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.player-card,
.content-card,
.side-card {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-2xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

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

.movie-video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  object-fit: contain;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #000000;
}

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

.player-cover img {
  object-fit: cover;
}

.player-cover-shade {
  z-index: 2;
  background: rgba(0, 0, 0, 0.46);
}

.play-button {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 107, 0, 0.92);
  box-shadow: 0 20px 50px rgba(255, 107, 0, 0.35);
  font-size: 36px;
  line-height: 1;
}

.content-card {
  margin-top: 22px;
  padding: 28px;
}

.content-card h2:not(:first-child) {
  margin-top: 26px;
}

.content-card p {
  margin: 12px 0 0;
  color: var(--neutral-700);
  font-size: 16px;
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.side-card dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--neutral-200);
}

.side-card dt {
  color: var(--neutral-500);
  font-weight: 750;
}

.side-card dd {
  margin: 0;
  color: var(--neutral-900);
}

.site-footer {
  padding: 54px 0 0;
  color: var(--neutral-300);
  background: var(--neutral-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.site-footer p {
  max-width: 460px;
  color: var(--neutral-400);
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 17px;
}

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

.footer-links a {
  color: var(--neutral-400);
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 34px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--neutral-500);
  font-size: 14px;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

  .overview-grid,
  .two-column,
  .ranking-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .ranking-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 96px;
  }

  .hero-control {
    display: none;
  }

  .section-heading,
  .split-heading {
    display: grid;
    align-items: start;
  }

  .hero-search,
  .mobile-search {
    width: 100%;
  }

  .site-search-form input {
    width: 100%;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .overview-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .detail-head-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .detail-poster {
    width: 180px;
  }

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