:root {
  color-scheme: dark;
  --bg: #080a12;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --text: #f8fafc;
  --muted: #a6b0c3;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #f97316;
  --brand-2: #ef4444;
  --brand-3: #7c3aed;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(239, 68, 68, 0.28), transparent 32rem),
    radial-gradient(circle at 82% 14%, rgba(124, 58, 237, 0.28), transparent 32rem),
    linear-gradient(180deg, #0f1020 0%, #080a12 48%, #07070c 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 18, 0.82);
  backdrop-filter: blur(18px);
}

.site-logo {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff 0%, #fed7aa 44%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a,
.category-strip a,
.ghost-btn,
.primary-btn {
  border-radius: 999px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-nav a {
  padding: 9px 13px;
  color: #dbe4f0;
  border: 1px solid transparent;
}

.site-nav a:hover,
.category-strip a:hover,
.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-2px);
}

.site-nav a:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

main {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 32px 0 20px;
}

.hero-stage {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 18, 0.96), rgba(5, 8, 18, 0.52) 54%, rgba(5, 8, 18, 0.9)),
    var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.2);
  transform: scale(1.08);
  opacity: 0.55;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 370px);
  gap: 36px;
  align-items: center;
  padding: clamp(26px, 5vw, 72px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.22), transparent 36%),
    linear-gradient(315deg, rgba(124, 58, 237, 0.22), transparent 42%);
  opacity: 0.8;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin-bottom: 12px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-title h1,
.detail-copy h1 {
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(42px, 7vw, 88px);
}

.hero-summary {
  max-width: 700px;
  margin-top: 24px;
  color: #d5deec;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.detail-meta,
.tag-row,
.rank-meta,
.footer-inner,
.category-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 30px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 900;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #fed7aa, #fb923c 52%, #ef4444);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.28);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: clamp(26px, 5vw, 72px);
  bottom: 30px;
  z-index: 3;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 38px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, #fed7aa, #f97316);
}

.hero-panel,
.section-block,
.page-title,
.filter-bar,
.category-card,
.rank-card,
.detail-hero,
.player-card,
.detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  padding: 22px;
  align-self: stretch;
}

.hero-panel h2,
.section-heading h2,
.player-card h2,
.detail-section h2 {
  font-size: 24px;
  font-weight: 950;
}

.hero-panel p,
.section-heading p,
.page-title p,
.detail-line,
.detail-section p,
.category-card p,
.rank-content p,
.movie-desc {
  color: var(--muted);
  line-height: 1.72;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin-top: 13px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.rank-row span {
  grid-row: span 2;
  color: #fb923c;
  font-weight: 950;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 2px 24px;
}

.category-strip a {
  flex: 0 0 auto;
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin: 16px 0 24px;
  padding: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box span {
  color: #fed7aa;
  font-weight: 900;
}

.movie-search,
.year-filter {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  outline: none;
  background: rgba(0, 0, 0, 0.24);
}

.movie-search {
  padding: 0 16px;
}

.year-filter {
  padding: 0 12px;
}

.section-block {
  margin: 24px 0;
  padding: clamp(18px, 3vw, 28px);
}

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

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

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover,
.rank-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.38);
  background: rgba(255, 255, 255, 0.082);
}

.poster-wrap,
.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img,
.rank-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover img,
.rank-card:hover img {
  transform: scale(1.04);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  min-width: 32px;
  padding: 5px 9px;
  color: #111827;
  border-radius: 999px;
  background: #fed7aa;
  font-size: 13px;
  font-weight: 950;
}

.movie-info {
  padding: 14px;
}

.movie-title {
  display: block;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.36;
}

.movie-meta {
  margin-top: 6px;
  color: #fbbf24;
  font-size: 13px;
}

.movie-desc {
  margin-top: 9px;
  font-size: 14px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 700;
}

.page-main {
  padding: 30px 0 50px;
}

.page-title {
  padding: clamp(22px, 4vw, 42px);
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.page-title p {
  max-width: 840px;
  margin-top: 12px;
  font-size: 18px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.category-card {
  padding: 22px;
}

.category-title {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.category-links {
  margin-top: 18px;
  align-items: stretch;
}

.category-links a {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fed7aa;
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
}

.breadcrumb a {
  color: #fed7aa;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  padding: clamp(18px, 3vw, 32px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.45);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-line {
  margin-top: 16px;
  font-size: 20px;
}

.detail-meta {
  margin-top: 18px;
}

.detail-copy .primary-btn {
  margin-top: 24px;
}

.player-card,
.detail-section {
  margin-top: 24px;
  padding: clamp(18px, 3vw, 28px);
}

.video-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.14));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 20px 48px rgba(239, 68, 68, 0.36);
  font-size: 36px;
  text-indent: 6px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-section p {
  margin-top: 14px;
  font-size: 18px;
}

.related-block {
  margin-top: 24px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-poster {
  border-radius: 16px;
}

.rank-number {
  color: #fb923c;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.rank-content {
  align-self: center;
}

.rank-content .movie-title {
  margin-top: 6px;
  font-size: 22px;
}

.rank-content p {
  margin-top: 9px;
}

.rank-meta {
  margin-top: 12px;
}

.site-footer {
  margin-top: 40px;
  padding: 26px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
}

.footer-inner {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.footer-inner strong {
  color: #fff;
}

.footer-inner a {
  color: #fed7aa;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1180px) {
  .hero-wrap {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-panel h2,
  .hero-panel p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding-top: 12px;
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-stage {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    max-width: 240px;
    margin: 0 auto;
  }

  .filter-bar,
  .detail-hero,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }

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

@media (max-width: 560px) {
  main {
    width: min(100% - 20px, 1480px);
  }

  .site-header {
    padding-inline: 12px;
  }

  .hero-stage {
    border-radius: 24px;
  }

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

  .movie-info {
    padding: 10px;
  }

  .movie-title {
    font-size: 15px;
  }

  .movie-desc {
    display: none;
  }

  .tag-row span {
    font-size: 11px;
  }
}
