:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --pink-50: #fdf2f8;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 10px 25px rgba(244, 63, 94, 0.10);
  --shadow-md: 0 18px 45px rgba(31, 41, 55, 0.14);
  --shadow-lg: 0 28px 70px rgba(31, 41, 55, 0.22);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--rose-50), var(--orange-50) 45%, var(--pink-50));
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 247, 237, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(244, 63, 94, 0.10);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.08);
}

.nav-wrap {
  width: min(var(--page-width), calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-400), var(--orange-400));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--rose-600);
  background: rgba(255, 228, 230, 0.82);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.top-search {
  width: 270px;
  position: relative;
  display: flex;
  align-items: center;
}

.top-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(244, 63, 94, 0.18);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  box-shadow: 0 8px 18px rgba(244, 63, 94, 0.06);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  height: 42px;
  padding: 0 54px 0 18px;
}

.top-search button,
.mobile-search button {
  border: 0;
  color: var(--white);
  background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
  cursor: pointer;
}

.top-search button {
  position: absolute;
  right: 5px;
  width: 42px;
  height: 32px;
  border-radius: 999px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

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

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

.mobile-panel {
  display: none;
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  height: 42px;
  padding: 0 16px;
}

.mobile-search button {
  border-radius: 999px;
}

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

.page-shell,
.hero-inner,
.footer-grid,
.footer-bottom {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.45) 58%, rgba(17, 24, 39, 0.30)), linear-gradient(0deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.08) 42%);
}

.hero-inner {
  position: relative;
  z-index: 5;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  padding: 90px 0 86px;
}

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

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.26);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  max-width: 670px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
  box-shadow: 0 18px 36px rgba(244, 63, 94, 0.26);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--rose-600);
  background: var(--white);
  border: 1px solid rgba(244, 63, 94, 0.12);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-md);
}

.hero-control {
  position: absolute;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--white);
}

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

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

.section-heading h2,
.page-title h1,
.filter-panel h2,
.detail-main h1 {
  margin: 0;
  color: var(--gray-800);
  letter-spacing: -0.03em;
}

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

.section-heading p,
.page-title p,
.filter-panel p {
  margin: 10px 0 0;
  color: var(--gray-600);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose-100), var(--orange-100));
}

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

.movie-card:hover .poster-link img,
.related-item:hover img,
.ranking-row:hover img {
  transform: scale(1.10);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose-500), var(--orange-500));
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.2);
}

.poster-shadow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.62), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title,
.related-item:hover h3,
.ranking-row:hover h3 {
  color: var(--rose-600);
}

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 28px;
  margin-bottom: 14px;
}

.movie-tags span,
.detail-tags span {
  padding: 5px 9px;
  color: var(--rose-600);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--rose-100);
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

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

.category-card {
  overflow: hidden;
  color: var(--gray-800);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose-100), var(--orange-100));
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.category-card-body span {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
  color: var(--gray-800);
}

.category-card-body p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.65;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 130px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
}

.ranking-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: var(--rose-100);
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.6;
}

.ranking-info span {
  color: var(--rose-600);
  font-size: 13px;
  font-weight: 800;
}

.page-title {
  padding: 48px 0 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 28px;
  color: var(--gray-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--rose-600);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin: 22px 0 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

.filter-controls input,
.filter-controls select {
  height: 46px;
  padding: 0 16px;
}

.filter-controls input {
  grid-column: span 1;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--gray-600);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

.detail-hero {
  padding: 30px 0 54px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
  gap: 28px;
  align-items: start;
}

.watch-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(244, 63, 94, 0.28), rgba(17, 24, 39, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-cover span {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  font-size: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
  box-shadow: 0 18px 44px rgba(244, 63, 94, 0.36);
}

.play-cover strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.detail-main {
  padding: 28px;
}

.detail-main h1 {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.detail-summary {
  color: var(--gray-600);
  font-size: 16px;
  line-height: 1.9;
}

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

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

.info-item {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rose-50), var(--orange-50));
}

.info-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--gray-500);
  font-size: 12px;
}

.info-item strong {
  color: var(--gray-800);
  font-size: 14px;
}

.article-block {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--rose-50), var(--orange-50));
}

.article-block h2 {
  margin: 0 0 12px;
  color: var(--gray-800);
}

.article-block p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 16px;
  color: var(--gray-800);
}

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

.related-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
}

.related-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: var(--rose-100);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.related-item h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.related-item p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.site-footer {
  margin-top: 60px;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(135deg, var(--gray-900), #24212b);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: rgba(255, 255, 255, 0.68);
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: var(--rose-400);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

@media (max-width: 1024px) {
  .top-search {
    width: 220px;
  }

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

  .ranking-panel,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }

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

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

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

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

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

  .hero-inner {
    padding: 74px 0 72px;
  }

  .hero-control {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .section-actions {
    margin-top: 16px;
  }

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

  .ranking-panel {
    gap: 14px;
  }

  .ranking-row {
    grid-template-columns: 42px 105px 1fr;
    gap: 12px;
  }

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

  .filter-controls input {
    grid-column: 1 / -1;
  }

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

@media (max-width: 560px) {
  .nav-wrap {
    height: 64px;
  }

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

  .hero,
  .hero-inner {
    min-height: 520px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .ranking-row {
    grid-template-columns: 40px 96px 1fr;
    padding: 12px;
  }

  .rank-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

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

  .related-item {
    grid-template-columns: 96px 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
