:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.26);
  --rose: #e11d48;
  --rose-dark: #be123c;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0, #ffffff 36%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(16px);
  color: #ffffff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 12px 30px rgba(225, 29, 72, 0.35);
}

.brand-text {
  white-space: nowrap;
}

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

.nav-link,
.header-cta,
.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link {
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.header-cta,
.primary-button {
  padding: 10px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.24);
}

.header-cta:hover,
.primary-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(225, 29, 72, 0.30);
}

.ghost-button {
  padding: 10px 18px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-carousel {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: var(--bg);
  color: #ffffff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(244, 63, 94, 0.28), transparent 32%),
    radial-gradient(circle at 76% 62%, rgba(245, 158, 11, 0.20), transparent 30%);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(780px, calc(100% - 32px));
  margin-left: max(24px, calc((100vw - 1200px) / 2));
  padding: 120px 0 170px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #fb7185;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero-copy p {
  width: min(680px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-panel {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1200px, calc(100% - 32px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.58);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.hero-search,
.page-search {
  display: grid;
  gap: 8px;
  flex: 1;
}

.hero-search label {
  color: rgba(255, 255, 255, 0.80);
  font-size: 13px;
  font-weight: 700;
}

.hero-search input,
.page-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  outline: none;
  padding: 14px 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

.page-search input {
  color: var(--text);
  border-color: var(--line);
  background: #ffffff;
}

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

.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: 32px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
}

.content-section,
.page-main,
.detail-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 64px 0;
}

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

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

.section-heading p,
.side-card p,
.story-card p,
.category-card p,
.category-tile p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: var(--rose-dark);
  background: #fff1f2;
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(225, 29, 72, 0.34);
  box-shadow: var(--shadow);
}

.card-link {
  display: grid;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.88), rgba(245, 158, 11, 0.84)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.20), transparent 48%);
}

.poster-frame::before {
  content: "影像封面";
  position: absolute;
  inset: auto 16px 18px 16px;
  color: rgba(255, 255, 255, 0.90);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.poster-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-frame figcaption {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-body h3 {
  margin: 0;
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  margin: 0;
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: #9f1239;
  background: #fff1f2;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile,
.category-card {
  display: grid;
  gap: 10px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(136, 19, 55, 0.86)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.35), transparent 34%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
}

.category-tile span,
.category-card span {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
}

.category-tile h3,
.category-card h2 {
  margin: 0;
  font-size: 24px;
}

.category-tile p,
.category-card p {
  color: rgba(255, 255, 255, 0.76);
}

.category-tile strong {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

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

.category-card ul,
.sitemap-group ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.category-card li,
.sitemap-group li {
  margin: 5px 0;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 30px;
}

.rank-list,
.ranking-list {
  display: grid;
  gap: 12px;
}

.rank-item,
.ranking-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.rank-item strong,
.ranking-row strong {
  color: var(--rose);
  font-size: 18px;
}

.rank-item span,
.ranking-row span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em,
.ranking-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.side-card,
.story-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.page-main {
  padding: 46px 0 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(136, 19, 55, 0.88)),
    radial-gradient(circle at 80% 22%, rgba(245, 158, 11, 0.34), transparent 32%);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.80);
  font-size: 18px;
}

.page-search {
  max-width: 760px;
  margin-top: 24px;
}

.detail-main {
  width: 100%;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  min-height: 620px;
  padding: 92px max(24px, calc((100vw - 1200px) / 2));
  color: #ffffff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy {
  max-width: 820px;
}

.detail-line {
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

.detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.player-section,
.detail-content,
.detail-main > .content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.player-section {
  padding: 56px 0 0;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.22), rgba(2, 6, 23, 0.42));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(225, 29, 72, 0.34);
}

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

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(15, 23, 42, 0.70);
  font-size: 13px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 42px;
}

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

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

.sitemap-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.sitemap-group {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.sitemap-group h2 {
  margin: 0 0 12px;
}

.site-footer {
  margin-top: 64px;
  color: #ffffff;
  background: #0f172a;
}

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

.footer-inner p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

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

@media (max-width: 860px) {
  .header-inner,
  .main-nav,
  .footer-inner,
  .section-heading,
  .hero-panel,
  .two-column-section,
  .detail-content,
  .detail-hero {
    display: grid;
  }

  .main-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .header-cta {
    display: none;
  }

  .hero-copy {
    padding-top: 90px;
  }

  .hero-panel {
    align-items: stretch;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding-top: 54px;
  }

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

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

  .ranking-row em,
  .rank-item em {
    grid-column: 2;
  }

  .page-hero {
    padding: 36px 24px;
  }
}

@media (max-width: 560px) {
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .sitemap-layout {
    grid-template-columns: 1fr;
  }

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

  .nav-link {
    padding: 7px 8px;
    font-size: 12px;
  }

  .detail-meta {
    gap: 6px;
  }
}
