:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-100: #fef3c7;
  --orange-500: #f97316;
  --white: #ffffff;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.18);
  --shadow-xl: 0 26px 70px rgba(15, 23, 42, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.32);
}

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

.main-nav a,
.mobile-panel a {
  color: var(--slate-200);
  padding: 10px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover {
  color: var(--white);
  background: rgba(245, 158, 11, 0.18);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.nav-search input,
.mobile-panel input,
.large-search input,
.inline-filter input {
  border: 1px solid rgba(203, 213, 225, 0.34);
  outline: none;
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--slate-800);
  background: rgba(255, 255, 255, 0.94);
  min-width: 210px;
}

.nav-search button,
.mobile-panel button,
.large-search button,
.inline-filter button,
.btn-primary,
.btn-secondary,
.btn-link {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-search button,
.mobile-panel button,
.large-search button,
.inline-filter button,
.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.25);
}

.nav-search button {
  padding: 10px 14px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: var(--slate-800);
}

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

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 6px;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  min-height: 76vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 86px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--amber-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-one-line,
.detail-one-line {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  color: var(--slate-100);
}

.hero-summary {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--slate-300);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-tags span {
  color: var(--amber-100);
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.tag-row span {
  color: var(--amber-600);
  background: #fff7ed;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
}

.btn-secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}

.btn-link {
  color: var(--amber-100);
  background: transparent;
}

.btn-primary:hover,
.nav-search button:hover,
.large-search button:hover,
.inline-filter button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.32);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: rotate(2deg);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  font-size: 2rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: var(--amber-500);
}

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

.home-search-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -44px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 3;
}

.home-search-block h2,
.section-head h2,
.info-panel h2,
.detail-text h2,
.player-title-row h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.home-search-block p {
  margin: 8px 0 0;
  color: var(--slate-500);
}

.large-search,
.inline-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.large-search button,
.inline-filter button {
  padding: 0 20px;
}

.section-block {
  padding: 70px 0 0;
}

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

.section-head > a {
  color: var(--amber-600);
  font-weight: 800;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  min-height: 160px;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  align-self: stretch;
}

.category-thumbs img {
  height: 100%;
  min-height: 116px;
  object-fit: cover;
  border-radius: 14px;
}

.category-tile h2 {
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 1.15rem;
}

.category-tile p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.94rem;
}

.category-tile span {
  display: inline-flex;
  margin-top: 12px;
  color: var(--amber-600);
  font-weight: 800;
}

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

.movie-card {
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--slate-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.04));
  opacity: 0.82;
}

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

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 0 12px;
  color: var(--slate-900);
  background: var(--amber-400);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  padding: 0 10px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  font-style: normal;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card h2 {
  margin: 8px 0 7px;
  color: var(--slate-800);
  font-size: 1.12rem;
  line-height: 1.32;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--slate-500);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card h2 {
  font-size: 1rem;
}

.dark-strip {
  width: 100%;
  max-width: none;
  padding: 70px max(16px, calc((100% - 1180px) / 2)) 76px;
  margin-top: 80px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.light-head h2 {
  color: var(--white);
}

.light-head > a {
  color: var(--amber-400);
}

.dark-strip .movie-card {
  background: rgba(255, 255, 255, 0.94);
}

.wide-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.wide-card a {
  position: relative;
  display: block;
  min-height: 180px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.wide-card img {
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.wide-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.12));
}

.wide-card strong {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: var(--white);
  font-size: 1.1rem;
}

.page-hero {
  margin-top: 46px;
  padding: 56px;
  border-radius: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  box-shadow: var(--shadow-lg);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--slate-300);
}

.category-hero,
.search-hero,
.ranking-hero {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800) 55%, var(--amber-600));
}

.inline-filter {
  max-width: 600px;
  margin-top: 24px;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--slate-500);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--slate-800);
}

.empty-state a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--amber-600);
  font-weight: 800;
}

.detail-hero {
  min-height: 560px;
  color: var(--white);
  background-position: center;
  background-size: cover;
}

.detail-shell {
  padding: 46px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  color: var(--slate-300);
  font-size: 0.94rem;
}

.breadcrumb a:hover {
  color: var(--amber-400);
}

.detail-top {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
}

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

.detail-copy h1 {
  max-width: 800px;
}

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

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

.player-panel,
.info-panel,
.detail-text article {
  overflow: hidden;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.player-wrap {
  position: relative;
  background: var(--slate-950);
  aspect-ratio: 16 / 9;
}

.main-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--slate-950);
}

.player-cover[hidden] {
  display: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.player-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.72));
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-900);
  background: var(--amber-400);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
  font-size: 2rem;
}

.player-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
}

.player-title-row span {
  color: var(--amber-600);
  font-weight: 800;
}

.info-panel {
  padding: 24px;
}

.info-panel ul {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.info-panel li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--slate-200);
}

.info-panel span {
  color: var(--slate-500);
}

.info-panel strong {
  color: var(--slate-800);
  text-align: right;
}

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

.detail-text article {
  padding: 28px;
}

.detail-text p {
  margin: 14px 0 0;
  color: var(--slate-600);
  font-size: 1.02rem;
}

.site-footer {
  margin-top: 90px;
  color: var(--slate-300);
  background: var(--slate-900);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 52px 0;
}

.footer-grid p {
  max-width: 520px;
  margin: 12px 0 0;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 1.05rem;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--slate-300);
}

.footer-grid a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

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

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

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

  .hero-poster {
    display: none;
  }

  .detail-top {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-shell {
    min-height: 64px;
  }

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

  .hero-content {
    padding: 52px 0 90px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(2rem, 12vw, 3.6rem);
  }

  .hero-arrow {
    display: none;
  }

  .home-search-block,
  .large-search,
  .inline-filter,
  .footer-grid,
  .detail-top {
    grid-template-columns: 1fr;
  }

  .home-search-block {
    margin-top: -28px;
    padding: 22px;
  }

  .section-block {
    padding-top: 50px;
  }

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

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

  .category-tile {
    grid-template-columns: 1fr;
  }

  .category-thumbs {
    height: 120px;
  }

  .page-hero {
    margin-top: 28px;
    padding: 34px 24px;
    border-radius: 26px;
  }

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

  .player-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 0.96rem;
  }

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

  .btn-primary,
  .btn-secondary,
  .btn-link {
    width: 100%;
  }
}
