:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #0b1120;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: #111827;
  --line: rgba(55, 65, 81, 0.9);
  --text: #f9fafb;
  --muted: #9ca3af;
  --muted-strong: #d1d5db;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #030712 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

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

.brand-icon,
.footer-logo span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  box-shadow: 0 0 34px rgba(245, 158, 11, 0.32);
}

.brand-copy strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.main-nav,
.quick-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav {
  margin-left: auto;
}

.quick-nav {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.nav-link,
.quick-nav a,
.mobile-cats a {
  border-radius: 12px;
  padding: 9px 13px;
  color: var(--muted-strong);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.quick-nav a,
.mobile-cats a {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 14px;
}

.nav-link:hover,
.quick-nav a:hover,
.mobile-cats a:hover,
.nav-link.is-active {
  background: var(--amber);
  color: #fff;
}

.quick-nav a:hover,
.mobile-cats a:hover {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.85);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e5e7eb;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.96);
}

.mobile-links,
.mobile-cats {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-cats {
  padding-top: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(55, 65, 81, 0.55);
}

.hero-track {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

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

.hero-bg .poster-text {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  font-size: clamp(40px, 8vw, 92px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #111827, #030712);
}

.poster.is-empty .poster-text,
.hero-bg.is-empty .poster-text {
  display: flex;
}

.hero-bg:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0) 42%, rgba(3, 7, 18, 0.36) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 86px 0 74px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.11);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  color: #d1d5db;
  background: rgba(31, 41, 55, 0.82);
  border: 1px solid rgba(75, 85, 99, 0.78);
  font-size: 13px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.secondary-button,
.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 24, 39, 0.72);
}

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

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 30px;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: rgba(17, 24, 39, 0.76);
}

.hero-dot {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: var(--amber);
}

main {
  min-height: 60vh;
}

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

.section {
  padding: 56px 0;
}

.section + .section {
  padding-top: 12px;
}

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

.section-title h1,
.section-title h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(55, 65, 81, 0.72);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.6);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(17, 24, 39, 0.88);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #030712);
}

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

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

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

.poster-text {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.64);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.poster.is-empty .poster-text {
  display: flex;
}

.rating-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  padding: 6px 9px;
  font-weight: 900;
  font-size: 12px;
}

.rating-badge {
  right: 10px;
  color: #111827;
  background: #fbbf24;
}

.rank-badge {
  left: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

.card-body p {
  margin: 0 0 12px;
  min-height: 48px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

.card-meta span {
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(3, 7, 18, 0.48);
}

.tag-row span {
  padding: 5px 7px;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(75, 85, 99, 0.7);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 15rem),
    rgba(17, 24, 39, 0.72);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  line-height: 1.65;
}

.category-card span {
  color: #fbbf24;
  font-weight: 800;
}

.filter-panel {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid rgba(55, 65, 81, 0.82);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.66);
}

.search-line,
.select-line {
  display: grid;
  gap: 14px;
}

.search-line {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 14px;
}

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

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

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

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(75, 85, 99, 0.82);
  border-radius: 14px;
  padding: 0 14px;
  color: #fff;
  background: rgba(3, 7, 18, 0.65);
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(55, 65, 81, 0.74);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.62);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.48);
}

.rank-number {
  color: #fbbf24;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #111827;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.rank-score {
  border-radius: 16px;
  padding: 12px 14px;
  color: #111827;
  background: #fbbf24;
  font-size: 18px;
  font-weight: 900;
}

.detail-wrap {
  padding: 34px 0 60px;
}

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

.breadcrumb a:hover {
  color: #fbbf24;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  border: 1px solid rgba(75, 85, 99, 0.78);
  background: #020617;
  box-shadow: var(--shadow);
}

.player-card video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.72)),
    rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  box-shadow: 0 0 0 16px rgba(245, 158, 11, 0.14);
  font-size: 34px;
}

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

.detail-article,
.side-card,
.related-panel {
  margin-top: 24px;
  border: 1px solid rgba(55, 65, 81, 0.78);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.64);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.detail-article {
  padding: 28px;
}

.detail-article h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
}

.detail-article .lead {
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.detail-article h2,
.related-panel h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  color: #d1d5db;
  line-height: 1.9;
}

.side-card {
  margin-top: 0;
  padding: 18px;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #111827, #030712);
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--muted-strong);
}

.side-list strong {
  color: #fff;
}

.related-panel {
  padding: 24px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.92);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 900;
}

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

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer a:hover {
  color: #fbbf24;
}

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

.footer-bottom {
  padding: 18px 16px 24px;
  border-top: 1px solid rgba(55, 65, 81, 0.72);
  color: var(--muted);
  text-align: center;
}

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

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

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

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

  .site-header.is-open .mobile-panel {
    display: block;
  }

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

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

  .category-cards,
  .footer-inner,
  .detail-grid,
  .select-line {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .brand-copy small {
    display: none;
  }

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

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

  .hero h1 {
    font-size: 40px;
  }

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

  .hero-controls {
    bottom: 18px;
  }

  .hero-dot {
    width: 28px;
  }

  .section {
    padding: 38px 0;
  }

  .section-head {
    display: grid;
  }

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

  .category-cards,
  .footer-inner,
  .select-line,
  .mobile-cats {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p {
    min-height: auto;
  }

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-score {
    grid-column: 3;
    width: max-content;
  }

  .detail-article,
  .related-panel {
    padding: 18px;
  }

  .play-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

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