:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --cyan: #06b6d4;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body.site-shell {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 6%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 2%, rgba(6, 182, 212, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, #f97316);
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.brand-text {
  display: grid;
  gap: 2px;
}

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

.brand-text small {
  color: var(--subtle);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
}

.top-search {
  display: flex;
  align-items: center;
  width: 250px;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
}

.top-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.top-search input {
  padding: 0 12px;
  font-size: 14px;
}

.top-search button,
.primary-btn,
.ghost-btn,
.watch-link,
.panel-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-btn,
.watch-link,
.panel-link {
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.top-search button {
  padding: 8px 14px;
  font-size: 13px;
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

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

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 12px;
  color: var(--muted);
  border-radius: 12px;
}

.mobile-panel a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
}

.mobile-panel.is-open {
  display: block;
}

.hero-slider {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: 650px;
  margin: 34px auto 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: center;
  padding: clamp(32px, 6vw, 76px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: blur(7px) saturate(1.2);
  transform: scale(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74) 46%, rgba(2, 6, 23, 0.5)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 56%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-poster {
  display: block;
  max-width: 360px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}

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

.hero-dots {
  position: absolute;
  left: clamp(32px, 6vw, 76px);
  bottom: 30px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.is-active {
  width: 48px;
  background: #f59e0b;
}

.quick-strip {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.quick-strip a {
  min-height: 72px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.quick-strip a:hover {
  color: #fff;
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.42);
}

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

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

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

.section-head h2,
.page-hero h1,
.rank-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-head a,
.text-link {
  color: #fbbf24;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(145deg, #111827, #1e293b);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.92));
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  color: #111827;
  background: #fbbf24;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover {
  color: #fbbf24;
}

.card-meta {
  margin: 8px 0 0;
  color: var(--subtle);
  font-size: 13px;
}

.card-desc {
  min-height: 44px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.tag-row span {
  min-height: 24px;
  padding: 0 9px;
  font-size: 11px;
}

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

.category-tile {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(6, 182, 212, 0.1)),
    rgba(15, 23, 42, 0.82);
}

.category-tile::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -36px;
  top: -36px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.16);
}

.category-tile span {
  position: relative;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  position: relative;
  color: var(--muted);
  line-height: 1.6;
}

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

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

.wide-card .poster-link img {
  aspect-ratio: 16 / 10;
}

.rank-panel,
.info-card,
.side-recommend,
.detail-poster,
.category-overview-card,
.rank-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.rank-title span {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.2em;
}

.rank-title h2 {
  margin: 8px 0 18px;
  font-size: 28px;
}

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

.rank-panel li a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.rank-panel li a:hover {
  background: rgba(245, 158, 11, 0.12);
}

.rank-panel b {
  color: #fbbf24;
}

.rank-panel small {
  color: var(--subtle);
}

.panel-link {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
}

.page-main,
.detail-main {
  padding-bottom: 64px;
}

.page-hero,
.rank-hero {
  margin-top: 34px;
  padding: clamp(32px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.page-hero p,
.rank-hero p {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
}

.filter-bar select option {
  color: #111827;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

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

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

.category-overview-card h2 {
  margin: 8px 0 12px;
  font-size: 24px;
}

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

.rank-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 30px;
  align-items: center;
}

.rank-hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
}

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

.rank-hero-poster span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr) 96px;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  color: #fbbf24;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-cover img {
  width: 96px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-info small {
  color: var(--subtle);
}

.watch-link {
  min-height: 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 18px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

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

.watch-main {
  min-width: 0;
}

.video-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.62));
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f97316);
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.32);
}

.detail-copy {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.8);
}

.lead-text {
  margin: 18px 0 20px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-copy h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-copy p {
  color: var(--muted);
  line-height: 1.9;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.detail-poster {
  display: block;
  overflow: hidden;
}

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

.info-card,
.side-recommend {
  padding: 20px;
}

.info-card h2,
.side-recommend h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  row-gap: 12px;
  margin: 0;
}

.info-card dt {
  color: var(--subtle);
}

.info-card dd {
  margin: 0;
  color: #fff;
}

.compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: rgba(245, 158, 11, 0.12);
}

.compact-card img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.compact-card strong,
.compact-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  margin-top: 4px;
  color: var(--subtle);
}

.small-card .card-desc {
  min-height: auto;
}

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: 28px;
}

.footer-brand strong {
  font-size: 22px;
}

.footer-brand p {
  color: var(--subtle);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  padding: 9px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.footer-links a:hover {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.42);
}

[hidden] {
  display: none !important;
}

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

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

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

  .watch-grid,
  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

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

  .hero-slider {
    min-height: 720px;
    border-radius: 24px;
  }

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

  .hero-poster {
    width: min(240px, 74vw);
    margin: 0;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-dots {
    left: 28px;
  }

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

  .category-overview-card,
  .rank-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .rank-cover img {
    width: 72px;
  }

  .watch-link {
    grid-column: 2 / -1;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-main,
  .detail-main,
  .quick-strip,
  .hero-slider,
  .footer-inner,
  .mobile-panel {
    width: min(100% - 22px, 1200px);
  }

  .brand-text small {
    display: none;
  }

  .hero-slider {
    min-height: 690px;
    margin-top: 18px;
  }

  .quick-strip,
  .category-grid,
  .movie-grid,
  .listing-grid,
  .compact-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero,
  .rank-hero,
  .detail-copy {
    padding: 24px;
    border-radius: 22px;
  }

  .rank-row {
    grid-template-columns: 42px 68px minmax(0, 1fr);
    gap: 12px;
  }
}
