:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --primary: #e11d48;
  --primary-2: #7c3aed;
  --accent: #f59e0b;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(225, 29, 72, 0.22), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(124, 58, 237, 0.24), transparent 32%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 72%);
}

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

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

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.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.34);
}

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

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.top-search {
  display: flex;
  align-items: center;
  min-width: 280px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.toolbar input,
.inline-filter input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.top-search input {
  padding: 9px 12px;
}

.top-search button,
.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(225, 29, 72, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.primary-button:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(124, 58, 237, 0.32);
}

.ghost-button,
.section-link {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.small-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

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

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

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-shell {
  position: relative;
  margin: 28px 0 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  padding: clamp(32px, 7vw, 76px);
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: #fecdd3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero-content p,
.page-hero p,
.section-heading p,
.ranking-panel p,
.detail-one-line,
.detail-section p,
.movie-card-body p,
.category-page-card p,
.category-tile strong,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-content p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-bottom {
  position: absolute;
  right: 28px;
  bottom: 26px;
  left: 28px;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 12px;
  width: min(520px, 50%);
}

.hero-thumb {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(14px);
}

.hero-thumb img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-thumb span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-block {
  margin: 58px 0;
}

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

.section-heading h2,
.ranking-panel h2,
.detail-section h2,
.footer-grid h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
}

.category-grid,
.category-page-grid,
.movie-grid,
.featured-rank-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile,
.category-page-card,
.ranking-panel,
.movie-card,
.featured-rank,
.player-shell,
.detail-main,
.detail-section {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.category-tile,
.category-page-card {
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-page-card:hover,
.movie-card:hover,
.featured-rank:hover {
  border-color: rgba(244, 63, 94, 0.45);
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.92);
}

.category-tile span,
.category-page-card span {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

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

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.24), rgba(124, 58, 237, 0.2));
}

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

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

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

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

.movie-card-kicker {
  color: #fda4af;
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card-body p {
  display: -webkit-box;
  min-height: 74px;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 14px;
}

.inline-filter,
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.inline-filter input,
.toolbar input {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: start;
  gap: 24px;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.rank-list,
.ranking-table {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.rank-row,
.ranking-table-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  transition: 0.2s ease;
}

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

.rank-row:hover,
.ranking-table-row:hover {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.rank-row span,
.rank-num {
  color: #fda4af;
  font-weight: 950;
}

.rank-row strong,
.rank-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  position: relative;
  margin: 28px 0 34px;
  padding: clamp(32px, 7vw, 70px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.26), rgba(124, 58, 237, 0.2)),
    rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.slim-hero h1,
.ranking-hero h1 {
  max-width: 780px;
}

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

.featured-rank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.featured-rank {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.featured-rank img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  filter: brightness(0.62);
}

.featured-rank span,
.featured-rank strong,
.featured-rank em {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 1;
}

.featured-rank span {
  top: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 48px;
  font-weight: 950;
}

.featured-rank strong {
  bottom: 76px;
  font-size: 24px;
}

.featured-rank em {
  bottom: 20px;
  display: -webkit-box;
  overflow: hidden;
  color: #e2e8f0;
  font-style: normal;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-table-row {
  grid-template-columns: 80px 1.5fr 100px 160px 1.5fr;
  padding: 14px 16px;
  color: var(--soft);
}

.rank-title {
  color: #fff;
  font-weight: 900;
}

.detail-layout {
  margin: 28px 0 64px;
}

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

.breadcrumb a:hover {
  color: #fff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 30px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(225, 29, 72, 0.26), rgba(2, 6, 23, 0.88) 58%),
    rgba(2, 6, 23, 0.7);
  cursor: pointer;
  text-align: center;
  z-index: 2;
}

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

.play-icon {
  display: inline-grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 42px rgba(225, 29, 72, 0.36);
}

.play-icon::before {
  display: block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #fff;
  content: "";
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 44px);
}

.player-cover em {
  max-width: 720px;
  color: var(--soft);
  font-style: normal;
  line-height: 1.7;
}

.detail-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
}

.detail-copy h1 {
  margin-bottom: 18px;
}

.detail-one-line {
  margin: 0 0 22px;
  font-size: 18px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.detail-meta div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.detail-section {
  margin-top: 24px;
  padding: 26px;
  border-radius: var(--radius-xl);
}

.detail-section p {
  margin: 14px 0 0;
  color: #dbeafe;
  font-size: 17px;
}

.related-block {
  margin-top: 42px;
}

.empty-state {
  display: none;
  margin: 30px 0;
  color: var(--muted);
  text-align: center;
}

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

.site-footer {
  width: min(1220px, calc(100% - 32px));
  margin: 80px auto 0;
  padding: 34px 0 24px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.footer-grid a:not(.site-logo) {
  display: block;
  margin-top: 9px;
  color: var(--muted);
}

.footer-grid a:hover {
  color: #fff;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-bottom {
  margin-top: 26px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .top-search {
    display: none;
  }

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

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

  .header-inner {
    gap: 12px;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-slide {
    align-items: flex-start;
    padding-top: 44px;
  }

  .hero-thumbs {
    display: none;
  }

  .hero-bottom {
    justify-content: center;
  }

  .section-heading,
  .toolbar,
  .inline-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .category-grid,
  .category-page-grid,
  .movie-grid,
  .compact-grid,
  .list-grid,
  .featured-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-table-row {
    grid-template-columns: 54px 1fr;
  }

  .ranking-table-row span:nth-child(n+3) {
    display: none;
  }

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

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

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

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

@media (max-width: 560px) {
  main,
  .site-footer,
  .header-inner,
  .mobile-nav {
    width: min(100% - 20px, 1220px);
  }

  .site-logo {
    font-size: 17px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-shell,
  .page-hero,
  .player-shell,
  .detail-main,
  .detail-section {
    border-radius: 22px;
  }

  .hero-slider {
    min-height: 560px;
  }

  .hero-slide {
    padding: 30px 22px;
  }

  .category-grid,
  .category-page-grid,
  .movie-grid,
  .compact-grid,
  .list-grid,
  .featured-rank-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-body p {
    min-height: auto;
  }
}
