:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --orange: #ea580c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(234, 88, 12, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
}

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

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

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 104px;
}

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

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.35);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.nav-link {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 520px;
  height: 70vh;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, transparent 42%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(86px, 13vh, 148px);
  width: min(680px, calc(100% - 48px));
}

.eyebrow {
  margin: 0 0 10px;
  color: #fbbf24;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}

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

.hero-desc,
.page-hero p,
.detail-lead {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  max-width: 760px;
}

.hero-tags,
.mini-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.24);
  font-size: 12px;
}

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

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

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.32);
}

.btn-ghost {
  color: white;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.58);
  color: white;
  font-size: 34px;
  cursor: pointer;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: 40px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.hero-search {
  position: absolute;
  right: clamp(22px, 5vw, 58px);
  bottom: 32px;
  display: flex;
  width: min(390px, calc(100% - 44px));
  padding: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: white;
  padding: 0 16px;
  outline: none;
}

.hero-search button,
.filter-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.content-section {
  margin-top: 72px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.section-heading.slim h2 {
  font-size: 28px;
}

.section-more {
  color: #fbbf24;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.82));
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-body strong {
  font-size: 17px;
  line-height: 1.35;
}

.meta-line,
.card-desc,
.rank-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-desc {
  min-height: 42px;
}

.mini-tags {
  gap: 6px;
}

.mini-tags span {
  min-height: 24px;
  padding: 3px 8px;
}

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

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

.category-card {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 154px;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

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

.category-card span {
  position: absolute;
  inset: auto 16px 16px 16px;
}

.category-card strong,
.category-card em {
  display: block;
}

.category-card strong {
  font-size: 20px;
}

.category-card em {
  margin-top: 6px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

.rank-panel,
.story-card,
.filter-panel {
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 6px 12px;
  align-items: center;
  padding: 11px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
  transition: background 0.2s ease;
}

.ranking-list a:hover {
  background: rgba(245, 158, 11, 0.12);
}

.rank-num {
  grid-row: span 2;
  color: #fbbf24;
  font-weight: 900;
  font-size: 18px;
}

.rank-title {
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 72px);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.72)),
    radial-gradient(circle at 80% 18%, rgba(245, 158, 11, 0.28), transparent 30rem);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 260px;
}

.ranking-hero {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.52)),
    var(--hero-cover) center / cover;
}

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

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  height: 100%;
  padding: 18px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.category-info p {
  color: var(--muted);
  line-height: 1.8;
}

.rank-card-grid {
  display: grid;
  gap: 14px;
}

.rank-card a {
  display: grid;
  grid-template-columns: 64px 100px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 130px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
}

.rank-large {
  color: #fbbf24;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.rank-card img {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-card-body {
  display: grid;
  gap: 8px;
}

.rank-card-body strong {
  font-size: 20px;
}

.rank-card-body em,
.rank-card-body span {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.filter-panel {
  margin-top: 28px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 200px 200px 120px;
  gap: 12px;
}

.filter-panel button {
  border: 0;
}

.filter-note {
  color: var(--muted);
  margin-bottom: 18px;
}

.movie-card.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--muted);
}

.breadcrumb a {
  color: #fbbf24;
}

.breadcrumb em {
  color: #e2e8f0;
  font-style: normal;
}

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-meta span {
  display: inline-grid;
  gap: 3px;
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid var(--line);
}

.detail-meta em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 50px rgba(234, 88, 12, 0.36);
  font-size: 30px;
  padding-left: 5px;
}

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

.story-card {
  padding: 28px;
}

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

.story-card p {
  color: #cbd5e1;
  line-height: 2;
  margin: 0;
}

.site-footer {
  margin-top: 96px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand p,
.copyright {
  color: var(--muted);
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  text-align: center;
  font-size: 13px;
}

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

  .split-section,
  .detail-content,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  main {
    width: min(100% - 24px, 1200px);
    padding-top: 88px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

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

  .hero-content {
    bottom: 160px;
  }

  .hero-search {
    left: 18px;
    right: 18px;
    bottom: 78px;
    width: auto;
  }

  .hero-dots {
    bottom: 38px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-overview-card a,
  .detail-layout,
  .rank-card a {
    grid-template-columns: 1fr;
  }

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

  .rank-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .hero,
  .page-hero,
  .detail-hero,
  .player-shell {
    border-radius: 20px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .hero-desc,
  .page-hero p,
  .detail-lead {
    font-size: 15px;
  }

  .movie-grid,
  .movie-grid.wide,
  .movie-grid.catalog-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
