* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.20);
  --cyan: #22d3ee;
  --blue: #2563eb;
  --pink: #f472b6;
  --orange: #fb923c;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(244, 114, 182, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.image-missing {
  opacity: 0;
}

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

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

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #60a5fa 52%, var(--pink));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.35);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

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

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(10px) saturate(1.18);
  transform: scale(1.07);
  opacity: 0.42;
}

.hero-slide::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.22), transparent 26rem);
  z-index: 1;
}

.hero-overlay,
.detail-bg-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.20) 42%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  min-height: 690px;
  gap: 56px;
  padding: 76px 0 110px;
}

.hero-copy h1,
.detail-copy h1 {
  max-width: 780px;
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p,
.detail-copy p {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow,
.section-kicker,
.page-title span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 47, 73, 0.34);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

.hero-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.primary-btn,
.home-search button {
  color: #04111d;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.23);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

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

.full {
  width: 100%;
}

.hero-poster,
.detail-poster {
  position: relative;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(244, 114, 182, 0.16)),
    #0f172a;
  box-shadow: var(--shadow);
}

.hero-poster::after,
.poster-wrap::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.74));
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 40px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dots button.active {
  width: 34px;
  background: var(--cyan);
}

.search-hero-panel {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  margin-top: -54px;
  position: relative;
  z-index: 8;
}

.home-search,
.rank-entry,
.info-panel,
.filter-panel,
.side-card,
.sitemap-box,
.category-overview-card,
.sticky-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search {
  padding: 24px;
}

.home-search label,
.filter-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.home-search-row {
  display: flex;
  gap: 12px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.72);
}

input:focus,
select:focus {
  border-color: rgba(34, 211, 238, 0.78);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.rank-entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  transition: 0.2s ease;
}

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

.rank-entry span,
.rank-entry em {
  color: var(--muted);
  font-style: normal;
}

.rank-entry strong {
  font-size: 20px;
}

.page-section,
.page-shell {
  padding: 72px 0;
}

.page-title {
  margin-bottom: 34px;
}

.page-title h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-title p,
.section-head p,
.info-panel p,
.detail-main p,
.sticky-side p,
.category-overview-card p,
.sitemap-box p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.section-more,
.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  transition: 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.08;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(96, 165, 250, 0.10), rgba(244, 114, 182, 0.14)),
    #0f172a;
}

.poster-wrap img {
  transition: transform 0.34s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-body h3 {
  min-height: 52px;
  margin: 10px 0;
  font-size: 18px;
  line-height: 1.42;
}

.card-body p {
  display: -webkit-box;
  min-height: 68px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hot-score {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 166px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 9rem),
    rgba(15, 23, 42, 0.78);
  transition: 0.2s ease;
}

.category-card span {
  font-size: 18px;
  font-weight: 900;
}

.category-card strong {
  font-size: 34px;
  color: var(--cyan);
}

.category-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

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

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

.rank-no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  font-weight: 900;
}

.rank-info {
  display: grid;
  gap: 4px;
}

.rank-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-score {
  color: var(--orange);
  font-weight: 900;
}

.info-panel,
.sticky-side {
  padding: 28px;
}

.info-panel span {
  color: var(--cyan);
  font-weight: 900;
}

.info-panel h2 {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.mini-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  margin-top: 22px;
}

.mini-stats strong {
  color: var(--cyan);
  font-size: 28px;
}

.mini-stats em {
  align-self: center;
  color: var(--muted);
  font-style: normal;
}

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

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
}

.filter-grid-wide {
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr;
}

.filter-result {
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
}

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

.category-overview-card {
  padding: 24px;
  transition: 0.2s ease;
}

.category-overview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-overview-title span {
  font-size: 24px;
  font-weight: 900;
}

.category-overview-title strong {
  color: var(--cyan);
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-samples a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  font-size: 13px;
}

.rank-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
}

.sticky-side {
  position: sticky;
  top: 92px;
  height: fit-content;
}

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

.detail-hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 310px 1fr;
  align-items: center;
  gap: 46px;
  min-height: 620px;
  padding: 70px 0;
}

.player-section {
  margin-top: -70px;
  position: relative;
  z-index: 6;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.66));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.42);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 28px;
  padding: 54px 0 20px;
}

.detail-main {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  background: rgba(15, 23, 42, 0.74);
}

.detail-main h2 {
  margin-top: 0;
  font-size: 28px;
}

.detail-main h2:not(:first-child) {
  margin-top: 34px;
}

.detail-main p {
  font-size: 16px;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.side-card {
  padding: 22px;
}

.side-card h3 {
  margin-top: 0;
}

.side-card dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
}

.nav-pair a {
  display: block;
  padding: 10px 0;
  color: var(--cyan);
  font-weight: 800;
}

.tag-row-large span {
  font-size: 14px;
}

.sitemap-box {
  margin-bottom: 22px;
  padding: 24px;
}

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

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

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

.sitemap-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #dbeafe;
  background: rgba(2, 6, 23, 0.44);
  font-size: 13px;
}

.sitemap-links span {
  color: var(--muted);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 1.2fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
}

.footer-grid p,
.footer-links a,
.footer-cats a {
  color: var(--muted);
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  flex-direction: column;
}

.is-hidden-card {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-content,
  .search-hero-panel,
  .split-layout,
  .rank-page-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-poster {
    display: none;
  }

  .sticky-side {
    position: static;
  }
}

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

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-copy h1,
  .detail-copy h1 {
    font-size: clamp(36px, 14vw, 58px);
  }

  .home-search-row,
  .section-head,
  .detail-hero-inner {
    display: block;
  }

  .home-search button {
    width: 100%;
    margin-top: 12px;
  }

  .filter-grid,
  .filter-grid-wide,
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .sitemap-cats,
  .sitemap-movies {
    grid-template-columns: 1fr;
  }

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

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

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