:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --orange-500: #f97316;
  --amber-50: #fffbeb;
  --yellow-500: #eab308;
  --blue-50: #eff6ff;
  --blue-600: #2563eb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 10px 25px rgba(17, 24, 39, 0.08);
  --shadow-xl: 0 24px 60px rgba(17, 24, 39, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  font-family: ui-sans-serif, system-ui, -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.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.34);
}

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

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

.nav-link {
  padding: 10px 14px;
  color: var(--gray-600);
  border-radius: 999px;
  font-size: 15px;
  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 {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 30vw);
  padding: 4px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 8px 12px;
  color: var(--gray-700);
  background: transparent;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.25);
}

.header-search button {
  padding: 8px 16px;
  font-weight: 700;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 800;
}

.secondary-btn {
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.primary-btn:hover,
.secondary-btn:hover,
.header-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(244, 63, 94, 0.28);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--rose-50);
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  color: var(--gray-700);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  display: none;
  min-height: 600px;
  position: relative;
}

.hero-slide.is-active {
  display: block;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.78) 42%, rgba(17, 24, 39, 0.34) 100%), linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.6fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0 64px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  color: #ffe4e6;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(255, 228, 230, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  color: white;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.meta-pill,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: white;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
  transform: rotate(1.5deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 58%);
}

.hero-poster strong {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  color: white;
  font-size: 22px;
}

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

.hero-dot {
  width: 38px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  background: white;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: white;
}

.section.warm {
  background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--gray-600);
}

.category-grid,
.movie-grid,
.rank-grid,
.related-grid {
  display: grid;
  gap: 22px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 24px;
  background: linear-gradient(135deg, white, var(--rose-50));
  border: 1px solid var(--rose-100);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(249, 115, 22, 0.18));
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--gray-600);
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.filter-panel input {
  width: 100%;
  padding: 14px 16px;
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  outline: 0;
}

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

.filter-btn {
  padding: 9px 14px;
  color: var(--gray-700);
  background: var(--gray-100);
}

.filter-btn.active,
.filter-btn:hover {
  color: white;
  background: var(--rose-500);
}

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

.movie-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--rose-100);
  box-shadow: var(--shadow-md);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--gray-200);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--rose-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--rose-600);
  background: var(--rose-50);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: var(--rose-100);
  box-shadow: var(--shadow-md);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--gray-700);
  font-weight: 900;
  background: var(--gray-100);
  border-radius: 50%;
}

.top-rank .rank-number {
  color: white;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
}

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

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

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

.rank-info em {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 72px 0 48px;
  color: white;
  background: radial-gradient(circle at 18% 10%, rgba(244, 63, 94, 0.48), transparent 28%), linear-gradient(135deg, var(--gray-900), #3f1231 58%, #7c2d12);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.85fr);
  gap: 28px;
}

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.player-wrap {
  position: relative;
  background: black;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: white;
  text-align: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22));
  border: 0;
}

.play-cover[hidden] {
  display: none;
}

.play-cover span {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
  color: white;
  font-size: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
  box-shadow: 0 18px 40px rgba(244, 63, 94, 0.38);
}

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

.movie-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.meta-line,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  padding: 7px 12px;
  color: var(--rose-600);
  background: var(--rose-50);
}

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

.movie-tags span {
  padding: 7px 11px;
  color: var(--gray-700);
  background: var(--gray-100);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 16px;
  color: var(--gray-700);
}

.side-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 18px;
}

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

.movie-card.compact .card-body p {
  min-height: 0;
}

.site-footer {
  padding: 44px 0 28px;
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: white;
  font-size: 24px;
}

.footer-inner p,
.copyright {
  margin: 8px 0 0;
  color: #9ca3af;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-tags span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  color: white;
  border: 0;
  border-radius: 50%;
  background: var(--rose-500);
  box-shadow: var(--shadow-md);
}

.back-top.show {
  display: grid;
  place-items: center;
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

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

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

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

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

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

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
    height: 64px;
  }

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

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

  .hero h1 {
    font-size: 38px;
  }

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

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

  .rank-item img {
    width: 64px;
    height: 86px;
  }
}
