:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.88);
  --bg-card-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(135deg, #1e293b, #020617);
}

button,
input {
  font: inherit;
}

.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 {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

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

.hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
  opacity: 0.78;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.08)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  right: clamp(24px, 14vw, 280px);
  bottom: clamp(34px, 8vw, 86px);
  z-index: 2;
}

.hero-kicker,
.page-hero span,
.detail-kicker,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 16px 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

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

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

.primary-button,
.ghost-button,
.search-panel button,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary-button,
.search-panel button,
.quick-search button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.search-panel button:hover,
.quick-search button:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 52px;
  background: var(--amber);
}

.hero-side {
  display: grid;
  gap: 24px;
}

.glass-panel,
.sticky-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.glass-panel h2,
.sticky-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.quick-search,
.search-panel,
.filter-bar {
  display: flex;
  gap: 12px;
}

.quick-search input,
.search-panel input,
.filter-bar input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: rgba(2, 6, 23, 0.82);
  outline: none;
}

.quick-search input,
.search-panel input {
  min-height: 48px;
}

.quick-categories,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-categories a,
.pill-link,
.filter-bar a,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.72);
  transition: color 0.25s ease, background 0.25s ease;
}

.quick-categories a:hover,
.pill-link:hover,
.filter-bar a:hover,
.text-link:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.2);
}

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

.content-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 72px;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  white-space: nowrap;
  color: var(--amber);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.35s ease;
}

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

.card-year,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  background: var(--amber);
}

.rank-badge {
  left: 10px;
  right: auto;
  color: #fff;
  background: rgba(2, 6, 23, 0.76);
}

.movie-card-body {
  padding: 14px;
}

.card-meta {
  margin-bottom: 8px;
  font-size: 12px;
}

.movie-card h3 {
  margin: 0 0 8px;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--amber);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fcd34d;
  font-size: 12px;
  background: rgba(245, 158, 11, 0.12);
}

.large-tags span {
  padding: 6px 10px;
  font-size: 13px;
}

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

.category-tile {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent),
    rgba(15, 23, 42, 0.82);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

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

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

.category-tile div {
  display: grid;
  gap: 6px;
  color: var(--soft);
  font-size: 13px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.76);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.86);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

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

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

.page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 48px;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(38px, 8vw, 88px);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 840px;
  margin: 12px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px;
  background: rgba(15, 23, 42, 0.76);
}

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

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

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

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

.filter-bar {
  align-items: center;
  margin-bottom: 18px;
}

.filter-bar input {
  height: 46px;
  border-radius: 16px;
}

.filter-bar a {
  white-space: nowrap;
}

.search-panel {
  max-width: 820px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.76);
}

.detail-layout {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #111827;
  font-size: 32px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 16px 44px rgba(245, 158, 11, 0.38);
}

.detail-info {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  max-height: 520px;
}

.detail-copy {
  padding: 24px;
}

.detail-copy h1 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-copy p {
  color: var(--soft);
  line-height: 1.8;
}

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

.article-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 26px;
  background: rgba(15, 23, 42, 0.76);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-block p {
  margin: 0;
  color: var(--soft);
  line-height: 2;
}

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

.slim-rank-list {
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

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

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 36px;
  padding: 46px 0 30px;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

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

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.76);
}

@media (max-width: 1180px) {
  .hero,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage,
  .hero-image {
    min-height: 560px;
  }

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

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

  .detail-info,
  .sticky-panel {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 6px;
  }

  .hero-stage,
  .hero-image {
    min-height: 520px;
  }

  .hero-content {
    right: 24px;
  }

  .movie-grid,
  .full-grid,
  .compact-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 620px) {
  .header-inner,
  .hero,
  .content-section,
  .page-hero,
  .detail-layout,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, var(--max));
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    margin-top: 16px;
  }

  .hero-stage,
  .hero-image {
    min-height: 560px;
  }

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

  .hero-control {
    display: none;
  }

  .hero-mini-grid,
  .movie-grid,
  .full-grid,
  .compact-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .quick-search,
  .search-panel,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }
}
