:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-300: #fda4af;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-700: #be123c;
  --pink-600: #db2777;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 65px rgba(15, 23, 42, 0.25);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-900);
  background: linear-gradient(180deg, #fff7f8 0%, #ffffff 32%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  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(244, 63, 94, 0.14);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--rose-700);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rose-600), var(--pink-600));
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.35);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  overflow: hidden;
}

.nav-link {
  padding: 9px 12px;
  color: var(--slate-700);
  border-radius: 999px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rose-700);
  background: var(--rose-50);
}

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

.header-search input,
.large-search input,
.toolbar input,
.toolbar select,
.inline-filter {
  width: 100%;
  border: 1px solid rgba(244, 63, 94, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--slate-900);
  outline: none;
  padding: 12px 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.large-search input:focus,
.toolbar input:focus,
.toolbar select:focus,
.inline-filter:focus {
  border-color: var(--rose-400, #fb7185);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.header-search button,
.large-search button,
.primary-btn {
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--rose-600), var(--pink-600));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.large-search button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(225, 29, 72, 0.35);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--rose-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav.open {
  display: grid;
}

.mobile-link {
  padding: 12px 14px;
  background: #fff;
  color: var(--slate-700);
  border-radius: 16px;
  border: 1px solid var(--rose-100);
  font-weight: 700;
}

.mobile-link.active {
  color: var(--rose-700);
  background: var(--rose-50);
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  max-height: 820px;
  overflow: hidden;
  background: #07070c;
}

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

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 25%, rgba(244, 63, 94, 0.38), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.25) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 110px 24px 120px;
  margin-left: max(24px, calc((100vw - 1280px) / 2));
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fecdd3;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.rose {
  color: var(--rose-600);
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 660px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.tag-row span {
  background: var(--rose-50);
  color: var(--rose-700);
}

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

.ghost-btn {
  display: inline-flex;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.active {
  background: #fff;
}

.section-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.search-panel {
  margin-top: -44px;
  position: relative;
  z-index: 8;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 32px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px);
}

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

.section-heading.compact {
  align-items: start;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-block h2,
.detail-aside h2 {
  margin: 0;
  color: var(--slate-900);
  line-height: 1.15;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
  color: var(--rose-700);
  font-weight: 850;
}

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

.large-search input {
  min-height: 56px;
  font-size: 16px;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card-wide {
  flex-direction: row;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-200);
}

.movie-card-wide .poster-wrap {
  width: 180px;
  flex: 0 0 180px;
  aspect-ratio: auto;
}

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

.movie-card:hover img {
  transform: scale(1.08);
}

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-600), var(--pink-600));
  box-shadow: 0 10px 28px rgba(225, 29, 72, 0.35);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
}

.card-title {
  color: var(--slate-900);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.card-meta,
.card-desc,
.category-info em,
.category-overview-body em,
.rank-copy em,
.rank-row-main em {
  color: var(--slate-500);
  font-style: normal;
}

.card-meta {
  font-size: 13px;
}

.card-desc {
  font-size: 14px;
}

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

.category-card,
.category-overview-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.category-cover,
.category-visual {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.72;
  transition: transform 0.5s ease;
}

.category-card:hover .category-cover,
.category-overview-card:hover .category-visual {
  transform: scale(1.08);
}

.category-info,
.category-overview-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.category-info strong,
.category-overview-body strong {
  font-size: 24px;
  line-height: 1.1;
}

.category-info em,
.category-overview-body em,
.category-overview-body span {
  color: rgba(255, 255, 255, 0.86);
}

.rank-section {
  max-width: 1180px;
}

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

.rank-item,
.rank-row {
  display: grid;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--slate-100);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item {
  grid-template-columns: 42px 84px 1fr auto;
  padding: 12px 16px;
}

.rank-item:hover,
.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num,
.rank-row-num {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-600), var(--pink-600));
  font-weight: 900;
  border-radius: 14px;
}

.rank-num {
  width: 34px;
  height: 34px;
}

.rank-item img,
.rank-row img {
  width: 84px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy,
.rank-row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rank-copy strong,
.rank-row-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-heat,
.rank-score {
  color: var(--rose-700);
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #881337, #be123c 45%, #db2777);
}

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  padding: 80px max(24px, calc((100vw - 1280px) / 2)) 76px;
}

.small-hero {
  min-height: 280px;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(38px, 6vw, 72px);
}

.page-hero p:last-child {
  max-width: 720px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 26px;
}

[data-movie-card].hidden-card {
  display: none;
}

.rank-board {
  display: grid;
  gap: 14px;
}

.rank-row {
  grid-template-columns: 54px 110px 1fr 58px;
  padding: 14px 18px;
}

.rank-row-num {
  width: 40px;
  height: 40px;
}

.rank-row img {
  width: 110px;
  height: 70px;
}

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

.detail-backdrop {
  opacity: 0.35;
  filter: blur(3px) saturate(1.1);
  transform: scale(1.03);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(244, 63, 94, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78));
}

.detail-layout {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 86px 24px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: center;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.32), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-600), var(--pink-600));
  box-shadow: 0 22px 45px rgba(225, 29, 72, 0.42);
  font-size: 34px;
  padding-left: 5px;
}

.detail-info {
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb em {
  color: #fff;
  font-style: normal;
}

.detail-info h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 70px);
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

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

.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
}

.detail-content,
.detail-aside {
  min-width: 0;
}

.detail-block,
.detail-aside {
  background: #fff;
  border-radius: 26px;
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.detail-block h2,
.detail-aside h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.detail-block p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 1.9;
}

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

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

.side-rank a {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 16px;
  background: var(--slate-50);
}

.side-rank span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  border-radius: 10px;
  background: var(--rose-600);
  font-weight: 900;
}

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

.search-status {
  margin: 24px 0;
  color: var(--slate-600);
  font-weight: 750;
}

.site-footer {
  margin-top: 40px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #881337);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-size: 20px;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  gap: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

  .detail-hero {
    min-height: auto;
  }
}

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

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

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

  .hero-content {
    padding: 96px 18px 100px;
    margin-left: 0;
  }

  .hero-control {
    display: none;
  }

  .section-panel {
    padding: 42px 16px;
  }

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

  .section-heading,
  .large-search,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-heat {
    display: none;
  }

  .rank-row {
    grid-template-columns: 42px 88px 1fr;
  }

  .rank-score {
    display: none;
  }

  .page-hero {
    padding: 64px 18px;
  }

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

  .detail-block,
  .detail-aside {
    padding: 20px;
  }

  .mobile-nav {
    padding-left: 16px;
    padding-right: 16px;
    grid-template-columns: 1fr;
  }
}
