:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.08);
  --red: #dc2626;
  --orange: #f97316;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #059669;
  --amber: #f59e0b;
  --purple: #7c3aed;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: white;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.25);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  color: #374151;
}

.desktop-nav a {
  position: relative;
  padding: 8px 0;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--red);
}

.desktop-nav a.active::after,
.desktop-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

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

.top-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 10px 15px;
  min-height: 42px;
  outline: none;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.top-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.top-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 42px;
  font-weight: 800;
  cursor: pointer;
}

.top-search button,
.primary-btn {
  color: white;
  background: linear-gradient(90deg, var(--red), var(--orange));
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.25);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 24px 18px;
  background: white;
}

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

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: #374151;
  font-weight: 700;
}

.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.hero {
  position: relative;
  height: 610px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 900ms ease, transform 1400ms ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(249, 115, 22, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  top: 50%;
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
  color: white;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.hero-content h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 22px);
}

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

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
}

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

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

.hero-dots button {
  width: 13px;
  height: 13px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  transition: width 250ms ease, background 250ms ease;
}

.hero-dots button.active {
  width: 34px;
  background: white;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.soft-section,
.dark-band {
  max-width: none;
  margin: 0;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.soft-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.dark-band {
  color: white;
  background: radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.22), transparent 34%), linear-gradient(135deg, #111827, #1f2937);
}

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

.section-heading.tight {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: var(--red);
  font-weight: 900;
}

.section-heading.light a,
.section-heading.light h2 {
  color: white;
}

.eyebrow {
  margin-bottom: 8px;
  color: white;
}

.eyebrow.blue {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.eyebrow.gold,
.eyebrow.amber {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.eyebrow.green {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: var(--soft-shadow);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

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

.quality,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.quality {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.movie-info {
  padding: 15px 16px 17px;
}

.movie-title,
.list-title,
.overview-title {
  display: block;
  color: #111827;
  font-weight: 900;
  line-height: 1.25;
}

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

.movie-info p,
.list-content p,
.category-overview-card p,
.footer-inner p {
  color: var(--muted);
}

.movie-info p {
  min-height: 48px;
  margin: 8px 0 12px;
  font-size: 14px;
}

.movie-meta span {
  color: #4b5563;
  background: #f3f4f6;
}

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

.category-tile,
.category-overview-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--soft-shadow);
  transition: transform 250ms ease, background 250ms ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
}

.category-tile:hover {
  background: rgba(255, 255, 255, 0.14);
}

.tile-images {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr;
  gap: 4px;
  height: 150px;
  background: rgba(255, 255, 255, 0.06);
}

.tile-images img {
  height: 100%;
  object-fit: cover;
}

.category-tile strong,
.category-tile span {
  display: block;
  padding: 0 18px;
}

.category-tile strong {
  padding-top: 18px;
  font-size: 20px;
}

.category-tile span {
  padding-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.two-column-section {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 34px;
}

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

.list-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px 150px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: 20px;
  padding: 14px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.home-rank .list-card {
  grid-template-columns: 34px 130px 1fr;
}

.list-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.list-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.list-cover img {
  height: 100%;
  object-fit: cover;
}

.list-title {
  margin-bottom: 6px;
  font-size: 18px;
}

.list-content p {
  margin: 0 0 10px;
  font-size: 14px;
}

.page-hero {
  margin: 0;
  padding: 92px max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: white;
  background:
    radial-gradient(circle at 75% 20%, rgba(249, 115, 22, 0.28), transparent 28%),
    linear-gradient(135deg, #111827, #991b1b 55%, #f97316);
}

.compact-hero,
.search-hero {
  background:
    radial-gradient(circle at 75% 20%, rgba(37, 99, 235, 0.32), transparent 28%),
    linear-gradient(135deg, #111827, #1d4ed8 60%, #06b6d4);
}

.ranking-hero {
  background:
    radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.36), transparent 28%),
    linear-gradient(135deg, #111827, #7c2d12 58%, #f59e0b);
}

.category-overview-card {
  padding: 18px;
  border-color: var(--line);
  background: white;
}

.overview-title {
  margin-bottom: 8px;
  font-size: 23px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.compact-card .movie-info p,
.compact-card .movie-meta {
  display: none;
}

.compact-card .movie-info {
  padding: 10px;
}

.compact-card .movie-title {
  font-size: 14px;
}

.filter-panel {
  position: sticky;
  top: 73px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.1fr 1.5fr repeat(3, 0.9fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--soft-shadow);
}

.filter-title {
  font-weight: 900;
  color: #111827;
}

.full-rank-list .list-card {
  grid-template-columns: 48px 180px 1fr;
}

.detail-shell {
  padding: 28px max(24px, calc((100vw - 1280px) / 2 + 24px)) 0;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 28px;
  background: #050505;
  box-shadow: var(--shadow);
}

.player-card video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #050505;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.38));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  padding-left: 5px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 22px 55px rgba(220, 38, 38, 0.35);
}

.player-card.is-playing .play-overlay {
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.detail-info {
  border-radius: 28px;
  padding: 30px;
  color: white;
  background:
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.24), transparent 34%),
    linear-gradient(135deg, #111827, #1f2937);
  box-shadow: var(--soft-shadow);
}

.detail-info h1 {
  margin: 4px 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-info p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  border-radius: 999px;
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
}

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

.article-content,
.related-box {
  border-radius: 26px;
  padding: 28px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.article-content h2,
.related-box h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.article-content p {
  margin: 0 0 26px;
  color: #374151;
  font-size: 17px;
}

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

.related-list .list-card {
  grid-template-columns: 108px 1fr;
}

.related-list .list-rank {
  display: none;
}

.related-list .list-content p,
.related-list .movie-meta span:nth-child(n+3) {
  display: none;
}

.site-footer {
  margin-top: 36px;
  color: rgba(255, 255, 255, 0.75);
  background: #111827;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.62);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  max-width: 440px;
  gap: 12px 20px;
  justify-content: flex-end;
  font-weight: 700;
}

.footer-links a:hover {
  color: white;
}

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

.hidden-by-filter {
  display: none !important;
}

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

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

  .two-column-section,
  .detail-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .header-inner {
    padding: 12px 16px;
  }

  .desktop-nav,
  .top-search {
    display: none;
  }

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

  .brand {
    font-size: 20px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .section,
  .soft-section,
  .dark-band {
    padding: 42px 18px;
  }

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

  .movie-grid,
  .featured-grid,
  .side-grid,
  .catalog-grid,
  .category-grid,
  .category-overview-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-card,
  .home-rank .list-card,
  .full-rank-list .list-card {
    grid-template-columns: 34px 112px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .list-content p {
    display: none;
  }

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

  .page-hero {
    padding: 64px 18px;
  }

  .player-card,
  .player-card video {
    min-height: 260px;
  }

  .detail-shell {
    padding: 20px 18px 0;
  }

  .detail-info,
  .article-content,
  .related-box {
    padding: 22px;
    border-radius: 22px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .featured-grid,
  .side-grid,
  .catalog-grid,
  .category-grid,
  .category-overview-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta,
  .hero-actions,
  .detail-meta {
    gap: 8px;
  }

  .list-card,
  .home-rank .list-card,
  .full-rank-list .list-card,
  .related-list .list-card {
    grid-template-columns: 96px 1fr;
  }

  .list-rank {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
  }

  .list-cover {
    aspect-ratio: 1 / 1;
  }

  .rank-list .movie-meta span:nth-child(n+3) {
    display: none;
  }
}
