:root {
  color-scheme: dark;
  --bg: #070812;
  --bg-soft: #101323;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: #a8b1c7;
  --line: rgba(255, 255, 255, 0.13);
  --primary: #ff3d8b;
  --primary-2: #8b5cf6;
  --cyan: #22d3ee;
  --gold: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(139, 92, 246, 0.34), transparent 34rem),
    radial-gradient(circle at 86% 14%, rgba(34, 211, 238, 0.18), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(255, 61, 139, 0.20), transparent 36rem),
    var(--bg);
  color: var(--text);
}

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

.header-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2), var(--cyan));
  box-shadow: 0 14px 32px rgba(255, 61, 139, 0.32);
}

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

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

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 46px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0 92px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px) scale(0.985);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 36px 0 56px;
  border-radius: 40px;
  background:
    linear-gradient(90deg, rgba(7, 8, 18, 0.88), rgba(7, 8, 18, 0.40), rgba(7, 8, 18, 0.74)),
    var(--hero-image) center / cover;
  filter: saturate(1.2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 61, 139, 0.34), transparent 28rem),
    radial-gradient(circle at 70% 40%, rgba(34, 211, 238, 0.22), transparent 24rem),
    linear-gradient(180deg, transparent, rgba(7, 8, 18, 0.52));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-left: clamp(20px, 5vw, 64px);
}

.eyebrow,
.section-heading span,
.category-card-copy span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 740px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-text {
  max-width: 720px;
  margin: 0;
  color: #dde5f7;
  font-size: 18px;
  line-height: 1.9;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e9eefc;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 34px rgba(255, 61, 139, 0.30);
}

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

.hero-poster {
  position: relative;
  z-index: 2;
  width: min(390px, 100%);
  justify-self: center;
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

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

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

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

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

.section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.section-heading p {
  grid-column: 1 / 2;
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.6fr);
  align-items: center;
  gap: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 8px 0 8px;
  font-size: 32px;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.inline-search,
.hero-mini-search {
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
}

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

.inline-search input,
.hero-mini-search input {
  padding: 0 14px;
}

.inline-search button,
.hero-mini-search button {
  border: 0;
  white-space: nowrap;
  cursor: pointer;
}

.hero-mini-search button {
  padding: 0 18px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.20);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(7, 8, 18, 0.88));
}

.category-glow {
  position: absolute;
  inset: 0;
  background: var(--tile-image) center / cover;
  opacity: 0.42;
  transform: scale(1.05);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover .category-glow {
  opacity: 0.58;
  transform: scale(1.12);
}

.category-tile small,
.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile small {
  color: var(--cyan);
  font-weight: 800;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile em {
  color: #d7def0;
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.20);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0b1020;
  background: rgba(255, 209, 102, 0.92);
  font-size: 12px;
  font-weight: 900;
}

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

.card-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3 {
  min-height: 46px;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.card-summary {
  min-height: 62px;
  margin: 0 0 12px;
  color: #cfd7e8;
  font-size: 13px;
  line-height: 1.6;
}

.movie-card-compact .card-summary {
  min-height: 42px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  color: #dce8f7;
  font-size: 11px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 54px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.13);
}

.rank-number {
  font-size: 19px;
  font-weight: 1000;
  color: var(--gold);
}

.rank-item img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy {
  min-width: 0;
}

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

.rank-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 61, 139, 0.28), transparent 32rem),
    radial-gradient(circle at 88% 30%, rgba(34, 211, 238, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 760px;
  margin: 12px 0 12px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d8e0f1;
  font-size: 17px;
  line-height: 1.8;
}

.category-hero {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 0.45fr);
  align-items: end;
  gap: 24px;
}

.filter-bar {
  position: sticky;
  top: 88px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 8, 18, 0.76);
  backdrop-filter: blur(18px);
}

.filter-bar input {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chips button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.filter-chips button:hover,
.filter-chips button.is-active {
  color: white;
  background: linear-gradient(135deg, rgba(255, 61, 139, 0.86), rgba(139, 92, 246, 0.86));
}

.category-list-large {
  display: grid;
  gap: 22px;
}

.category-card-large {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) 1fr;
  gap: 24px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
}

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

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.category-card-copy h2 {
  margin: 8px 0;
  font-size: 30px;
}

.category-card-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  padding: 34px 0 58px;
  background:
    linear-gradient(90deg, rgba(7, 8, 18, 0.92), rgba(7, 8, 18, 0.70), rgba(7, 8, 18, 0.92)),
    var(--detail-image) center / cover;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 61, 139, 0.26), transparent 30rem),
    radial-gradient(circle at 80% 18%, rgba(34, 211, 238, 0.18), transparent 26rem);
}

.breadcrumb,
.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.breadcrumb a {
  color: #dce8f7;
}

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

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

.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0;
  color: #e2e9f8;
  font-size: 19px;
  line-height: 1.85;
}

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

.player-section {
  margin-top: -72px;
  position: relative;
  z-index: 5;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: #02030a;
  box-shadow: var(--shadow);
}

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 61, 139, 0.20), transparent 22rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.74));
}

.player-cover img {
  object-fit: cover;
  filter: saturate(1.12);
}

.play-button {
  position: relative;
  z-index: 3;
  width: clamp(74px, 10vw, 108px);
  height: clamp(74px, 10vw, 108px);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 22px 52px rgba(255, 61, 139, 0.38);
  cursor: pointer;
}

.play-button span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid white;
  transform: translate(-36%, -50%);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
}

.content-card h2 {
  margin: 10px 0 12px;
  font-size: 28px;
}

.content-card p {
  margin: 0;
  color: #d7def0;
  line-height: 1.9;
}

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

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-shell p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

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

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

  .rank-list,
  .rank-list-wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(7, 8, 18, 0.94);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero,
  .hero-track {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 52px 0 82px;
  }

  .hero-backdrop {
    inset: 22px 0 46px;
    border-radius: 28px;
  }

  .hero-content {
    padding: 20px 24px 0;
  }

  .hero-poster {
    width: min(280px, 78%);
  }

  .search-panel,
  .category-hero,
  .filter-bar,
  .category-card-large,
  .detail-shell,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .header-shell,
  .section,
  .page-hero,
  .breadcrumb,
  .detail-shell,
  .footer-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 17px;
  }

  .hero,
  .hero-track {
    min-height: 720px;
  }

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

  .inline-search,
  .hero-mini-search,
  .footer-shell {
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-tile {
    min-height: 170px;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

  .card-summary {
    min-height: auto;
    font-size: 12px;
  }

  .filter-bar {
    top: 76px;
  }

  .rank-item {
    grid-template-columns: 38px 48px 1fr;
  }

  .rank-score {
    display: none;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

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