:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(17, 24, 39, 0.94);
  --line: rgba(255, 255, 255, 0.10);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --accent: #f59e0b;
  --accent-strong: #f97316;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 28rem),
    linear-gradient(180deg, #030712 0%, #0b1120 46%, #030712 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

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

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111827;
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.28);
}

.brand__text {
  font-size: 20px;
}

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

.desktop-nav a,
.nav-link,
.mobile-nav a {
  border-radius: 999px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.desktop-nav a,
.nav-link {
  padding: 9px 14px;
}

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

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.8);
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f9fafb;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
}

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

.hero {
  position: relative;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.02);
}

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

.hero-slide__backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.76) 45%, rgba(3, 7, 18, 0.36) 100%),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0) 38%),
    var(--hero-image) center/cover no-repeat;
  filter: saturate(1.1);
}

.hero-slide__content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  padding: 76px 0 92px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 0;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111827;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.24);
}

.button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.34);
}

.button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 24, 39, 0.68);
  color: #f9fafb;
}

.button--ghost:hover {
  border-color: rgba(245, 158, 11, 0.42);
  color: #fbbf24;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background: rgba(17, 24, 39, 0.66);
  box-shadow: var(--shadow);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: auto 20px 20px;
  height: 90px;
  border-radius: 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.66));
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  z-index: 5;
}

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

.hero-dot.is-active {
  width: 36px;
  background: #fbbf24;
}

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  align-items: center;
  gap: 28px;
  margin-top: -32px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel--small {
  margin-top: 0;
}

.search-panel h2,
.section-heading h2,
.content-card h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.search-panel p {
  margin: 10px 0 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.52);
}

.search-box span {
  color: #fbbf24;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f9fafb;
}

.search-box input::placeholder {
  color: #6b7280;
}

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

.section-heading a {
  color: #fbbf24;
  font-weight: 900;
}

.section-heading--tight {
  margin-bottom: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.74);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(31, 41, 55, 0.88);
}

.movie-card__poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.movie-card__poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img {
  transform: scale(1.05);
}

.movie-card__score {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.movie-card__body {
  padding: 16px;
}

.movie-card__meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9ca3af;
  font-size: 13px;
}

.movie-card__meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.movie-card h3 {
  margin: 12px 0 6px;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: #9ca3af;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 800;
}

.tag-row--hero,
.tag-row--detail {
  margin-top: 20px;
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 176px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

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

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 7, 18, 0.88) 100%);
}

.category-tile span {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 20px;
}

.category-tile strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: #d1d5db;
  font-size: 13px;
  font-style: normal;
}

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

.split-layout--ranking {
  grid-template-columns: minmax(0, 1fr) 430px;
}

.ranking-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.78);
  padding: 22px;
  box-shadow: var(--shadow);
}

.ranking-panel--sticky {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 36px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(3, 7, 18, 0.34);
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.08);
}

.rank-item__number {
  color: #fbbf24;
  font-size: 18px;
  font-weight: 900;
}

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

.rank-item__content {
  min-width: 0;
}

.rank-item strong,
.rank-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item strong {
  color: #fff;
}

.rank-item em {
  color: #9ca3af;
  font-size: 12px;
  font-style: normal;
}

.rank-item__score {
  color: #fbbf24;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 92px;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.68)),
    var(--page-hero-image) center/cover no-repeat;
}

.page-hero--compact,
.page-hero--ranking {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.2), transparent 24rem),
    linear-gradient(180deg, #111827 0%, #030712 100%);
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.category-overview {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 260px;
  padding: 0;
}

.category-overview::after {
  display: none;
}

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

.category-overview__covers img {
  position: static;
  width: 100%;
  height: 100%;
  min-height: 124px;
  border-radius: 18px;
  opacity: 1;
  object-fit: cover;
}

.category-overview__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 26px;
}

.category-overview__body h2 {
  margin: 12px 0 8px;
  font-size: 30px;
  line-height: 1.12;
}

.category-overview__body p {
  margin: 0 0 18px;
  color: #d1d5db;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.78)),
    var(--detail-image) center/cover no-repeat;
}

.detail-hero__inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: #d1d5db;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
}

.detail-poster {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  max-width: 920px;
}

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

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

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 5;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 22px 50px rgba(245, 158, 11, 0.32);
}

.player-button__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.18);
}

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

.content-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.74);
  padding: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.content-card p {
  margin: 16px 0 0;
  color: #d1d5db;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.84);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 28px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.footer-brand {
  color: #fbbf24;
  font-size: 22px;
}

.site-footer p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #9ca3af;
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  font-size: 13px;
  font-weight: 800;
}

.footer-links a:hover {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.is-filtered-out {
  display: none !important;
}

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

  .menu-button {
    display: flex;
  }

  .hero-slide__content,
  .split-layout,
  .split-layout--ranking,
  .detail-layout,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .hero-slide__content {
    gap: 32px;
  }

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

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

  .ranking-panel--sticky {
    position: static;
    max-height: none;
  }

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

@media (max-width: 820px) {
  .hero-slider,
  .hero-slide__content {
    min-height: 760px;
  }

  .hero-slide__content,
  .section-wrap,
  .site-header__inner,
  .mobile-nav,
  .page-hero > div,
  .detail-hero__inner,
  .site-footer__inner {
    width: min(100% - 24px, 1280px);
  }

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

  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 520px) {
  .brand__text {
    font-size: 17px;
  }

  .hero-slider,
  .hero-slide__content {
    min-height: 720px;
  }

  .hero-slide__content {
    padding-top: 42px;
  }

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

  .search-panel {
    padding: 20px;
  }

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

  .rank-item {
    grid-template-columns: 30px 46px minmax(0, 1fr);
  }

  .rank-item__score {
    display: none;
  }

  .rank-item img {
    width: 46px;
    height: 64px;
  }

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