:root {
  --page-bg: #fff7f8;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #fdf2f4;
  --line: #f2dce2;
  --rose: #e11d48;
  --rose-dark: #be123c;
  --amber: #f59e0b;
  --purple: #7c3aed;
  --shadow: 0 18px 45px rgba(79, 21, 40, 0.12);
  --radius: 22px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #ffe4ea 0, transparent 34rem), var(--page-bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(225, 29, 72, 0.08);
  box-shadow: 0 10px 35px rgba(76, 29, 45, 0.08);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--rose), #fb7185 55%, var(--amber));
  box-shadow: 0 12px 26px rgba(225, 29, 72, 0.28);
}

.brand-text {
  font-size: 22px;
  color: #111827;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 30vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 9px 8px 9px 14px;
  background: transparent;
  color: #111827;
}

.header-search button,
.primary-btn,
.ghost-btn,
.nav-toggle,
.search-box button,
.player-action {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.header-search button,
.primary-btn,
.search-box button,
.player-action {
  background: linear-gradient(135deg, var(--rose), #fb7185);
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.24);
}

.header-search button {
  padding: 9px 16px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 10px 14px;
  color: var(--rose);
  background: var(--soft);
}

.mobile-nav {
  display: none;
  padding: 0 22px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-category-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mobile-category-line a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 680px;
  background: #120914;
  color: #fff;
  overflow: hidden;
}

.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-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 35%, rgba(244, 63, 94, 0.15), transparent 26rem),
    linear-gradient(90deg, rgba(14, 6, 16, 0.95) 0%, rgba(39, 12, 27, 0.74) 45%, rgba(20, 8, 18, 0.2) 100%),
    linear-gradient(0deg, rgba(18, 9, 20, 0.86), rgba(18, 9, 20, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 680px;
  margin: 0 auto;
  padding: 92px 22px 84px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 380px;
  align-items: center;
  gap: 42px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fecdd3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero h1 a:hover,
.movie-card h3 a:hover,
.ranking-title:hover,
.text-link:hover {
  color: var(--rose);
}

.hero-desc {
  max-width: 680px;
  margin: 22px 0 0;
  color: #ffe4e6;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.detail-tags span,
.movie-tags span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.ranking-row:hover,
.mini-card:hover {
  transform: translateY(-3px);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.09);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster-card {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(18px);
}

.hero-poster-card strong {
  display: block;
  font-size: 22px;
}

.hero-poster-card span {
  color: #fecdd3;
  font-size: 14px;
}

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

.hero-controls button {
  width: 44px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-controls button.is-active {
  width: 74px;
  background: #fff;
}

.section,
.page-hero,
.detail-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 68px 22px;
}

.page-hero {
  padding-top: 74px;
  padding-bottom: 38px;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 58px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 88% 10%, rgba(251, 113, 133, 0.28), transparent 21rem),
    linear-gradient(135deg, #231024, #4a132c 58%, #90153e);
  color: #fff;
  box-shadow: var(--shadow);
}

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

.page-hero p,
.detail-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: #ffe4e6;
  line-height: 1.85;
  font-size: 17px;
}

.section-title {
  margin-bottom: 28px;
}

.section-title .eyebrow {
  background: #fff0f3;
  color: var(--rose);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-title p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.feature-band {
  background: linear-gradient(180deg, #fff, #fff7f8);
}

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

.movie-card,
.category-card,
.ranking-row,
.search-panel,
.detail-card,
.info-panel,
.mini-card {
  background: var(--card-bg);
  border: 1px solid rgba(225, 29, 72, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(80, 22, 44, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card {
  overflow: hidden;
}

.movie-card:hover,
.category-card:hover,
.ranking-row:hover,
.mini-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(225, 29, 72, 0.22);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1f1020;
}

.movie-cover img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .movie-cover img,
.mini-card:hover img,
.category-card:hover img {
  transform: scale(1.055);
  filter: saturate(1.08);
}

.movie-year,
.movie-kind {
  position: absolute;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
}

.movie-year {
  left: 12px;
}

.movie-kind {
  right: 12px;
  background: rgba(225, 29, 72, 0.88);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9f1239;
  font-size: 13px;
  font-weight: 800;
}

.movie-tags {
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span,
.filter-chip {
  color: #9f1239;
  background: #fff1f2;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 24px;
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}

.category-card-content {
  position: relative;
  z-index: 2;
}

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

.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 18px;
  outline: 0;
  background: #fff;
}

.search-box input:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.12);
}

.search-box button {
  padding: 0 24px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  cursor: pointer;
}

.filter-chip.is-active {
  color: #fff;
  background: var(--rose);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #e11d48);
}

.ranking-row img {
  width: 120px;
  height: 78px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-title {
  display: inline-block;
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 6px;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ranking-score {
  color: var(--rose);
  font-weight: 900;
  white-space: nowrap;
}

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

.mini-card {
  overflow: hidden;
}

.mini-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-card span {
  display: block;
  padding: 12px;
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-hero {
  position: relative;
  color: #fff;
  background: #140916;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.08);
  transform: scale(1.04);
  opacity: 0.52;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 9, 22, 0.94), rgba(58, 17, 34, 0.76)), linear-gradient(0deg, #140916, transparent 58%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 78px 22px 54px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #fecdd3;
  font-size: 14px;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  font-weight: 800;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: #fff;
  background: #0f0710;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  filter: saturate(1.08);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent, rgba(0, 0, 0, 0.52));
}

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

.play-ring {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), #fb7185);
  box-shadow: 0 24px 48px rgba(225, 29, 72, 0.35);
  font-size: 36px;
  padding-left: 6px;
}

.detail-card,
.info-panel {
  padding: 24px;
}

.detail-card h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.detail-card p,
.info-panel p {
  margin: 0 0 16px;
  color: #4b5563;
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 12px;
}

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

.info-list span:first-child {
  color: var(--muted);
}

.info-list span:last-child {
  font-weight: 900;
  text-align: right;
}

.no-results {
  display: none;
  padding: 26px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

[data-search-item].is-hidden {
  display: none !important;
}

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

  .nav-toggle {
    display: inline-flex;
  }

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

  .hero-content,
  .detail-hero-inner,
  .detail-body-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 360px;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    padding: 12px 16px;
  }

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

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 64px;
  }

  .hero-poster {
    display: none;
  }

  .section,
  .page-hero,
  .detail-section {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

  .ranking-row {
    grid-template-columns: 42px 82px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 82px;
    height: 62px;
  }

  .ranking-score {
    display: none;
  }

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

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

  .detail-hero-inner {
    padding-top: 46px;
  }

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

  .play-ring {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1,
  .detail-hero h1 {
    letter-spacing: -0.04em;
  }
}
