:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.34);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --rose: #f43f5e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(244, 63, 94, 0.1), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.container,
.header-inner,
.footer-inner,
.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

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

.logo-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 12px 38px rgba(245, 158, 11, 0.28);
}

.logo-text {
  display: grid;
  line-height: 1.25;
}

.logo-text strong {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.logo-text small {
  color: var(--subtle);
  font-size: 12px;
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 6px;
}

.desktop-nav {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 8px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-nav.open {
  display: grid;
}

.hero-carousel {
  position: relative;
  height: clamp(560px, 76vh, 760px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 34%, rgba(2, 6, 23, 0.18) 72%),
    linear-gradient(0deg, #020617 0%, transparent 42%),
    radial-gradient(circle at 28% 72%, rgba(245, 158, 11, 0.18), transparent 28rem);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2));
  bottom: clamp(64px, 13vh, 130px);
  z-index: 2;
  width: min(720px, calc(100% - 48px));
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1,
.movie-detail-text h1 {
  margin: 0;
  color: #fff;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  font-size: clamp(42px, 7vw, 88px);
}

.hero-content p {
  width: min(680px, 100%);
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.tag-row,
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.sidebar-tags a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.hero-tags span,
.detail-tags span,
.sidebar-tags a {
  padding: 7px 12px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.section-link,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.primary-button {
  padding: 0 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.26);
}

.ghost-button,
.section-link,
.panel-link {
  padding: 0 22px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.62);
}

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

.ghost-button:hover,
.section-link:hover,
.panel-link:hover {
  border-color: var(--line-strong);
  color: #fff;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 76px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 36px;
  background: var(--amber);
}

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

.alt-section {
  background: rgba(15, 23, 42, 0.3);
  border-block: 1px solid var(--line);
}

.intro-section {
  padding-top: 52px;
}

.intro-grid,
.two-column-layout,
.detail-layout {
  display: grid;
  gap: 32px;
}

.intro-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
}

.intro-grid h2,
.section-heading h2,
.ranking-panel h2,
.sidebar-card h2,
.more-categories h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  line-height: 1.2;
}

.intro-grid h2 {
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: -0.035em;
}

.intro-grid p,
.section-heading p,
.page-hero p,
.movie-card p,
.footer-brand p,
.category-card p,
.text-block p {
  color: var(--muted);
}

.intro-grid p {
  max-width: 680px;
  margin: 14px 0 0;
  font-size: 18px;
}

.search-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.search-input {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #fff;
  outline: none;
  background: rgba(2, 6, 23, 0.84);
}

.search-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.category-pill {
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-pill:hover,
.movie-card:hover,
.category-card:hover,
.side-item:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-pill strong {
  display: block;
  color: #fff;
  font-size: 18px;
}

.category-pill span {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 13px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 8px 0 0;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 24px;
  scroll-snap-type: x proximity;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.1);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  color: #fff;
  font-size: 12px;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #020617;
  background: #fcd34d;
}

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

.movie-title {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.28;
}

.movie-title:hover {
  color: #fcd34d;
}

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

.movie-meta,
.detail-badges,
.detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-meta span,
.detail-badges span,
.detail-meta-line span,
.detail-meta-line a {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
}

.movie-meta span {
  padding: 3px 8px;
  font-size: 12px;
}

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

.feature-list {
  display: grid;
  gap: 16px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.movie-card-wide .poster-link {
  aspect-ratio: auto;
  min-height: 160px;
}

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

.ranking-panel,
.sidebar-card {
  position: sticky;
  top: 94px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.side-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.side-item {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.34);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.side-item > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #020617;
  font-weight: 900;
  background: #fcd34d;
}

.side-item img {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.side-item strong {
  overflow: hidden;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-item em {
  color: #fcd34d;
  font-style: normal;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(244, 63, 94, 0.14), transparent 24rem),
    rgba(2, 6, 23, 0.52);
}

.page-hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  max-width: 820px;
}

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

.page-hero .search-panel {
  max-width: 680px;
  margin-top: 28px;
}

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

.category-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card a {
  display: grid;
  padding: 18px;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  min-height: 118px;
}

.category-posters img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.category-card h2 {
  margin: 18px 0 6px;
  color: #fff;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 14px;
}

.category-card span {
  color: #fcd34d;
  font-weight: 900;
}

.more-categories {
  margin-top: 46px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.more-categories div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.more-categories a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.more-categories a:hover {
  border-color: var(--line-strong);
  color: #fff;
}

.detail-main {
  padding: 34px 0 78px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 24px;
  color: var(--subtle);
}

.breadcrumb a:hover {
  color: #fcd34d;
}

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

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  border: 0;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.32));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button-large {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 18px 42px rgba(244, 63, 94, 0.3);
  font-size: 34px;
}

.player-cover strong {
  max-width: 80%;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.15;
}

.movie-detail-text {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.movie-detail-text h1 {
  font-size: clamp(32px, 5vw, 58px);
}

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

.detail-badges span,
.detail-meta-line span,
.detail-meta-line a {
  padding: 7px 12px;
}

.detail-meta-line {
  margin-top: 16px;
}

.detail-meta-line a {
  color: #fcd34d;
}

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

.text-block {
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.32);
}

.text-block h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 22px;
}

.text-block p {
  margin: 0;
  font-size: 16px;
}

.review-block {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.08);
}

.related-section {
  padding-bottom: 0;
}

.detail-sidebar {
  display: grid;
  gap: 20px;
}

.sidebar-card {
  position: static;
}

.sidebar-tags {
  margin-top: 16px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 42px;
  padding: 52px 0;
}

.footer-brand p {
  max-width: 560px;
  margin: 18px 0 0;
}

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

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

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

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

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  text-align: center;
}

.is-hidden-by-filter {
  display: none !important;
}

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

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .logo-text small {
    display: none;
  }

  .hero-carousel {
    height: 640px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.18) 100%);
  }

  .hero-content {
    bottom: 84px;
  }

  .hero-dots {
    right: auto;
    left: 24px;
    bottom: 38px;
  }

  .intro-grid,
  .footer-inner,
  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .movie-card-wide .poster-link {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }

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

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

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

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

  .movie-detail-text {
    padding: 20px;
  }

  .side-item {
    grid-template-columns: 30px 52px minmax(0, 1fr) auto;
  }
}
