* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #070914;
  --bg-soft: #101425;
  --card: rgba(18, 23, 42, 0.82);
  --card-solid: #12172a;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f8ff;
  --muted: #a6aec8;
  --dim: #6f7896;
  --gold: #ffcf5a;
  --pink: #ff5f8f;
  --blue: #6ab7ff;
  --green: #48d6a0;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 26px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 95, 143, 0.22), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(106, 183, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #090b17 0%, #070914 42%, #0b1020 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 20, 0.72);
  backdrop-filter: blur(22px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #11131d;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 12px 34px rgba(255, 95, 143, 0.28);
}

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.24s ease;
}

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

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 30vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input::placeholder,
.filter-box input::placeholder {
  color: rgba(166, 174, 200, 0.72);
}

.header-search button {
  border: 0;
  padding: 11px 16px;
  color: #11131d;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--pink));
}

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

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

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(18, 23, 42, 0.95);
}

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

.mobile-links,
.mobile-categories,
.footer-links,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-links a,
.mobile-categories a,
.footer-links a,
.chip-link {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.chip-link.is-active,
.chip-link:hover,
.mobile-links a:hover,
.mobile-categories a:hover,
.footer-links a:hover {
  color: var(--text);
  border-color: rgba(255, 207, 90, 0.46);
}

.hero-shell {
  position: relative;
  min-height: calc(100vh - 76px);
  padding: 42px 0 70px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.34;
  pointer-events: none;
}

.hero-glow-one {
  left: -140px;
  top: 100px;
  background: var(--pink);
}

.hero-glow-two {
  right: -120px;
  bottom: 80px;
  background: var(--blue);
}

.hero-slider {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0d1122;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 420px;
  gap: 32px;
  align-items: center;
  padding: 70px;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 20, 0.94) 0%, rgba(7, 9, 20, 0.78) 48%, rgba(7, 9, 20, 0.48) 100%),
    radial-gradient(circle at 70% 18%, rgba(255, 207, 90, 0.16), transparent 34%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 16px 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.card-tags,
.detail-genres,
.tag-cloud,
.detail-meta,
.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.card-tags span,
.detail-genres span,
.tag-cloud span,
.detail-meta span,
.rank-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.rank-action,
.side-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.24s ease;
}

.primary-btn,
.rank-action {
  color: #11131d;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 16px 34px rgba(255, 95, 143, 0.24);
}

.ghost-btn,
.section-more,
.side-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.rank-action:hover,
.side-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.hero-dots {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

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

.hero-dot.is-active {
  background: linear-gradient(135deg, var(--gold), var(--pink));
}

.section-wrap,
.page-hero,
.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section-wrap {
  padding: 42px 0;
}

.intro-strip,
.page-hero,
.category-overview-card,
.detail-content-grid,
.detail-side,
.player-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 23, 42, 0.74);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: -34px;
  padding: 30px;
  position: relative;
  z-index: 5;
  backdrop-filter: blur(16px);
}

.intro-strip h2,
.section-title h2,
.page-hero h1,
.category-overview-head h2,
.detail-article h2,
.detail-side h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.intro-strip p,
.page-hero p,
.category-overview-head p,
.detail-article p,
.detail-side p {
  color: var(--muted);
  line-height: 1.9;
}

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

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 207, 90, 0.42);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

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

.poster-link img {
  transition: transform 0.32s ease;
}

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  color: #11131d;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--pink));
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim);
  font-size: 12px;
}

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

.card-body h3 a:hover,
.rank-content h3 a:hover {
  color: var(--gold);
}

.card-body p {
  min-height: 58px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-tags span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.compact-card .card-body p {
  display: none;
}

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

.category-tile {
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  overflow: hidden;
  transition: 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(106, 183, 255, 0.44);
}

.tile-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  height: 86px;
  margin-bottom: 14px;
}

.tile-stack img {
  border-radius: 12px;
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
}

.category-tile span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-hero {
  margin-top: 34px;
  padding: 44px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 95, 143, 0.2);
  filter: blur(8px);
}

.page-hero > * {
  position: relative;
  z-index: 2;
}

.category-hero {
  display: grid;
  gap: 14px;
}

.archive-tools {
  padding-bottom: 16px;
}

.filter-box {
  display: grid;
  gap: 9px;
  color: var(--muted);
}

.filter-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.large-filter input {
  min-height: 60px;
  font-size: 18px;
}

.overview-stack {
  width: min(1240px, calc(100% - 32px));
  display: grid;
  gap: 22px;
  margin: 30px auto 0;
}

.category-overview-card {
  padding: 24px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 82px 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(18, 23, 42, 0.8);
}

.rank-cover {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
}

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

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

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

.rank-tags span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  margin-top: 34px;
  min-height: 560px;
  padding: 46px;
  overflow: hidden;
  border-radius: 34px;
  background: var(--card-solid);
  box-shadow: var(--shadow);
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.24;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 9, 20, 0.96), rgba(7, 9, 20, 0.76));
}

.detail-poster,
.detail-info {
  position: relative;
  z-index: 2;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta,
.detail-genres {
  margin-top: 16px;
}

.detail-info .primary-btn {
  margin-top: 26px;
}

.player-section {
  padding-top: 54px;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #02040b;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #02040b;
}

.play-gate {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: radial-gradient(circle, rgba(7, 9, 20, 0.2), rgba(7, 9, 20, 0.76));
}

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

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  position: relative;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 18px 46px rgba(255, 95, 143, 0.34);
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 24px;
  border-left: 22px solid #11131d;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}

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

.detail-article p {
  font-size: 17px;
}

.detail-side {
  padding: 24px;
  align-self: start;
}

.tag-cloud {
  margin: 16px 0 24px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 20, 0.8);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
}

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

.footer-grid h3 {
  margin-top: 0;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--dim);
  border-top: 1px solid var(--line);
}

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

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

  .header-search {
    width: min(420px, 46vw);
  }

  .menu-toggle {
    display: block;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .compact-rank {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .header-search {
    display: none;
  }

  .hero-shell {
    min-height: auto;
    padding-top: 20px;
  }

  .hero-slider {
    min-height: 590px;
    border-radius: 28px;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .intro-strip,
  .section-title,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-row {
    grid-template-columns: 70px 40px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 3;
    width: max-content;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 26px;
  }

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

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

@media (max-width: 520px) {
  .section-wrap,
  .page-hero,
  .detail-hero {
    width: min(100% - 22px, 1240px);
  }

  .hero-slider {
    width: min(100% - 22px, 1240px);
  }

  .movie-grid,
  .archive-grid,
  .slim-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
  }

  .rank-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .rank-number {
    position: absolute;
    margin-left: 8px;
    margin-top: 8px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
  }

  .rank-content,
  .rank-action {
    grid-column: 2;
  }
}
