:root {
  --pink-50: #fff1f7;
  --pink-100: #ffe4ef;
  --pink-200: #fecddf;
  --pink-300: #f9a8d4;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f5c7d8;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(236, 72, 153, 0.16);
  --soft-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink-500), var(--pink-300), var(--rose-400));
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.28);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--pink-500);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 255, 255, 0.28);
}

.logo-text {
  font-size: 24px;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.header-search input {
  width: 180px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-menu-button {
  border: 0;
  cursor: pointer;
  color: var(--pink-500);
  background: #ffffff;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
}

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

.mobile-quick-nav {
  display: none;
  justify-content: space-around;
  padding: 0 16px 12px;
}

.mobile-quick-nav a {
  font-size: 14px;
  color: #ffffff;
}

.hero-carousel {
  position: relative;
  height: clamp(480px, 58vw, 640px);
  margin-bottom: 56px;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35) 46%, rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 66px;
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 14px;
  margin-bottom: 16px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.detail-title-row,
.filter-controls,
.card-stats,
.movie-meta-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  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: #ffffff;
  background: linear-gradient(90deg, var(--pink-500), var(--rose-500));
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.32);
}

.primary-button.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

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

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 36px;
  line-height: 1;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-section {
  margin: 58px auto;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-heading span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--pink-300), transparent);
}

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

.category-strip {
  margin-top: -88px;
  position: relative;
  z-index: 4;
}

.category-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 94px;
  background: var(--pink-100);
}

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

.category-card-body {
  padding: 18px;
}

.category-card h3,
.category-card p {
  margin: 0;
}

.category-card h3 {
  font-size: 20px;
}

.category-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 12px;
}

.category-card strong {
  color: var(--pink-500);
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pink-100), #ffffff);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(236, 72, 153, 0.92);
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink-500), var(--rose-500));
}

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

.movie-meta-line,
.card-stats {
  color: var(--muted);
  font-size: 12px;
}

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

.movie-card h3 a:hover {
  color: var(--pink-500);
}

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.movie-tags span,
.detail-tags span {
  color: var(--pink-500);
  background: var(--pink-50);
  border: 1px solid var(--pink-100);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
}

.horizontal-scroller {
  display: flex;
  gap: 18px;
  padding-bottom: 12px;
  overflow-x: auto;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-width: 340px;
}

.movie-card-horizontal .poster-link {
  aspect-ratio: auto;
  min-height: 130px;
  height: 100%;
}

.movie-card-horizontal p {
  min-height: 0;
}

.highlight-panel {
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(90deg, var(--pink-100), #fff6fa);
}

.soft-panel {
  background: linear-gradient(135deg, #fff7fb, var(--pink-100));
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 380px;
  gap: 28px;
}

.ranking-box,
.side-card,
.detail-info-card,
.detail-text-card,
.player-card,
.about-panel,
.filter-panel {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.ranking-box {
  padding: 24px;
}

.ranking-box h2,
.side-card h2,
.about-panel h2 {
  margin-top: 0;
}

.ranking-box .movie-card-horizontal,
.rank-list .movie-card-horizontal,
.side-list .movie-card-horizontal {
  min-width: 0;
  margin-bottom: 14px;
}

.ranking-box .poster-link,
.rank-list .poster-link,
.side-list .poster-link {
  min-height: 112px;
}

.text-button {
  width: 100%;
  margin-top: 8px;
  color: var(--pink-500);
  background: var(--pink-50);
}

.filter-panel {
  padding: 20px;
  margin-bottom: 28px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-search {
  margin-bottom: 14px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.filter-controls {
  align-items: flex-end;
}

.filter-controls label {
  flex: 1 1 150px;
}

.filter-result {
  margin-top: 14px;
  color: var(--muted);
}

.filter-result strong {
  color: var(--pink-500);
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: #ffffff;
}

.empty-state.is-visible {
  display: block;
}

.movie-card.is-hidden {
  display: none;
}

.sub-hero {
  color: #ffffff;
  padding: 82px 0 74px;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(120deg, var(--pink-500), var(--rose-400));
}

.sub-hero p {
  margin: 0 0 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.86;
}

.sub-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
}

.sub-hero span {
  display: block;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.sub-hero strong {
  display: inline-flex;
  margin-top: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

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

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

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

.detail-shell {
  padding-bottom: 36px;
}

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

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

.player-card {
  padding: 14px;
  background: #111827;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
}

.player-start span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink-500), var(--rose-500));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  font-size: 28px;
}

.video-player.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.player-loading,
.player-status {
  position: absolute;
  left: 16px;
  right: 16px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
}

.player-loading {
  top: 16px;
  display: none;
  width: max-content;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
}

.video-player.is-loading .player-loading {
  display: block;
}

.player-status {
  bottom: 16px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.58);
}

.video-player.is-playing .player-status {
  display: none;
}

.detail-info-card,
.detail-text-card,
.side-card,
.about-panel {
  padding: 26px;
}

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

.detail-kicker {
  margin: 0 0 8px;
  color: var(--pink-500);
  font-weight: 800;
}

.detail-info-card h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.detail-one-line {
  color: var(--muted);
  font-size: 18px;
}

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

.detail-meta div {
  padding: 12px;
  border-radius: 14px;
  background: var(--pink-50);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.detail-text-card h2 {
  margin: 0 0 12px;
}

.detail-text-card p {
  margin: 0;
  color: #374151;
  white-space: pre-line;
}

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

.side-list {
  display: grid;
  gap: 14px;
}

.about-panel p {
  color: #374151;
  font-size: 17px;
}

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

.stats-grid li {
  padding: 18px;
  border-radius: 18px;
  background: var(--pink-50);
}

.stats-grid strong {
  display: block;
  color: var(--pink-500);
  font-size: 28px;
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(180deg, #fff7fb, var(--pink-100));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-logo {
  color: var(--text);
  font-size: 22px;
  margin-bottom: 14px;
}

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

.site-footer p,
.site-footer a {
  color: var(--muted);
}

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

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

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

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

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

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 62px;
  }

  .site-nav,
  .header-search {
    display: none;
  }

  .site-nav.is-open {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(236, 72, 153, 0.96);
  }

  .mobile-menu-button,
  .mobile-quick-nav {
    display: flex;
  }

  .logo-text {
    font-size: 20px;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-control {
    display: none;
  }

  .category-strip {
    margin-top: 24px;
  }

  .category-strip,
  .category-grid,
  .movie-grid,
  .library-grid,
  .triple-grid,
  .compact-grid,
  .four-grid,
  .rank-list,
  .footer-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-panel {
    padding: 22px;
  }

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

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

  .hero-carousel {
    height: 500px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .category-strip,
  .category-grid,
  .movie-grid,
  .library-grid,
  .triple-grid,
  .compact-grid,
  .four-grid,
  .rank-list,
  .footer-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .movie-card-horizontal .poster-link {
    min-height: 120px;
  }

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

  .section-heading span {
    width: 100%;
    flex: none;
  }

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

  .player-start span {
    width: 66px;
    height: 66px;
  }
}
