:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --sky-700: #0369a1;
  --sky-600: #0284c7;
  --sky-500: #0ea5e9;
  --sky-100: #e0f2fe;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-large: 24px;
  --radius-medium: 16px;
  --radius-small: 10px;
}

* {
  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(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.28);
}

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  box-shadow: 0 12px 25px rgba(14, 165, 233, 0.35);
}

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

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-copy em {
  margin-top: 4px;
  font-size: 12px;
  color: #bae6fd;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 10px;
  color: #e5e7eb;
  font-size: 15px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: var(--sky-600);
  transform: translateY(-1px);
}

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

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

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 20%, rgba(14, 165, 233, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.1) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.55), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--white);
  max-width: 760px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #7dd3fc;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  font-size: 18px;
  color: #e2e8f0;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #075985;
  background: var(--sky-100);
  font-size: 13px;
  font-weight: 650;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(186, 230, 253, 0.22);
}

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

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

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  box-shadow: 0 16px 32px rgba(14, 165, 233, 0.3);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.primary-button.full {
  width: 100%;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

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

.soft-bg {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--slate-500);
}

.section-more {
  color: var(--sky-700);
  background: var(--sky-100);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding: 8px 2px 22px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  min-width: 280px;
  scroll-snap-align: start;
}

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

.featured-grid .movie-card:first-child {
  grid-column: span 2;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-medium);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.09);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--sky-700));
}

.featured-grid .movie-card:first-child .poster-wrap {
  height: 300px;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.68));
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.region-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--white);
  background: var(--sky-600);
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.32);
}

.region-pill {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: var(--amber-500);
}

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

.movie-card h2 {
  min-height: 54px;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.movie-card h2 a:hover {
  color: var(--sky-700);
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
}

.movie-line {
  min-height: 48px;
  margin-top: 10px;
}

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

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  border-radius: var(--radius-medium);
  background: var(--slate-900);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.category-tile img,
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img,
.category-card:hover img {
  opacity: 0.55;
  transform: scale(1.08);
}

.category-tile span,
.category-tile em,
.category-card div {
  position: relative;
  z-index: 2;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  color: var(--white);
}

.category-tile span {
  font-size: 22px;
  font-weight: 800;
}

.category-tile em {
  margin-top: 6px;
  color: #dbeafe;
  font-style: normal;
  font-size: 14px;
}

.category-card {
  min-height: 230px;
  display: flex;
  align-items: end;
  padding: 26px;
  color: var(--white);
}

.category-card h2 {
  margin: 8px 0;
  font-size: 28px;
}

.category-card span {
  color: #7dd3fc;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.category-card p {
  max-width: 520px;
  margin: 0;
  color: #e0f2fe;
}

.ranking-panel,
.side-card {
  padding: 22px;
  border-radius: var(--radius-medium);
  background: var(--white);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.1);
}

.panel-title {
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 850;
}

.rank-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row img {
  width: 72px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--slate-100);
}

.rank-row strong,
.rank-row em {
  display: block;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 78% 22%, rgba(14, 165, 233, 0.24), transparent 34%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.compact-hero {
  padding: 86px 0 70px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.inline-search,
.search-box {
  margin-bottom: 26px;
}

.search-box.large {
  max-width: 720px;
  margin-top: 28px;
  margin-bottom: 18px;
}

.inline-search input,
.search-box input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0 18px;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.inline-search input:focus,
.search-box input:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.quick-filter {
  margin-top: 18px;
}

.quick-filter button {
  min-height: 36px;
  border: 1px solid rgba(186, 230, 253, 0.32);
  border-radius: 999px;
  padding: 0 14px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.quick-filter button.active,
.quick-filter button:hover {
  color: var(--slate-900);
  background: var(--white);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-medium);
  background: var(--white);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.09);
}

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

.ranking-table th,
.ranking-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.ranking-table th {
  color: var(--slate-700);
  background: #f8fafc;
}

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

.player-section {
  padding: 34px 0;
  background: #000;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sky-600);
  box-shadow: 0 20px 45px rgba(2, 132, 199, 0.48);
  font-size: 36px;
  padding-left: 6px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
  background: var(--sky-700);
}

.play-overlay.hidden {
  display: none;
}

.detail-section {
  padding-top: 58px;
}

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

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

.detail-main {
  padding: 32px;
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.1);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--slate-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--sky-700);
}

.detail-main h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.detail-main h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-main p {
  margin: 0 0 14px;
  color: #334155;
}

.lead-text {
  font-size: 19px;
  color: var(--slate-800) !important;
}

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

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--sky-700);
  background: var(--sky-100);
  font-weight: 700;
  font-size: 13px;
}

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

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-medium);
  object-fit: cover;
  background: var(--slate-100);
  box-shadow: var(--shadow-soft);
}

.side-card {
  margin-top: 20px;
}

.side-card h2 {
  margin: 0 0 14px;
}

.side-card p {
  margin: 8px 0;
  color: var(--slate-700);
}

.detail-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.detail-pager a {
  padding: 14px;
  border-radius: 14px;
  color: var(--sky-700);
  background: var(--sky-100);
  font-weight: 750;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 24px;
  font-weight: 850;
}

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

.site-footer p {
  margin: 0;
}

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

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

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

[hidden],
.movie-card.is-hidden {
  display: none !important;
}

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

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

  .ranking-panel,
  .detail-side {
    order: 2;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    padding: 12px 0;
    flex-wrap: wrap;
  }

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

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    padding-top: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
  }

  .hero {
    height: 560px;
  }

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

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

  .content-section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

  .movie-grid,
  .dense-grid,
  .related-grid,
  .category-grid,
  .category-list-grid,
  .footer-grid,
  .detail-pager {
    grid-template-columns: 1fr;
  }

  .featured-grid .movie-card:first-child {
    grid-column: auto;
  }

  .poster-wrap,
  .featured-grid .movie-card:first-child .poster-wrap {
    height: 240px;
  }

  .detail-main {
    padding: 22px;
  }

  .video-frame {
    border-radius: 0;
  }

  .player-section .container {
    width: 100%;
  }
}
