:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(245, 158, 11, 0.22);
  --line-strong: rgba(245, 158, 11, 0.48);
  --gold: #f59e0b;
  --gold-soft: #fbbf24;
  --gold-light: #fde68a;
  --purple: #581c87;
  --purple-soft: #9333ea;
  --text: #fff7ed;
  --muted: rgba(254, 243, 199, 0.76);
  --faint: rgba(254, 243, 199, 0.55);
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(88, 28, 135, 0.45), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(245, 158, 11, 0.22), transparent 26%),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.88), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold-light);
}

.brand {
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--purple-soft));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
  color: white;
  font-size: 13px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.desktop-nav a,
.mobile-panel a {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover {
  color: var(--gold-soft);
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.big-search input,
.filter-search input {
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
  border-radius: 999px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  width: 250px;
  padding: 10px 14px;
}

.nav-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-search input:focus {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
  background: rgba(255, 255, 255, 0.12);
}

.nav-search button,
.mobile-search button,
.big-search button,
.btn-primary {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-search button,
.mobile-search button {
  padding: 10px 16px;
}

.nav-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.38);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-light);
  cursor: pointer;
}

.mobile-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  display: grid;
  gap: 12px;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mobile-search input {
  min-width: 0;
  padding: 12px 14px;
}

.hero-slider {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-image,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(88, 28, 135, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 52%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  min-height: 76vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 86px 0 122px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  color: white;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.hero-desc {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.year-badge,
.rank-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: var(--gold-light);
  font-size: 13px;
  padding: 7px 12px;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--gold-light);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(245, 158, 11, 0.14);
  border-color: var(--gold-soft);
}

.hero-side-card {
  position: absolute;
  right: max(32px, calc((100vw - 1280px) / 2));
  bottom: 92px;
  z-index: 3;
  width: min(280px, 28vw);
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 0.25s ease, border 0.25s ease;
}

.hero-side-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold-soft);
}

.hero-side-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-side-card span {
  display: block;
  padding: 14px 16px 16px;
  color: var(--gold-light);
  font-weight: 800;
}

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

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 54px;
  background: var(--gold-soft);
}

.hero-category-strip {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  width: min(1280px, calc(100% - 32px));
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.hero-category-strip a {
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(15, 23, 42, 0.56);
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.hero-category-strip a:hover {
  color: var(--gold-light);
  border-color: var(--gold-soft);
}

.home-search-band,
.content-section,
.watch-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 560px);
  gap: 28px;
  align-items: center;
  margin-top: -34px;
  position: relative;
  z-index: 6;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(88, 28, 135, 0.48));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-band h2,
.content-section h2,
.filter-panel h2,
.article-card h2,
.watch-section h2,
.site-footer h2 {
  margin: 0;
  color: var(--gold-light);
}

.home-search-band p,
.page-hero p,
.filter-panel p,
.article-card p,
.site-footer p,
.category-card p,
.category-tile small {
  color: var(--muted);
  line-height: 1.8;
}

.big-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.big-search input {
  min-width: 0;
  padding: 16px 18px;
}

.big-search button {
  padding: 0 24px;
}

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

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

.section-head.compact {
  align-items: center;
}

.section-more {
  color: var(--gold-soft);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.20);
  transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.46);
  box-shadow: 0 24px 65px rgba(245, 158, 11, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
}

.year-badge {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
}

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

.movie-card-body strong {
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.meta-line,
.card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card-desc {
  color: var(--faint);
}

.tag-row {
  gap: 7px;
}

.tag-row span {
  font-size: 12px;
  padding: 5px 9px;
}

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

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 16px;
}

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

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

.category-tile,
.category-card,
.ranking-panel,
.filter-panel,
.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.category-tile,
.category-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-soft);
  background: rgba(88, 28, 135, 0.30);
}

.category-tile span,
.category-card h2,
.category-card strong {
  color: var(--gold-light);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(147, 51, 234, 0.9));
  color: white;
  font-weight: 900;
}

.ranking-panel {
  padding: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(245, 158, 11, 0.12);
}

.rank-num {
  grid-row: span 2;
  color: var(--gold-soft);
  font-size: 22px;
  font-weight: 900;
}

.rank-title {
  color: white;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--faint);
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px max(16px, calc((100vw - 1280px) / 2)) 72px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 72% 18%, rgba(245, 158, 11, 0.25), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.62));
}

.compact-hero h1 {
  max-width: 900px;
  font-size: clamp(34px, 6vw, 58px);
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 360px);
  gap: 18px;
  align-items: end;
  padding: 22px;
  margin-bottom: 26px;
}

.filter-search {
  display: grid;
  gap: 8px;
  color: var(--gold-light);
  font-weight: 700;
}

.filter-search input {
  width: 100%;
  padding: 13px 16px;
}

.filter-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--gold-soft);
  background: rgba(245, 158, 11, 0.18);
  color: var(--gold-light);
}

.empty-tip {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--gold-light);
}

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

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

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.25) 70%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0 74px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

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

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

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

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

.detail-info h1 {
  font-size: clamp(36px, 6vw, 66px);
}

.detail-line {
  max-width: 800px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
}

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

.detail-tags {
  max-width: 860px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #d97706);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.42);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 22px;
}

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

.article-card {
  padding: 26px;
}

.article-card p {
  margin-bottom: 0;
}

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

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), #020617);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 34px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid rgba(245, 158, 11, 0.12);
  color: var(--faint);
}

@media (max-width: 1180px) {
  .desktop-nav a:nth-last-child(-n + 5) {
    display: none;
  }

  .nav-search input {
    width: 210px;
  }

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-content {
    padding-top: 74px;
  }

  .hero-side-card {
    display: none;
  }

  .hero-category-strip {
    bottom: 70px;
  }

  .home-search-band,
  .split-layout,
  .detail-wrap,
  .detail-copy,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-wrap {
    padding-top: 54px;
  }

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

@media (max-width: 720px) {
  .nav-wrap {
    height: 62px;
  }

  .brand {
    font-size: 18px;
  }

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

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

  .hero-category-strip {
    bottom: 72px;
  }

  .home-search-band {
    margin-top: -24px;
    padding: 20px;
  }

  .big-search,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .content-section,
  .watch-section {
    padding-top: 46px;
  }

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

  .page-hero {
    padding-top: 72px;
  }

  .detail-info h1,
  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .list-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .detail-meta,
  .tag-row {
    align-items: stretch;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }
}
