:root {
  color-scheme: light;
  --site-red: #dc2626;
  --site-red-dark: #b91c1c;
  --site-blue: #2563eb;
  --site-purple: #7c3aed;
  --site-pink: #db2777;
  --site-orange: #ea580c;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --bg-page: #f9fafb;
  --bg-card: #ffffff;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.10);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% -10%, rgba(220, 38, 38, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(37, 99, 235, 0.13), transparent 32rem),
    linear-gradient(180deg, #fff 0%, #f9fafb 36%, #f3f4f6 100%);
}

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

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

.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.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--site-red);
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--site-red), #ef4444 60%, #fb7185);
  border-radius: 0.75rem;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
  font-size: 0.85rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--site-red);
  background: #fee2e2;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--border-soft);
  border-radius: 0.85rem;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  cursor: pointer;
}

.menu-button span {
  width: 1.1rem;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border-soft);
  padding: 0.75rem 1.25rem 1rem;
  background: #fff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.35rem;
}

.mobile-link {
  padding: 0.8rem 0.9rem;
  border-radius: 0.85rem;
  color: #374151;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.is-active {
  background: #fee2e2;
  color: var(--site-red);
}

.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem 0;
}

.hero-carousel {
  position: relative;
  min-height: 500px;
  border-radius: 1.25rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, #111827 0%, #7f1d1d 52%, #111827 100%);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.65s ease, transform 0.65s ease;
  background:
    radial-gradient(circle at 12% 20%, hsl(var(--poster-hue, 0deg) 85% 52% / 0.22), transparent 24rem),
    linear-gradient(135deg, #111827, #450a0a 64%, #000);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 40%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  min-height: 500px;
  padding: 4.6rem 3.4rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  margin: 1rem 0 0.85rem;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.14rem;
  line-height: 1.75;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.76rem;
  font-weight: 700;
}

.movie-card .tag-chip,
.detail-tags .tag-chip {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #4b5563;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
}

.primary-button,
.ghost-button,
.outline-link,
.section-more,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.quick-search button {
  border: 0;
  padding: 0.92rem 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--site-red), #ef4444);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.32);
  cursor: pointer;
}

.ghost-button {
  padding: 0.86rem 1.15rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.outline-link,
.section-more {
  min-height: 2.65rem;
  padding: 0.68rem 1rem;
  color: var(--site-red);
  background: #fff;
  border: 1px solid #fecaca;
}

.primary-button:hover,
.ghost-button:hover,
.outline-link:hover,
.section-more:hover,
.quick-search button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 3;
  display: flex;
  gap: 0.48rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2.2rem;
  background: #fff;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) 2fr;
  gap: 1rem;
  align-items: center;
  margin: 1.25rem 0 2.5rem;
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 1rem;
  padding: 0.65rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.quick-search input,
.filter-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0.75rem 0.8rem;
  background: transparent;
  color: #111827;
  font: inherit;
}

.quick-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.quick-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 4rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: #fff;
  color: #111827;
  border: 1px solid #f3f4f6;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  font-weight: 900;
}

.quick-cats a span {
  color: var(--site-red);
  font-size: 0.9rem;
}

.content-section,
.filter-section,
.detail-content {
  margin-bottom: 3rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  background: var(--bg-card);
  border: 1px solid #f3f4f6;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: #fecaca;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.16);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(160deg, hsl(var(--poster-hue) 75% 45%), #111827 68%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.26), transparent 42%);
}

.movie-card-large .poster-frame,
.movie-grid-large .poster-frame {
  aspect-ratio: 16 / 9;
}

.poster-frame img,
.compact-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.82) 100%);
}

.poster-badge {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.94);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(10px);
}

.movie-card-body {
  padding: 0.95rem;
}

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.movie-card-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

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

.movie-card-desc {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.listing-hero {
  margin-bottom: 1.5rem;
  padding: clamp(2rem, 6vw, 4.2rem);
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(127, 29, 29, 0.96)),
    radial-gradient(circle at 82% 20%, rgba(220, 38, 38, 0.32), transparent 25rem);
  color: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.listing-hero h1 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.listing-hero p {
  max-width: 850px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
  font-size: 1.05rem;
}

.search-hero {
  background: linear-gradient(135deg, #111827, #1d4ed8 58%, #7c2d12);
}

.rank-hero {
  background: linear-gradient(135deg, #111827, #7c2d12 54%, #881337);
}

.category-hero {
  background: linear-gradient(135deg, #111827, #7f1d1d 56%, #312e81);
}

.filter-bar {
  margin-bottom: 1.25rem;
  align-items: center;
}

.rank-list {
  display: grid;
  gap: 0.6rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 4rem 1.2fr 2.6fr 4rem;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #f3f4f6;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-number {
  font-size: 1.2rem;
  color: var(--site-red);
  font-weight: 950;
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  justify-self: end;
  color: #f59e0b;
  font-weight: 950;
}

.detail-main {
  max-width: 1180px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.player-shell {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #030712;
  box-shadow: var(--shadow-soft);
}

.movie-player {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  background: #000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.9rem;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(220, 38, 38, 0.34), transparent 18rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  font-weight: 950;
  font-size: 1.05rem;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-red), #ef4444);
  box-shadow: 0 18px 45px rgba(220, 38, 38, 0.36);
  font-size: 1.45rem;
}

.detail-intro {
  padding: 1.6rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #f3f4f6;
  box-shadow: var(--shadow-card);
}

.detail-category {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--site-red);
  font-weight: 900;
  font-size: 0.82rem;
}

.detail-intro h1 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one {
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 1.25rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.detail-meta-grid span {
  display: grid;
  gap: 0.18rem;
  padding: 0.78rem;
  border-radius: 0.9rem;
  background: #f9fafb;
  color: #374151;
  font-weight: 800;
}

.detail-meta-grid strong {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.detail-meta-grid em {
  color: #f59e0b;
  font-style: normal;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.story-card {
  padding: 1.45rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #f3f4f6;
  box-shadow: var(--shadow-card);
}

.story-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

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

.accent-card {
  background: linear-gradient(135deg, #fff, #fff7ed);
  border-color: #fed7aa;
}

.compact-card {
  display: grid;
  grid-template-columns: 3rem 3.8rem minmax(0, 1fr) 3.5rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #f3f4f6;
}

.compact-rank {
  color: var(--site-red);
  font-weight: 950;
}

.compact-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.65rem;
  background: linear-gradient(160deg, hsl(var(--poster-hue) 75% 45%), #111827);
}

.compact-info {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.compact-info strong,
.compact-info em {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-info em {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: normal;
}

.compact-score {
  color: #f59e0b;
  font-weight: 950;
}

.site-footer {
  margin-top: 4rem;
  background: #111827;
  color: #e5e7eb;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  padding: 2.5rem 1.25rem;
}

.footer-inner p {
  max-width: 580px;
  color: #9ca3af;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 0.75rem;
}

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

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

.footer-copy {
  border-top: 1px solid #1f2937;
  padding: 1rem 1.25rem;
  color: #9ca3af;
  text-align: center;
}

[data-filter-hidden="true"] {
  display: none !important;
}

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

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

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

  .menu-button {
    display: inline-flex;
  }

  .quick-panel,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .hero-content {
    padding: 3.2rem 1.5rem 3.6rem;
  }

  .rank-row {
    grid-template-columns: 3rem 1fr 4rem;
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-main {
    padding: 1rem 0.85rem 0;
  }

  .header-inner {
    padding: 0 0.85rem;
  }

  .hero-carousel,
  .hero-content {
    min-height: 430px;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .hero-content p {
    font-size: 0.96rem;
  }

  .quick-search,
  .filter-bar {
    flex-direction: column;
  }

  .quick-cats {
    grid-template-columns: 1fr;
  }

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

  .movie-card-body {
    padding: 0.78rem;
  }

  .movie-card-desc,
  .tag-row {
    display: none;
  }

  .listing-hero {
    padding: 1.4rem;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .player-shell,
  .movie-player {
    min-height: 260px;
  }
}
