:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-solid: #0f172a;
  --panel-soft: #111c33;
  --line: rgba(148, 163, 184, 0.16);
  --muted: #94a3b8;
  --text: #f8fafc;
  --subtext: #cbd5e1;
  --brand: #f59e0b;
  --brand-light: #fbbf24;
  --brand-deep: #b45309;
  --danger: #ef4444;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #07111f 44%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.brand:hover,
.footer-brand:hover {
  color: var(--brand-light);
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
  font-size: 0.9rem;
}

.header-search {
  flex: 1 1 420px;
  max-width: 520px;
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

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

.header-search input::placeholder,
.toolbar-card input::placeholder {
  color: #64748b;
}

.header-search button,
.btn,
.play-overlay {
  border: 0;
  cursor: pointer;
}

.header-search button {
  padding: 10px 18px;
  color: #111827;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
}

.site-nav {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 12px;
  overflow-x: auto;
}

.site-nav a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--subtext);
  font-size: 0.94rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--brand-light);
  background: rgba(148, 163, 184, 0.1);
  transform: translateY(-1px);
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 26px auto 46px;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}

.hero-stage {
  position: relative;
  min-height: 640px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 38%);
  align-items: center;
  gap: 28px;
  padding: clamp(28px, 5vw, 64px);
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0.56)),
    var(--hero-image) center / cover;
  filter: saturate(1.15);
  z-index: -2;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 8% 8% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.25);
  filter: blur(68px);
  z-index: -1;
}

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

.hero-copy {
  max-width: 650px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: var(--brand-light);
  background: rgba(245, 158, 11, 0.12);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  color: var(--subtext);
  line-height: 1.85;
}

.hero-copy p {
  max-width: 680px;
  margin: 20px 0 0;
  font-size: 1.08rem;
}

.hero-tags,
.tag-row,
.movie-meta,
.detail-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 0.84rem;
}

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

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

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

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

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.62);
}

.btn.small {
  min-height: 38px;
  padding: 9px 15px;
  font-size: 0.9rem;
}

.text-link {
  color: var(--brand-light);
  font-weight: 800;
}

.hero-poster {
  display: block;
  justify-self: end;
  width: min(100%, 330px);
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 30px;
  bottom: 24px;
  display: flex;
  gap: 9px;
  z-index: 5;
}

.hero-dot {
  width: 42px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--brand-light);
}

.hero-panel,
.toolbar-card,
.story-card,
.ranking-column,
.category-overview-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  min-height: 640px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.hero-panel h2,
.ranking-column h2,
.story-card h2,
.footer-grid h2 {
  margin: 0 0 18px;
  color: #fff;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(30, 41, 59, 0.8);
}

.rank-num {
  width: 34px;
  color: var(--brand-light);
  font-weight: 900;
  font-size: 1.08rem;
  text-align: center;
}

.rank-item img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.rank-item strong,
.rank-item em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item strong {
  color: #fff;
}

.rank-item em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.content-section,
.page-shell,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 34px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

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

.movie-card {
  min-width: 0;
}

.movie-card[hidden] {
  display: none;
}

.movie-card > a {
  display: block;
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card > a:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.9));
  overflow: hidden;
}

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

.movie-card > a:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-year,
.poster-type {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(10px);
}

.poster-year {
  top: 10px;
  left: 10px;
  color: #fff;
}

.poster-type {
  right: 10px;
  bottom: 10px;
  color: var(--brand-light);
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.movie-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: #64748b;
}

.tag-row {
  gap: 6px;
}

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

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.76);
}

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

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.category-card h3,
.category-overview-card h2 {
  margin: 0;
  color: #fff;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

.category-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-link-cloud a {
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-link-cloud a:hover {
  color: var(--brand-light);
}

.page-shell {
  padding: 34px 0 20px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.9)),
    radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.18), transparent 22rem);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(28px, 5vw, 58px);
  margin-bottom: 24px;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 1.04rem;
}

.toolbar-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  margin: 0 0 22px;
  border-radius: 20px;
}

.toolbar-card input,
.toolbar-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  padding: 0 14px;
}

.toolbar-card select {
  max-width: 210px;
}

.page-grid {
  margin-bottom: 30px;
}

.search-grid .compact .movie-card-body {
  min-height: 212px;
}

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

.ranking-column {
  padding: 20px;
  border-radius: 24px;
}

.detail-shell {
  padding: 26px 0 20px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.74)),
    radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.18), transparent 23rem);
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.detail-copy h1 {
  font-size: clamp(2.2rem, 5vw, 5rem);
}

.detail-copy .lead {
  max-width: 850px;
  margin: 18px 0 0;
  font-size: 1.08rem;
}

.player-section {
  margin: 26px 0;
}

.video-box {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #020617;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
  text-align: center;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.3);
  font-size: 2rem;
}

.play-overlay strong {
  font-size: 1.2rem;
}

.video-box.is-playing .play-overlay {
  display: none;
}

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

.story-card {
  padding: 24px;
  border-radius: 24px;
}

.story-card p {
  margin: 0;
  color: var(--subtext);
  line-height: 1.92;
}

.related-section {
  padding-top: 42px;
}

.site-footer {
  margin-top: 58px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
}

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

.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

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

.footer-grid a:hover {
  color: var(--brand-light);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: #64748b;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

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

  .hero-panel {
    min-height: 0;
  }

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

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

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

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

@media (max-width: 820px) {
  .header-shell {
    min-height: 62px;
  }

  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    padding: 0 0 14px;
  }

  .site-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-carousel {
    min-height: auto;
    margin-top: 16px;
  }

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

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

  .hero-poster {
    justify-self: start;
    width: 210px;
  }

  .hero-dots {
    left: 24px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-list.wide,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .toolbar-card {
    flex-direction: column;
  }

  .toolbar-card select {
    max-width: none;
  }

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

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

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

@media (max-width: 520px) {
  .content-section,
  .page-shell,
  .detail-shell,
  .hero-carousel,
  .header-shell,
  .site-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1240px);
  }

  .brand,
  .footer-brand {
    font-size: 1.1rem;
  }

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

  .hero-slide {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(2.15rem, 13vw, 3.25rem);
  }

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

  .movie-card.compact > a {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .movie-card.compact .poster-wrap {
    height: 100%;
    min-height: 176px;
  }
}
