:root {
  --color-red: #dc2626;
  --color-red-dark: #b91c1c;
  --color-red-soft: #fee2e2;
  --color-stone-50: #fafaf9;
  --color-stone-100: #f5f5f4;
  --color-stone-200: #e7e5e4;
  --color-stone-500: #78716c;
  --color-stone-600: #57534e;
  --color-stone-700: #44403c;
  --color-stone-800: #292524;
  --color-stone-900: #1c1917;
  --shadow-soft: 0 16px 40px rgba(28, 25, 23, 0.08);
  --shadow-card: 0 10px 24px rgba(28, 25, 23, 0.1);
  --radius-large: 24px;
  --radius-card: 18px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-stone-200);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.05);
}

.header-inner {
  width: min(100% - 32px, var(--max-width));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red), #fb923c);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28);
}

.brand-copy strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand-copy small {
  display: block;
  color: var(--color-stone-500);
  font-size: 0.75rem;
  margin-top: 3px;
}

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

.desktop-nav a,
.mobile-panel nav a {
  color: var(--color-stone-600);
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
}

.header-search input,
.mobile-panel input,
.wide-search input,
.filter-bar input {
  width: 100%;
  border: 1px solid var(--color-stone-200);
  border-radius: 999px;
  background: var(--color-stone-100);
  color: var(--color-stone-800);
  padding: 10px 16px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.wide-search input:focus,
.filter-bar input:focus {
  border-color: var(--color-red);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.header-search button,
.mobile-panel button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--color-red);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.wide-search button:hover {
  background: var(--color-red-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--color-stone-700);
  font-size: 1.6rem;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--color-stone-100);
}

.hero {
  position: relative;
  height: min(80vh, 780px);
  min-height: 560px;
  overflow: hidden;
  background: var(--color-stone-900);
}

.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;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(220, 38, 38, 0.35), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42) 55%, rgba(0, 0, 0, 0.2)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 42%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - var(--max-width)) / 2));
  bottom: 86px;
  width: min(720px, calc(100% - 48px));
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--color-red);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-kicker {
  background: var(--color-red-soft);
  color: var(--color-red-dark);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  width: min(680px, 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.hero-tags {
  margin: 22px 0 28px;
}

.hero-tags a,
.hero-tags span,
.detail-meta span,
.tag-row span,
.detail-tags a {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--color-red);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.primary-button:hover {
  background: var(--color-red-dark);
  transform: translateY(-2px);
}

.primary-button.full {
  width: 100%;
}

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

.ghost-button:hover {
  border-color: #ffffff;
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dots button.active {
  background: var(--color-red);
}

.section-wrap {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 56px 0;
}

.page-main .section-wrap {
  padding-top: 34px;
}

.intro-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: 32px;
  align-items: end;
}

.intro-search h2,
.section-heading h2,
.compact-hero h1,
.detail-card h1 {
  margin: 12px 0;
  color: var(--color-stone-900);
  line-height: 1.18;
}

.intro-search p,
.compact-hero p {
  color: var(--color-stone-600);
  margin: 0;
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.wide-search input {
  border: 0;
  background: transparent;
}

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

.section-heading.tight {
  align-items: center;
}

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

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

.category-tile {
  min-height: 128px;
  border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-card);
  padding: 20px;
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover,
.compact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.category-tile span {
  display: block;
  color: var(--color-stone-900);
  font-size: 1.08rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.category-tile small {
  color: var(--color-stone-600);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--color-stone-200);
}

.movie-poster img,
.compact-card img,
.category-preview img,
.poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.quality-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 0.72rem;
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--color-stone-500);
  font-size: 0.76rem;
  font-weight: 700;
}

.movie-meta-line a {
  color: var(--color-red);
}

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

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

.movie-card p {
  margin: 0 0 12px;
  color: var(--color-stone-600);
  font-size: 0.88rem;
  line-height: 1.55;
}

.tag-row span,
.detail-tags a {
  color: var(--color-stone-600);
  background: var(--color-stone-100);
  font-size: 0.75rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--color-stone-200);
  border-radius: 16px;
  padding: 10px;
  background: #ffffff;
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(220, 38, 38, 0.35);
}

.rank-number {
  color: var(--color-red);
  font-size: 1.28rem;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-stone-200);
}

.rank-copy strong,
.rank-copy small {
  display: block;
}

.rank-copy strong {
  overflow: hidden;
  color: var(--color-stone-900);
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--color-stone-500);
  font-size: 0.78rem;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 150px;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-width: thin;
}

.compact-card {
  overflow: hidden;
  border: 1px solid var(--color-stone-200);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(28, 25, 23, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card img {
  aspect-ratio: 2 / 3;
  background: var(--color-stone-200);
}

.compact-card span,
.compact-card small {
  display: block;
  padding: 0 10px;
}

.compact-card span {
  overflow: hidden;
  margin-top: 10px;
  color: var(--color-stone-900);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  color: var(--color-stone-500);
  font-size: 0.76rem;
  margin: 4px 0 12px;
}

.page-main {
  min-height: 60vh;
}

.compact-hero {
  width: min(100% - 32px, var(--max-width));
  margin: 34px auto 0;
  border-radius: var(--radius-large);
  padding: 42px;
  background:
    radial-gradient(circle at 88% 12%, rgba(220, 38, 38, 0.18), transparent 30%),
    linear-gradient(145deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow-soft);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-stone-500);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: var(--color-red);
}

.filter-bar {
  margin-top: 24px;
  width: min(100%, 560px);
}

.empty-result {
  display: none;
  margin: 24px 0 0;
  border-radius: 18px;
  padding: 26px;
  color: var(--color-stone-600);
  background: #ffffff;
  text-align: center;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-card);
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-preview img {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background: var(--color-stone-200);
}

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--color-stone-600);
}

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

.player-section {
  background: #000000;
}

.player-shell {
  position: relative;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-symbol {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-red);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.35);
  font-size: 2rem;
  padding-left: 4px;
}

.player-state {
  position: absolute;
  left: 20px;
  bottom: 16px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

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

.detail-card,
.sidebar-card {
  border: 1px solid var(--color-stone-200);
  border-radius: var(--radius-card);
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.05);
}

.detail-card {
  margin-bottom: 22px;
}

.detail-card h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.detail-card h2,
.sidebar-card h2 {
  margin: 26px 0 12px;
  color: var(--color-stone-900);
  font-size: 1.2rem;
}

.detail-card p {
  color: var(--color-stone-700);
  margin: 0 0 12px;
}

.lead-text {
  border-left: 4px solid var(--color-red);
  padding-left: 16px;
  font-size: 1.05rem;
  font-weight: 700;
}

.detail-meta {
  margin: 14px 0 24px;
}

.detail-meta span {
  color: var(--color-stone-600);
  background: var(--color-stone-100);
}

.detail-tags {
  margin-top: 20px;
}

.detail-tags a:hover {
  color: #ffffff;
  background: var(--color-red);
}

.detail-sidebar {
  position: sticky;
  top: 92px;
}

.sidebar-card {
  margin-bottom: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  margin-bottom: 16px;
  background: var(--color-stone-200);
}

.sidebar-ranks {
  display: grid;
  gap: 10px;
}

.sidebar-ranks .rank-item {
  grid-template-columns: 34px 48px minmax(0, 1fr);
  padding: 8px;
}

.sidebar-ranks .rank-item img {
  width: 48px;
  height: 64px;
}

.site-footer {
  margin-top: 40px;
  background: var(--color-stone-900);
  color: var(--color-stone-200);
}

.footer-inner {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
}

.site-footer p {
  color: var(--color-stone-500);
  margin: 16px 0 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

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

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

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

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

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

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

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

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

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

  .header-inner {
    height: 66px;
  }

  .hero {
    min-height: 600px;
    height: 78vh;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-control {
    display: none;
  }

  .intro-search,
  .detail-layout,
  .footer-inner,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .detail-sidebar {
    position: static;
  }

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

@media (max-width: 640px) {
  .section-wrap {
    width: min(100% - 24px, var(--max-width));
    padding: 38px 0;
  }

  .compact-hero {
    width: min(100% - 24px, var(--max-width));
    padding: 26px;
  }

  .brand-copy small {
    display: none;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-actions,
  .wide-search,
  .mobile-panel form {
    flex-direction: column;
    align-items: stretch;
  }

  .category-grid,
  .movie-grid,
  .category-movie-grid,
  .related-grid,
  .rank-grid,
  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item,
  .sidebar-ranks .rank-item {
    grid-template-columns: 34px 46px minmax(0, 1fr);
  }

  .rank-item img,
  .sidebar-ranks .rank-item img {
    width: 46px;
    height: 62px;
  }

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

  .movie-card p {
    display: none;
  }
}

@media (max-width: 430px) {
  .category-grid,
  .movie-grid,
  .category-movie-grid,
  .related-grid,
  .rank-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

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