:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --rose: #fb7185;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.wrap {
  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);
}

.nav-bar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #e0f2fe, var(--accent));
  -webkit-background-clip: text;
  color: transparent;
}

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

.desktop-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  transition: 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: white;
  background: rgba(56, 189, 248, 0.12);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.hero-search input,
.filter-box input,
.mobile-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  outline: none;
}

.nav-search input {
  width: 210px;
  padding: 10px 14px;
}

.nav-search input:focus,
.hero-search input:focus,
.filter-box input:focus,
.mobile-panel input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.nav-search button,
.hero-search button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  color: white;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

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

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-panel nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.mobile-panel form {
  display: flex;
  gap: 10px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 670px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.26;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.2);
  transform: scale(1.05);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.86)),
    radial-gradient(circle at 68% 40%, rgba(56, 189, 248, 0.22), transparent 34rem);
}

.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(380px, 0.78fr);
  gap: 44px;
  align-items: center;
  padding: 76px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-weight: 800;
  font-size: 13px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  max-width: 680px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

.hero-search {
  width: min(610px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 28px 0 20px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-search input {
  border-color: transparent;
  background: transparent;
}

.hero-search button {
  padding: 12px 24px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.25);
}

.btn-soft {
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(15, 23, 42, 0.72);
}

.hero-carousel {
  position: relative;
  height: 540px;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: var(--shadow);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.18) 32%, rgba(2, 6, 23, 0.9) 100%);
}

.hero-slide-copy {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 2;
}

.hero-slide-copy span {
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
}

.hero-slide-copy h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4vw, 42px);
}

.hero-slide-copy p {
  color: var(--soft);
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--accent);
}

.content-section {
  padding: 54px 0;
}

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

.compact-head {
  align-items: start;
}

.section-head h2,
.archive-panel h2,
.footer-grid h2,
.detail-content h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p,
.archive-panel p,
.footer-grid p,
.detail-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  flex: 0 0 auto;
  color: #bae6fd;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.55));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 22px 58px rgba(14, 165, 233, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(14, 165, 233, 0.2));
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(14, 165, 233, 0.9);
  font-size: 12px;
  font-weight: 800;
}

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

.meta-row,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card h3 a:hover,
.rank-info h3 a:hover {
  color: var(--accent);
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
}

.large-tags span {
  font-size: 13px;
  padding: 7px 12px;
}

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

.category-tile {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 13rem),
    rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.category-tile span {
  color: #bae6fd;
  font-weight: 900;
}

.category-tile strong {
  font-size: 20px;
  line-height: 1.4;
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  transition: 0.22s ease;
}

.full-rank .rank-card {
  grid-template-columns: auto 128px minmax(0, 1fr);
}

.rank-card:hover {
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-2px);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.archive-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.archive-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.archive-links a,
.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 12px;
  color: var(--soft);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.archive-links a:hover,
.pagination a:hover,
.pagination a.is-active {
  color: white;
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.38);
}

.page-hero {
  padding: 72px 0 28px;
}

.page-hero h1 {
  max-width: 880px;
}

.filter-box {
  width: min(680px, 100%);
  margin-top: 26px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  padding: 0 13px;
}

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

.detail-poster-wrap {
  position: relative;
  border-radius: 30px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(15, 23, 42, 0.88));
  box-shadow: var(--shadow);
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 23px;
  background: rgba(15, 23, 42, 0.8);
}

.detail-copy .lead {
  max-width: 820px;
}

.detail-meta {
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.player-section {
  padding: 18px 0 44px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 18px 54px rgba(14, 165, 233, 0.36);
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  padding-top: 28px;
}

.detail-content h2 {
  margin-top: 24px;
}

.detail-content p {
  font-size: 17px;
  color: #cbd5e1;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.96));
}

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

.footer-grid a:not(.brand) {
  display: block;
  margin: 10px 0;
  color: var(--muted);
}

.footer-grid a:not(.brand):hover {
  color: var(--accent);
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-bottom {
  padding: 18px 0 32px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

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

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

  .hero-shell,
  .split-section {
    grid-template-columns: 1fr;
  }

  .archive-panel {
    position: static;
  }
}

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

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

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding: 48px 0;
  }

  .hero-carousel {
    height: 460px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button {
    border-radius: 16px;
  }

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

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

  .detail-poster-wrap {
    max-width: 340px;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-carousel {
    height: 420px;
    border-radius: 24px;
  }

  .category-grid,
  .movie-grid,
  .library-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-card,
  .full-rank .rank-card {
    grid-template-columns: auto 88px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-info p,
  .rank-info .tag-row {
    display: none;
  }

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