* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f3f4f6;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dark);
  background: var(--page);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

.nav a {
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #bfdbfe;
}

.header-search {
  position: relative;
  width: min(340px, 28vw);
}

.header-search input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.header-search input::placeholder {
  color: #dbeafe;
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  color: #ffffff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%);
  cursor: pointer;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(180deg, #111827, #1f2937);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.78) 45%, rgba(17, 24, 39, 0.28) 100%), radial-gradient(circle at 72% 30%, rgba(37, 99, 235, 0.45), transparent 36%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 44px;
  min-height: 600px;
  color: #ffffff;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow,
.section-kicker {
  color: #60a5fa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.25);
}

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

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: #ffffff;
}

.quick-strip {
  padding: 18px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.quick-links {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.quick-links a {
  flex: 0 0 auto;
  padding: 9px 16px;
  color: #1d4ed8;
  font-weight: 800;
  border-radius: 999px;
  background: var(--blue-soft);
}

.section {
  padding: 56px 0;
}

.section-soft {
  background: #ffffff;
}

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

.section-head h2,
.page-hero h1,
.detail-text h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head a,
.text-link {
  color: #2563eb;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #dbeafe;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.3);
}

.card-body {
  padding: 14px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 850;
}

.card-body h3 a:hover {
  color: var(--blue);
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.category-tile,
.overview-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-tile {
  position: relative;
  min-height: 220px;
  padding: 22px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.86));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 21px;
  font-weight: 900;
}

.category-tile small {
  color: #dbeafe;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: start;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  margin: 12px 0 24px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.list-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: stretch;
}

.list-card .poster-link {
  aspect-ratio: auto;
  min-height: 146px;
}

.list-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wide-rank .list-card {
  grid-template-columns: 150px minmax(0, 1fr);
}

.side-rank .list-card {
  grid-template-columns: 88px minmax(0, 1fr);
}

.side-rank .list-card .poster-link {
  min-height: 116px;
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1d4ed8);
}

.page-hero {
  padding: 70px 0;
}

.page-hero p {
  max-width: 780px;
  color: #dbeafe;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.overview-cover img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.overview-card h2 {
  margin: 4px 0 10px;
  font-size: 24px;
}

.overview-card p {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  background: #f9fafb;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.detail-hero {
  padding: 18px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #dbeafe;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.detail-main,
.detail-aside {
  min-width: 0;
}

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

.player-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.28), rgba(17, 24, 39, 0.78));
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.32);
  font-size: 28px;
}

.detail-text,
.related-section,
.detail-aside {
  margin-top: 22px;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.detail-text h1 {
  margin-bottom: 12px;
}

.detail-text h2,
.detail-aside h2 {
  margin: 24px 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.one-line {
  padding: 16px 18px;
  border-radius: 18px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
}

.large-tags {
  margin: 16px 0 8px;
}

.compact-head {
  margin-bottom: 18px;
}

.site-footer {
  color: #9ca3af;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-logo,
.site-footer h3 {
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6b7280;
}

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

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

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

  .detail-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

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

  .nav {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
    padding: 12px 0;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
  }

  .header-search {
    width: 100%;
    order: 3;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 0 80px;
  }

  .hero-poster {
    display: none;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .footer-grid,
  .overview-card {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 620px) {
  .movie-grid,
  .catalog-grid,
  .small-grid,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .list-card,
  .wide-rank .list-card,
  .side-rank .list-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .list-card .poster-link {
    min-height: 122px;
  }

  .page-hero {
    padding: 48px 0;
  }

  .detail-text,
  .related-section,
  .detail-aside {
    padding: 18px;
    border-radius: 18px;
  }
}
