* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: #0f1b2e;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --gold: #facc15;
  --orange: #f97316;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(250, 204, 21, 0.12), transparent 34%),
    radial-gradient(circle at 84% 0%, rgba(249, 115, 22, 0.14), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
body.menu-open .site-header {
  background: rgba(2, 6, 23, 0.88);
  border-color: var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #1f1300;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 12px 30px rgba(250, 204, 21, 0.24);
}

.brand-name {
  font-size: 21px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 13px;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

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

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

.mobile-panel {
  display: none;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track {
  min-height: 100vh;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.52fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  width: min(1220px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 120px 0 76px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.hero-slide.active .hero-bg {
  opacity: 1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.84) 44%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.2) 45%, rgba(2, 6, 23, 0.82) 100%);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.18);
  transform: scale(1.08);
}

.hero-content {
  max-width: 760px;
}

.eyebrow,
.section-heading span,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-content p,
.page-hero p,
.section-heading p,
.detail-one-line {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 999px;
  padding: 7px 11px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
  font-size: 13px;
}

.hero-actions,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: #1f1300;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.22);
}

.ghost-button {
  min-height: 48px;
  padding: 0 22px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.movie-card:hover,
.category-chip:hover,
.category-overview-card:hover,
.rank-feature:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.62);
  aspect-ratio: 2 / 3;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: inherit;
  z-index: 1;
}

.hero-poster img,
.movie-cover img,
.detail-poster img,
.rank-feature img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  z-index: 5;
}

.hero-controls button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  opacity: 0.5;
}

.hero-dot.active {
  width: 30px;
  opacity: 1;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.section-block,
.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 10px 0 0;
  letter-spacing: -0.035em;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

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

.category-chip,
.category-overview-card,
.movie-card,
.rank-feature,
.content-card,
.player-shell,
.page-hero,
.detail-hero,
.rank-list {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.category-chip {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 22px;
}

.category-chip span {
  font-size: 20px;
  font-weight: 900;
}

.category-chip small,
.movie-card p,
.category-overview-card p,
.content-card p,
.rank-feature p {
  color: var(--muted);
  line-height: 1.75;
}

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

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  outline: none;
  padding: 0 16px;
}

.filter-bar input {
  min-width: min(320px, 100%);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(250, 204, 21, 0.34);
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.movie-cover img {
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
  opacity: 0.9;
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #1f1300;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #1f1300;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

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

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h2 {
  min-height: 52px;
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.42;
}

.movie-card p {
  min-height: 75px;
  margin: 0 0 12px;
  font-size: 14px;
}

.movie-card.compact h2 {
  min-height: 46px;
  font-size: 16px;
}

.movie-card.compact p {
  min-height: 64px;
  font-size: 13px;
}

.ranking-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.text-link {
  color: var(--gold);
  font-weight: 900;
}

.page-shell {
  padding-top: 112px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(32px, 7vw, 72px);
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 30%;
  height: 280px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.22), transparent 70%);
  pointer-events: none;
}

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

.category-overview-card {
  display: grid;
  gap: 18px;
  border-radius: 24px;
  padding: 26px;
}

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

.category-sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-sample-links a {
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(15, 23, 42, 0.52);
  font-size: 13px;
}

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

.rank-feature {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 24px;
  padding: 16px;
}

.rank-feature a:first-child {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
}

.rank-feature span,
.rank-feature em {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
}

.rank-feature h2 {
  margin: 8px 0;
  font-size: 22px;
}

.rank-list {
  overflow: hidden;
  border-radius: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 58px minmax(0, 1fr) 90px 120px 110px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
}

.rank-row:hover {
  background: rgba(250, 204, 21, 0.08);
}

.rank-row img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
}

.rank-row b,
.rank-row em {
  color: var(--gold);
  font-style: normal;
}

.rank-title {
  color: var(--text);
  font-weight: 900;
}

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

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

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: clamp(20px, 4vw, 44px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.02;
}

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

.large-tags {
  margin-top: 18px;
}

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

.player-shell {
  border-radius: var(--radius-xl);
  padding: 14px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.86));
  border: 0;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #1f1300;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.45);
  font-size: 26px;
}

.player-cover strong {
  font-size: 18px;
}

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

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

.content-card {
  border-radius: 24px;
  padding: 28px;
}

.content-card h2 {
  font-size: 26px;
}

.content-card p {
  font-size: 16px;
}

.next-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 0;
  padding-bottom: 0;
}

.next-nav a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.62);
  padding: 16px 18px;
}

.next-nav a:hover {
  color: var(--gold);
  border-color: rgba(250, 204, 21, 0.32);
}

.site-footer {
  margin-top: 54px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-brand p,
.footer-bottom {
  color: var(--muted);
}

.footer-links h2 {
  font-size: 18px;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .movie-grid,
  .ranking-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .mobile-panel {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    display: block;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  body.menu-open .mobile-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-nav {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.95);
    box-shadow: var(--shadow);
    padding: 14px;
  }

  .mobile-link {
    padding: 12px 14px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 110px;
  }

  .hero-poster {
    max-width: 260px;
    justify-self: start;
  }

  .row-heading,
  .footer-bottom,
  .next-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar {
    justify-content: flex-start;
  }

  .overview-grid,
  .rank-feature-grid,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 42px 52px minmax(0, 1fr);
  }

  .rank-row span:nth-of-type(n + 2),
  .rank-row em {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .section-block,
  .page-shell,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1220px);
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-section,
  .hero-track,
  .hero-slide {
    min-height: 920px;
  }

  .hero-content h1 {
    font-size: 44px;
  }

  .movie-grid,
  .ranking-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .movie-card h2 {
    min-height: 48px;
    font-size: 15px;
  }

  .movie-card p {
    min-height: 68px;
    font-size: 12px;
  }

  .tag-row span {
    font-size: 11px;
    padding: 5px 8px;
  }

  .category-chip {
    min-height: 120px;
    padding: 16px;
  }

  .category-chip span {
    font-size: 17px;
  }

  .rank-feature {
    grid-template-columns: 88px 1fr;
  }

  .content-card {
    padding: 22px;
  }
}
