:root {
  color-scheme: dark;
  --bg-950: #060708;
  --bg-900: #0b0d10;
  --bg-800: #101419;
  --bg-700: #151a21;
  --bg-600: #1a2129;
  --line: #333d47;
  --text: #ffffff;
  --muted: #9ca3af;
  --soft: #cbd5e1;
  --primary: #f5871f;
  --primary-2: #f79f3f;
  --primary-dark: #d66d0f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-900);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(245, 135, 31, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 18%, rgba(247, 159, 63, 0.08), transparent 30rem),
    var(--bg-900);
}

body::selection {
  background: rgba(245, 135, 31, 0.35);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 26, 33, 0.92);
  border-bottom: 1px solid rgba(51, 61, 71, 0.72);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(245, 135, 31, 0.28);
}

.brand-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  font-size: 14px;
  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(--primary);
}

.mobile-toggle {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-700);
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(51, 61, 71, 0.7);
  padding: 12px 20px 18px;
  background: var(--bg-800);
}

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

.hero {
  position: relative;
  min-height: 72vh;
  max-height: 820px;
  overflow: hidden;
  background: var(--bg-950);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: saturate(1.08) contrast(1.06);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 7, 8, 0.96), rgba(11, 13, 16, 0.78) 42%, rgba(11, 13, 16, 0.12)),
    linear-gradient(0deg, var(--bg-900), transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  min-height: 72vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 64px;
  padding: 72px 0;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-desc {
  max-width: 640px;
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta,
.detail-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.meta-line span {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 32px rgba(245, 135, 31, 0.28);
}

.btn.ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.btn.text {
  color: var(--primary-2);
  padding-inline: 8px;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(245, 135, 31, 0.22), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster img,
.poster-wrap img,
.player-cover img,
.category-covers img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(21, 26, 33, 0.52);
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 74px));
}

.hero-control.next {
  right: max(18px, calc((100vw - 1180px) / 2 - 74px));
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--primary);
}

.search-strip,
.content-section,
.filter-panel,
.detail-content,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 24px;
  border: 1px solid rgba(51, 61, 71, 0.8);
  border-radius: var(--radius);
  background: rgba(21, 26, 33, 0.88);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.search-strip h2,
.section-head h2,
.story-card h2,
.footer-group h2 {
  margin: 0;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.search-strip h2,
.section-head h2,
.story-card h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.search-strip p,
.page-hero p,
.category-large p,
.story-card p,
.footer-brand p,
.card-body p,
.rank-copy em {
  color: var(--muted);
  line-height: 1.75;
}

.quick-search {
  display: flex;
  min-width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-900);
}

.quick-search input {
  flex: 1;
  min-width: 0;
  color: var(--text);
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
}

.quick-search button {
  color: #111827;
  border: 0;
  padding: 0 20px;
  font-weight: 850;
  background: var(--primary);
}

.content-section {
  margin-top: 58px;
}

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

.section-head a {
  color: var(--primary-2);
  font-weight: 750;
}

.compact-head {
  margin-bottom: 16px;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 135, 31, 0.24), transparent 32%),
    linear-gradient(135deg, var(--bg-700), var(--bg-950));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

.poster-wrap img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  color: #111827;
  background: var(--primary);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

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

.meta-line {
  gap: 6px;
  margin-bottom: 9px;
}

.meta-line span {
  padding: 4px 8px;
  font-size: 11px;
}

.card-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--primary-2);
}

.card-body p {
  display: -webkit-box;
  min-height: 49px;
  margin: 8px 0 0;
  overflow: hidden;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  color: var(--primary-2);
  background: rgba(245, 135, 31, 0.12);
  border: 1px solid rgba(245, 135, 31, 0.24);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.compact .card-body p {
  display: none;
}

.compact .tag-row {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(51, 61, 71, 0.72);
  border-radius: 18px;
  background: rgba(21, 26, 33, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 135, 31, 0.48);
  background: rgba(26, 33, 41, 0.92);
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  background: var(--bg-600);
}

.rank-number {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

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

.rank-copy em {
  font-style: normal;
  font-size: 13px;
}

.rank-score {
  color: var(--primary-2);
  font-weight: 900;
}

.category-grid,
.category-large-grid {
  display: grid;
  gap: 16px;
}

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

.category-card,
.category-large {
  border: 1px solid rgba(51, 61, 71, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 135, 31, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(21, 26, 33, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card {
  padding: 18px;
}

.category-card:hover,
.category-large:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 135, 31, 0.48);
}

.category-card span,
.category-large h2 {
  color: var(--text);
  font-weight: 850;
}

.category-card p,
.category-large p {
  margin: 8px 0 0;
  font-size: 13px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 28px;
}

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

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-large {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.category-covers img {
  aspect-ratio: 3 / 4.1;
  border-radius: 12px;
  background: var(--bg-600);
}

.filter-panel {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid rgba(51, 61, 71, 0.72);
  border-radius: var(--radius);
  background: rgba(21, 26, 33, 0.8);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
}

.filter-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  height: 44px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  outline: none;
  padding: 0 12px;
  background: var(--bg-900);
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: rgba(245, 135, 31, 0.65);
}

.detail-hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: var(--bg-950);
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 610px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: center;
  gap: 52px;
  padding: 76px 0 54px;
}

.detail-poster {
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: var(--bg-700);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(36px, 6vw, 72px);
}

.lead {
  max-width: 780px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.8;
}

.big-tags {
  margin-top: 20px;
}

.player-section {
  margin-top: 48px;
}

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

.movie-video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  background: #000;
}

.player-cover {
  z-index: 2;
  padding: 0;
  color: var(--text);
  border: 0;
  background: #000;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(245, 135, 31, 0.22), transparent 26%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
}

.player-cover.is-hidden {
  display: none;
}

.play-circle {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 45px rgba(245, 135, 31, 0.38);
  transform: translate(-50%, -50%);
}

.play-circle span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #111827;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

.story-card {
  padding: 28px;
  border: 1px solid rgba(51, 61, 71, 0.72);
  border-radius: var(--radius);
  background: rgba(21, 26, 33, 0.82);
}

.story-card p {
  margin: 16px 0 0;
  font-size: 16px;
}

.wide-rank {
  grid-template-columns: 1fr 1fr;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(51, 61, 71, 0.72);
  background: var(--bg-800);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 1fr;
  gap: 38px;
  padding: 42px 0;
}

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

.footer-group h2 {
  margin-bottom: 14px;
  font-size: 16px;
}

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

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

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: var(--muted);
  border-top: 1px solid rgba(51, 61, 71, 0.6);
  font-size: 13px;
  text-align: center;
}

.poster-wrap.no-image img,
.hero-poster.no-image img,
.detail-poster.no-image img,
.category-covers .no-image,
.rank-row.no-image img {
  display: none;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 34px;
  }

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

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

  .wide-rank {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: flex;
  }

  .hero,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 22px;
    padding: 76px 0 88px;
  }

  .hero-poster {
    width: min(230px, 62vw);
    order: -1;
  }

  .hero-control {
    display: none;
  }

  .search-strip,
  .split-section,
  .detail-shell,
  .detail-content,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .search-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-search {
    min-width: 0;
    height: 46px;
  }

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

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

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

  .detail-shell {
    gap: 28px;
    padding-top: 46px;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }

  .player-wrap {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .search-strip,
  .content-section,
  .filter-panel,
  .detail-content,
  .player-section,
  .page-hero,
  .detail-shell,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero-meta span,
  .detail-meta span {
    font-size: 12px;
  }

  .movie-grid,
  .compact-grid {
    gap: 14px;
  }

  .card-body h3 {
    font-size: 15px;
  }

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

  .rank-score {
    display: none;
  }

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