:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-soft: #fff5f5;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #eceef2;
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --brand-soft: #fee2e2;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff1f2 0, rgba(255, 241, 242, 0) 34rem), var(--bg);
  line-height: 1.6;
}

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.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.3);
}

.brand-text strong,
.footer-brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  margin-top: -3px;
}

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

.nav-link,
.desktop-nav > a,
.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  color: #374151;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 320px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a,
.mobile-categories a {
  display: block;
  padding: 10px 12px;
  color: #4b5563;
  border-radius: 12px;
  font-size: 14px;
  transition: 0.2s ease;
}

.dropdown-panel a:hover,
.mobile-categories a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 4px 8px 12px;
  background: transparent;
}

.header-search button,
.big-search button {
  border: 0;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.header-search button:hover,
.big-search button:hover,
.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.mobile-panel > a {
  display: block;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-panel > a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.mobile-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

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

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.65), rgba(17, 24, 39, 0.15)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, var(--bg), rgba(247, 247, 248, 0));
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--brand);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 680px;
  margin: 24px 0 0;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.32);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.ghost-btn.dark {
  color: var(--brand);
  border-color: #fecaca;
  background: #fff5f5;
}

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

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

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

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

.container-panel {
  padding: clamp(20px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

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

.section-head h2,
.search-band h2,
.content-section h2,
.rank-panel h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head > a,
.text-btn {
  color: var(--brand);
  font-weight: 800;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 540px);
  align-items: center;
  gap: 20px;
  margin-top: -54px;
  position: relative;
  z-index: 5;
}

.big-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

.big-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 12px 12px 18px;
}

.inline-search {
  max-width: 620px;
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.24);
}

.inline-search input {
  color: #fff;
}

.inline-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

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

.category-tile,
.overview-card {
  min-height: 150px;
  padding: 22px;
  background: linear-gradient(135deg, #fff, #fff5f5);
  border: 1px solid #fee2e2;
  border-radius: 18px;
  transition: 0.2s ease;
}

.category-tile:hover,
.overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(220, 38, 38, 0.11);
}

.category-tile span,
.overview-card h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.overview-links a {
  color: #7f1d1d;
  background: #fee2e2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

.home-grid {
  grid-template-columns: repeat(6, 1fr);
}

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.68));
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
}

.card-meta {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.card-desc {
  min-height: 42px;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  color: #7f1d1d;
  background: #fee2e2;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
}

.rank-panel {
  padding: 22px;
  background: linear-gradient(180deg, #fff, #fff5f5);
  border: 1px solid #fee2e2;
  border-radius: 20px;
}

.sticky-rank {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: #fecaca;
  transform: translateX(3px);
}

.rank-item strong {
  color: var(--brand);
  font-size: 20px;
  text-align: center;
}

.rank-item img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-item em {
  display: block;
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.rank-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.page-main {
  padding-bottom: 32px;
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
  color: #fff;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.page-hero {
  min-height: 280px;
  padding: clamp(34px, 6vw, 70px);
  overflow: hidden;
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(248, 113, 113, 0.55), rgba(248, 113, 113, 0));
}

.page-hero h1 {
  position: relative;
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  position: relative;
  max-width: 760px;
  color: #e5e7eb;
  font-size: 18px;
}

.slim-hero,
.search-hero,
.category-hero,
.ranking-hero {
  background: linear-gradient(135deg, #111827, #991b1b 64%, #ef4444);
}

.local-filter {
  width: min(100%, 280px);
  border: 1px solid #e5e7eb;
  outline: 0;
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: clamp(24px, 5vw, 52px);
  padding: clamp(24px, 5vw, 52px);
  background: radial-gradient(circle at 10% 0, rgba(248, 113, 113, 0.42), rgba(248, 113, 113, 0) 28rem), linear-gradient(135deg, #111827, #450a0a);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.breadcrumb strong {
  color: #fff;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-lead {
  max-width: 780px;
  margin: 22px 0 0;
  color: #f3f4f6;
  font-size: 19px;
}

.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-section {
  scroll-margin-top: 92px;
}

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

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.16), rgba(0, 0, 0, 0.24));
  cursor: pointer;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  color: #fff;
  background: rgba(220, 38, 38, 0.95);
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.28);
  transition: 0.2s ease;
}

.player-cover:hover span {
  transform: scale(1.08);
}

.player-cover.is-hidden {
  display: none;
}

.content-section h2 {
  margin: 0 0 14px;
}

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

.site-footer {
  margin-top: 60px;
  color: #e5e7eb;
  background: #111827;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--brand);
  border-radius: 12px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

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

.footer-links a {
  color: #d1d5db;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

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

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

  .split-section,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .sticky-rank {
    position: static;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    min-height: 560px;
  }

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

  .search-band,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 320px;
  }

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

@media (max-width: 700px) {
  .header-inner {
    min-height: 66px;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 540px;
  }

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

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

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

  .container-panel,
  .page-hero,
  .detail-hero {
    border-radius: 20px;
  }

  .section-head {
    display: block;
  }

  .section-head > a,
  .local-filter {
    margin-top: 12px;
  }

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

  .big-search {
    border-radius: 18px;
    align-items: stretch;
    flex-direction: column;
  }

  .inline-search input {
    color: #111827;
  }

  .inline-search input::placeholder {
    color: #6b7280;
  }

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

  .tag-row span:nth-child(n+4) {
    display: none;
  }

  .rank-item {
    grid-template-columns: 30px 48px 1fr;
  }

  .rank-item img {
    width: 48px;
    height: 68px;
  }

  .player-cover span {
    width: 68px;
    height: 68px;
  }
}
