* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(168, 85, 247, 0.24);
  --line-strong: rgba(251, 191, 36, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #fbbf24;
  --amber-deep: #d97706;
  --purple: #9333ea;
  --purple-soft: #c084fc;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
  --radius: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(147, 51, 234, 0.26), transparent 34rem),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  font-size: 15px;
  background: linear-gradient(135deg, #fde68a, #f59e0b 55%, #a855f7);
  box-shadow: 0 10px 34px rgba(251, 191, 36, 0.32);
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  background: linear-gradient(90deg, #fde68a, #fbbf24, #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.5px;
}

.brand em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--soft);
}

.desktop-nav a {
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--amber);
  background: rgba(15, 23, 42, 0.82);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  color: var(--soft);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.55);
}

.mobile-nav.is-open {
  display: grid;
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76) 38%, rgba(15, 23, 42, 0.24) 70%),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 40%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100% - 1180px) / 2));
  bottom: 82px;
  width: min(680px, calc(100% - 56px));
}

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

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 44px rgba(2, 6, 23, 0.72);
}

.hero-desc {
  margin: 0 0 22px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  border: 1px solid rgba(251, 191, 36, 0.26);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.36);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(2, 6, 23, 0.58);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 0;
}

.intro-panel,
.filter-panel {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}

.intro-copy {
  max-width: 680px;
}

.intro-copy h2,
.section-heading h2,
.page-hero h1,
.text-panel h2,
.side-card h2 {
  margin: 0;
  color: #fffbeb;
  letter-spacing: -0.035em;
}

.intro-copy h2,
.page-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.intro-copy p:last-child,
.page-hero p {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.search-box {
  display: flex;
  width: min(480px, 100%);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.search-box.wide {
  width: 100%;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
}

.search-box button {
  border: 0;
  border-radius: 13px;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  padding: 0 18px;
  cursor: pointer;
}

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

.section-heading span {
  display: inline-block;
  color: var(--amber);
  font-weight: 800;
  margin-bottom: 8px;
}

.section-heading h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading.small h2 {
  font-size: 26px;
}

.section-more {
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

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

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

.rail-row {
  display: flex;
  overflow-x: auto;
  gap: 18px;
  padding-bottom: 12px;
  scrollbar-color: rgba(147, 51, 234, 0.6) rgba(15, 23, 42, 0.8);
}

.rail-card {
  min-width: 280px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.92));
  box-shadow: 0 14px 44px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.78), rgba(30, 41, 59, 0.94));
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: var(--amber);
  padding: 6px 10px;
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3,
.rank-item h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  color: #fffbeb;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover {
  color: var(--amber);
}

.movie-card p,
.rank-item p {
  margin: 0 0 14px;
  min-height: 44px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  color: var(--purple-soft);
  background: rgba(147, 51, 234, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.16);
  border-radius: 999px;
  font-size: 12px;
  padding: 5px 8px;
}

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

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

.category-tile {
  min-height: 132px;
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.16), transparent 55%),
    linear-gradient(135deg, rgba(88, 28, 135, 0.55), rgba(15, 23, 42, 0.92));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile strong {
  display: block;
  color: #fffbeb;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-tile span {
  color: var(--soft);
  line-height: 1.7;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.rank-card,
.side-card,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-card ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.rank-card li a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.54);
}

.rank-card b {
  color: var(--amber);
}

.rank-card span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 46px auto 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 44%),
    radial-gradient(circle at bottom right, rgba(147, 51, 234, 0.28), transparent 48%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 58px);
}

.page-hero div {
  max-width: 820px;
}

.category-list {
  padding-bottom: 24px;
}

.rank-list {
  list-style: none;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 30px;
}

.rank-list-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.rank-num {
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.1);
  color: var(--amber);
  font-weight: 900;
  font-size: 20px;
}

.rank-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 12px;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 42%, rgba(2, 6, 23, 0.54)), linear-gradient(0deg, #020617, transparent 44%);
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 58px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

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

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

.breadcrumb a {
  color: #fde68a;
}

.breadcrumb em {
  font-style: normal;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-line {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
  max-width: 820px;
}

.detail-tags {
  margin: 18px 0 24px;
}

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

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

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover.is-hidden {
  display: none;
}

.big-play {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 20px 58px rgba(245, 158, 11, 0.34);
  font-size: 34px;
  padding-left: 4px;
}

.text-panel {
  margin-top: 24px;
  padding: 26px;
}

.text-panel h2,
.side-card h2 {
  font-size: 24px;
  margin-bottom: 14px;
}

.text-panel p {
  margin: 0;
  color: var(--soft);
  line-height: 1.95;
  font-size: 16px;
}

.detail-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: var(--text);
  min-width: 0;
}

.side-card a {
  color: var(--amber);
}

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

.related-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 8px;
  background: rgba(30, 41, 59, 0.56);
}

.related-card img {
  width: 92px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  grid-row: span 2;
}

.related-card strong {
  color: #fffbeb;
  line-height: 1.35;
}

.related-card span {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 620px;
}

.footer-grid h3 {
  color: var(--amber);
  margin: 0 0 12px;
}

.footer-grid a:not(.brand) {
  display: block;
  color: var(--soft);
  margin: 9px 0;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--muted);
  text-align: center;
  padding: 18px;
  font-size: 13px;
}

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

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

  .mobile-toggle {
    display: inline-flex;
  }

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

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

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

  .rank-card,
  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero-carousel {
    height: 74vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-panel,
  .filter-panel,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .rank-list-row,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-num {
    min-height: 44px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

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

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

@media (max-width: 520px) {
  .header-inner,
  .content-wrap,
  .page-hero,
  .detail-wrap,
  .footer-grid {
    width: min(100% - 22px, 1180px);
  }

  .brand strong {
    font-size: 18px;
  }

  .brand em {
    display: none;
  }

  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
    gap: 8px;
  }

  .search-box button {
    min-height: 40px;
  }

  .detail-hero {
    min-height: auto;
  }
}
