:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --muted: #94a3b8;
  --text: #f8fafc;
  --line: rgba(148, 163, 184, 0.18);
  --orange: #f97316;
  --red: #dc2626;
  --gold: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.18), transparent 34rem),
    radial-gradient(circle at 100% 20%, rgba(220, 38, 38, 0.15), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  white-space: nowrap;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fb923c;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 0;
  background: transparent;
  font-size: 28px;
}

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

.top-search input,
.large-search input,
.page-search {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  border-radius: 999px;
  outline: none;
  padding: 12px 16px;
}

.top-search input {
  width: 250px;
}

.top-search button,
.large-search button,
.filter-bar button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.large-search button:hover,
.filter-bar button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-btn,
.section-more {
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(251, 146, 60, 0.35);
  box-shadow: none;
}

.hero-carousel {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: calc(100vh - 150px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15);
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.7) 46%, rgba(2, 6, 23, 0.85) 100%),
    radial-gradient(circle at 80% 24%, rgba(249, 115, 22, 0.28), transparent 30rem);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 420px;
  gap: 58px;
  align-items: center;
  padding: 64px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
  margin: 22px 0 0;
  max-width: 760px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fed7aa;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(251, 146, 60, 0.2);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-5deg) rotateX(2deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
  font-size: 38px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

.hero-bottom {
  position: relative;
  z-index: 4;
  width: min(1280px, calc(100% - 32px));
  margin: -10px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 32px;
}

.hero-dots,
.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.hero-chip-row a {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
}

.content-section,
.category-block,
.detail-content {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.section-head h2,
.category-block-head h2,
.detail-panel h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p,
.category-block-head p {
  color: var(--muted);
  margin: 8px 0 0;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  opacity: 0.82;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.32);
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f97316);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

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

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #fb923c;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0;
  color: #fff;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  color: #94a3b8;
  line-height: 1.7;
  margin: 10px 0 0;
  font-size: 14px;
}

.compact-card .movie-card-body {
  padding: 13px;
}

.compact-card p {
  display: none;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 34px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 66px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.rank-num {
  font-size: 22px;
  color: #fb923c;
  font-weight: 900;
}

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

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

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

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

.category-tile {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.8);
}

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

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.42;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 8px 0 0;
}

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

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  border-radius: 34px;
  padding: 60px;
  background:
    radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #cbd5e1;
  margin-top: 18px;
}

.breadcrumb a {
  color: #fb923c;
}

.tools-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.page-search {
  width: min(420px, 100%);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-bar button {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: none;
}

.filter-bar button.active {
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.large-search {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  max-width: 720px;
}

.large-search input {
  flex: 1;
  border-radius: 18px;
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: blur(10px) saturate(1.18);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 46px;
  align-items: center;
  padding: 48px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.detail-copy h1 {
  font-size: clamp(40px, 7vw, 78px);
}

.detail-meta {
  margin-top: 20px;
}

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

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -80px auto 0;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(251, 146, 60, 0.24);
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.16), rgba(2, 6, 23, 0.45));
}

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

.player-start {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 42px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 22px 60px rgba(249, 115, 22, 0.42);
}

.detail-columns {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.detail-panel {
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 28px;
}

.detail-panel p {
  color: #cbd5e1;
  line-height: 2;
  margin: 16px 0 0;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
  margin-top: 56px;
}

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

.footer-brand {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

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

.site-footer h3 {
  margin: 0 0 12px;
}

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

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 0 24px;
}

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

@media (max-width: 1120px) {
  .top-search {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr 320px;
  }

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

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

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

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
  }

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

  .nav-link {
    padding: 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 34px;
  }

  .hero-poster {
    max-width: 280px;
  }

  .hero-bottom,
  .section-head,
  .category-block-head,
  .tools-panel,
  .large-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .page-hero {
    padding: 34px 22px;
    border-radius: 24px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .player-section {
    margin-top: -34px;
  }

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

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .category-block,
  .detail-content {
    padding: 36px 0;
  }

  .movie-grid,
  .ranking-grid,
  .compact-grid,
  .category-grid,
  .category-grid.mini {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 40px 58px 1fr;
  }
}
