:root {
  --bg: #fff7fb;
  --bg-soft: #fff;
  --text: #1f2937;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --primary: #ef4444;
  --primary-dark: #dc2626;
  --blue: #3b82f6;
  --purple: #a855f7;
  --pink: #ec4899;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 28rem),
    linear-gradient(135deg, #fff7fb 0%, #eff6ff 48%, #faf5ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 241, 242, 0.92), rgba(239, 246, 255, 0.92), rgba(250, 245, 255, 0.92));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.25);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.7);
}

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.75);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-slide > img.image-missing,
.movie-card img.image-missing,
.rank-poster img.image-missing,
.detail-poster img.image-missing,
.detail-backdrop img.image-missing {
  opacity: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.18) 100%),
    radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.42), transparent 28rem),
    radial-gradient(circle at 80% 60%, rgba(59, 130, 246, 0.42), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 150px 24px 140px;
  margin-left: max(24px, calc((100vw - 1280px) / 2));
  color: #fff;
}

.eyebrow {
  color: #fb7185;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 900;
  margin: 0 0 12px;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  margin: 0;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
  margin: 22px 0 0;
}

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

.tag-row span {
  color: #be123c;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 241, 242, 0.92);
}

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

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.25);
}

.ghost-btn {
  color: #be123c;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

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

.hero-panel {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 88px;
  z-index: 3;
  width: min(430px, calc(100vw - 48px));
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.hero-search-box span {
  display: block;
  color: #fff;
  font-weight: 900;
  margin-bottom: 10px;
}

.hero-search-box form,
.hero-inline-search {
  display: flex;
  gap: 8px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.hero-search-box input,
.hero-inline-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 12px;
  background: transparent;
}

.hero-search-box button,
.hero-inline-search button {
  border: 0;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--pink));
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.hero-stats div {
  color: #fff;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-stats strong {
  display: block;
  font-size: 26px;
}

.hero-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

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

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

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

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 22px;
}

.section-head,
.split-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.section-head h2,
.split-section h2,
.text-panel h2,
.side-card h2,
.sitemap-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.05em;
}

.section-desc {
  color: var(--muted);
  max-width: 720px;
  line-height: 1.8;
  margin: 12px 0 0;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(59, 130, 246, 0.2)),
    #f8fafc;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.72));
}

.badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 10px;
  top: 10px;
}

.type-badge {
  right: 10px;
  bottom: 10px;
}

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

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

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

.movie-card h3 a:hover {
  color: var(--primary-dark);
}

.movie-meta,
.movie-intro {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 8px 0 0;
}

.movie-intro {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card .tag-row {
  margin-top: 12px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.card-foot a {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.category-card,
.category-overview-card {
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.category-card span,
.category-main-link span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.category-card h3,
.category-overview-card h2 {
  margin: 8px 0;
  font-size: 22px;
}

.category-card p,
.category-overview-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.mini-links,
.category-sample-list,
.sitemap-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-links a,
.category-sample-list a,
.sitemap-links a {
  color: #475569;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.86);
}

.category-sample-list a {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border-radius: 14px;
}

.category-sample-list small {
  color: #94a3b8;
}

.top-rank-list,
.rank-page-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.split-section > div:first-child {
  flex: 0 0 35%;
  position: sticky;
  top: 92px;
}

.top-rank-list {
  flex: 1;
}

.rank-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.rank-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(59, 130, 246, 0.2));
}

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

.rank-no {
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--pink));
}

.rank-item h3 {
  margin: 0;
  font-size: 18px;
}

.rank-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 7px 0 0;
}

.rank-item strong {
  display: inline-block;
  color: var(--primary-dark);
  margin-top: 8px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  padding: 84px max(22px, calc((100vw - 1280px) / 2)) 74px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(236, 72, 153, 0.5), transparent 28rem),
    radial-gradient(circle at 82% 40%, rgba(59, 130, 246, 0.5), transparent 28rem),
    linear-gradient(135deg, #111827, #312e81 55%, #881337);
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.small-hero {
  min-height: 300px;
}

.category-count-card {
  min-width: 230px;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px);
}

.category-count-card strong {
  display: block;
  font-size: 58px;
  line-height: 1;
}

.filter-bar {
  position: sticky;
  top: 82px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px auto;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  outline: 0;
  padding: 12px 14px;
  background: #fff;
}

.filter-count {
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  font-weight: 900;
  padding: 0 12px;
}

.detail-hero {
  min-height: 620px;
  padding-top: 86px;
  padding-bottom: 86px;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background: linear-gradient(135deg, #111827, #881337);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.2)),
    radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.36), transparent 28rem);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.3), rgba(59, 130, 246, 0.3));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

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

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

.detail-meta-grid span {
  padding: 12px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 28px;
}

.player-card,
.text-panel,
.side-card,
.prev-next-nav,
.sitemap-panel {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.38), rgba(136, 19, 55, 0.52));
}

.play-overlay span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 18px 44px rgba(239, 68, 68, 0.34);
}

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

.player-note,
.text-panel p {
  color: var(--muted);
  line-height: 1.9;
  margin: 14px 0 0;
}

.text-panel {
  margin-top: 24px;
}

.prev-next-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.prev-next-nav a {
  padding: 14px;
  border-radius: 18px;
  color: #be123c;
  font-weight: 800;
  background: rgba(255, 241, 242, 0.78);
}

.side-detail-column {
  position: sticky;
  top: 92px;
}

.side-movie-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.side-movie-list .movie-card {
  display: grid;
  grid-template-columns: 92px 1fr;
}

.side-movie-list .poster-link {
  height: 100%;
  min-height: 138px;
}

.side-movie-list .movie-intro,
.side-movie-list .tag-row,
.side-movie-list .card-foot span {
  display: none;
}

.sitemap-links.movie-sitemap-links {
  max-height: 720px;
  overflow: auto;
  align-items: flex-start;
}

.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 22px 60px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: var(--text);
  font-size: 18px;
}

.site-footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

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

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

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

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

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

  .side-detail-column,
  .split-section > div:first-child {
    position: static;
  }

  .split-section,
  .section-head,
  .page-hero {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .main-nav {
    display: none;
    width: 100%;
    padding: 0 0 12px;
    flex-wrap: wrap;
  }

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

  .hero-carousel {
    min-height: 780px;
  }

  .hero-content {
    padding-top: 110px;
  }

  .hero-panel {
    left: 22px;
    right: 22px;
    bottom: 80px;
    width: auto;
  }

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    position: static;
    grid-template-columns: 1fr;
  }

  .detail-meta-grid,
  .prev-next-nav {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}
