* {
  box-sizing: border-box;
}

:root {
  --primary: #2980b9;
  --primary-dark: #1e618c;
  --primary-light: #5dade2;
  --accent: #2ecc71;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--neutral-50);
  color: var(--neutral-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 229, 229, 0.9);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 10px 24px rgba(41, 128, 185, 0.24);
  font-size: 13px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--neutral-700);
  font-weight: 650;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  transition: color 0.2s ease;
}

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

.nav-group {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 54px;
  left: 0;
  display: grid;
  min-width: 180px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-group:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--neutral-700);
  white-space: nowrap;
}

.nav-dropdown-link:hover {
  background: var(--neutral-100);
  color: var(--primary);
}

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

.header-search input,
.mobile-search input,
.large-search input,
.catalog-filter input,
.catalog-filter select {
  border: 1px solid var(--neutral-300);
  outline: 0;
  background: #fff;
  color: var(--neutral-900);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 240px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.header-search button,
.mobile-search button,
.large-search button {
  border: 0;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.catalog-filter input:focus,
.catalog-filter select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.12);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--neutral-800);
  font-size: 26px;
}

.mobile-panel {
  display: none;
  padding: 18px 16px 24px;
  border-top: 1px solid var(--neutral-200);
  background: #fff;
}

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

.mobile-panel a {
  color: var(--neutral-700);
  font-weight: 650;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
}

.mobile-search button {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--neutral-900);
}

.hero-site-title {
  position: absolute;
  top: 34px;
  left: 50%;
  z-index: 6;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  color: #fff;
  pointer-events: none;
}

.hero-site-title span,
.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-site-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
}

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

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

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

.hero-overlay,
.detail-backdrop span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 48%, rgba(0, 0, 0, 0.22));
}

.hero-content {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 76px;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  padding: 7px 13px;
  margin-bottom: 16px;
  background: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.hero-actions,
.detail-meta,
.hero-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-primary,
.btn-ghost,
.text-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(41, 128, 185, 0.26);
}

.btn-primary:hover,
.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-meta {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 32px;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 64px 0;
}

.white-section {
  background: #fff;
}

.soft-section {
  background: var(--neutral-100);
}

.blue-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.watch-panel h2,
.detail-content h2,
.ranking-side h2,
.category-overview-card h2 {
  margin: 0;
  color: var(--neutral-900);
  line-height: 1.16;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.section-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--neutral-600);
}

.section-link,
.text-button {
  color: var(--primary);
}

.section-link:hover,
.text-button:hover {
  color: var(--primary-dark);
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 229, 229, 0.76);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(41, 128, 185, 0.26);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  height: 265px;
  overflow: hidden;
  background: var(--neutral-200);
}

.movie-card.wide .poster-link {
  height: 370px;
}

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

.movie-card:hover .poster-link img,
.channel-card:hover img,
.compact-card:hover img {
  transform: scale(1.06);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 750;
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 34px;
  padding: 0 8px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 12px;
  font-weight: 900;
}

.movie-card-body {
  padding: 18px;
}

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

.movie-card h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.3;
}

.movie-card h2 a:hover {
  color: var(--primary);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--neutral-600);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  color: var(--primary-dark);
  background: rgba(41, 128, 185, 0.1);
}

.horizontal-rail {
  display: grid;
  grid-auto-columns: minmax(280px, 320px);
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-rail .movie-card {
  scroll-snap-align: start;
}

.compact-grid,
.channel-grid,
.category-overview-grid {
  display: grid;
  gap: 20px;
}

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

.compact-card,
.channel-card,
.category-preview {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--neutral-200);
}

.compact-card {
  height: 220px;
  box-shadow: var(--shadow);
}

.compact-card img,
.channel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.compact-overlay,
.channel-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.12));
}

.compact-title,
.rank-dot {
  position: absolute;
  z-index: 2;
}

.compact-title {
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.rank-dot {
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

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

.channel-card {
  height: 210px;
  padding: 20px;
  color: #fff;
}

.channel-card strong,
.channel-card em {
  position: relative;
  z-index: 2;
  display: block;
}

.channel-card strong {
  margin-top: 108px;
  font-size: 22px;
}

.channel-card em {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 72px;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(93, 173, 226, 0.58), transparent 30%), linear-gradient(135deg, #0f172a, #1e618c);
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.catalog-filter {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  background: var(--neutral-100);
  border-radius: 18px;
}

.catalog-filter input,
.catalog-filter select {
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
}

.empty-state {
  display: none;
  padding: 28px;
  margin: 24px 0 0;
  text-align: center;
  color: var(--neutral-600);
  background: var(--neutral-100);
  border-radius: 16px;
}

.empty-state.show {
  display: block;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 170px;
  gap: 3px;
}

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

.category-overview-card h2 {
  font-size: 24px;
}

.category-overview-card p {
  color: var(--neutral-600);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

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

.ranking-side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--neutral-100);
  border-radius: 20px;
}

.ranking-side h2 {
  margin-bottom: 4px;
  font-size: 24px;
}

.ranking-side .compact-card {
  height: 120px;
}

.large-search {
  display: flex;
  max-width: 680px;
  margin-top: 28px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.large-search input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 20px;
  border-radius: 999px;
}

.large-search button {
  min-width: 110px;
  border-radius: 999px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--neutral-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 36px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.detail-copy h1 {
  max-width: 900px;
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
}

.lead {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.detail-meta {
  margin: 20px 0;
}

.detail-tags {
  margin-bottom: 24px;
}

.watch-section {
  background: #0f172a;
}

.watch-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.watch-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: #fff;
}

.watch-panel h2 {
  color: #fff;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 20px;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2));
  cursor: pointer;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 18px 44px rgba(41, 128, 185, 0.45);
  font-size: 30px;
}

.play-layer strong {
  font-size: 18px;
}

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

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

.detail-content article {
  padding: 26px;
  background: var(--neutral-100);
  border-radius: 20px;
}

.detail-content h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 17px;
}

.site-footer {
  padding: 54px 0 0;
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  color: #fff;
}

.site-footer p {
  max-width: 520px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

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

.footer-bottom {
  margin-top: 42px;
  padding: 18px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.56);
}

@media (max-width: 1120px) {
  .catalog-grid,
  .channel-grid,
  .compact-grid,
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    height: 620px;
  }

  .hero-site-title {
    top: 24px;
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
  }

  .section {
    padding: 48px 0;
  }

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

  .catalog-filter,
  .detail-grid,
  .category-overview-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .large-search {
    border-radius: 18px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    height: 640px;
  }

  .hero-copy h2,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero-actions,
  .large-search {
    align-items: stretch;
    flex-direction: column;
  }

  .large-search button {
    min-height: 46px;
  }

  .featured-grid,
  .catalog-grid,
  .two-column-grid,
  .compact-grid,
  .channel-grid,
  .ranking-main {
    grid-template-columns: 1fr;
  }

  .poster-link,
  .movie-card.wide .poster-link {
    height: 300px;
  }

  .category-preview {
    height: 210px;
  }

  .detail-poster img {
    height: 360px;
  }

  .watch-panel {
    padding: 12px;
    border-radius: 18px;
  }

  .player-shell {
    border-radius: 14px;
  }
}
