:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --red-600: #dc2626;
  --pink-700: #be185d;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 8px 20px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 18px 40px rgba(17, 24, 39, 0.13);
  --shadow-lg: 0 30px 70px rgba(190, 24, 93, 0.18);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  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%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    90deg,
    var(--red-600),
    var(--rose-600),
    var(--pink-700)
  );
  box-shadow: 0 12px 30px rgba(190, 24, 93, 0.28);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand.compact {
  color: var(--white);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: #ffe4e6;
  font-size: 12px;
}

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

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  background: #ffe4e6;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffe4e6;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-track {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(
      90deg,
      rgba(17, 24, 39, 0.92),
      rgba(190, 24, 93, 0.72),
      rgba(244, 63, 94, 0.36)
    ),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.6s ease;
}

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

.hero-content {
  max-width: 760px;
  margin: 0 auto;
  width: min(1280px, calc(100% - 40px));
  color: var(--white);
  padding: 90px 0 110px;
}

.hero-kicker,
.detail-kicker,
.page-hero p,
.section-heading p {
  display: inline-flex;
  margin: 0 0 12px;
  color: #ffe4e6;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

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

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--rose-100);
  color: var(--rose-600);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

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

.primary-button {
  color: var(--rose-600);
  background: var(--white);
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.18);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-size: 36px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 32px;
  background: var(--white);
}

.feature-strip {
  max-width: 1180px;
  margin: -38px auto 36px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 20px;
}

.feature-strip a {
  min-height: 76px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  color: var(--gray-900);
  font-weight: 900;
  backdrop-filter: blur(18px);
}

.content-section {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading a {
  color: var(--rose-600);
  font-weight: 800;
}

.compact-heading h2 {
  font-size: 28px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose-100), var(--gray-200));
}

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

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

.quality-badge,
.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 900;
}

.quality-badge {
  left: 12px;
  color: var(--white);
  background: var(--rose-600);
}

.year-badge {
  right: 12px;
  color: var(--gray-900);
  background: rgba(255, 255, 255, 0.88);
}

.rank-badge {
  left: 12px;
  top: auto;
  bottom: 12px;
  color: var(--white);
  background: rgba(17, 24, 39, 0.74);
}

.card-body {
  padding: 18px;
}

.card-body.compact {
  padding: 15px;
}

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

.card-body p {
  margin: 10px 0 14px;
  color: var(--gray-500);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
}

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

.category-tile {
  min-height: 210px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  background-image:
    linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(190, 24, 93, 0.92)),
    var(--tile-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  margin: 8px 0 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 500;
}

.category-tile em {
  font-style: normal;
  font-weight: 900;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 30px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 56px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-row span {
  color: var(--rose-600);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--rose-100);
}

.rank-row strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  display: block;
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.search-panel {
  display: block;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.search-box button {
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--rose-600);
  padding: 0 18px;
  font-weight: 800;
}

.empty-state {
  display: none;
  margin: 20px 0;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--gray-500);
  text-align: center;
}

.search-panel.is-empty .empty-state {
  display: block;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: linear-gradient(
    135deg,
    var(--red-600),
    var(--rose-600),
    var(--pink-700)
  );
}

.compact-page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.compact-page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: -0.05em;
}

.compact-page-hero span {
  display: block;
  max-width: 680px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.category-hero {
  background-image:
    linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(190, 24, 93, 0.82)),
    var(--page-image);
  background-size: cover;
  background-position: center;
}

.detail-hero {
  position: relative;
  background-image:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(190, 24, 93, 0.7)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-intro {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}

.detail-intro > img {
  width: 240px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--rose-100);
}

.detail-intro h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-intro p:not(.detail-kicker) {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

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

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card,
.story-card,
.side-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.player-card h2,
.story-card h2,
.side-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.25;
}

.story-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.1),
    rgba(17, 24, 39, 0.55)
  );
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: var(--rose-600);
  box-shadow: 0 18px 40px rgba(225, 29, 72, 0.45);
  font-size: 30px;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.side-card dt {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

.side-card dd {
  margin: -8px 0 0;
  color: var(--gray-900);
  font-weight: 800;
}

.site-footer {
  margin-top: 46px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-content: start;
  gap: 12px 20px;
  flex-wrap: wrap;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .two-column-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .hero,
  .hero-track {
    min-height: 560px;
  }

  .hero-content {
    padding: 72px 0 96px;
  }

  .hero-arrow {
    display: none;
  }

  .feature-strip {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -28px;
  }

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

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

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

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

  .detail-intro > img {
    width: min(220px, 72vw);
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 46px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 460px) {
  .content-section,
  .detail-hero-inner {
    width: min(100% - 28px, 1280px);
  }

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

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .player-card,
  .story-card,
  .side-card {
    padding: 18px;
  }
}
