:root {
  --site-red: #dc2626;
  --site-rose: #e11d48;
  --site-pink: #be185d;
  --site-dark: #111827;
  --site-muted: #6b7280;
  --site-soft: #fff1f2;
  --site-border: #e5e7eb;
  --site-card: #ffffff;
  --site-bg: #f8fafc;
  --site-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  --site-radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #111827;
  background: var(--site-bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--site-red), var(--site-rose), var(--site-pink));
  box-shadow: 0 12px 30px rgba(190, 24, 93, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 22px;
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.brand-text span {
  display: block;
  margin-top: 4px;
  color: #ffe4e6;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  color: #ffffff;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #ffe4e6;
  opacity: 1;
}

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

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 23px;
}

.mobile-nav {
  display: none;
  padding: 8px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(225, 29, 72, 0.42), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.70) 45%, rgba(15, 23, 42, 0.26)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.94), transparent 48%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 84px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #ffe4e6;
  font-weight: 700;
  font-size: 14px;
}

.hero-title {
  max-width: 780px;
  margin: 22px 0 16px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 720px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  color: #be123c;
  background: #ffe4e6;
}

.pill {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-rose), var(--site-red));
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(225, 29, 72, 0.38);
}

.button.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  opacity: 0.72;
}

.hero-dot.active {
  width: 26px;
  background: #ffffff;
  opacity: 1;
}

.section {
  padding: 56px 0;
}

.section.white {
  background: #ffffff;
}

.section.soft {
  background: linear-gradient(135deg, #fff1f2, #ffffff 54%, #f8fafc);
}

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

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--site-muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--site-radius);
  background: var(--site-card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  border-color: #fecdd3;
  box-shadow: var(--site-shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  margin: 0;
  background: linear-gradient(135deg, #1f2937, #881337);
}

.poster-wrap.wide {
  aspect-ratio: 16 / 9;
}

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

.movie-card-link:hover .poster-wrap img,
.related-card:hover img,
.rank-card:hover img {
  transform: scale(1.08);
}

.year-badge,
.rank-number,
.type-badge {
  position: absolute;
  z-index: 2;
}

.year-badge {
  top: 10px;
  right: 10px;
  color: #ffffff;
  background: rgba(225, 29, 72, 0.94);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  left: 10px;
  bottom: 10px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.76);
  backdrop-filter: blur(8px);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  color: #111827;
}

.movie-card-link:hover .movie-title,
.related-card:hover .movie-title,
.rank-card:hover .movie-title {
  color: var(--site-rose);
}

.movie-desc {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.movie-meta {
  margin-top: auto;
  color: #6b7280;
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff1f2, #ffffff);
  border: 1px solid #ffe4e6;
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

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

.category-tile:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-rose), var(--site-red));
  transform: translateY(-4px);
  box-shadow: 0 20px 38px rgba(225, 29, 72, 0.22);
}

.category-icon {
  font-size: 36px;
}

.category-tile h3 {
  margin: 12px 0 8px;
  font-size: 21px;
}

.category-tile p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

.category-tile:hover p {
  color: #ffe4e6;
}

.category-count {
  display: inline-flex;
  margin-top: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.10);
  color: #be123c;
  font-size: 13px;
  font-weight: 800;
}

.category-tile:hover .category-count {
  color: #be123c;
  background: #ffffff;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 170px)) auto;
  gap: 12px;
  align-items: center;
  margin: 24px 0 30px;
  padding: 16px;
  border: 1px solid #ffe4e6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--site-border);
  border-radius: 12px;
  padding: 0 13px;
  color: #111827;
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18);
}

.filter-count {
  color: #be123c;
  font-weight: 850;
  white-space: nowrap;
}

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

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

.rank-card {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.86);
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--site-shadow);
}

.rank-thumb {
  width: 102px;
  min-width: 102px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.rank-number {
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-rose), var(--site-red));
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.22);
}

.rank-body {
  min-width: 0;
  padding-left: 44px;
}

.page-hero {
  padding: 64px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 22%, rgba(244, 63, 94, 0.38), transparent 28%),
    linear-gradient(135deg, #111827 0%, #7f1d1d 52%, #be123c 100%);
}

.page-hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #ffe4e6;
  line-height: 1.8;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #fecdd3;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--site-shadow);
  background: #111827;
}

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

.detail-card,
.player-card,
.text-card {
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  margin: 12px 0 18px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.detail-card .lead {
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin: 18px 0;
}

.detail-meta .pill {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.player-card {
  overflow: hidden;
  margin-top: 30px;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-player video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 45%, rgba(225, 29, 72, 0.24), transparent 32%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.34));
  cursor: pointer;
}

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

.play-core {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-rose), var(--site-red));
  box-shadow: 0 18px 38px rgba(225, 29, 72, 0.45);
  font-size: 34px;
  text-indent: 4px;
}

.player-status {
  padding: 12px 16px;
  color: #9ca3af;
  background: #020617;
  font-size: 14px;
}

.text-card {
  padding: 26px;
}

.text-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.text-card + .text-card {
  margin-top: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.related-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.34s ease;
}

.related-card .movie-title {
  padding: 12px 12px 4px;
  font-size: 14px;
}

.related-card .movie-meta {
  padding: 0 12px 12px;
}

.pagination-note {
  margin-top: 24px;
  color: var(--site-muted);
  line-height: 1.7;
}

.empty-result {
  display: none;
  padding: 30px;
  border-radius: 18px;
  background: #ffffff;
  color: #6b7280;
  text-align: center;
}

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

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

.site-footer h3,
.site-footer h4 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
  font-size: 14px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #fb7185;
}

.footer-bottom {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6b7280;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .filter-count {
    grid-column: 1 / -1;
  }
}

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 96px 0 96px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 28px;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .rank-list,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-card {
    padding: 22px;
  }
}

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

  .brand-text strong {
    font-size: 17px;
  }

  .hero {
    min-height: 520px;
  }

  .hero-content {
    padding: 82px 0 86px;
  }

  .hero-actions,
  .hero-meta,
  .tag-row {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

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

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

  .movie-title {
    font-size: 15px;
  }

  .movie-desc {
    font-size: 13px;
  }

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

  .rank-card {
    gap: 12px;
  }

  .rank-thumb {
    width: 84px;
    min-width: 84px;
  }

  .rank-body {
    padding-left: 36px;
  }
}
