:root {
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --orange-600: #ea580c;
  --orange-400: #fb923c;
  --yellow-300: #fde047;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 48%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red-500), var(--orange-600));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(135deg, var(--red-700), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--gray-700);
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 700;
}

.mobile-link:hover {
  color: var(--red-600);
  background: #fef2f2;
}

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

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 25% 20%, rgba(253, 224, 71, 0.22), transparent 30%), linear-gradient(0deg, rgba(2, 6, 23, 0.55), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 590px;
  margin: 0 auto;
  padding: 70px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  color: var(--white);
}

.hero-pill,
.page-hero span,
.detail-copy .crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row a,
.meta-row span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.ghost-button,
.section-more,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--red-700);
  background: var(--white);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.25);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.hero-poster {
  position: relative;
  width: min(340px, 100%);
  justify-self: end;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--red-600);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%);
}

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

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

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

.band-light,
.content-section,
.detail-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px;
}

.quick-search {
  padding-top: 36px;
  padding-bottom: 36px;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.text-card h2,
.side-card h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.quick-search p,
.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.search-box,
.filter-panel {
  display: flex;
  gap: 12px;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.search-box button,
.section-more {
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--orange-600));
  cursor: pointer;
  white-space: nowrap;
}

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

.section-more.light,
.section-heading.inverted .section-more {
  color: var(--red-700);
  background: var(--white);
}

.section-heading.inverted h2,
.section-heading.inverted p {
  color: var(--white);
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 9px;
  color: var(--white);
  background: var(--red-600);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--slate-900);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--red-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body {
  padding: 13px;
}

.card-body h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--red-600);
}

.card-body p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.category-section {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1180px) / 2));
  padding-right: max(20px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

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

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

.category-tile {
  position: relative;
  min-height: 240px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  background: var(--slate-900);
}

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

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

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(127, 29, 29, 0.26));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.category-tile strong {
  margin-bottom: 8px;
  font-size: 22px;
}

.category-tile em {
  color: rgba(255, 255, 255, 0.8);
  font-style: normal;
  line-height: 1.55;
}

.ranking-band {
  padding: 56px max(20px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, var(--slate-950), #7f1d1d 65%, var(--orange-600));
}

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

.compact-link {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-link:hover {
  transform: translateY(-3px);
  background: var(--white);
}

.compact-link img {
  width: 66px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.compact-link span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.compact-link strong {
  color: var(--gray-900);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-link em {
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--red-700), var(--orange-600));
  color: var(--white);
}

.page-hero > div {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 20px;
}

.page-hero h1 {
  margin-top: 16px;
  color: var(--white);
  font-size: clamp(40px, 5vw, 64px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.filter-panel select {
  max-width: 180px;
}

.large-filter select {
  max-width: 160px;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 560px;
  margin: 0 auto;
  padding: 58px 20px;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy {
  color: var(--white);
}

.crumbs {
  padding: 0;
  margin-bottom: 18px;
  background: transparent;
  border: 0;
}

.crumbs a:hover {
  color: var(--yellow-300);
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 800px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.8;
}

.detail-copy .primary-button {
  margin-top: 28px;
}

.tag-row a:hover {
  background: rgba(255, 255, 255, 0.28);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.text-card,
.side-card {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.player-card {
  position: relative;
  overflow: hidden;
  background: var(--slate-950);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--red-600);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

.player-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--red-600);
  background: rgba(255, 255, 255, 0.94);
  font-size: 30px;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.25);
}

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

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  pointer-events: none;
}

.text-card,
.side-card {
  padding: 26px;
}

.text-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.text-card p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.95;
  font-size: 16px;
}

.quote-text {
  padding-left: 18px;
  border-left: 4px solid var(--red-500);
  font-size: 18px;
  font-weight: 700;
}

.detail-side {
  position: relative;
}

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

.detail-side .compact-list {
  grid-template-columns: 1fr;
}

.detail-side .compact-link {
  background: #f9fafb;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 20px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 16px;
  color: var(--white);
  font-size: 20px;
}

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

.site-footer p,
.site-footer a {
  margin: 0 0 10px;
  display: block;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.site-footer a:hover {
  color: var(--orange-400);
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.56);
}

.is-filtered-out {
  display: none;
}

@media (max-width: 1024px) {
  .movie-grid,
  .catalog-grid,
  .ranking-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-poster {
    justify-self: start;
    max-width: 260px;
  }

  .detail-side .side-card {
    position: static;
  }

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

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

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

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

  .hero-content,
  .detail-inner {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .hero-poster,
  .detail-poster {
    display: none;
  }

  .hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero p,
  .detail-line {
    font-size: 16px;
  }

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

  .ranking-list {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .quick-search-inner,
  .search-box,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-panel select {
    max-width: none;
  }

  .content-section,
  .detail-layout,
  .band-light {
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .footer-grid {
    gap: 18px;
  }
}
