:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #ef4444;
  --brand-dark: #dc2626;
  --brand-soft: rgba(239, 68, 68, 0.12);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1200px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), #fb7185);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.32);
  font-size: 16px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}

.header-search,
.mobile-search,
.home-search-band form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.home-search-band input,
.filter-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 210px;
}

.header-search input:focus,
.mobile-search input:focus,
.home-search-band input:focus,
.filter-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.header-search button,
.mobile-search button,
.home-search-band button,
.filter-chips button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.home-search-band button,
.primary-button {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.25);
}

.header-search button:hover,
.mobile-search button:hover,
.home-search-band button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  background: var(--brand-dark);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  background: #111827;
  margin: 5px auto;
}

.mobile-nav {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 20px;
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.mobile-nav a {
  padding: 10px 0;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 650px;
  background: #09090b;
  color: #ffffff;
}

.hero-stage {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 84px 24px 96px;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.2);
  transform: translateX(-50%) scale(1.08);
  opacity: 0.32;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(239, 68, 68, 0.36), transparent 34%),
    linear-gradient(90deg, rgba(9, 9, 11, 0.94), rgba(9, 9, 11, 0.72) 48%, rgba(9, 9, 11, 0.4));
}

.hero-stage,
.hero-dots {
  position: relative;
  z-index: 1;
}

.hero-copy,
.hero-cover {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-heading span,
.page-title span {
  display: inline-flex;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.card-body .tag-row span,
.detail-tags a {
  background: #fee2e2;
  color: #b91c1c;
}

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

.hero-cover {
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-cover:hover img {
  transform: scale(1.06);
}

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

.hero-dots button {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.active {
  background: #ffffff;
}

.home-search-band,
.section-block,
.page-shell,
.detail-page > .breadcrumb,
.detail-content,
.related-block,
.player-section {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.home-search-band {
  margin-top: -42px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.home-search-band h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

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

.section-block {
  padding-top: 72px;
}

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

.section-heading h2,
.page-title h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading a,
.text-link {
  color: var(--brand);
  font-weight: 900;
}

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

.category-tile {
  min-height: 156px;
  border-radius: 24px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.92)),
    #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

.category-tile span {
  display: block;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
}

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

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

.catalog-grid {
  padding-top: 28px;
}

.movie-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #111827, #374151);
  overflow: hidden;
}

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

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

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.score {
  right: 12px;
  background: var(--brand);
}

.rank-badge {
  left: 12px;
  background: #111827;
}

.card-body {
  padding: 15px;
}

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

.card-body h3 a:hover {
  color: var(--brand);
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.ranking-block {
  padding-bottom: 10px;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ranking-list.wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 26px;
}

.ranking-row {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.ranking-link {
  display: grid;
  grid-template-columns: 54px 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
}

.ranking-number {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
  text-align: center;
}

.ranking-row img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

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

.ranking-copy strong,
.ranking-copy em {
  display: block;
}

.ranking-copy strong {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.ranking-score {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
}

.page-shell {
  padding-top: 44px;
  padding-bottom: 78px;
}

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

.breadcrumb a {
  color: var(--brand);
  font-weight: 800;
}

.breadcrumb span::before,
.breadcrumb a + span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 10px;
  color: #cbd5e1;
}

.page-title {
  padding: 42px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 24%, rgba(239, 68, 68, 0.16), transparent 30%),
    #ffffff;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.page-title p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
}

.category-overview-card p {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 460px) 1fr;
  gap: 18px;
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-search span {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

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

.filter-chips button {
  background: var(--surface-soft);
  color: #334155;
}

.filter-chips button:hover,
.filter-chips button.active {
  background: var(--brand);
  color: #ffffff;
}

.detail-page {
  padding-bottom: 80px;
}

.detail-page > .breadcrumb {
  padding-top: 34px;
}

.detail-hero {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: end;
  color: #ffffff;
  min-height: 520px;
  padding: 60px 24px;
  border-radius: 0 0 36px 36px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.76));
}

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

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  margin: 12px 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-copy p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 7px 12px;
  font-weight: 800;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.55));
  cursor: pointer;
}

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

.play-overlay span {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 46px rgba(239, 68, 68, 0.38);
}

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

.story-card,
.info-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.story-card h2,
.info-card h2 {
  margin: 0 0 14px;
}

.story-card p,
.info-card dd {
  color: #475569;
}

.info-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.info-card dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
}

.info-card dt {
  color: var(--muted);
  font-weight: 900;
}

.info-card dd {
  margin: 0;
}

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

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

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.footer-logo {
  color: #ffffff;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 18px 24px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

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

  .info-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero,
  .hero-stage {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 60px;
  }

  .hero-cover {
    width: min(72vw, 320px);
    margin: 0 auto;
  }

  .home-search-band,
  .filter-panel,
  .detail-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .category-overview-grid,
  .ranking-list,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    border-radius: 0 0 28px 28px;
  }

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

@media (max-width: 620px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

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

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

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

  .hero h1 {
    font-size: 42px;
  }

  .hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .home-search-band,
  .section-block,
  .page-shell,
  .detail-page > .breadcrumb,
  .detail-content,
  .related-block,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-search-band,
  .page-title {
    border-radius: 22px;
    padding: 22px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .ranking-link {
    grid-template-columns: 40px 52px 1fr;
  }

  .ranking-score {
    display: none;
  }

  .card-body {
    padding: 12px;
  }

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