:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --radius: 1.25rem;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 30rem), var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(2, 6, 23, 0.92));
  z-index: -1;
}

.site-shell {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo-link,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark,
.footer-logo span {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.35);
}

.logo-text {
  color: var(--text);
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link,
.mobile-nav-link {
  color: var(--muted-strong);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search input,
.page-filter input {
  min-width: 16rem;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  outline: none;
}

.header-search input:focus,
.page-filter input:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.page-filter button {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  color: var(--text);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  background: rgba(148, 163, 184, 0.1);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0.75rem 1rem 1rem;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.4rem;
}

.hero-carousel {
  position: relative;
  min-height: 42rem;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transform: scale(1.03);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 42rem;
  display: flex;
  align-items: center;
  padding-top: 4rem;
}

.hero-copy {
  width: min(100%, 43rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.hero-tags,
.detail-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-tags span,
.detail-meta span,
.movie-meta span {
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-size: 0.85rem;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

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

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.22);
}

.ghost-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid var(--line);
}

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

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

.hero-dots button {
  width: 2.4rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.is-active {
  background: var(--accent);
}

.section-block {
  padding: 4.5rem 0;
}

.section-dark {
  background: #020617;
}

.section-deep {
  background: linear-gradient(180deg, #020617, #0f172a);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-heading.compact {
  align-items: start;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

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

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

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-link img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

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

.poster-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 3.4rem;
  height: 3.4rem;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding: 1rem;
}

.movie-card-body h3 {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.movie-card-body h3 a:hover {
  color: var(--accent);
}

.movie-card-body p {
  min-height: 3.4rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

.movie-meta {
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.movie-meta span {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-row span {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 0.45rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
}

.movie-card-featured {
  grid-column: span 2;
}

.movie-card-featured .poster-link {
  aspect-ratio: 16 / 9;
}

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

.category-card,
.category-overview-card,
.content-card,
.content-side,
.ranking-panel {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
}

.category-card {
  display: grid;
  gap: 0.55rem;
  padding: 1.25rem;
}

.category-card strong {
  font-size: 1.15rem;
  color: var(--text);
}

.category-card span,
.category-overview-head p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.category-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-3px);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.5rem;
  align-items: start;
}

.ranking-panel {
  padding: 1.25rem;
}

.sticky-panel {
  position: sticky;
  top: 5.25rem;
}

.rank-list {
  display: grid;
  gap: 0.75rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 2.4rem 3.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted-strong);
  padding: 0.55rem;
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.42);
}

.rank-item:hover {
  color: var(--text);
  background: rgba(245, 158, 11, 0.12);
}

.rank-number {
  color: var(--accent);
  font-weight: 900;
}

.rank-item img {
  width: 3.2rem;
  height: 4.4rem;
  object-fit: cover;
  border-radius: 0.55rem;
  background: #111827;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-year {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.page-main {
  padding-top: 4rem;
  background: #020617;
}

.page-hero {
  padding: 5.2rem 0 3rem;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 56rem;
}

.page-filter {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.page-filter input {
  min-width: min(100%, 28rem);
}

.category-overview-list {
  display: grid;
  gap: 1.35rem;
  padding-bottom: 4rem;
}

.category-overview-card {
  padding: 1.25rem;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-overview-head h2 {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 0.45rem;
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 43rem;
  overflow: hidden;
  background: #020617;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
  padding-bottom: 3rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted-strong);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 1.5rem;
  background: #111827;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-info {
  max-width: 48rem;
}

.detail-meta {
  margin-bottom: 1.2rem;
}

.detail-tags {
  margin-top: 0.8rem;
}

.player-section {
  margin-top: -3rem;
  position: relative;
  z-index: 5;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 1.5rem;
  background: #000;
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow: var(--shadow);
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 5rem;
  height: 5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-size: 1.8rem;
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.35);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.5rem;
  padding: 3rem 0 4rem;
}

.content-card,
.content-side {
  padding: 1.5rem;
}

.content-card h2,
.content-side h2 {
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0 0 1rem;
}

.content-card p {
  color: var(--muted-strong);
  line-height: 2;
  margin-bottom: 1.4rem;
  text-align: justify;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.inline-links a {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.content-side dl {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.85rem;
  color: var(--muted-strong);
}

.content-side dt {
  color: var(--muted);
}

.search-results-section {
  padding-bottom: 4rem;
}

.site-footer {
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.footer-logo {
  margin-bottom: 1rem;
}

.site-footer h3 {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.site-footer li + li {
  margin-top: 0.55rem;
}

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

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  color: var(--muted);
  text-align: center;
  padding: 1.1rem 1rem;
  border-top: 1px solid var(--line);
}

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

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

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

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero-carousel,
  .hero-content {
    min-height: 36rem;
  }

  .movie-grid,
  .featured-grid,
  .small-grid,
  .category-grid,
  .full-rank-list,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 1rem, 80rem);
  }

  .hero-carousel,
  .hero-content {
    min-height: 34rem;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.25rem;
  }

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

  .movie-card-featured {
    grid-column: span 1;
  }

  .category-overview-head,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 14rem;
  }

  .rank-item {
    grid-template-columns: 2rem 2.6rem minmax(0, 1fr);
  }

  .rank-year {
    display: none;
  }
}
