:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --bg-card-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --primary: #10b981;
  --primary-dark: #059669;
  --accent: #14b8a6;
  --amber: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 38rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(20px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.25);
}

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

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 8px;
}

.desktop-nav {
  display: flex;
}

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

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.16);
}

.mobile-toggle {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
}

.hero-slider {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-slides {
  position: relative;
  min-height: 690px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.42)),
    linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.2) 36%, rgba(2, 6, 23, 0.25));
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 64px;
  padding: 112px 0 92px;
}

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

.hero-kicker,
.page-hero span,
.section-heading span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 820px;
  font-size: clamp(42px, 7vw, 86px);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

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

.hero-tags span,
.detail-meta span,
.movie-meta span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(203, 213, 225, 0.22);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
}

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

.hero-poster {
  position: relative;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: var(--shadow);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: auto 24px -28px;
  height: 56px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.28);
  filter: blur(22px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img {
  transform: scale(1.045);
}

.hero-control {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -74px;
  padding-bottom: 30px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 66px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.hero-categories,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero-categories a,
.quick-links a,
.category-movie-links a {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  transition: color 0.2s ease, background 0.2s ease;
}

.hero-categories a:hover,
.quick-links a:hover,
.category-movie-links a:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.18);
}

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

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-wrap {
  margin-top: 28px;
}

.search-panel {
  display: flex;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 18px;
  padding: 14px 16px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
}

.search-panel button,
.filter-chip {
  border: 0;
  border-radius: 18px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
}

.empty-result {
  margin-top: 18px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 18px;
  padding: 16px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  min-height: 38px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.filter-chip.active,
.filter-chip:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.34);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 58%);
}

.movie-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.play-icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.32);
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover,
.rank-item h2 a:hover,
.content-card a:hover {
  color: #6ee7b7;
}

.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;
}

.movie-meta {
  gap: 6px;
  margin-top: 8px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

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

.category-card,
.category-overview-card,
.content-card,
.ranking-panel,
.rank-item {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.category-card {
  display: block;
  padding: 18px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.34);
}

.category-thumbs,
.category-overview-media {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-thumbs img,
.category-overview-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 20px;
}

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

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

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

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

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #ffffff;
  font-weight: 800;
}

.panel-title a {
  color: #6ee7b7;
  font-size: 13px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
}

.ranking-page-list .rank-item {
  grid-template-columns: 70px 112px minmax(0, 1fr);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 72px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.category-overview-card {
  padding: 18px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-movie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-movie-links a {
  font-size: 13px;
}

.sticky-search {
  position: sticky;
  top: 88px;
  z-index: 40;
}

.quick-links {
  justify-content: flex-start;
  margin-top: 14px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 94px 0 64px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.12);
  opacity: 0.42;
}

.detail-bg-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.94)),
    linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.3));
}

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

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

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

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

.breadcrumb a {
  color: #a7f3d0;
}

.detail-info h1 {
  font-size: clamp(34px, 5.4vw, 68px);
}

.detail-tags {
  margin-top: 16px;
}

.player-section {
  margin-top: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.46));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 24px 54px rgba(16, 185, 129, 0.32);
  cursor: pointer;
}

.player-overlay span {
  transform: translateX(3px);
  font-size: 36px;
}

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

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-links a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
}

[hidden],
.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 38px;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: flex;
  }

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

  .mobile-nav .nav-link {
    display: block;
    text-align: center;
  }

  .hero-slider,
  .hero-slides,
  .hero-layout {
    min-height: auto;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    padding: 92px 0 118px;
  }

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

  .hero-control {
    display: grid;
    margin-top: -106px;
  }

  .hero-categories {
    justify-content: flex-start;
  }

  .category-grid,
  .category-overview-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 64px;
  }

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

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 40px;
  }

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

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

  .search-panel {
    display: grid;
  }

  .search-panel button {
    min-height: 44px;
  }

  .rank-item,
  .ranking-page-list .rank-item {
    grid-template-columns: 42px 76px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-number {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 13px;
  }

  .page-hero {
    padding: 92px 0 54px;
  }

  .detail-hero {
    padding: 72px 0 40px;
  }

  .player-overlay button {
    width: 72px;
    height: 72px;
  }

  .player-overlay span {
    font-size: 28px;
  }
}
