:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  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(--slate-900);
  background: #f8fafc;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

.site-nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo {
  font-size: 24px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red-500), var(--red-800));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.36);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #e5e7eb;
  font-size: 15px;
  font-weight: 650;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--white);
  background: rgba(220, 38, 38, 0.92);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.open {
  display: grid;
  gap: 6px;
}

.hero {
  position: relative;
  height: 590px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(239, 68, 68, 0.28), transparent 35%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.66) 46%, rgba(127, 29, 29, 0.42)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 0 118px;
  color: var(--white);
}

.hero-kicker,
.detail-kicker,
.sub-hero span {
  color: #fecaca;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  font-weight: 900;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.35);
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  color: var(--red-700);
  background: #fef2f2;
  border-color: #fecaca;
}

.tag-row.large span {
  min-height: 32px;
  padding: 6px 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 850;
  transition: 0.2s ease;
}

.btn.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.34);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.42);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.btn.ghost.dark {
  color: var(--slate-800);
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

.btn.plain {
  color: #fee2e2;
  background: rgba(127, 29, 29, 0.3);
}

.btn.light {
  color: var(--red-700);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.btn.small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.hero-dot {
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.active,
.hero-dot:hover {
  background: rgba(220, 38, 38, 0.82);
  transform: translateY(-2px);
}

.hero-dot span {
  display: block;
  color: #fecaca;
  font-size: 12px;
  font-weight: 900;
}

.hero-dot strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.35;
}

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

.search-hero {
  padding: 42px 0 0;
}

.search-hero-inner {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.search-hero h2,
.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.search-hero p,
.cta-band p {
  margin: 0 0 24px;
  color: var(--slate-600);
  font-size: 17px;
  line-height: 1.8;
}

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

.page-section.soft {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: var(--slate-100);
}

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

.section-title > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
}

.section-more {
  color: var(--red-700);
  font-weight: 800;
}

.movie-grid,
.quick-result-grid,
.category-grid {
  display: grid;
  gap: 18px;
}

.compact-grid,
.quick-result-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.all-card-grid {
  align-items: start;
}

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

.movie-card {
  min-width: 0;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  box-shadow: var(--soft-shadow);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 58%);
  opacity: 0;
  transition: opacity 0.26s ease;
}

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

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

.year-badge,
.rank-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.year-badge {
  top: 10px;
  right: 10px;
  min-height: 28px;
  padding: 0 9px;
  color: var(--white);
  background: var(--red-600);
  font-size: 12px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  color: var(--red-700);
  background: #fff7ed;
  font-size: 14px;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  color: var(--white);
  background: rgba(220, 38, 38, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: 0.24s ease;
}

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

.movie-card-body h3 {
  margin: 10px 0 5px;
  color: var(--slate-900);
  font-size: 16px;
  line-height: 1.42;
  font-weight: 850;
}

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

.movie-card-body p {
  margin: 0 0 10px;
  color: var(--slate-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 700;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.horizontal-card .poster {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.horizontal-card .movie-card-body h3 {
  margin-top: 0;
  font-size: 18px;
}

.ranking-strip,
.ranking-list {
  display: grid;
  gap: 16px;
}

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

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(127, 29, 29, 0.35));
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 20px;
}

.category-tile span {
  margin-top: 130px;
  color: #fecaca;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.32;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.filter-input-wrap {
  position: relative;
}

.filter-input-wrap span {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--slate-600);
  font-size: 22px;
}

.filter-input-wrap input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  outline: none;
  color: var(--slate-900);
  background: #f8fafc;
  font-size: 16px;
}

.filter-input-wrap input:focus {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.filter-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-hints span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.filter-hints span:hover {
  color: var(--white);
  background: var(--red-600);
}

.sub-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--red-900));
  color: var(--white);
}

.sub-hero > div {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.sub-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  font-weight: 900;
}

.sub-hero p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.image-sub-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.1);
}

.category-overview-grid {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.category-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
}

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

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--slate-600);
  line-height: 1.75;
}

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.category-preview-links a {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--red-700);
  background: #fef2f2;
  font-size: 13px;
  font-weight: 750;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 34px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: var(--slate-200);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.12;
  font-weight: 950;
}

.detail-one-line {
  margin: 0 0 18px;
  color: var(--slate-600);
  font-size: 20px;
  line-height: 1.75;
}

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

.detail-meta span {
  padding: 8px 13px;
  border-radius: 12px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-weight: 800;
}

.player-section {
  padding-top: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(220, 38, 38, 0.2), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.38);
  font-size: 36px;
}

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

.story-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.story-card,
.text-card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.story-card h2,
.text-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-card p,
.text-card p {
  margin: 0;
  color: var(--slate-600);
  font-size: 16px;
  line-height: 1.9;
}

.narrow-section {
  max-width: 900px;
}

.narrow-section .text-card + .text-card {
  margin-top: 18px;
}

.cta-band {
  padding: 68px 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--red-900));
  text-align: center;
}

.cta-band p {
  color: #fee2e2;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-950);
}

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

.footer-grid p {
  max-width: 360px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.footer-grid a:hover {
  color: #fca5a5;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .compact-grid,
  .quick-result-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .story-section,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

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

  .hero {
    height: 680px;
  }

  .hero-content {
    padding-bottom: 190px;
  }

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

  .hero-dot {
    min-height: 58px;
  }

  .detail-hero,
  .category-overview-card,
  .story-section {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 340px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .logo {
    font-size: 19px;
  }

  .hero {
    height: 720px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .compact-grid,
  .quick-result-grid,
  .wide-grid,
  .category-grid,
  .ranking-list,
  .ranking-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-card .poster {
    aspect-ratio: 2 / 3;
  }

  .search-hero-inner,
  .story-card,
  .text-card,
  .filter-panel {
    padding: 18px;
  }
}
