:root {
  color-scheme: dark;
  --bg: #1c1917;
  --bg-soft: #292524;
  --bg-panel: #1f1b18;
  --card: #292524;
  --card-strong: #3b342f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(245, 158, 11, 0.22);
  --text: #fafaf9;
  --muted: #a8a29e;
  --muted-strong: #d6d3d1;
  --accent: #d97706;
  --accent-light: #f59e0b;
  --accent-soft: rgba(217, 119, 6, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  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;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.16), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(120, 53, 15, 0.22), transparent 40rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: rgba(28, 25, 23, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.scrolled {
  background: rgba(41, 37, 36, 0.96);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-light), #57534e 72%);
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.28);
  transition: transform 180ms ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text,
.footer-logo div {
  display: grid;
  line-height: 1.15;
}

.brand-text strong,
.footer-logo strong {
  color: #fef3c7;
  font-size: 1.12rem;
}

.brand-text small,
.footer-logo small {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent);
  color: white;
}

.nav-menu {
  position: relative;
}

.nav-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 220px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(41, 37, 36, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

.nav-menu:hover .nav-panel,
.nav-menu:focus-within .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted-strong);
}

.nav-panel a:hover {
  background: var(--card-strong);
  color: var(--accent-light);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 270px;
}

.header-search input,
.hero-search input,
.inline-filter input {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  color: white;
  background: rgba(68, 64, 60, 0.82);
  border-radius: 14px;
  padding: 11px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.header-search input:focus,
.hero-search input:focus,
.inline-filter input:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(87, 83, 78, 0.9);
}

.header-search button,
.hero-search button,
.inline-filter button {
  border: 0;
  color: white;
  background: var(--accent);
  border-radius: 14px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.header-search button:hover,
.hero-search button:hover,
.inline-filter button:hover,
.primary-button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: var(--card);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--text);
}

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

main {
  min-height: 62vh;
}

.hero {
  position: relative;
  min-height: 850px;
  padding: 124px 0 70px;
  overflow: hidden;
}

.hero > h1,
.hero-intro,
.hero-search,
.hero-stage,
.hero-controls,
.section-block,
.page-shell,
.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hero > h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  max-width: 980px;
}

.hero-intro {
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  max-width: 780px;
  margin-bottom: 24px;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-bottom: 30px;
}

.hero-stage {
  position: relative;
  height: 540px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.95), rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.18)),
    linear-gradient(0deg, rgba(12, 10, 9, 0.42), transparent 52%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 650px;
  padding: clamp(28px, 5vw, 72px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-light);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h2,
.page-hero h1,
.detail-header h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p:not(.eyebrow) {
  color: var(--muted-strong);
  font-size: 1.12rem;
  line-height: 1.9;
  max-width: 620px;
}

.hero-tags,
.tag-row,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(68, 64, 60, 0.78);
  border: 1px solid var(--line);
  font-size: 0.83rem;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-button {
  color: white;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.26);
}

.ghost-button {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(41, 37, 36, 0.62);
}

.ghost-button:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
  transform: translateY(-1px);
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.hero-controls button {
  border: 1px solid var(--line);
  color: white;
  background: rgba(41, 37, 36, 0.82);
  border-radius: 999px;
  min-width: 42px;
  height: 42px;
  cursor: pointer;
}

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

.hero-dot {
  width: 32px;
  min-width: 32px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
  background: rgba(168, 162, 158, 0.42);
}

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

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

.flat-section {
  padding-top: 32px;
}

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

.section-heading p {
  margin: 0 0 6px;
  color: var(--accent-light);
  font-weight: 800;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: var(--accent-light);
}

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

.category-tile {
  min-height: 154px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.12), transparent),
    rgba(41, 37, 36, 0.78);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  color: #fef3c7;
  font-size: 1.2rem;
  font-weight: 800;
}

.category-tile p,
.category-overview-card p,
.card-content p,
.content-card p,
.page-hero p,
.footer-brand p {
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.86);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0a09;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.poster-card:hover img {
  transform: scale(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.84), transparent 55%);
}

.poster-wrap figcaption {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

.poster-wrap figcaption span,
.rank-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.poster-wrap figcaption small {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
}

.card-content {
  padding: 18px;
}

.card-content h2 {
  margin: 0 0 9px;
  color: white;
  font-size: 1.05rem;
  line-height: 1.35;
  transition: color 160ms ease;
}

.movie-card:hover h2 {
  color: var(--accent-light);
}

.card-content p {
  margin: 0 0 13px;
  font-size: 0.93rem;
}

.card-meta {
  margin-bottom: 11px;
}

.tag-row span {
  background: rgba(68, 64, 60, 0.55);
}

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

.compact-card {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.82);
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

.compact-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.compact-card img {
  width: 116px;
  height: 76px;
  object-fit: cover;
  border-radius: 13px;
  transition: transform 360ms ease;
}

.compact-rank {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  flex: 0 0 auto;
}

.compact-card b {
  display: block;
  margin-bottom: 6px;
  color: white;
  line-height: 1.35;
}

.compact-card small {
  color: var(--muted);
}

.page-shell {
  padding: 112px 0 58px;
}

.page-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.16), transparent),
    rgba(41, 37, 36, 0.78);
  box-shadow: var(--shadow);
}

.small-hero {
  padding: clamp(28px, 5vw, 58px);
}

.small-hero h1 {
  max-width: 920px;
}

.small-hero p:last-child,
.small-hero > p:not(.eyebrow) {
  max-width: 820px;
}

.inline-filter {
  display: flex;
  gap: 10px;
  width: min(680px, 100%);
  margin-top: 24px;
}

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

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

.category-overview-grid {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(41, 37, 36, 0.8);
  transition: transform 160ms ease, border-color 160ms ease;
}

.category-overview-card h2 {
  margin: 0;
  font-size: 1.8rem;
}

.category-overview-card p:first-child {
  margin: 0 0 8px;
  color: var(--accent-light);
  font-weight: 800;
}

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

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

.detail-main,
.detail-sidebar {
  display: grid;
  gap: 20px;
}

.video-panel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 24%),
    rgba(0, 0, 0, 0.28);
  color: white;
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 18px 46px rgba(217, 119, 6, 0.36);
  font-size: 2rem;
  padding-left: 4px;
}

.play-cover.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-header {
  padding: 8px 0 2px;
}

.detail-header h1 {
  margin-bottom: 18px;
}

.content-card,
.side-block,
.poster-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.84);
  overflow: hidden;
}

.content-card,
.side-block {
  padding: 22px;
}

.content-card h2,
.side-block h2 {
  margin: 0 0 13px;
  color: #fef3c7;
  font-size: 1.25rem;
}

.content-card p {
  margin: 0;
  white-space: pre-wrap;
}

.poster-card {
  position: sticky;
  top: 94px;
  padding: 14px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 360ms ease;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.52);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: white;
}

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

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

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

.footer-brand p {
  max-width: 560px;
}

.copyright {
  color: #78716c;
  font-size: 0.85rem;
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .poster-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

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

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 108px;
  }

  .hero-stage {
    height: 620px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.54));
  }

  .hero-content {
    justify-content: end;
    padding: 28px;
  }

  .hero-search {
    flex-direction: column;
  }

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

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

  .compact-card img {
    width: 104px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .hero > h1,
  .hero-intro,
  .hero-search,
  .hero-stage,
  .hero-controls,
  .section-block,
  .page-shell,
  .footer-grid,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 1rem;
  }

  .hero-stage {
    height: 580px;
    border-radius: 22px;
  }

  .hero-actions,
  .inline-filter {
    flex-direction: column;
  }

  .ghost-button,
  .primary-button,
  .inline-filter button {
    width: 100%;
  }

  .small-hero {
    padding: 24px;
  }

  .content-card,
  .side-block {
    padding: 18px;
  }

  .play-cover span {
    width: 72px;
    height: 72px;
  }
}
