:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --line: #44403c;
  --text: #fafaf9;
  --muted: #a8a29e;
  --muted-2: #78716c;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(28, 25, 23, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(68, 64, 60, 0.9);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  color: #1c1917;
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.32);
  font-size: 13px;
}

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

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

.nav-link {
  color: #d6d3d1;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

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

.hero-slider {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--bg);
}

.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-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0c0a09 0%, rgba(12, 10, 9, 0.76) 42%, rgba(12, 10, 9, 0.22) 100%);
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 74px;
  max-width: 720px;
}

.hero-badge,
.card-kicker,
.section-heading span {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.94);
  color: #1c1917;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 22px;
  color: #d6d3d1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.hero-meta span:first-child,
.detail-meta span:first-child {
  color: var(--amber);
  font-weight: 900;
}

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

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

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

.btn-primary {
  background: var(--amber);
  color: #1c1917;
}

.btn-primary:hover {
  background: var(--amber-dark);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.78);
  transform: translateY(-2px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 24px 0;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 10px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.text-link {
  color: var(--amber);
  font-weight: 800;
}

.panel-section {
  border-radius: 28px;
  background: rgba(28, 25, 23, 0.74);
}

.gradient-section {
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(28, 25, 23, 0.96), rgba(68, 64, 60, 0.72));
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  background: #111;
}

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

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

.movie-card-large .poster-frame {
  aspect-ratio: 16 / 9;
}

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-kicker {
  margin-bottom: 10px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber);
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

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

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

.card-meta {
  gap: 8px;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 12px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card-horizontal .poster-frame {
  height: 100%;
  aspect-ratio: auto;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

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

.category-tile:hover img {
  opacity: 0.52;
  transform: scale(1.06);
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 20px;
}

.category-tile span {
  padding-top: 118px;
  color: var(--text);
  font-size: 21px;
  font-weight: 900;
}

.category-tile em {
  margin-top: 8px;
  color: #d6d3d1;
  font-size: 13px;
  line-height: 1.7;
  font-style: normal;
}

.category-overview-card {
  min-height: 310px;
  padding: 18px;
}

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

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

.category-overview-copy h2 {
  margin: 0 0 10px;
}

.category-overview-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-copy span {
  color: var(--amber);
  font-weight: 900;
}

.page-hero {
  min-height: 300px;
  display: grid;
  align-items: end;
  border-radius: 28px;
  padding: 42px;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.28), transparent 35%),
    linear-gradient(135deg, rgba(28, 25, 23, 0.98), rgba(41, 37, 36, 0.82));
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 260px;
}

.category-hero {
  min-height: 240px;
}

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

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

.filter-bar {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-bar input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(28, 25, 23, 0.95);
  color: var(--text);
  padding: 0 18px;
  outline: none;
}

.filter-bar input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 12px;
  background: var(--panel-soft);
  color: #d6d3d1;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--amber);
  color: #1c1917;
}

.filter-empty {
  padding: 30px;
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

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

.ranking-card a {
  display: grid;
  grid-template-columns: 72px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 104px;
  border-radius: 18px;
  background: var(--panel);
  padding: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-card a:hover {
  background: var(--panel-soft);
  transform: translateY(-2px);
}

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

.ranking-card img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-copy strong {
  font-size: 18px;
}

.rank-copy em,
.rank-copy small {
  color: var(--muted);
  font-style: normal;
}

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

.detail-main {
  max-width: 1280px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.45));
  color: #fff;
  cursor: pointer;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  color: #1c1917;
  font-size: 30px;
  box-shadow: 0 0 46px rgba(245, 158, 11, 0.45);
}

.player-overlay strong {
  font-size: 22px;
}

.player-overlay em {
  max-width: 80%;
  color: #d6d3d1;
  font-style: normal;
  text-align: center;
}

.detail-copy {
  margin-top: 26px;
}

.detail-copy h1 {
  margin-top: 0;
}

.detail-copy section,
.info-panel {
  margin-top: 22px;
  border-radius: 18px;
  background: var(--panel);
  padding: 24px;
}

.detail-copy h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-copy p {
  margin: 0;
  color: #d6d3d1;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 90px;
}

.detail-side > img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.info-panel dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.info-panel div {
  display: contents;
}

.info-panel dt,
.info-panel dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-panel dt {
  color: var(--muted);
}

.info-panel dd {
  text-align: right;
  color: var(--text);
  font-weight: 800;
}

.info-panel dd a {
  color: var(--amber);
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand p {
  max-width: 460px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: end;
  gap: 14px 24px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  color: var(--muted-2);
  text-align: center;
  font-size: 14px;
}

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

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

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

  .menu-button {
    display: inline-grid;
  }

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

  .hero-control {
    display: none;
  }

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

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

  .detail-side {
    position: static;
  }

  .footer-inner,
  .row-heading {
    flex-direction: column;
    align-items: start;
  }

  .ranking-card a {
    grid-template-columns: 44px 64px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section,
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-copy {
    left: 16px;
    right: 16px;
    bottom: 58px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .grid-six,
  .grid-four,
  .grid-three,
  .grid-featured,
  .grid-two,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 118px 1fr;
  }

  .page-hero {
    padding: 28px;
  }

  .ranking-card a {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .ranking-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rank-number,
  .rank-score {
    text-align: left;
    grid-column: auto;
  }
}
