:root {
  --red: #ef4444;
  --red-dark: #dc2626;
  --orange: #f97316;
  --yellow: #f59e0b;
  --green: #10b981;
  --cyan: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f3f4f6;
}

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

button,
input,
select {
  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.9);
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(18px);
}

.nav-shell,
.footer-shell,
.content-section,
.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #1f2937;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.28);
}

.brand-name {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--red);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.page-filter-input,
.page-filter-year {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.top-search input {
  width: 230px;
  padding: 10px 14px;
}

.top-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  padding: 10px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  color: var(--ink);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.mobile-search input {
  width: 100%;
  padding: 10px 14px;
}

.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 50%, #f0fdfa 100%);
}

.home-hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  filter: blur(60px);
  top: -160px;
  left: -120px;
}

.home-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  filter: blur(60px);
  bottom: -170px;
  right: -110px;
}

.hero-stage {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 42px;
  align-items: center;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy h1,
.page-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p {
  margin: 0 0 26px;
  max-width: 700px;
  color: #4b5563;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fee2e2;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 750;
}

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

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(229, 231, 235, 0.95);
  padding: 8px 12px;
  color: #374151;
  font-size: 14px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: var(--red);
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.28);
}

.ghost-btn {
  color: #374151;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 430px;
  border-radius: 30px;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.74)),
    var(--hero-image),
    linear-gradient(135deg, #ef4444, #f97316);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.hero-poster span {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 0;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: #111827;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: #d1d5db;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--red);
}

.content-section {
  padding: 64px 0;
}

.white-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: #fff;
}

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

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

.section-head a {
  color: var(--red);
  font-weight: 750;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 22px;
  padding: 22px;
  color: #fff;
  background-image:
    linear-gradient(135deg, rgba(17, 24, 39, 0.85), rgba(239, 68, 68, 0.42)),
    var(--category-image),
    linear-gradient(135deg, #111827, #ef4444);
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 35px rgba(17, 24, 39, 0.12);
}

.category-card span,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 850;
}

.category-card strong,
.category-overview-card p {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.7;
}

.category-overview-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 850;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
}

.mini-links a:hover {
  text-decoration: underline;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.86);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.28);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.13);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.58)),
    var(--poster-image),
    linear-gradient(135deg, #ef4444, #f97316);
  background-size: cover;
  background-position: center;
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 45%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.poster-meta,
.rank-number,
.play-dot {
  position: absolute;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}

.poster-meta {
  left: 14px;
  bottom: 14px;
  background: rgba(17, 24, 39, 0.72);
  padding: 6px 10px;
  font-size: 13px;
}

.rank-number {
  top: 12px;
  left: 12px;
  background: var(--red);
  padding: 7px 10px;
  font-size: 13px;
}

.play-dot {
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.32);
}

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.movie-title {
  color: #111827;
  font-size: 18px;
  font-weight: 820;
  line-height: 1.35;
}

.movie-desc {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
  min-height: 46px;
}

.movie-meta {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ef4444;
  background: #fee2e2;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #9ca3af;
  font-size: 12px;
}

.score-row strong {
  color: var(--red);
  font-size: 20px;
}

.score-row em {
  font-style: normal;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.movie-card.compact .poster-frame {
  aspect-ratio: auto;
  min-height: 150px;
}

.movie-card.compact .movie-desc {
  min-height: auto;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 55%, #f0fdfa 100%);
}

.slim-hero > div,
.category-hero > div {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
}

.category-hero {
  color: #fff;
  background-image:
    linear-gradient(135deg, rgba(17, 24, 39, 0.88), rgba(239, 68, 68, 0.48)),
    var(--hero-image),
    linear-gradient(135deg, #111827, #ef4444);
  background-size: cover;
  background-position: center;
}

.category-hero p,
.category-hero h1 {
  color: #fff;
}

.filter-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.filter-panel strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.filter-panel span {
  color: #6b7280;
  font-size: 14px;
}

.filter-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-filter-input,
.page-filter-year {
  min-height: 44px;
  padding: 10px 14px;
}

.page-filter-input {
  min-width: min(320px, 70vw);
}

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

.detail-wrap {
  padding: 34px 0 64px;
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 8.4;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  cursor: pointer;
  color: #fff;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.72)),
    var(--poster-image),
    linear-gradient(135deg, #111827, #ef4444);
  background-size: cover;
  background-position: center;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-card.is-playing .player-poster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  cursor: pointer;
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.38);
}

.player-poster span {
  font-size: 18px;
  font-weight: 800;
}

.detail-main {
  margin-top: 34px;
  display: grid;
  gap: 28px;
}

.detail-title-block {
  border-radius: 26px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.detail-title-block h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-title-block p {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.large-tags .tag-pill {
  padding: 7px 12px;
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  border-radius: 24px;
  background: #fff;
  padding: 26px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

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

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 42px 0;
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.footer-shell p {
  max-width: 560px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-content: flex-start;
}

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

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

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

  .hero-stage {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    min-height: 310px;
  }

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

  .ranking-grid,
  .related-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-shell,
  .footer-shell,
  .content-section,
  .detail-wrap {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-stage {
    min-height: 760px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .section-head,
  .filter-panel,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .overview-grid,
  .movie-grid,
  .ranking-grid,
  .wide-ranking,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .movie-card.compact .poster-frame {
    min-height: 138px;
  }

  .player-card {
    border-radius: 18px;
    aspect-ratio: 16 / 10;
  }

  .player-start {
    width: 70px;
    height: 70px;
  }
}
