:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --purple: #7c3aed;
  --purple-soft: #a78bfa;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

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

main {
  overflow: hidden;
}

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.site-logo__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), #f97316 46%, var(--purple-soft));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

.site-logo__text {
  display: grid;
  line-height: 1.1;
}

.site-logo__text strong {
  font-size: 19px;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-logo__text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber-light);
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--soft);
  border-radius: 999px;
}

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

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

.hero {
  position: relative;
  min-height: 660px;
  width: min(1380px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(251, 191, 36, 0.16);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  min-height: 660px;
  padding: clamp(32px, 7vw, 86px);
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber-light), var(--purple-soft));
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-lead,
.detail-lead,
.page-hero p {
  margin: 20px 0 0;
  max-width: 780px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.movie-card__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.58);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-button {
  padding: 13px 22px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.25);
}

.ghost-button {
  padding: 12px 20px;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.54);
}

.text-button {
  color: var(--amber-light);
}

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

.hero-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.hero-search,
.ranking-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.72));
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero-search h2,
.ranking-panel h2,
.side-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.search-box,
.filter-bar {
  display: grid;
  gap: 12px;
}

.search-box input,
.search-box select,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.62);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}

.search-box input:focus,
.search-box select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(251, 191, 36, 0.54);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.09);
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.search-result {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.44);
}

.search-result img,
.mini-card img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.search-result strong,
.mini-card strong {
  display: block;
  color: #f8fafc;
}

.search-result small,
.mini-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.18);
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 72px auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

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

.movie-grid--featured {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.movie-grid--catalog {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.36);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.movie-card__cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(30, 41, 59, 0.65);
}

.movie-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .movie-card__cover img {
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.06);
}

.movie-card__cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #0f172a;
  background: var(--amber-light);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  color: white;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.movie-card__body {
  padding: 16px;
}

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

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--amber-light);
}

.movie-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
}

.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.category-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.category-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.64));
}

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

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

.category-card__content h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card__content p {
  margin: 0 0 12px;
  color: var(--soft);
  line-height: 1.7;
}

.category-card__links {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.category-card__links a {
  color: var(--muted);
  font-size: 14px;
}

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

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

.ranking-panel {
  position: sticky;
  top: 98px;
}

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

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

.ranking-list span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-light), #f97316);
}

.ranking-list strong {
  display: block;
}

.ranking-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(40px, 6vw, 72px);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.28), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 27, 75, 0.78));
  box-shadow: var(--shadow);
}

.page-hero--compact h1,
.page-hero--category h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.filter-bar {
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  min-height: 560px;
  margin: 34px auto 0;
  padding: clamp(22px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.detail-hero__poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

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

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-xl);
  background: black;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
  font-size: 18px;
  font-weight: 900;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay__icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber-light), #f97316);
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.28);
}

.detail-article {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.78);
}

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

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

.detail-article p {
  margin: 0 0 14px;
  color: #dbeafe;
  font-size: 16px;
  line-height: 1.9;
  text-align: justify;
}

.detail-side {
  position: sticky;
  top: 98px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.rank-table th,
.rank-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  text-align: left;
}

.rank-table th {
  color: #fde68a;
  background: rgba(2, 6, 23, 0.42);
}

.rank-table td {
  color: #cbd5e1;
}

.rank-table a {
  color: white;
  font-weight: 800;
}

.site-footer {
  margin-top: 88px;
  padding: 48px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 34px;
}

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

.site-footer p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fde68a;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-slider,
  .hero-slide {
    min-height: 560px;
  }

  .hero-panel,
  .ranking-panel,
  .detail-side {
    position: static;
  }

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

@media (max-width: 760px) {
  .site-header__inner,
  .content-section,
  .page-hero,
  .detail-hero,
  .hero,
  .footer-grid,
  .mobile-nav {
    width: min(100% - 20px, 1280px);
  }

  .site-logo__text small {
    display: none;
  }

  .hero-slider,
  .hero-slide {
    min-height: 530px;
  }

  .hero-slide {
    padding: 28px;
  }

  .category-card,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero__poster {
    max-width: 210px;
  }

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

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

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

  .movie-card__body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    display: none;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .movie-grid--catalog,
  .movie-grid--featured {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
