:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.78);
  --line: rgba(75, 85, 99, 0.42);
  --text: #f9fafb;
  --muted: #9ca3af;
  --muted2: #6b7280;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(75, 85, 99, 0.24), transparent 32rem), linear-gradient(135deg, #030712 0%, #111827 44%, #030712 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header-inner,
.content-section,
.quick-search-section,
.player-section,
.detail-content,
.category-overview-grid,
.page-hero-inner,
.detail-layout,
.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 38px rgba(0, 0, 0, 0.28);
}

.brand-mark span,
.play-button span {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #f9fafb;
  margin-left: 3px;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

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

.brand-text strong {
  font-size: 21px;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.brand-text small,
.movie-meta,
.rank-meta,
.compact-card em,
.breadcrumb,
.detail-side-card dt {
  color: var(--muted2);
}

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

.nav-link {
  padding: 9px 15px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(31, 41, 55, 0.92);
  transform: translateY(-1px);
}

.top-search {
  width: min(320px, 30vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(17, 24, 39, 0.72);
}

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

.top-search input {
  padding: 7px 8px;
}

.top-search button,
.filter-selects button,
.primary-button {
  border: 0;
  border-radius: 12px;
  padding: 9px 14px;
  color: #111827;
  background: #f9fafb;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #030712;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 max(24px, calc((100vw - 1280px) / 2)) 8vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img,
.detail-backdrop img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.82), rgba(3, 7, 18, 0.28) 56%, rgba(3, 7, 18, 0.84)), linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.82) 18%, transparent 60%);
}

.hero-bg img {
  filter: saturate(0.9) contrast(1.02);
  transform: scale(1.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d1d5db;
  font-size: 13px;
  letter-spacing: 0.18em;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: rgba(249, 250, 251, 0.65);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(34px, 7vw, 74px);
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.045em;
}

.hero p,
.page-hero p,
.detail-one-line,
.section-head p,
.category-overview-card p,
.detail-article p {
  color: #d1d5db;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  color: #d1d5db;
  background: rgba(17, 24, 39, 0.66);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

.hero-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-link,
.full-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 13px;
  padding: 0 18px;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.ghost-button,
.section-link,
.full-link,
.footer-links a {
  border: 1px solid var(--line);
  color: #e5e7eb;
  background: rgba(17, 24, 39, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.full-link:hover,
.footer-links a:hover {
  transform: translateY(-1px);
  background: rgba(31, 41, 55, 0.92);
  color: #ffffff;
}

.primary-button:hover {
  background: #e5e7eb;
  color: #111827;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 42px;
  z-index: 3;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  width: 28px;
  background: #f9fafb;
}

.content-section,
.quick-search-section,
.player-section {
  padding: 72px 0 0;
}

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

.section-head.centered {
  display: block;
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-head h2,
.rank-card h2,
.category-overview-card h2,
.detail-article h2,
.detail-side-card h2,
.player-section h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.16;
  font-weight: 300;
}

.filter-panel,
.rank-card,
.detail-side-card,
.category-overview-card,
.detail-article {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.filter-panel {
  margin-bottom: 28px;
}

.filter-search input,
.filter-selects select {
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 15px;
  padding: 13px 14px;
  background: rgba(3, 7, 18, 0.55);
}

.filter-selects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

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

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

.movie-card.is-hidden,
.ranking-item.is-hidden,
.empty-state {
  display: none;
}

.empty-state.is-visible {
  display: block;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(75, 85, 99, 0.36);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card-link:hover {
  transform: translateY(-7px);
  border-color: rgba(249, 250, 251, 0.26);
  background: rgba(31, 41, 55, 0.82);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card-link:hover .poster-frame img {
  transform: scale(1.07);
  filter: brightness(0.78);
}

.poster-gradient,
.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), transparent 46%);
}

.poster-action {
  position: absolute;
  left: 14px;
  bottom: 14px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #111827;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #aeb8c7;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: auto;
  gap: 7px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(75, 85, 99, 0.42);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
  opacity: 0.86;
  transform: scale(1.08);
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 24px;
  font-weight: 400;
}

.category-tile em {
  margin-top: 8px;
  color: #d1d5db;
  font-size: 14px;
  font-style: normal;
}

.split-section,
.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

.rank-card {
  position: sticky;
  top: 100px;
}

.rank-list,
.compact-list,
.ranking-list-full {
  display: grid;
  gap: 12px;
}

.rank-row,
.compact-card,
.ranking-item a {
  display: grid;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(75, 85, 99, 0.32);
  border-radius: 18px;
  padding: 12px;
  background: rgba(3, 7, 18, 0.34);
}

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

.rank-number {
  grid-row: span 2;
  font-size: 18px;
  font-weight: 800;
}

.rank-title,
.compact-card strong,
.compact-card em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.full-link {
  width: 100%;
  margin-top: 18px;
}

.page-hero {
  padding: 98px 0 44px;
  background: radial-gradient(circle at 76% 14%, rgba(148, 163, 184, 0.2), transparent 24rem), linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(3, 7, 18, 0));
}

.page-hero.slim-hero {
  padding-bottom: 28px;
}

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

.compact-card {
  grid-template-columns: 72px minmax(0, 1fr);
}

.compact-card img {
  width: 72px;
  height: 90px;
  border-radius: 13px;
  object-fit: cover;
  background: #111827;
}

.ranking-item a {
  grid-template-columns: 58px 104px minmax(0, 1fr);
  gap: 16px;
}

.ranking-index {
  font-size: 28px;
  font-weight: 800;
}

.ranking-item img {
  width: 104px;
  height: 138px;
  border-radius: 16px;
  object-fit: cover;
  background: #111827;
}

.ranking-copy strong,
.ranking-copy em,
.ranking-copy b {
  display: block;
}

.ranking-copy strong {
  font-size: 22px;
  font-weight: 500;
}

.ranking-copy em {
  margin: 6px 0 10px;
  color: var(--muted2);
  font-style: normal;
}

.ranking-copy b {
  color: #cbd5e1;
  font-weight: 400;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 54px;
}

.detail-backdrop {
  opacity: 0.26;
  filter: blur(14px) saturate(0.9);
  transform: scale(1.05);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.68)), linear-gradient(0deg, #030712 0%, transparent 60%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}

.detail-tags {
  margin-bottom: 28px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  background: #000000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.video-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.video-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(3, 7, 18, 0.72));
}

.play-button {
  position: relative;
  z-index: 3;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.play-button span {
  border-top-width: 13px;
  border-bottom-width: 13px;
  border-left-width: 20px;
  border-left-color: #111827;
}

.detail-article p {
  font-size: 17px;
}

.detail-side-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.detail-side-card div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid rgba(75, 85, 99, 0.26);
  padding-bottom: 12px;
}

.detail-side-card dd {
  margin: 0;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.9);
}

.footer-inner {
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand p {
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-links {
  justify-content: flex-end;
  margin-top: 0;
}

.footer-links a {
  border-radius: 999px;
  padding: 7px 12px;
}

@media (max-width: 1180px) {
  .movie-grid,
  .movie-grid.all-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }
  .rank-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .site-header-inner {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }
  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .top-search {
    width: auto;
    flex: 1;
  }
  .filter-selects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .category-overview-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header-inner,
  .content-section,
  .quick-search-section,
  .player-section,
  .detail-content,
  .category-overview-grid,
  .page-hero-inner,
  .detail-layout,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }
  .brand-text strong {
    font-size: 18px;
  }
  .brand-text small {
    display: none;
  }
  .top-search {
    flex-basis: 100%;
  }
  .hero {
    min-height: 620px;
  }
  .hero-slide {
    padding: 0 12px 92px;
  }
  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }
  .hero-actions,
  .section-head,
  .category-overview-head,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }
  .primary-button,
  .ghost-button,
  .section-link {
    width: 100%;
  }
  .filter-selects,
  .movie-grid,
  .movie-grid.all-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-poster {
    width: 210px;
  }
  .ranking-item a {
    grid-template-columns: 44px 74px minmax(0, 1fr);
    gap: 10px;
  }
  .ranking-item img {
    width: 74px;
    height: 98px;
  }
  .ranking-copy b {
    display: none;
  }
  .video-shell {
    border-radius: 18px;
  }
  .play-button {
    width: 66px;
    height: 66px;
  }
}
