:root {
  --red: #dc2626;
  --pink: #db2777;
  --amber: #f59e0b;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-900: #1c1917;
  --shadow: 0 20px 45px rgba(28, 25, 23, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--stone-900);
  background:
    radial-gradient(circle at 15% 0%, rgba(248, 113, 113, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(219, 39, 119, 0.16), transparent 28rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fafaf9 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

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

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.25);
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(135deg, #991b1b, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  color: var(--stone-700);
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

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

.top-search input,
.mobile-search input,
.search-box input,
.filter-select {
  border: 1px solid var(--stone-200);
  outline: none;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--stone-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-box input:focus,
.filter-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.2);
}

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

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

.secondary-button,
.section-link {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--stone-100);
  color: var(--stone-900);
}

.mobile-panel {
  display: none;
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--stone-200);
}

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--stone-700);
  font-weight: 700;
}

.hero-slider {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  background: #0c0a09;
}

.hero-track {
  position: relative;
  min-height: 80vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: 36px;
  align-items: center;
  padding: 80px max(24px, calc((100vw - 1320px) / 2)) 84px;
  color: #fff;
  opacity: 0;
  transform: scale(1.01);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.58;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.93), rgba(12, 10, 9, 0.66) 44%, rgba(12, 10, 9, 0.35)),
    linear-gradient(180deg, rgba(190, 18, 60, 0.22), rgba(12, 10, 9, 0.58));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fecdd3;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

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

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.tag-row,
.detail-tags,
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.category-pills a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

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

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

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(1.4deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 16px;
  top: 16px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  font-weight: 900;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #fff;
}

.main-wrap,
.page-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 24px;
}

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

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

.section-head h2,
.page-head h1,
.detail-copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-head p,
.page-head p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--stone-500);
  line-height: 1.8;
}

.section-link {
  color: var(--red);
  background: #fff;
  border: 1px solid #fecaca;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.12);
  white-space: nowrap;
}

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

.movie-card {
  display: grid;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.85);
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: var(--stone-200);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.68));
}

.card-score,
.card-year {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

.card-score {
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.card-year {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  font-size: 17px;
  line-height: 1.3;
}

.card-body small {
  color: var(--stone-500);
  font-size: 13px;
}

.card-body em {
  color: var(--stone-700);
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span,
.detail-tags span,
.category-pills a {
  color: #b91c1c;
  background: #fee2e2;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 28px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--stone-200);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 24px rgba(28, 25, 23, 0.1);
}

.rank-item img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  font-weight: 900;
}

.rank-item strong,
.rank-item small,
.rank-item em {
  display: block;
}

.rank-item small,
.rank-item em {
  color: var(--stone-500);
  font-size: 13px;
  font-style: normal;
  margin-top: 4px;
}

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

.category-card {
  position: relative;
  min-height: 170px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #991b1b, #db2777);
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.category-card strong,
.category-card span {
  position: relative;
  z-index: 1;
  display: block;
}

.category-card strong {
  font-size: 22px;
  margin-bottom: 12px;
}

.category-card span {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--stone-200);
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.06);
}

.search-box {
  display: flex;
  flex: 1;
  min-width: 280px;
  gap: 12px;
}

.search-box input {
  width: 100%;
}

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

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(7px) saturate(1.1);
  transform: scale(1.08);
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.95), rgba(12, 10, 9, 0.55)),
    linear-gradient(180deg, rgba(190, 18, 60, 0.28), rgba(12, 10, 9, 0.72));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 32px;
  align-items: center;
}

.player-shell {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 35px 75px rgba(0, 0, 0, 0.36);
  cursor: pointer;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 32px;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.4);
  padding-left: 5px;
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-info p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
  font-size: 17px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
  font-size: 13px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.detail-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.detail-copy,
.side-panel {
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--stone-200);
  box-shadow: 0 12px 32px rgba(28, 25, 23, 0.07);
}

.detail-copy {
  padding: 30px;
}

.detail-copy h2 {
  font-size: 28px;
  margin-top: 0;
  margin-bottom: 14px;
}

.detail-copy p {
  color: var(--stone-700);
  line-height: 1.9;
  margin: 0 0 24px;
}

.side-panel {
  padding: 18px;
  position: sticky;
  top: 96px;
}

.side-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.breadcrumb {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px 0;
  color: var(--stone-500);
  font-size: 14px;
}

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

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

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
  margin-bottom: 14px;
}

.footer-inner p {
  margin: 0;
  max-width: 620px;
  color: var(--stone-500);
  line-height: 1.8;
}

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

.footer-links a {
  color: var(--stone-200);
}

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

.footer-copy {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px;
  color: var(--stone-500);
  border-top: 1px solid rgba(120, 113, 108, 0.28);
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--stone-200);
  color: var(--stone-500);
  text-align: center;
}

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

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

  .menu-button {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 66px;
    padding: 0 16px;
  }

  .mobile-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 52px 18px 78px;
  }

  .hero-poster {
    max-width: 270px;
    justify-self: center;
  }

  .main-wrap,
  .page-wrap,
  .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .section-head,
  .page-head,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 540px) {
  .logo-text {
    font-size: 18px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

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

  .rank-item {
    grid-template-columns: 54px 1fr;
  }

  .rank-number {
    display: none;
  }

  .rank-item img {
    width: 54px;
    height: 76px;
  }

  .search-box {
    min-width: 100%;
  }
}
