:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --panel: #ffffff;
  --dark: #0f172a;
  --blue: #1e3a8a;
  --gold: #facc15;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 55%, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.brand-text {
  font-size: 1.55rem;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--gold);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.header-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #111827;
  cursor: pointer;
  padding: 10px 15px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-links a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  min-height: 76vh;
  color: #fff;
  background: var(--dark);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 76vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.75s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  min-height: 76vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px 0 130px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.25);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 840px;
  margin: 24px 0 18px;
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-info p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.detail-tags,
.card-tags,
.card-badges,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0 32px;
}

.hero-meta span,
.detail-meta span,
.detail-tags span,
.card-tags span,
.card-badges i,
.filter-chips button {
  border-radius: 999px;
  padding: 7px 12px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.category-overview-head a,
.panel-title a,
.detail-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  min-height: 52px;
  padding: 0 30px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 20px 42px rgba(249, 115, 22, 0.35);
}

.ghost-btn {
  min-height: 52px;
  padding: 0 28px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.ranking-card:hover,
.detail-switch a:hover {
  transform: translateY(-3px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  font-size: 2rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  opacity: 0.48;
}

.hero-dots button.is-active {
  opacity: 1;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.stats-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stats-strip div {
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.82));
  box-shadow: var(--shadow);
}

.stats-strip strong {
  display: block;
  font-size: 2rem;
  color: var(--gold);
}

.stats-strip span {
  color: rgba(255, 255, 255, 0.72);
}

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

.dark-section {
  width: 100%;
  margin: 0;
  padding: 72px max(16px, calc((100vw - 1180px) / 2));
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e1b4b 48%, #7c2d12);
}

.section-heading,
.category-overview-head,
.panel-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2,
.panel-title h2,
.related-panel h2,
.text-panel h2,
.category-overview-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-heading p,
.category-overview-card p,
.footer-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.dark-section .section-heading p {
  color: rgba(255, 255, 255, 0.68);
}

.section-more,
.category-overview-head a,
.panel-title a {
  color: #1d4ed8;
  font-weight: 900;
}

.dark-section .section-more,
.dark-section .category-overview-head a,
.dark-section .panel-title a {
  color: var(--gold);
}

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

.featured-grid,
.compact-grid {
  grid-template-columns: repeat(6, 1fr);
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
}

.poster-frame {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1e3a8a);
}

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

.movie-card:hover .poster-frame img,
.category-tile:hover {
  transform: scale(1.055);
}

.card-body,
.card-copy,
.ranking-copy {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card-body {
  padding: 14px;
}

.movie-card strong {
  font-size: 1rem;
  line-height: 1.35;
}

.card-meta,
.movie-card em,
.ranking-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.card-tags span,
.card-badges i {
  color: #1e293b;
  border-color: #e2e8f0;
  background: #f1f5f9;
  padding: 5px 9px;
  font-size: 0.78rem;
}

.line-clamp {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease;
}

.category-tile span {
  font-size: 1.6rem;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
}

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

.ranking-panel,
.related-panel,
.text-panel,
.category-overview-card {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.72);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #eef2ff;
  transform: translateX(3px);
}

.rank-row img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-number {
  color: var(--orange);
  font-size: 1.15rem;
  font-weight: 900;
}

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

.rank-row em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.84rem;
}

.page-hero,
.detail-hero {
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a, #7c2d12);
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 72px max(16px, calc((100vw - 1180px) / 2));
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 18px;
}

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

.category-overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
}

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

.movie-card-horizontal {
  min-height: 142px;
  flex-direction: row;
}

.movie-card-horizontal .poster-frame {
  width: 96px;
  min-width: 96px;
  aspect-ratio: auto;
}

.movie-card-horizontal .card-copy {
  padding: 14px;
}

.filter-bar {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.filter-bar input {
  width: 100%;
  border: 1px solid #e2e8f0;
  outline: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}

.filter-bar input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.filter-chips button {
  color: #1e293b;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.filter-chips button:hover {
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.ranking-card {
  position: relative;
  min-height: 180px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-card img {
  width: 116px;
  height: 152px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-medal {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.ranking-copy strong {
  font-size: 1.1rem;
}

.ranking-copy span {
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 72px max(16px, calc((100vw - 1180px) / 2));
  background-size: cover;
  background-position: center;
}

.detail-poster img {
  width: 300px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  font-size: clamp(2.4rem, 5vw, 5.4rem);
}

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

.detail-tags {
  margin: 0 0 28px;
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #020617;
  box-shadow: 0 30px 65px rgba(15, 23, 42, 0.24);
}

.player-card video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  cursor: pointer;
  border: 0;
  text-align: center;
  background: radial-gradient(circle at center, rgba(30, 64, 175, 0.34), rgba(2, 6, 23, 0.82));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.42);
}

.play-overlay strong {
  max-width: 88%;
  font-size: clamp(1.3rem, 2vw, 2.2rem);
}

.text-panel {
  padding: 28px;
}

.text-panel p {
  color: #334155;
  line-height: 1.95;
  font-size: 1.03rem;
}

.related-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.related-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.detail-switch {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-switch a {
  flex: 1;
  min-height: 48px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.site-footer {
  color: #fff;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  margin-top: 40px;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.62);
}

.footer-grid h2 {
  color: var(--gold);
  margin: 0 0 16px;
  font-size: 1.1rem;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.68);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
}

[data-card].is-hidden,
.ranking-card.is-hidden {
  display: none;
}

@media (max-width: 1120px) {
  .movie-grid,
  .featured-grid,
  .compact-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .ranking-panel,
  .related-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

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

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 16px;
  }

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 680px;
  }

  .overview-samples,
  .footer-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster img {
    width: min(300px, 100%);
  }
}

@media (max-width: 640px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .content-section,
  .dark-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .section-heading,
  .category-overview-head,
  .panel-title {
    align-items: start;
    flex-direction: column;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card strong {
    font-size: 0.96rem;
  }

  .ranking-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .ranking-card img {
    width: 82px;
    height: 114px;
  }

  .detail-hero {
    min-height: auto;
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .detail-info h1,
  .page-hero h1,
  .hero h1 {
    letter-spacing: -0.04em;
  }

  .player-card {
    border-radius: 18px;
  }

  .play-button {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }
}
