:root {
  --bg: #f5f0ea;
  --paper: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e0d8;
  --red: #dc2626;
  --pink: #db2777;
  --amber: #b45309;
  --dark: #1c1917;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf5 0%, var(--bg) 42%, #fff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(231, 224, 216, 0.88);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-name {
  font-size: clamp(20px, 2vw, 27px);
  background: linear-gradient(135deg, #b91c1c, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
  transform: translateZ(0);
}

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

.nav-link,
.mobile-link {
  font-weight: 700;
  color: #57534e;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #d6d3d1;
  background: #fff;
  border-radius: 999px;
  padding: 10px 15px;
  outline: none;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 800;
}

.header-search button,
.mobile-search button,
.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 10px 13px;
  background: #f5f0ea;
  font-size: 22px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.hero-carousel {
  position: relative;
  min-height: clamp(560px, 78vh, 780px);
  overflow: hidden;
  background: #1c1917;
}

.hero-slide {
  position: absolute;
  inset: 0;
  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;
  transform: scale(1.04);
  transition: transform 7000ms ease;
}

.hero-slide.is-active img {
  transform: scale(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.14)), linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: clamp(70px, 12vh, 120px);
  max-width: 760px;
  color: #fff;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 24px;
  max-width: 680px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-meta {
  margin-bottom: 26px;
}

.hero-meta span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(10px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 30px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  color: #1c1917;
  letter-spacing: -0.05em;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.section-head p,
.page-title p,
.category-card p,
.movie-info p,
.line-card p,
.detail-copy p {
  color: var(--muted);
  line-height: 1.72;
}

.content-section {
  margin-top: 64px;
}

.soft-panel {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(253, 242, 248, 0.96));
}

.dark-panel {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 30px;
  background: linear-gradient(135deg, #1c1917, #292524);
  color: #fff;
}

.dark-panel .section-head h2,
.dark-panel .section-head p {
  color: #fff;
}

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

.movie-card {
  min-width: 0;
}

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(28, 25, 23, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #57534e);
}

.movie-card.large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.02));
  transition: opacity 0.3s ease;
}

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 4;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.score-badge {
  right: 12px;
  background: rgba(220, 38, 38, 0.88);
}

.rank-badge {
  left: 12px;
  background: rgba(28, 25, 23, 0.76);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  min-height: 1.35em;
  overflow: hidden;
  color: #1c1917;
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-link:hover h3 {
  color: var(--red);
}

.movie-info p {
  min-height: 3.35em;
  margin: 0 0 12px;
  overflow: hidden;
}

.meta-row {
  color: #78716c;
  font-size: 13px;
}

.meta-row span,
.tag-row span {
  border-radius: 999px;
  background: #f5f0ea;
  padding: 4px 9px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  color: #9f1239;
  background: #fff1f2;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 210px;
  border: 1px solid rgba(231, 224, 216, 0.9);
  border-radius: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  color: #1c1917;
  font-size: 24px;
}

.category-card p {
  margin: 0;
}

.category-card span {
  align-self: flex-start;
  margin-top: auto;
  color: var(--red);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.05);
}

.filter-panel label {
  display: block;
  margin: 0 0 8px;
  color: #57534e;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border-radius: 14px;
}

.line-list {
  display: grid;
  gap: 16px;
}

.line-card a {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  overflow: hidden;
  border-radius: 22px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(28, 25, 23, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.line-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.line-card img {
  width: 190px;
  height: 112px;
  border-radius: 16px;
  object-fit: cover;
}

.line-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.line-head h3 {
  margin: 0;
  flex: 1;
  font-size: 21px;
}

.line-head span:last-child,
.rank-line {
  color: var(--red);
  font-weight: 900;
}

.line-card p {
  margin: 8px 0 12px;
}

.page-title {
  overflow: hidden;
  border-radius: 34px;
  padding: clamp(28px, 6vw, 62px);
  color: #fff;
  background: radial-gradient(circle at top right, rgba(219, 39, 119, 0.55), transparent 30%), linear-gradient(135deg, #1c1917, #3f3f46 58%, #991b1b);
}

.page-title h1,
.page-title p {
  color: #fff;
}

.page-title p {
  max-width: 780px;
  margin-bottom: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #78716c;
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 28px;
  align-items: start;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #0c0a09;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.24));
}

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

.player-cover-inner {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
}

.player-cover-inner strong {
  font-size: clamp(22px, 3vw, 34px);
}

.player-button-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  font-size: 34px;
}

.detail-card {
  border-radius: 30px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.07);
}

.detail-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  margin-bottom: 20px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.05em;
}

.detail-card .score-big {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 16px;
  color: var(--red);
  font-size: 42px;
  font-weight: 900;
}

.detail-copy {
  display: grid;
  gap: 24px;
  margin-top: 34px;
}

.copy-block {
  border-radius: 28px;
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
}

.copy-block h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.copy-block p {
  margin: 0;
  font-size: 17px;
}

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

.site-footer {
  color: #d6d3d1;
  background: linear-gradient(135deg, #1c1917, #292524);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 34px;
}

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

.footer-inner p {
  max-width: 560px;
  color: #a8a29e;
  line-height: 1.75;
}

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

.footer-links a {
  color: #d6d3d1;
}

.footer-links a:hover {
  color: #fb7185;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  width: 44px;
  height: 44px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
  cursor: pointer;
}

.back-top.is-visible {
  display: block;
}

.no-results {
  display: none;
  border-radius: 24px;
  padding: 28px;
  color: #78716c;
  background: #fff;
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

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

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

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

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

  .detail-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
  }

  .detail-card img {
    margin: 0;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .line-card a {
    grid-template-columns: 120px 1fr;
  }

  .line-card img {
    width: 120px;
    height: 86px;
  }

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

@media (max-width: 620px) {
  .nav-shell {
    min-height: 64px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-actions a {
    width: 100%;
    justify-content: center;
  }

  .section-head {
    display: grid;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

  .movie-info p {
    min-height: auto;
    font-size: 14px;
  }

  .detail-card {
    display: block;
  }

  .detail-card img {
    margin-bottom: 18px;
  }

  .player-box {
    border-radius: 20px;
  }

  .page-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 28px;
  }
}
