:root {
  --rose: #f43f5e;
  --rose-dark: #e11d48;
  --pink: #ec4899;
  --orange: #f97316;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

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: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 10px 22px rgba(244, 63, 94, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-size: 15px;
  transition: all 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  color: var(--text);
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 10px 14px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(90deg, var(--rose), var(--pink));
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rose), var(--pink));
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.14) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 38px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  background: var(--rose);
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.34);
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 660px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.9;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.rank-meta span,
.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  color: #4b5563;
  background: #f3f4f6;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  box-shadow: 0 18px 35px rgba(244, 63, 94, 0.32);
}

.btn-secondary {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.btn-light {
  color: var(--rose-dark);
  background: #fff1f2;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
  transform: translateY(-2px);
}

.hero-card-stack {
  display: grid;
  gap: 14px;
}

.hero-side-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-side-card:hover {
  transform: translateX(-4px);
  background: rgba(255, 255, 255, 0.2);
}

.hero-side-card img {
  width: 96px;
  height: 118px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #ffe4e6, #fce7f3);
}

.hero-side-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.hero-side-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.6;
}

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

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

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

.hero-search-panel {
  margin-top: -38px;
  position: relative;
  z-index: 6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(244, 63, 94, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-panel input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--text);
  background: #ffffff;
}

.search-panel button,
.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--rose), var(--pink));
}

.section {
  padding: 72px 0;
}

.section.compact {
  padding: 42px 0;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section h1,
.section h2,
.page-hero h1,
.detail-title {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.03em;
  color: #111827;
}

.section h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.section-intro,
.page-intro {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2, #fce7f3);
}

.poster-wrap.tall {
  aspect-ratio: 3 / 4;
}

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  box-shadow: 0 10px 20px rgba(244, 63, 94, 0.26);
}

.rating-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  background: #fef3c7;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-card p {
  min-height: 44px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid rgba(244, 63, 94, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--rose-dark);
  font-size: 13px;
  background: #ffffff;
}

.page-hero {
  padding: 70px 0 46px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 45%, #fdf2f8 100%);
}

.page-hero .breadcrumb,
.detail-breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px auto;
  gap: 12px;
  margin: 26px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.subnav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #4b5563;
  background: #ffffff;
  border: 1px solid var(--line);
}

.subnav a.active,
.subnav a:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(90deg, var(--rose), var(--pink));
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.rank-number {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--rose), var(--pink));
}

.rank-thumb {
  width: 150px;
  height: 86px;
  border-radius: 18px;
  object-fit: cover;
  background: linear-gradient(135deg, #fff1f2, #fce7f3);
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-head {
  padding: 42px 0;
  background: linear-gradient(135deg, #111827 0%, #1f2937 60%, #4c0519 100%);
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  background: linear-gradient(135deg, #ffe4e6, #fce7f3);
}

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

.detail-title {
  margin: 12px 0 14px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 48px 0 72px;
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.content-card + .content-card {
  margin-top: 22px;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 950;
}

.content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.18), rgba(2, 6, 23, 0.42));
}

.player-start span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 32px;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 18px 45px rgba(244, 63, 94, 0.34);
}

.player-box.is-playing .player-start {
  display: none;
}

.player-message {
  display: none;
  padding: 12px 16px;
  color: #fecdd3;
  background: #111827;
}

.player-box.has-message .player-message {
  display: block;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 950;
}

.related-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #f9fafb;
}

.related-item img {
  width: 108px;
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #fff1f2, #fce7f3);
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.35;
}

.related-item span {
  color: var(--muted);
  font-size: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 950;
}

.footer-inner p,
.footer-inner a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-inner a:hover {
  color: var(--rose-dark);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 20px;
  color: var(--muted);
  text-align: center;
}

.hidden-card {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
}

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

@media (max-width: 1024px) {
  .navbar {
    align-items: flex-start;
  }

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

  .nav-links,
  .header-search {
    display: none;
  }

  .site-header.is-open .nav-links,
  .site-header.is-open .header-search {
    display: flex;
    width: 100%;
  }

  .site-header.is-open .navbar {
    flex-wrap: wrap;
  }

  .site-header.is-open .nav-links {
    justify-content: flex-start;
  }

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

  .hero-card-stack {
    display: none;
  }

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

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

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

  .side-card {
    position: static;
  }

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

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 640px;
  }

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

  .hero-title {
    font-size: 40px;
  }

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

  .hero-search-panel {
    margin-top: 18px;
  }

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

  .section {
    padding: 52px 0;
  }

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

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

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

  .rank-thumb,
  .rank-item .btn-light {
    display: none;
  }

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

  .detail-poster {
    max-width: 280px;
  }

  .content-card {
    padding: 22px;
  }

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