:root {
  --bg: #0b101a;
  --bg-soft: #111827;
  --bg-card: #182235;
  --bg-card-strong: #1f2937;
  --text: #f8fafc;
  --muted: #a7b0c0;
  --muted-2: #6b7280;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  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.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.12), transparent 28rem),
    var(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 26, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: #d1d5db;
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link--soft {
  color: #9ca3af;
  font-size: 0.9rem;
}

.header-search {
  width: 280px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.72);
}

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

.header-search button,
.wide-search button {
  border: 0;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  padding: 0 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.78);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

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

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 16, 26, 0.96), rgba(11, 16, 26, 0.72), rgba(11, 16, 26, 0.3)),
    linear-gradient(0deg, var(--bg), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 110px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #d6dce8;
  font-size: 1.08rem;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.24);
}

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

.btn-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(31, 41, 55, 0.62);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
  font-size: 2rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.home-search-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.86);
}

.search-strip-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 28px;
  padding: 34px 0;
}

.search-strip-inner h2,
.section-heading h2,
.rank-card h2,
.content-card h2,
.category-block h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  letter-spacing: -0.03em;
}

.search-strip-inner p,
.section-heading p,
.category-block p,
.content-card p {
  color: var(--muted);
}

.wide-search {
  display: flex;
  overflow: hidden;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.8);
}

.wide-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 18px;
}

.section {
  padding: 70px 0;
}

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

.section-more {
  flex: none;
  color: var(--amber);
  font-weight: 900;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

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

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card--featured .poster-link img {
  aspect-ratio: 16 / 9;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 55%);
}

.poster-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.85rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.related-card a:hover span {
  color: var(--amber);
}

.movie-card p {
  min-height: 3.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  min-height: 24px;
  font-size: 0.76rem;
}

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

.category-panel,
.category-block,
.rank-card,
.content-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.74);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.2);
}

.category-panel {
  min-height: 190px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(31, 41, 55, 0.82)),
    rgba(17, 24, 39, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.48);
}

.category-panel strong {
  display: block;
  font-size: 1.2rem;
}

.category-panel p {
  color: var(--muted);
}

.category-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-panel div span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fcd34d;
  font-size: 0.78rem;
}

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

.rank-card {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.rank-card-head span {
  color: var(--amber);
  font-weight: 900;
}

.rank-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.rank-list li + li {
  border-top: 1px solid var(--line);
}

.rank-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
}

.rank-list strong {
  color: var(--amber);
}

.rank-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: var(--muted-2);
  font-style: normal;
  font-size: 0.85rem;
}

.rank-more {
  display: grid;
  place-items: center;
  min-height: 42px;
  margin-top: 18px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 92px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(31, 41, 55, 0.94), rgba(11, 16, 26, 0.98));
}

.page-hero .wide-search {
  max-width: 720px;
  margin-top: 30px;
}

.category-overview {
  padding: 42px 0 78px;
}

.category-block {
  padding: 24px;
  margin-bottom: 26px;
}

.category-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 74px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.76);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

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

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 38px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #d1d5db;
  font-size: 0.92rem;
}

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

.breadcrumb em {
  color: var(--muted);
  font-style: normal;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  margin-top: 64px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-copy p {
  font-size: 1.12rem;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-card {
  padding: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #05070d;
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070d;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.player-start span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.28);
}

.player-start strong {
  font-size: 1.05rem;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  padding: 26px;
}

.content-card p {
  margin-bottom: 0;
  font-size: 1rem;
}

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

.related-card a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.76);
}

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

.related-card span {
  display: block;
  padding: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.4fr;
  gap: 34px;
  padding: 48px 0;
}

.site-footer p {
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links--wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

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

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

  .home-split {
    grid-template-columns: 1fr;
  }

  .rank-card {
    position: static;
  }

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

@media (max-width: 860px) {
  .header-inner {
    min-height: 66px;
  }

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(11, 16, 26, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 10px;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 88px;
  }

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

  .search-strip-inner,
  .detail-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 52px 76px minmax(0, 1fr);
  }

  .ranking-row .btn {
    grid-column: 2 / 4;
  }

  .ranking-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .ranking-cover img {
    width: 76px;
    height: 104px;
  }

  .detail-layout {
    margin-top: 36px;
  }

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

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.4rem;
  }

  .wide-search {
    border-radius: 18px;
    flex-direction: column;
  }

  .wide-search input {
    min-height: 52px;
  }

  .wide-search button {
    min-height: 48px;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading,
  .category-block-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card--featured .poster-link img {
    aspect-ratio: 2 / 3;
  }

  .page-hero {
    padding: 68px 0 52px;
  }
}
