:root {
  --bg: #0a0a0a;
  --panel: #171717;
  --panel-soft: #1f1f1f;
  --panel-strong: #262626;
  --line: #2d2d2d;
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a3a3a3;
  --muted-strong: #d4d4d4;
  --gold: #f59e0b;
  --gold-dark: #d97706;
  --gold-soft: rgba(245, 158, 11, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(23, 23, 23, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark,
.footer-logo span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #171717;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.05em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--gold);
  color: #171717;
}

.nav-link.compact {
  color: var(--muted);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.16) 100%), linear-gradient(0deg, rgba(10, 10, 10, 0.92), transparent 45%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(640px, 100%);
  padding-top: 58px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #171717;
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 32px;
  color: var(--muted-strong);
  font-size: 19px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  background: var(--gold);
  color: #171717;
}

.primary-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

.ghost-btn,
.filter-link {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-soft);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover,
.filter-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  color: var(--text);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: 0.25s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.74);
  color: var(--gold);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.search-band {
  margin-top: -54px;
  position: relative;
  z-index: 20;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 470px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 23, 23, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: 25px;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-form,
.filter-bar {
  display: flex;
  gap: 12px;
}

.search-form input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f0f0f;
  color: var(--text);
  outline: none;
  padding: 0 16px;
}

.search-form input:focus,
.filter-bar input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.search-form button {
  min-width: 92px;
  border: 0;
  border-radius: 14px;
  background: var(--gold);
  color: #171717;
  font-weight: 900;
  cursor: pointer;
}

.page-stack {
  padding: 72px 0 96px;
}

.content-section + .content-section,
.page-stack .content-section + .content-section {
  margin-top: 88px;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card a {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel-strong);
}

.movie-card.is-featured .card-poster {
  min-height: 320px;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 56%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-tags {
  position: absolute;
  top: 12px;
  left: 12px;
}

.card-tags span,
.type-badge,
.rank-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(23, 23, 23, 0.9);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.type-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  min-width: 34px;
  justify-content: center;
  background: var(--gold);
  color: #171717;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.32;
  transition: color 0.25s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3 {
  color: var(--gold);
}

.movie-card.is-featured h3 {
  font-size: 24px;
}

.card-body p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #737373;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.4s ease;
}

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

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.category-card em {
  margin-top: 8px;
  color: var(--muted-strong);
  font-style: normal;
  font-size: 13px;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  scroll-snap-align: start;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #101010;
}

.footer-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand p,
.footer-list a,
.footer-bottom {
  color: var(--muted);
}

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

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

.footer-list a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
}

.sub-page {
  min-height: 72vh;
  padding-bottom: 90px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.18), transparent 32%), linear-gradient(135deg, #101010, #050505);
}

.compact-hero {
  padding: 92px 0 64px;
  border-bottom: 1px solid var(--line);
}

.ranking-hero {
  padding: 110px 0 78px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
}

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

.crumbs a:hover {
  color: var(--gold);
}

.filter-bar {
  margin-bottom: 28px;
  align-items: center;
}

.large-filter {
  position: sticky;
  top: 84px;
  z-index: 10;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px);
}

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

.empty-state {
  display: none;
  margin: 24px 0 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: var(--panel);
}

.empty-state.is-visible {
  display: block;
}

.category-overview-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: 0.25s ease;
}

.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

.category-title em {
  color: var(--gold);
  font-style: normal;
}

.category-overview-card p {
  min-height: 68px;
  color: var(--muted);
}

.category-samples {
  display: grid;
  gap: 8px;
}

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

.category-samples a:hover {
  color: var(--gold);
}

.detail-hero {
  min-height: 620px;
}

.detail-bg,
.detail-bg-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  opacity: 0.25;
  filter: blur(2px);
}

.detail-bg-shade {
  background: linear-gradient(90deg, #0a0a0a 0%, rgba(10, 10, 10, 0.78) 56%, rgba(10, 10, 10, 0.52) 100%), linear-gradient(0deg, #0a0a0a, transparent 42%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  padding: 74px 0 60px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 46px;
  align-items: center;
  margin-top: 34px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: 19px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
  margin: 0 0 30px;
}

.detail-meta div {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(23, 23, 23, 0.72);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 800;
}

.player-section {
  padding-top: 72px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.82));
}

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

.play-ring,
.player-cover strong {
  position: relative;
  z-index: 2;
}

.play-ring {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  color: #171717;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 0 0 14px rgba(245, 158, 11, 0.16);
}

.player-cover strong {
  font-size: 20px;
}

.article-section {
  margin-top: 70px;
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.article-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.article-card p {
  margin: 0;
  color: var(--muted-strong);
  white-space: pre-line;
}

.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.detail-nav a {
  flex: 1;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted-strong);
  transition: 0.25s ease;
}

.detail-nav a:last-child {
  text-align: right;
}

.detail-nav a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

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

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(23, 23, 23, 0.98);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
  }

  .hero {
    height: 680px;
    min-height: 680px;
  }

  .hero-copy {
    padding-top: 86px;
  }

  .hero-control {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .movie-card.is-featured {
    grid-column: auto;
    grid-row: auto;
  }

  .movie-card.is-featured .card-poster {
    min-height: auto;
  }

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

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

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

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .footer-wrap {
    width: min(100% - 22px, var(--max));
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 620px;
    height: 620px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .detail-actions,
  .filter-bar,
  .detail-nav {
    flex-direction: column;
    align-items: stretch;
  }

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

  .movie-grid,
  .featured-grid,
  .library-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-nav a:last-child {
    text-align: left;
  }
}
