:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #e2e8f0;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(148, 163, 184, 0.16), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

main {
  min-height: 60vh;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.8rem;
  display: inline-grid;
  place-items: center;
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  box-shadow: 0 12px 34px rgba(226, 232, 240, 0.18);
  font-size: 0.85rem;
}

.brand-text {
  font-size: 1.25rem;
  background: linear-gradient(90deg, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  text-decoration: none;
  border-radius: 0.8rem;
  padding: 0.62rem 0.85rem;
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--text);
  background: rgba(30, 41, 59, 0.9);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem;
}

.header-search input,
.mobile-search input,
.wide-search input {
  min-width: 12rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0.55rem 0.8rem;
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.section-more,
.filter-group button {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button {
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  padding: 0.58rem 1rem;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.filter-group button:hover,
.filter-group button.is-active {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.55rem;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 0.26rem 0;
  background: var(--text);
  border-radius: 2px;
}

.mobile-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
}

.mobile-panel nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.mobile-link {
  display: block;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.52);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.86) 45%, rgba(15, 23, 42, 0.32) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0) 45%);
}

.hero-content {
  position: relative;
  max-width: 1280px;
  min-height: 720px;
  margin: 0 auto;
  padding: 8.5rem 1.25rem 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 3rem;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.86rem;
  margin-bottom: 1.2rem;
}

.hero-copy h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 1.3rem;
  color: var(--muted-strong);
  font-size: clamp(1.08rem, 2.1vw, 1.42rem);
  line-height: 1.8;
}

.hero-meta,
.movie-meta-line,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(15, 23, 42, 0.62);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.72rem 1.15rem;
}

.ghost-button,
.section-more,
.filter-group button {
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
}

.ghost-button:hover,
.section-more:hover,
.filter-group button:hover,
.filter-group button.is-active {
  color: var(--text);
  background: rgba(51, 65, 85, 0.86);
  border-color: rgba(226, 232, 240, 0.32);
}

.hero-poster {
  display: block;
  border-radius: 1.8rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.24);
  transform: rotate(1deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(14px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: var(--text);
  background: transparent;
}

.hero-arrow {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  font-size: 1.5rem;
}

.hero-arrow:hover {
  background: rgba(148, 163, 184, 0.18);
}

.hero-dots {
  display: flex;
  gap: 0.45rem;
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.35);
  padding: 0;
}

.hero-dot.is-active {
  width: 1.8rem;
  background: #f8fafc;
}

.hero-category-bar {
  position: absolute;
  left: 50%;
  top: 5.3rem;
  transform: translateX(-50%);
  width: min(1280px, calc(100% - 2.5rem));
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-category-bar a {
  color: var(--muted-strong);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
  border-radius: 999px;
  padding: 0.48rem 0.82rem;
}

.content-section,
.page-shell,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.2rem 1.25rem;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.4rem;
  margin-bottom: 1.6rem;
}

.section-heading h2,
.page-heading h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-heading p,
.page-heading p,
.category-card-body p,
.detail-copy p,
.movie-card-body p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.72;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.15rem;
}

.movie-card,
.category-card,
.panel-box,
.player-card {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 232, 240, 0.32);
  background: rgba(30, 41, 59, 0.88);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #020617);
  transition: transform 0.32s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.poster-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: var(--muted-strong);
  padding: 0.24rem 0.55rem;
  font-size: 0.78rem;
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  padding: 0.9rem;
}

.movie-card-body h2,
.movie-card-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card-body h2 a,
.movie-card-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.movie-card-body p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
}

.movie-meta-line {
  font-size: 0.78rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tag-row span,
.detail-tags a {
  color: var(--muted-strong);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
  text-decoration: none;
}

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

.category-card {
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  padding: 0.5rem;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.category-card-body {
  padding: 1.1rem;
}

.category-card-body h2 {
  margin: 0 0 0.45rem;
}

.filter-panel {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.62);
}

.wide-search {
  display: grid;
  gap: 0.5rem;
  color: var(--muted-strong);
  font-weight: 700;
}

.wide-search input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-group strong {
  color: var(--muted-strong);
  margin-right: 0.2rem;
}

.filter-group button {
  padding: 0.48rem 0.75rem;
}

.no-results {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 1.25rem;
}

.no-results.is-visible {
  display: block;
}

.ranking-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.rank-list {
  display: grid;
  gap: 0.75rem;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 4rem 1fr;
  align-items: center;
  gap: 0.85rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  padding: 0.55rem;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.rank-number {
  width: 2rem;
  text-align: center;
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  border-radius: 0.65rem;
  padding: 0.35rem 0;
  font-weight: 900;
}

.rank-item img {
  width: 4rem;
  aspect-ratio: 2 / 3;
  border-radius: 0.65rem;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info em {
  margin-top: 0.25rem;
  color: var(--muted);
  font-style: normal;
  font-size: 0.88rem;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--muted-strong);
  text-decoration: none;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.5fr);
  gap: 1.4rem;
  padding-top: 1.5rem;
}

.player-card {
  position: relative;
  background: #000;
}

.movie-player {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  border-radius: 1.25rem;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(248, 250, 252, 0.18), transparent 14rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-core {
  width: clamp(4.8rem, 9vw, 7rem);
  height: clamp(4.8rem, 9vw, 7rem);
  display: grid;
  place-items: center;
  border: 1px solid rgba(248, 250, 252, 0.35);
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.92);
  color: #0f172a;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  font-size: clamp(2rem, 4vw, 3rem);
  padding-left: 0.2rem;
}

.player-message {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  color: var(--muted-strong);
  text-align: center;
  font-size: 0.92rem;
}

.detail-copy,
.detail-side,
.rich-text {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.72);
  padding: 1.25rem;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rich-text {
  margin-top: 1rem;
}

.rich-text h2 {
  margin-top: 0;
}

.rich-text p {
  color: var(--muted-strong);
  line-height: 1.9;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 2rem;
}

.footer-inner h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
}

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

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

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

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

  .hero-poster {
    display: none;
  }
}

@media (max-width: 820px) {
  .hero-slider,
  .hero-content {
    min-height: 660px;
  }

  .hero-content {
    padding-top: 8.8rem;
  }

  .movie-grid,
  .category-grid,
  .ranking-layout,
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .page-heading {
    display: block;
  }

  .section-more {
    margin-top: 1rem;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding-inline: 0.9rem;
  }

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

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

  .hero-category-bar {
    display: none;
  }

  .hero-content,
  .content-section,
  .page-shell,
  .detail-shell {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .movie-grid,
  .category-grid,
  .ranking-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: auto 3.4rem 1fr;
  }
}
