:root {
  --brand: #e11d48;
  --brand-2: #fb7185;
  --brand-3: #7c3aed;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff1f2;
  --paper: #ffffff;
  --bg: #f8fafc;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

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

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

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

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

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--dark);
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 12px 24px rgba(225, 29, 72, 0.28);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
}

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

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
  background: var(--soft);
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 16px;
  outline: none;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(225, 29, 72, 0.55);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.10);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 90vw);
  max-height: 430px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: #fff1f2;
}

.search-result img {
  width: 62px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffe4e6, #eef2ff);
}

.search-result strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--soft);
  color: var(--brand);
  font-size: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.25), transparent 27%),
    radial-gradient(circle at 90% 14%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #fb7185 0%, #e11d48 45%, #7c3aed 100%);
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.30), rgba(17, 24, 39, 0.08));
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.97fr);
  gap: 48px;
  align-items: center;
  min-height: 620px;
  padding: 64px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
}

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

.hero p {
  max-width: 640px;
  margin: 0 0 28px;
  font-size: 18px;
  color: #ffe4e6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 850;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.20);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.10);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags a {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-showcase {
  position: relative;
}

.hero-frame {
  position: relative;
  min-height: 470px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(17, 24, 39, 0.32);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
  background: linear-gradient(135deg, #ffe4e6, #ede9fe);
}

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

.hero-slide-content {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 2;
}

.hero-slide-content .badge {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 10px;
}

.hero-slide-content h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
}

.hero-slide-content p {
  margin: 0 0 16px;
  color: #e5e7eb;
  font-size: 14px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}

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

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

main {
  min-height: 60vh;
}

.section {
  padding: 66px 0;
}

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

.section-head h2,
.page-title h1,
.detail-info h1 {
  margin: 0;
  color: var(--dark);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--brand);
  font-weight: 850;
}

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

.movie-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  border: 1px solid rgba(229, 231, 235, 0.85);
}

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

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

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

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

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

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

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

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

.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card p {
  margin: 12px 0 14px;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 70px;
}

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

.tag-list span,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 750;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  border: 1px solid rgba(225, 29, 72, 0.12);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -30px;
  bottom: -28px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.10);
}

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

.category-card p {
  margin: 0;
  color: #6b7280;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 108px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 950;
}

.rank-item img {
  width: 108px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffe4e6, #ede9fe);
}

.rank-item h3 {
  margin: 0 0 7px;
  font-size: 19px;
}

.page-hero {
  padding: 58px 0 42px;
  background:
    radial-gradient(circle at 15% 20%, rgba(251, 113, 133, 0.25), transparent 28%),
    linear-gradient(180deg, #fff, #fff7f8);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.page-title {
  display: grid;
  gap: 18px;
}

.page-title h1 {
  font-size: clamp(32px, 4vw, 54px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

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

.detail-shell {
  padding: 44px 0 70px;
}

.detail-head {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: start;
  margin-bottom: 42px;
}

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffe4e6, #ede9fe);
  box-shadow: var(--shadow);
}

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

.detail-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 14px;
}

.detail-lead {
  margin: 22px 0;
  color: #374151;
  font-size: 18px;
}

.detail-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  margin-bottom: 28px;
}

.detail-block h2,
.player-section h2,
.related-section h2 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.25;
}

.detail-block p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 17px;
}

.player-section {
  margin-bottom: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #030712;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

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

.play-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.58), rgba(3, 7, 18, 0.18));
  cursor: pointer;
  z-index: 2;
}

.play-trigger span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 18px 42px rgba(225, 29, 72, 0.42);
  font-size: 34px;
  transform: translateX(3px);
}

.player-shell.is-playing .play-trigger {
  display: none;
}

.related-section {
  margin-top: 30px;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: #111827;
  padding: 46px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  color: #9ca3af;
  font-size: 14px;
}

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

@media (max-width: 1000px) {
  .navbar {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    background: #fff;
    border-radius: 20px;
    padding: 10px;
    border: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .hero-inner,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
  }

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

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

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 42px 0;
    gap: 30px;
  }

  .hero-frame,
  .hero-slide img {
    min-height: 380px;
  }

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

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

  .movie-card p {
    min-height: auto;
    -webkit-line-clamp: 2;
  }

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

  .rank-item {
    grid-template-columns: 42px 82px 1fr;
  }

  .rank-action {
    grid-column: 2 / -1;
  }

  .rank-item img {
    width: 82px;
    height: 62px;
  }

  .detail-info,
  .detail-block {
    padding: 20px;
    border-radius: 22px;
  }

  .play-trigger span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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