:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-700: #be123c;
  --rose-900: #881337;
  --pink-800: #9d174d;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --dark: #0f172a;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  color: var(--text);
  background: var(--soft);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-800));
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.28);
}

.logo-text {
  font-size: 22px;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input,
.mobile-search input,
.filter-search input {
  border: 0;
  outline: 0;
  min-width: 180px;
  background: transparent;
  padding: 8px 10px;
  color: var(--text);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button {
  color: #fff;
  background: var(--rose-600);
  padding: 9px 16px;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.25);
}

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

.ghost-button {
  color: var(--rose-700);
  background: var(--rose-50);
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--rose-50);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: var(--rose-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-900), var(--pink-800), var(--rose-700));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-content-inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  max-width: 1200px;
}

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

.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--rose-500);
  font-weight: 800;
  font-size: 13px;
}

.section-kicker,
.page-kicker {
  color: var(--rose-700);
  background: var(--rose-50);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero p {
  margin: 0 0 26px;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.86);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.hero-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.26);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(244, 63, 94, 0.9);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.main-content,
.page-main {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.content-section {
  padding: 54px 0 0;
}

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

.section-heading h2,
.page-heading h1 {
  margin: 0 0 6px;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-heading p {
  margin: 0;
  color: var(--muted);
}

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose-900), var(--pink-800));
}

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

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-overlay span {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 63, 94, 0.9);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

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

.poster-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: block;
  padding: 16px;
}

.movie-category {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--rose-700);
  background: var(--rose-50);
  font-size: 12px;
  font-weight: 800;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 48px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.42;
  transition: color 0.2s ease;
}

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

.movie-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 44px;
  overflow: hidden;
  margin-top: 8px;
  color: #6b7280;
  font-size: 14px;
}

.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span,
.tag-row {
  border-radius: 999px;
}

.movie-meta span {
  padding: 3px 8px;
  background: #f3f4f6;
}

.tag-row {
  color: #9f1239;
}

.movie-card-horizontal .movie-card-link {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.movie-card-horizontal .poster-wrap {
  aspect-ratio: auto;
  min-height: 150px;
}

.movie-card-compact .movie-card-link {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-radius: 16px;
}

.movie-card-compact .poster-wrap {
  aspect-ratio: 1 / 1;
}

.movie-card-compact .movie-title {
  min-height: auto;
  font-size: 15px;
}

.movie-card-compact .movie-desc,
.movie-card-compact .tag-row {
  display: none;
}

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

.category-card {
  min-height: 178px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 30%), linear-gradient(135deg, var(--rose-900), var(--rose-600));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.category-card p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.category-count {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
  font-size: 13px;
}

.page-hero {
  padding: 52px 0 30px;
  color: #fff;
  background: radial-gradient(circle at 20% 0%, rgba(244, 63, 94, 0.45), transparent 34%), linear-gradient(135deg, #111827, #881337 55%, #be123c);
}

.page-hero .page-heading {
  margin-bottom: 0;
}

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

.page-hero .page-heading p {
  color: rgba(255, 255, 255, 0.76);
}

.filter-panel {
  margin: 28px 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.filter-search {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
}

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

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-controls select {
  min-width: 116px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 9px 12px;
  color: var(--text);
  outline: 0;
}

.filter-result,
.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 16px;
  border-radius: 16px;
  color: var(--rose-700);
  background: var(--rose-50);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-800));
  font-weight: 950;
}

.rank-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.rank-info span {
  color: var(--muted);
  font-size: 14px;
}

.rank-score {
  color: var(--rose-700);
  font-size: 22px;
  font-weight: 950;
  text-align: right;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--rose-600);
}

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

.detail-card,
.side-card {
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.detail-body {
  padding: 24px;
}

.detail-body h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-desc {
  color: #4b5563;
  font-size: 18px;
}

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

.detail-tags span,
.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags span {
  color: var(--rose-700);
  background: var(--rose-50);
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px 26px 0 0;
  background: #020617;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(244, 63, 94, 0.20), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  background: var(--rose-600);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
  font-size: 28px;
}

.detail-section {
  padding: 24px;
  border-top: 1px solid var(--line);
}

.detail-section h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 950;
}

.detail-section p {
  margin: 0;
  color: #374151;
  white-space: pre-line;
}

.side-card {
  padding: 18px;
}

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

.site-footer {
  margin-top: 64px;
  color: rgba(255, 255, 255, 0.78);
  background: #111827;
}

.footer-inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-inner p {
  margin: 0;
  max-width: 620px;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
}

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

@media (max-width: 1024px) {
  .header-search {
    display: none;
  }

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

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

@media (max-width: 780px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 10px;
  }

  .mobile-nav .nav-link {
    display: block;
    padding: 12px 14px;
    background: #fff;
  }

  .mobile-search {
    display: flex;
    border-radius: 18px;
  }

  .mobile-search input {
    min-width: 0;
    width: 100%;
  }

  .hero {
    height: 620px;
  }

  .hero-slide::after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

  .hero-control {
    display: none;
  }

  .section-heading,
  .page-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .filter-controls label {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-controls select {
    width: 100%;
  }

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

  .movie-card-horizontal .movie-card-link,
  .movie-card-compact .movie-card-link {
    display: block;
  }

  .movie-card-horizontal .poster-wrap,
  .movie-card-compact .poster-wrap {
    aspect-ratio: 16 / 9;
  }

  .rank-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 2;
    text-align: left;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .main-content,
  .page-main,
  .hero-content-inner,
  .footer-inner {
    width: calc(100% - 28px);
    padding-left: 0;
    padding-right: 0;
  }

  .logo-text {
    font-size: 19px;
  }

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

  .content-section {
    padding-top: 38px;
  }

  .detail-body,
  .detail-section {
    padding: 18px;
  }
}
