:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --blue: #1d4ed8;
  --blue-deep: #0f172a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(37, 99, 235, 0.24), transparent 34%),
    radial-gradient(circle at 82% 4%, rgba(245, 158, 11, 0.16), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: radial-gradient(circle at 30% 20%, var(--amber-soft), var(--amber));
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 46px rgba(245, 158, 11, 0.75);
}

.brand-text {
  font-size: 1.48rem;
  background: linear-gradient(90deg, #fde68a, var(--amber), #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber-soft);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  display: block;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-link {
  display: block;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 44%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  padding: clamp(56px, 9vw, 108px) 0 72px;
}

.hero-text {
  max-width: 760px;
}

.hero-eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--amber-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 16px 0 18px;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.hero-text p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.85;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.hero-tags span,
.detail-tags span {
  color: #fff7ed;
  font-size: 0.88rem;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.38);
}

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

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, var(--amber));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.btn-ghost,
.section-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 32px;
  z-index: 7;
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-search,
.section-block,
.page-shell {
  padding-top: 64px;
}

.quick-search {
  position: relative;
  z-index: 12;
}

.quick-search > div:first-child h2,
.section-head h2,
.page-title h1,
.story-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.035em;
}

.quick-search > div:first-child,
.section-head,
.page-title {
  margin-bottom: 24px;
}

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

.section-head p,
.page-title p,
.story-panel p,
.quick-search > div:first-child p {
  color: var(--soft);
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-box {
  flex: 1;
  min-width: 240px;
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--amber-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.search-box input,
.filter-selects select {
  width: 100%;
  height: 46px;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.62);
  outline: none;
}

.search-box input {
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  align-items: end;
  gap: 12px;
}

.filter-selects select {
  min-width: 150px;
  padding: 0 14px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.42);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #020617;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.08) 58%, transparent 100%);
  opacity: 0.78;
  transition: opacity 0.28s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 3;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.year-badge {
  right: 10px;
  padding: 5px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.66);
}

.rank-badge {
  left: 10px;
  padding: 5px 9px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber));
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.88);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 8px;
  min-height: 2.55em;
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.movie-card:hover .card-body h2 {
  color: var(--amber-soft);
}

.card-body p {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.5;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.category-card,
.category-overview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
}

.category-card > a {
  display: grid;
  gap: 10px;
  padding: 22px;
}

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

.category-card strong {
  font-size: 2.4rem;
  letter-spacing: -0.06em;
}

.category-card p,
.category-overview p {
  color: var(--soft);
  line-height: 1.7;
}

.category-card div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 22px;
}

.category-card div:last-child a {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.rank-panel,
.mini-rank,
.rank-list-large {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.12);
  transform: translateX(3px);
}

.rank-row img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-num {
  color: var(--amber-soft);
  font-size: 1.1rem;
  font-weight: 900;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong,
.rank-info em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info strong {
  color: #ffffff;
}

.rank-info em {
  color: var(--soft);
  font-size: 0.78rem;
  font-style: normal;
}

.rank-score {
  color: #111827;
  min-width: 42px;
  padding: 5px 8px;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
  background: var(--amber-soft);
}

.page-shell {
  padding-bottom: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--soft);
  font-size: 0.92rem;
}

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

.page-title {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
}

.page-title.with-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.category-overview a {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

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

.listing-grid {
  margin-top: 26px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.95));
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.2rem, 4.6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.052em;
}

.detail-copy p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 1.06rem;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.meta-list div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.meta-list dt {
  color: var(--soft);
  font-size: 0.8rem;
}

.meta-list dd {
  margin: 6px 0 0;
  color: #ffffff;
  font-weight: 800;
}

.player-section,
.story-panel {
  padding-top: 48px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 16px;
  color: #ffffff;
  border: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.34)),
    radial-gradient(circle at center, rgba(245, 158, 11, 0.25), transparent 34%);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: clamp(74px, 10vw, 108px);
  height: clamp(74px, 10vw, 108px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  background: linear-gradient(135deg, #fde68a, var(--amber));
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.4);
}

.play-mask strong {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.story-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
}

.story-panel article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: var(--shadow);
}

.story-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

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

.empty-state {
  display: none;
  color: var(--soft);
  text-align: center;
  padding: 36px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 22px;
}

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

.movie-card.is-hidden {
  display: none;
}

.site-footer {
  margin-top: 80px;
  color: var(--muted);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.98));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.15rem;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1rem;
}

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

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

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

.footer-bottom {
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.9rem;
}

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

  .nav-toggle {
    display: flex;
  }

  .hero-slider {
    min-height: 74vh;
  }

  .split-layout,
  .page-title.with-panel,
  .detail-hero,
  .story-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-panel {
    order: -1;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-shell {
    height: 62px;
  }

  .brand-text {
    font-size: 1.18rem;
  }

  .hero-content {
    padding-bottom: 84px;
  }

  .hero-actions,
  .filter-bar,
  .filter-selects,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-dots {
    left: 12px;
    right: auto;
    bottom: 26px;
  }

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

  .page-title,
  .detail-hero,
  .story-panel article {
    padding: 22px;
    border-radius: 22px;
  }

  .rank-row {
    grid-template-columns: 34px 44px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}
