*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-glass: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.16);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --text-strong: #ffffff;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --radius-sm: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  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.03em;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.22);
}

.brand-text,
.footer-brand,
.section-head h2,
.ranking-title h2 {
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link,
.mobile-link,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.footer-links a:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-link {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.75s ease, transform 1.2s ease;
  transform: scale(1.03);
}

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

.hero-copy {
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 780px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 47, 73, 0.32);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  color: var(--text-strong);
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero p,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

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

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-size: 0.82rem;
}

.hero-actions,
.detail-copy .primary-btn {
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-link,
.wide-link,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.hero-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.28);
  cursor: pointer;
}

.ghost-btn,
.section-link,
.wide-link {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.wide-link:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.hero-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  padding: 0 14px;
}

.hero-search input {
  min-width: min(56vw, 520px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
  padding: 76px 0;
}

.section-overlap {
  margin-top: -18px;
  position: relative;
  z-index: 5;
}

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

.section-head h2,
.ranking-title h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

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

.category-tile,
.category-card-large,
.movie-card,
.ranking-panel,
.side-card,
.prose-card,
.player-card,
.filter-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-tile,
.category-card-large {
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-tile span,
.category-card-large h2 {
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 800;
}

.category-tile p,
.category-card-large p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.category-card-large strong {
  display: inline-flex;
  margin-top: 18px;
  color: var(--cyan);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.movie-card:hover img {
  transform: scale(1.06);
  filter: brightness(1.06);
}

.score-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.score-badge {
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  color: #03121d;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.play-badge {
  right: 10px;
  bottom: 10px;
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-body h2 {
  margin: 10px 0 8px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
}

.card-body p {
  min-height: 4.7em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

.tag-row span {
  padding: 5px 8px;
  color: #bfdbfe;
  font-size: 0.74rem;
}

.big-tags span {
  padding: 8px 12px;
  font-size: 0.88rem;
}

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

.ranking-panel,
.side-card,
.prose-card {
  border-radius: var(--radius);
  padding: 22px;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 42px 52px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  border-color: rgba(34, 211, 238, 0.38);
  transform: translateX(3px);
}

.rank-number {
  color: var(--cyan);
  font-weight: 900;
}

.ranking-item img {
  width: 52px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-text strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em,
.rank-score {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.rank-score {
  color: #facc15;
  font-weight: 900;
  text-align: right;
}

.wide-link {
  width: 100%;
  margin-top: 16px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.slim-hero {
  padding: 96px 0 54px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.18), transparent 28rem),
    rgba(2, 6, 23, 0.9);
}

.slim-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  margin-bottom: 28px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 700;
}

.empty-state {
  display: none;
  padding: 40px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  padding: 86px 0 72px;
  border-bottom: 1px solid var(--line);
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-copy h1 {
  max-width: 900px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.detail-meta {
  margin-top: 22px;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.78)),
    rgba(2, 6, 23, 0.72);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.28);
  font-size: 2rem;
}

.player-cover strong {
  font-size: clamp(1.25rem, 4vw, 2rem);
}

.player-cover em {
  color: #bfdbfe;
  font-style: normal;
}

.prose-card {
  margin-top: 24px;
}

.prose-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.35rem;
}

.prose-card p {
  margin: 0 0 22px;
  color: #cbd5e1;
  line-height: 1.9;
}

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

.side-card dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.side-card dd {
  margin: -8px 0 8px;
  color: #ffffff;
  line-height: 1.6;
}

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

.ranking-list-large {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

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

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

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

  .split-grid,
  .ranking-page-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-copy {
    min-height: 650px;
  }

  .hero-panel,
  .section-head,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search,
  .filter-panel {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-search {
    display: grid;
  }

  .hero-search input {
    min-width: 0;
  }

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

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

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

@media (max-width: 520px) {
  .container,
  .header-inner,
  .hero-copy,
  .hero-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.05em;
  }

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

  .section {
    padding: 54px 0;
  }

  .ranking-item {
    grid-template-columns: 34px 48px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}
