:root {
  color-scheme: light;
  --rose: #f43f5e;
  --rose-dark: #e11d48;
  --pink: #ec4899;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff7fb;
  --line: #f3d5df;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 50px rgba(190, 24, 93, 0.15);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7fb 0%, #fff 42%, #fff1f2 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(244, 63, 94, 0.12);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.32);
}

.brand-name {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--rose-dark);
  background: #fff1f2;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff1f2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 30px auto 0;
  overflow: hidden;
  border-radius: 36px;
  background: #111827;
  box-shadow: 0 30px 80px rgba(127, 29, 29, 0.22);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 46px;
  padding: 70px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.48;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 25%, rgba(244, 63, 94, 0.62), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.70) 52%, rgba(17, 24, 39, 0.30));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #fecdd3;
}

.hero-content h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: #fff1f2;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 14px 28px rgba(244, 63, 94, 0.34);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-cover {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-cover img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

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

.hero-search {
  position: absolute;
  right: 34px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  width: min(430px, calc(100% - 68px));
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  font-weight: 900;
  background: var(--rose);
}

.content-section,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 52px auto;
}

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.footer-brand p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--rose-dark);
  background: #fff1f2;
  white-space: nowrap;
}

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

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.16));
}

.category-card strong,
.category-card small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #fff;
}

.category-card strong {
  bottom: 58px;
  font-size: 1.25rem;
}

.category-card small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(244, 63, 94, 0.10);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(244, 63, 94, 0.32);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.movie-card.is-hidden {
  display: none;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.7), transparent);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.32);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 7px;
  color: #f9a8d4;
}

.movie-card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--rose-dark);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 9px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card .movie-card-body {
  padding: 13px;
}

.compact-card p {
  display: none;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: 56px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.22), transparent 30%),
    linear-gradient(135deg, #fff, #fff1f2);
  box-shadow: var(--shadow);
}

.small-hero,
.category-hero,
.ranking-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.search-panel {
  position: sticky;
  top: 86px;
  z-index: 20;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid rgba(244, 63, 94, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(18px);
}

.search-box input {
  width: 100%;
  height: 48px;
  border: 1px solid #ffe4e6;
  border-radius: 18px;
  outline: 0;
  padding: 0 16px;
  background: #fff;
}

.search-box input:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.10);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #4b5563;
  font-weight: 800;
  background: #f9fafb;
}

.filter-button.active,
.filter-button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
}

.empty-state {
  display: none;
  margin: 12px 0 0;
  color: var(--muted);
}

.empty-state.show {
  display: block;
}

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

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

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

.player-panel,
.detail-cover-card,
.detail-content {
  border: 1px solid rgba(244, 63, 94, 0.12);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.player-panel {
  padding: 18px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f172a;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.08));
}

.player-overlay.hidden {
  display: none;
}

.play-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 18px 45px rgba(244, 63, 94, 0.42);
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #fff;
}

.play-main-button {
  width: 100%;
  margin-top: 16px;
}

.detail-cover-card {
  overflow: hidden;
}

.detail-cover-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-meta-list {
  padding: 16px;
}

.detail-meta-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid #ffe4e6;
  color: var(--muted);
}

.detail-meta-list p:last-child {
  border-bottom: 0;
}

.detail-meta-list strong {
  color: var(--ink);
}

.detail-meta-list a {
  color: var(--rose-dark);
  font-weight: 800;
}

.detail-content {
  padding: 34px;
}

.lead-text {
  margin: 18px 0;
  color: #374151;
  font-size: 1.12rem;
  line-height: 1.9;
}

.detail-content h2 {
  margin: 30px 0 12px;
  font-size: 1.45rem;
}

.detail-content p {
  color: #374151;
  line-height: 1.95;
}

.detail-tags {
  margin-top: 14px;
}

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

.site-footer {
  margin-top: 80px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.brand-footer .brand-name {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1rem;
}

.footer-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.footer-link-grid a {
  color: #d1d5db;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  text-align: center;
  color: #9ca3af;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-shell {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 26px 110px;
  }

  .hero-cover {
    width: min(280px, 82vw);
    transform: none;
  }

  .hero-cover img {
    height: 360px;
  }

  .hero-search {
    left: 26px;
    right: 26px;
    width: auto;
  }

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

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

  .detail-cover-card {
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .hero-shell,
  .content-section,
  .detail-shell,
  .page-hero {
    width: min(100% - 22px, 1180px);
  }

  .hero-shell {
    min-height: 720px;
    border-radius: 26px;
  }

  .hero-content h1 {
    font-size: 2.35rem;
  }

  .hero-summary {
    font-size: 0.98rem;
  }

  .hero-actions {
    gap: 9px;
  }

  .primary-button,
  .ghost-button,
  .section-more {
    min-height: 42px;
    padding: 0 15px;
    font-size: 0.92rem;
  }

  .hero-controls {
    bottom: 86px;
  }

  .hero-search {
    bottom: 24px;
    left: 16px;
    right: 16px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .page-hero {
    padding: 34px 22px;
    border-radius: 26px;
  }

  .search-panel {
    top: 76px;
  }

  .detail-content {
    padding: 24px;
  }
}
