:root {
  --rose: #e11d48;
  --rose-dark: #be123c;
  --rose-soft: #ffe4e6;
  --orange: #ea580c;
  --orange-soft: #ffedd5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #f3d3d8;
  --panel: #ffffff;
  --bg: #fff7ed;
  --shadow: 0 24px 60px rgba(136, 19, 55, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 113, 133, 0.2), transparent 34rem),
    linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #fff7ed 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(225, 29, 72, 0.12);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 16px 30px rgba(225, 29, 72, 0.3);
}

.brand-text {
  font-size: 21px;
}

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

.main-nav a,
.quick-links a,
.text-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 16px;
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.quick-links a:hover,
.text-link:hover {
  color: var(--rose);
  background: var(--rose-soft);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--rose-soft);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--rose-dark);
}

.hero-carousel {
  position: relative;
  height: 680px;
  min-height: 620px;
  overflow: hidden;
  background: #1f0b12;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide > img,
.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay,
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(190, 18, 60, 0.92), rgba(234, 88, 12, 0.76) 58%, rgba(17, 24, 39, 0.45)),
    linear-gradient(0deg, rgba(255, 247, 237, 0.18), transparent 36%);
}

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

.hero-copy {
  max-width: 700px;
  padding-bottom: 86px;
}

.kicker,
.section-heading span,
.ranking-head span,
.category-wide span,
.category-card-head span {
  display: inline-flex;
  align-items: center;
  color: var(--rose);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.hero-copy .kicker,
.detail-copy .kicker,
.page-hero .kicker {
  color: #ffe4e6;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy h1 em {
  color: #ffe4e6;
  font-style: normal;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  margin: 0 0 28px;
  color: #fff1f2;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.8;
}

.hero-tags,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}

.hero-tags span,
.pill-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 50px;
  padding: 14px 24px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--rose);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

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

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
}

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

.hero-strip {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.24);
}

.mini-cover {
  width: 74px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

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

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

.mini-copy strong,
.mini-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-copy small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
}

.section {
  padding: 72px 0;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.soft-panel {
  background: linear-gradient(120deg, rgba(255, 237, 213, 0.82), rgba(255, 228, 230, 0.86));
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(136, 19, 55, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.library-grid .poster-frame {
  aspect-ratio: 3 / 4;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.2s ease;
}

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  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;
}

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

.poster-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  max-width: calc(100% - 28px);
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--rose);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover {
  color: var(--rose);
}

.movie-info p {
  min-height: 48px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

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

.category-card,
.category-wide,
.content-card,
.side-card,
.ranking-box,
.ranking-card {
  border: 1px solid rgba(225, 29, 72, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(136, 19, 55, 0.08);
}

.category-card {
  padding: 26px;
}

.category-card-head {
  display: grid;
  gap: 8px;
}

.category-card-head strong,
.category-wide h2,
.ranking-card h2 {
  font-size: 24px;
  line-height: 1.3;
}

.category-card p,
.category-wide p,
.content-card p {
  color: var(--muted);
  line-height: 1.85;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-preview a {
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: var(--rose-soft);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ranking-box {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ranking-head a {
  color: var(--rose);
  font-weight: 900;
}

.rank-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-list li + li {
  border-top: 1px solid #f4d5da;
}

.rank-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: var(--rose);
  font-style: normal;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose-dark), var(--orange));
}

.compact-hero {
  padding: 86px 0;
}

.compact-hero p {
  max-width: 780px;
}

.category-list-page {
  display: grid;
  gap: 24px;
}

.category-wide {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 24px;
  padding: 28px;
}

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

.category-wide .mini-card,
.side-card .mini-card {
  color: var(--ink);
  border-color: rgba(225, 29, 72, 0.08);
  background: #fff7f8;
}

.category-wide .mini-card small,
.side-card .mini-card small {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(136, 19, 55, 0.08);
}

.filter-input {
  width: min(100%, 520px);
  height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(225, 29, 72, 0.15);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
}

.filter-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ranking-page-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

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

.ranking-cover span {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(225, 29, 72, 0.9);
  font-weight: 900;
}

.ranking-card p {
  color: var(--muted);
  line-height: 1.75;
}

.ranking-card .pill-row span,
.detail-copy .pill-row span {
  color: #7f1d1d;
  background: var(--rose-soft);
}

.detail-hero {
  min-height: 560px;
}

.detail-hero-overlay {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(190, 18, 60, 0.76) 58%, rgba(234, 88, 12, 0.62)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), transparent);
}

.detail-hero-content {
  position: relative;
  z-index: 3;
  padding: 48px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

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

.detail-copy h1 {
  max-width: 860px;
}

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

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

.player-shell,
.content-card,
.side-card {
  padding: 24px;
}

.media-player {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18)),
    radial-gradient(circle, rgba(225, 29, 72, 0.35), transparent 42%);
  cursor: pointer;
  text-align: center;
}

.player-mask.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--rose);
  background: #ffffff;
  font-size: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.player-mask strong {
  max-width: min(80%, 640px);
  font-size: clamp(18px, 3vw, 28px);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 16px;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.mini-stack {
  display: grid;
  gap: 12px;
}

.side-card .text-link {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  background: var(--rose-soft);
  color: var(--rose-dark);
}

.site-footer {
  padding: 54px 0 28px;
  color: #fff1f2;
  background: linear-gradient(135deg, #9f1239, #c2410c);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

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

.site-footer p {
  max-width: 420px;
  line-height: 1.8;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #ffe4e6;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.copyright {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  text-align: center;
  color: #ffe4e6;
}

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

.image-fallback {
  opacity: 0;
}

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

  .hero-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-strip .mini-card:nth-child(n + 4) {
    display: none;
  }

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

  .ranking-box,
  .detail-side {
    position: static;
  }
}

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .hero-carousel {
    height: 740px;
  }

  .hero-copy {
    padding-bottom: 170px;
  }

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

  .hero-strip .mini-card:nth-child(n + 2) {
    display: none;
  }

  .hero-dots {
    bottom: 112px;
  }

  .movie-grid,
  .small-grid,
  .library-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .detail-poster {
    max-width: 260px;
  }

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