:root {
  --rose: #f43f5e;
  --rose-dark: #e11d48;
  --pink: #ec4899;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.nav-wrap {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 12px 25px rgba(244, 63, 94, 0.30);
  font-size: 14px;
  text-indent: 2px;
}

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

.nav-link {
  font-size: 15px;
  font-weight: 650;
  color: #374151;
  transition: color 0.25s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: #fff;
}

.mobile-link {
  display: block;
  padding: 12px 0;
  font-weight: 650;
  color: #374151;
}

.hero {
  position: relative;
  height: clamp(520px, 62vw, 660px);
  overflow: hidden;
  background: radial-gradient(circle at 20% 10%, #fecdd3, transparent 28%), #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide.no-image {
  background:
    radial-gradient(circle at 76% 25%, rgba(244, 63, 94, 0.42), transparent 30%),
    linear-gradient(135deg, #111827, #4c0519 50%, #831843);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.02)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.42), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: #fff;
}

.hero-kicker,
.detail-meta,
.meta-line,
.sub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-kicker span,
.detail-meta span,
.meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 16px 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 22px);
}

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

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

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

.primary-button,
.ghost-button,
.outline-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-button {
  background: linear-gradient(90deg, var(--rose), var(--pink));
  color: #fff;
  box-shadow: 0 18px 38px rgba(244, 63, 94, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.outline-button,
.section-more {
  border: 1px solid rgba(244, 63, 94, 0.30);
  color: var(--rose);
  background: #fff;
}

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

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

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

.section {
  padding: 54px 0;
}

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

.section-heading p {
  margin: 0 0 6px;
  color: var(--rose);
  font-weight: 800;
}

.section-heading h2,
.sub-hero h1,
.detail-card h1,
.cta-section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #111827, var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-search,
.toolbar-section {
  position: relative;
  z-index: 3;
  margin-top: -34px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 750;
}

.search-panel input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  background: #f9fafb;
}

.search-panel input:focus {
  border-color: rgba(244, 63, 94, 0.60);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.10);
}

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

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  padding: 9px 15px;
  font-weight: 750;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--rose);
  color: #fff;
  background: var(--rose);
}

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

.category-card,
.category-overview-card,
.movie-card,
.detail-card,
.side-card,
.player-card,
.cta-section {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-card,
.movie-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-card {
  padding: 16px;
}

.category-cover {
  position: relative;
  height: 120px;
  margin: -16px -16px 16px;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
}

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

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), transparent);
}

.category-cover span {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 2;
  font-size: 30px;
}

.category-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.category-card p,
.category-card small,
.movie-info p,
.movie-info small,
.sub-hero span,
.detail-card p,
.side-card p,
.site-footer p {
  color: var(--muted);
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.movie-card.horizontal {
  flex-direction: row;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(244, 63, 94, 0.32), transparent 25%),
    linear-gradient(135deg, #111827, #4c0519 55%, #be123c);
}

.movie-card.horizontal .poster-wrap {
  width: 42%;
  min-width: 220px;
  aspect-ratio: 16 / 10;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.poster-fallback-title,
.player-cover-title {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
}

.poster-wrap.no-image .poster-fallback-title,
.player-cover.no-image .player-cover-title {
  display: flex;
}

.year-badge,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  bottom: 10px;
  min-height: 26px;
  padding: 0 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  font-style: normal;
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.35);
}

.play-chip {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-indent: 3px;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.meta-line span {
  background: #fff1f2;
  color: var(--rose);
}

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

.movie-info p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.tag-row {
  margin-top: auto;
}

.tag-row span,
.detail-tag {
  color: #4b5563;
  background: #f3f4f6;
}

.movie-info small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
}

.ranking-panel {
  padding: 40px;
  border-radius: 34px;
  background: linear-gradient(180deg, #fff, #fff1f2);
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  font-weight: 750;
}

.ranking-list span {
  color: var(--rose);
  font-weight: 900;
}

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

.cta-section {
  margin-block: 36px 72px;
  padding: 48px;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.16), transparent 30%),
    #fff;
}

.cta-section p {
  max-width: 680px;
  margin: 12px auto 24px;
  color: var(--muted);
}

.sub-hero {
  padding: 86px 0 106px;
  color: #fff;
  background:
    radial-gradient(circle at 75% 22%, rgba(244, 63, 94, 0.45), transparent 26%),
    linear-gradient(135deg, #111827, #4c0519 52%, #881337);
}

.sub-hero p {
  margin: 0 0 8px;
  color: #fecdd3;
  font-weight: 850;
}

.sub-hero h1 {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}

.sub-hero span {
  display: block;
  max-width: 780px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.sub-meta {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.sub-meta strong {
  font-size: 24px;
  color: #fff;
}

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

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

.overview-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.overview-head > span {
  font-size: 34px;
}

.overview-head h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.overview-head p {
  margin: 0;
  color: var(--muted);
}

.overview-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0;
  color: var(--rose);
}

.overview-meta strong {
  font-size: 36px;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.overview-links a {
  border-radius: 999px;
  background: #f3f4f6;
  padding: 6px 10px;
  color: #4b5563;
  font-size: 13px;
}

.detail-layout {
  padding: 32px 0 8px;
}

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

.breadcrumb a {
  color: var(--rose);
  font-weight: 700;
}

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

.detail-main {
  min-width: 0;
}

.player-card {
  padding: 0;
  margin-bottom: 22px;
  background: #050505;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 60% 20%, rgba(244, 63, 94, 0.28), transparent 28%),
    linear-gradient(135deg, #111827, #4c0519);
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  color: #fff;
  box-shadow: 0 22px 42px rgba(244, 63, 94, 0.40);
  transform: translate(-50%, -50%);
  text-indent: 5px;
  font-size: 34px;
}

.player-cover small {
  position: absolute;
  left: 50%;
  top: calc(50% + 56px);
  z-index: 4;
  transform: translateX(-50%);
  font-weight: 800;
}

.player-cover-title {
  z-index: 4;
}

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

.detail-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.detail-title-row p {
  margin: 0 0 4px;
  color: var(--rose);
  font-weight: 800;
}

.detail-meta {
  margin: 18px 0;
}

.detail-meta span {
  color: #374151;
  background: #f3f4f6;
}

.one-line {
  padding: 18px;
  border-radius: 18px;
  background: #fff1f2;
  color: #9f1239 !important;
  font-weight: 700;
}

.detail-tags {
  margin: 18px 0 24px;
}

.detail-card h2,
.side-card h2 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.detail-card > p {
  white-space: pre-line;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-card {
  padding: 20px;
}

.poster-side .poster-wrap {
  border-radius: 18px;
}

.no-hover::after {
  opacity: 0;
}

.info-list {
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.info-list a {
  color: var(--rose);
}

.site-footer {
  margin-top: 46px;
  padding: 48px 0 22px;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: var(--rose);
}

.to-top {
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  padding: 10px 16px;
  font-weight: 800;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero {
    height: 590px;
  }

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

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

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .nav-wrap {
    height: 66px;
  }

  .logo,
  .footer-logo {
    font-size: 20px;
  }

  .hero {
    height: 620px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-actions,
  .section-heading,
  .detail-title-row,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .movie-card.horizontal {
    flex-direction: column;
  }

  .movie-card.horizontal .poster-wrap {
    width: 100%;
    min-width: 0;
    aspect-ratio: 2 / 3;
  }

  .ranking-panel,
  .cta-section,
  .detail-card {
    padding: 22px;
  }

  .sub-hero {
    padding: 58px 0 84px;
  }
}
