:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-panel: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 34rem),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.13), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: 0.2s ease;
  white-space: nowrap;
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: currentColor;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.84) 36%, rgba(2, 6, 23, 0.38) 70%, #020617 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.16) 45%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-bottom: 110px;
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 72px;
}

.hero-kicker,
.section-heading span,
.page-hero > span,
.card-category,
.glow-card > span {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.13);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin-top: -4px;
  font-size: clamp(26px, 4vw, 52px);
  color: #fef3c7;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.detail-copy .btn {
  margin-right: 12px;
}

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, var(--amber));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.26);
}

.btn-ghost {
  margin-left: 10px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
}

.hero-tags,
.card-tags,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span,
.meta-pills span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
  font-size: 12px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 238px;
  z-index: 5;
  display: flex;
  transform: translateX(-50%);
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.28);
}

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

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  transform: translateX(-50%);
  gap: 20px;
}

.search-panel,
.hero-side-list,
.glow-card,
.text-card,
.category-card a,
.category-overview-card a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  padding: 22px;
}

.hero-search,
.page-search {
  display: flex;
  gap: 10px;
}

.hero-search input,
.page-search input,
.inline-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  padding: 0 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
}

.hero-search button,
.page-search button {
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  color: #111827;
  background: var(--amber);
  cursor: pointer;
  font-weight: 800;
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-category-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.11);
  font-size: 13px;
}

.hero-side-list {
  display: grid;
  grid-template-columns: 0.48fr repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.hero-side-list h2 {
  align-self: center;
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.content-section,
.split-section,
.detail-content {
  padding: 70px 0;
}

.content-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.2));
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
}

.section-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  white-space: nowrap;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.88);
}

.movie-card a,
.category-card a,
.category-overview-card a {
  display: block;
  height: 100%;
}

.cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(15, 23, 42, 0.78));
}

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

.movie-card:hover .cover-wrap img {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 58%);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body em {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #64748b;
  font-size: 12px;
}

.movie-card-large .cover-wrap {
  aspect-ratio: 16 / 10.5;
}

.movie-card-large .card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
  padding-top: 72px;
}

.movie-card-large .card-body strong {
  min-height: auto;
  font-size: 22px;
}

.movie-card-horizontal a {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 120px;
}

.movie-card-horizontal .cover-wrap {
  height: 100%;
  min-height: 120px;
  aspect-ratio: auto;
}

.movie-card-horizontal .card-body strong {
  min-height: auto;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, var(--amber));
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 24px;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.68);
  transition: 0.2s ease;
}

.ranking-list a:hover {
  border-color: rgba(245, 158, 11, 0.42);
  transform: translateX(4px);
}

.ranking-list span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: var(--amber);
  font-weight: 900;
}

.ranking-list strong,
.ranking-list em {
  grid-column: 2;
}

.ranking-list strong {
  color: #fff;
  line-height: 1.2;
}

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

.glow-card {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 18rem),
    rgba(15, 23, 42, 0.82);
}

.glow-card h2 {
  margin: 16px 0;
  font-size: 30px;
  line-height: 1.1;
}

.glow-card p {
  color: var(--muted-strong);
}

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

.category-card a {
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

.category-card h3,
.category-overview-card h2 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.scroll-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.scroll-row .scroll-item {
  width: 340px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 0.8fr);
  gap: 32px;
  padding: 46px 0;
}

.footer-brand p,
.site-footer li,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

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

.page-hero {
  padding: 78px 0 34px;
}

.small-hero {
  display: grid;
  gap: 16px;
}

.page-hero h1 {
  max-width: 900px;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 10px;
}

.inline-search {
  display: block;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: rgba(245, 158, 11, 0.48);
  color: #111827;
  background: var(--amber);
}

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

.category-overview-card {
  min-height: 260px;
}

.category-overview-card a {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.category-overview-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: transform 0.5s ease;
}

.category-overview-card a::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.62));
}

.category-overview-card a:hover img {
  transform: scale(1.08);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 32px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) 1fr;
  gap: 36px;
  align-items: center;
  padding: 36px 0 54px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

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

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

.meta-pills {
  margin: 22px 0;
}

.player-section {
  padding-top: 18px;
}

.compact-heading {
  margin-bottom: 16px;
}

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

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-cover span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, var(--amber));
  box-shadow: 0 20px 54px rgba(245, 158, 11, 0.3);
  font-size: 34px;
  transform: translateX(3px);
}

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

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.text-card {
  padding: 28px;
}

.text-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 24px;
}

.text-card p {
  margin: 0;
  color: var(--muted-strong);
}

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

[data-search-card].is-hidden {
  display: none;
}

@media (max-width: 1120px) {
  .featured-grid,
  .movie-grid,
  .dense-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-panel,
  .split-section,
  .horizontal-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .glow-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.97);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .hero-carousel {
    min-height: 900px;
  }

  .hero-content {
    align-items: start;
    padding-top: 42px;
    padding-bottom: 0;
  }

  .hero-panel {
    bottom: 20px;
  }

  .hero-dots {
    bottom: 340px;
  }

  .hero-search,
  .page-search,
  .tool-row,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-search,
  .page-search {
    flex-direction: column;
  }

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

  .movie-card-horizontal a {
    grid-template-columns: 112px 1fr;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }

  .hero-actions .btn {
    width: 100%;
    margin: 0 0 10px;
  }

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

  .movie-card-horizontal a {
    grid-template-columns: 104px 1fr;
  }

  .card-tags {
    display: none;
  }

  .footer-grid {
    gap: 24px;
  }
}
