:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --cyan-500: #06b6d4;
  --blue-700: #1d4ed8;
  --ink-900: #0f172a;
  --ink-800: #1f2937;
  --ink-700: #374151;
  --ink-500: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #ffffff;
  color: var(--ink-900);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  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: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 24px;
}

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

.brand-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #06b6d4 46%, #2563eb);
  box-shadow: 0 12px 25px rgba(14, 165, 233, 0.35);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong,
.footer-brand {
  background: linear-gradient(90deg, #0284c7, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 24px;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--ink-500);
  font-size: 12px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  color: var(--ink-700);
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: var(--sky-500);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.25);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--sky-50);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.24) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0.1) 58%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 350px;
  align-items: center;
  gap: 56px;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
  animation: fade-up 680ms ease both;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.44);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 54px;
  background: #ffffff;
}

.hero-search-block {
  position: relative;
  z-index: 8;
  margin-top: -42px;
}

.hero-search-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink-900);
  background: #ffffff;
  outline: none;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.quick-search button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--sky-500);
  font-weight: 800;
  cursor: pointer;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quick-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--sky-600);
  background: var(--sky-50);
  font-weight: 700;
  white-space: nowrap;
}

.section {
  padding: 72px 0;
}

.soft-section {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

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

.section-head h2 {
  margin: 0 0 8px;
  color: var(--ink-900);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
}

.section-head p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-500);
}

.section-more,
.text-link {
  color: var(--sky-600);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.15);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover,
.ranking-card h3 a:hover {
  color: var(--sky-600);
}

.movie-meta,
.movie-line,
.ranking-content p,
.ranking-content span {
  color: var(--ink-500);
}

.movie-meta {
  margin: 0 0 10px;
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--sky-600);
  background: var(--sky-50);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #dff7ff;
  background: rgba(255, 255, 255, 0.14);
}

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

.movie-card.compact h3 {
  font-size: 16px;
}

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

.category-card {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  align-content: end;
  border-radius: 22px;
  padding: 22px;
  color: #ffffff;
  background: var(--ink-900);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.14));
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 76px 44px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-poster {
  overflow: hidden;
  border-radius: 12px;
}

.ranking-poster img {
  width: 76px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  font-weight: 900;
}

.ranking-content h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ranking-content p,
.ranking-content span {
  display: block;
  margin: 0;
  font-size: 14px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.45), transparent 38%), linear-gradient(135deg, #0f172a, #0b1120 60%, #082f49);
}

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

.compact-hero {
  padding: 76px 0 64px;
}

.page-hero h1,
.detail-intro h1 {
  margin: 10px 0 14px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
}

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

.eyebrow {
  margin: 0;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 800;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  align-items: center;
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.category-cover-stack {
  position: relative;
  display: block;
  height: 160px;
}

.category-cover-stack img {
  position: absolute;
  width: 105px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 4px solid #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.category-cover-stack img:nth-child(1) {
  left: 0;
  top: 18px;
  z-index: 3;
}

.category-cover-stack img:nth-child(2) {
  left: 44px;
  top: 6px;
  z-index: 2;
}

.category-cover-stack img:nth-child(3) {
  left: 86px;
  top: 22px;
  z-index: 1;
}

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

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--ink-500);
}

.detail-hero {
  min-height: 640px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: end;
  min-height: 640px;
  padding: 84px 0 70px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.detail-intro {
  max-width: 860px;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  background: #020617;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.12));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-ring {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.95);
  box-shadow: 0 0 0 16px rgba(14, 165, 233, 0.22);
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.player-title {
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.4);
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  min-height: 0;
  transform: translateX(-50%);
  color: #ffffff;
  font-weight: 700;
}

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

.detail-main,
.detail-side {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-main {
  padding: 30px;
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-main p {
  margin: 0 0 24px;
  color: var(--ink-700);
  font-size: 17px;
}

.detail-tags {
  margin-top: 8px;
}

.detail-side {
  align-self: start;
  padding: 24px;
}

.detail-side dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-side dt {
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: -6px 0 10px;
  color: var(--ink-900);
  font-weight: 700;
}

.site-footer {
  padding: 54px 0 24px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-grid p {
  max-width: 540px;
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

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

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .hero {
    height: 690px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 38px;
  }

  .hero-poster {
    display: none;
  }

  .hero-search-inner,
  .quick-search,
  .filter-panel,
  .home-ranking,
  .category-overview-grid,
  .detail-layout,
  .footer-grid,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-search-block {
    margin-top: 0;
    padding-top: 18px;
    background: #f8fafc;
  }

  .quick-links {
    justify-content: flex-start;
  }

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

  .detail-hero,
  .detail-hero-inner {
    min-height: auto;
  }

  .detail-poster {
    width: min(280px, 72vw);
  }

  .detail-hero-inner {
    align-items: start;
    padding: 54px 0;
  }
}

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

  .hero {
    height: 620px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

  .movie-grid,
  .catalog-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 64px 38px 1fr;
    gap: 12px;
  }

  .ranking-poster img {
    width: 64px;
  }

  .rank-number {
    width: 36px;
    height: 36px;
  }

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

  .category-cover-stack {
    width: 190px;
  }
}
