:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #1e293b;
  --card-hover: #334155;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --red: #ef4444;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.13), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(239, 68, 68, 0.10), transparent 32rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-logo__mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.25);
  font-size: 15px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 15px;
}

.nav-link {
  transition: color 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.72);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.mobile-nav a {
  color: var(--muted);
  padding: 7px 0;
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.86) 36%, rgba(2, 6, 23, 0.48) 72%, rgba(2, 6, 23, 0.9) 100%),
    linear-gradient(0deg, #020617 0%, transparent 34%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
  padding: 70px 0 115px;
}

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

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hero-copy p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.movie-card__meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: var(--subtle);
  font-size: 14px;
}

.hero-meta span,
.movie-card__meta span,
.detail-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.button--primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.22);
}

.button--ghost {
  color: #ffffff;
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.52);
}

.button--wide {
  width: 100%;
  margin-top: 14px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-light);
  font-weight: 800;
}

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.active {
  background: var(--amber-light);
}

.hero-mini-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(590px, 58vw);
}

.hero-mini {
  overflow: hidden;
  min-height: 82px;
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
}

.hero-mini img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

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

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

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--amber-light);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.section-heading h2,
.side-panel h2,
.detail-article h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-heading p,
.side-panel p {
  margin: 10px 0 0;
  color: var(--subtle);
  line-height: 1.75;
}

.section-link {
  color: var(--amber-light);
  font-weight: 800;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 45%),
    rgba(15, 23, 42, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(30, 41, 59, 0.86);
}

.category-tile span {
  color: var(--amber-light);
  font-weight: 900;
}

.category-tile strong {
  margin-top: 16px;
  color: #ffffff;
  font-size: 23px;
  line-height: 1.2;
}

.category-tile em {
  margin-top: 12px;
  color: var(--subtle);
  font-style: normal;
  line-height: 1.6;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.88);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  background: rgba(51, 65, 85, 0.94);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
}

.movie-card__link {
  display: block;
  height: 100%;
}

.movie-card__poster {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

.movie-card__poster img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card--large .movie-card__poster img {
  height: 330px;
}

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

.movie-card__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 55%);
}

.movie-card__poster figcaption {
  position: absolute;
  z-index: 1;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-light);
}

.movie-card__body {
  padding: 17px;
}

.movie-card h2 {
  margin: 10px 0 8px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0;
  min-height: 50px;
  color: var(--subtle);
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.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-radius: 999px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.78);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.tag-row--hero span {
  background: rgba(245, 158, 11, 0.82);
}

.movie-card--wide {
  background: rgba(15, 23, 42, 0.86);
}

.movie-card--wide .movie-card__link {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0;
}

.movie-card--wide .movie-card__poster img {
  height: 150px;
}

.movie-card--wide .movie-card__body {
  padding: 16px 18px;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.side-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.side-panel--sticky {
  position: sticky;
  top: 94px;
}

.side-movie-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.side-movie-grid .movie-card__poster img {
  height: 160px;
}

.page-hero {
  padding: 84px 0 64px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.13), transparent 46%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.65));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

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

.category-card a {
  min-height: 260px;
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0f172a;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.category-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

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

.category-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.category-card span {
  color: var(--amber-light);
  font-weight: 900;
}

.category-card h2 {
  margin: 8px 0;
  color: #ffffff;
  font-size: 25px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  color: var(--subtle);
}

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

.search-box input::placeholder {
  color: #64748b;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.66);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #111827;
  border-color: transparent;
  background: var(--amber-light);
}

.detail-hero {
  position: relative;
  padding: 70px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.76));
  border-bottom: 1px solid var(--line);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--subtle);
  font-size: 14px;
}

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

.detail-copy h1 {
  max-width: 820px;
  margin: 18px 0;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.052em;
}

.detail-copy p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  padding: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.26), transparent 18rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.26));
  text-align: center;
}

.player-overlay.hidden {
  display: none;
}

.player-overlay__icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 16px 45px rgba(245, 158, 11, 0.36);
  font-size: 30px;
}

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

.player-overlay em {
  max-width: 680px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.detail-section {
  padding: 28px 0 38px;
}

.detail-article {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-article h2:not(:first-child) {
  margin-top: 26px;
}

.detail-article p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  position: relative;
  margin-top: 36px;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.site-logo--footer {
  margin-bottom: 16px;
}

.site-footer p {
  margin: 0;
  max-width: 420px;
  color: var(--subtle);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

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

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

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

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: var(--amber-light);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  font-weight: 900;
}

.back-top.show {
  display: grid;
  place-items: center;
}

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

@media (max-width: 1080px) {
  .hero-content {
    grid-template-columns: 1fr 280px;
  }

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

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

  .section-block--split {
    grid-template-columns: 1fr;
  }

  .side-panel--sticky {
    position: static;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    min-height: 780px;
  }

  .hero-content {
    min-height: 700px;
    grid-template-columns: 1fr;
    padding-top: 46px;
    gap: 28px;
  }

  .hero-poster {
    width: min(270px, 78vw);
    transform: none;
  }

  .hero-bottom {
    display: block;
  }

  .hero-mini-list {
    display: none;
  }

  .hero-dots {
    justify-content: center;
  }

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

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

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

@media (max-width: 560px) {
  .container,
  .site-header__inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .site-logo {
    font-size: 18px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.035em;
  }

  .hero-actions,
  .page-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

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

  .movie-card--wide .movie-card__link {
    grid-template-columns: 120px 1fr;
  }

  .movie-card--wide .movie-card__poster img {
    height: 145px;
  }

  .movie-card__poster img,
  .movie-card--large .movie-card__poster img {
    height: 250px;
  }

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

  .page-hero {
    padding: 58px 0 46px;
  }

  .detail-article {
    padding: 22px;
  }
}
