:root {
  --color-sky: #0ea5e9;
  --color-sky-dark: #0284c7;
  --color-cyan: #06b6d4;
  --color-blue: #2563eb;
  --color-ink: #111827;
  --color-muted: #64748b;
  --color-soft: #f8fafc;
  --color-line: #e5e7eb;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-ink);
  background: #f8fafc;
  font-family: -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;
}

button {
  cursor: pointer;
}

.container-custom {
  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(226, 232, 240, 0.9);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 18px;
  background: linear-gradient(135deg, var(--color-sky), var(--color-cyan), var(--color-blue));
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.32);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--color-sky-dark), #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  color: var(--color-muted);
  font-size: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  border-radius: 12px;
  padding: 10px 16px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--color-sky-dark);
  background: #e0f2fe;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.12)), linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.05) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 116px;
  color: #ffffff;
}

.hero-kicker,
.detail-badges,
.detail-poster-meta,
.movie-meta,
.tag-row,
.detail-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-kicker span,
.detail-badges span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 700;
  color: #075985;
  background: #e0f2fe;
}

.hero-kicker span {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.9);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.28);
}

.hero-content h1,
.hero-content h2 {
  width: min(780px, 100%);
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  color: #bae6fd;
}

.hero-desc {
  width: min(680px, 100%);
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: var(--color-sky);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  background: var(--color-sky-dark);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-search {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 32px;
  width: min(760px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  transform: translateX(-50%);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: #f1f5f9;
  outline: none;
}

.hero-search button {
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  color: #ffffff;
  font-weight: 800;
  background: var(--color-sky);
}

.section-block {
  padding-top: 68px;
  padding-bottom: 68px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
}

.section-head a {
  color: var(--color-sky-dark);
  font-weight: 800;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--color-sky-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.movie-card:hover .movie-poster {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.08));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

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

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

.poster-year {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
}

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

.movie-title-link h3 {
  margin: 0 0 8px;
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--color-ink);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title-link:hover h3 {
  color: var(--color-sky-dark);
}

.movie-card-body p {
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: #64748b;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 3px 8px;
  font-size: 11px;
  color: #0e7490;
  background: #cffafe;
}

.category-section {
  padding: 68px 0;
  background: linear-gradient(120deg, #f0f9ff, #ecfeff);
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow-card);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.35s ease;
}

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

.category-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.category-content {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: grid;
  gap: 7px;
}

.category-content strong {
  font-size: 24px;
  font-weight: 900;
}

.category-content em,
.category-content b {
  display: -webkit-box;
  overflow: hidden;
  font-style: normal;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.84);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-content b {
  color: #bae6fd;
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 68px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(5px);
}

.rank-num {
  color: var(--color-sky-dark);
  font-size: 20px;
  font-weight: 900;
}

.rank-row img {
  width: 68px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row strong,
.rank-row em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.rank-row strong {
  color: var(--color-ink);
  font-weight: 900;
  -webkit-line-clamp: 1;
}

.rank-row em {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  -webkit-line-clamp: 2;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0369a1, #0891b2, #2563eb);
  background-size: cover;
  background-position: center;
}

.page-hero .container-custom {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
}

.page-hero p {
  width: min(760px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.small-hero {
  color: #ffffff;
  background: radial-gradient(circle at 15% 20%, rgba(186, 230, 253, 0.32), transparent 28%), linear-gradient(135deg, #075985, #0891b2, #1d4ed8);
}

.category-hero {
  min-height: 360px;
  display: flex;
  align-items: end;
}

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

.detail-top .breadcrumb {
  margin: 0 0 24px;
  color: #64748b;
}

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

.detail-top .breadcrumb a:hover {
  color: var(--color-sky-dark);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, 180px);
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--color-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0 12px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

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

.no-results {
  border-radius: 18px;
  padding: 28px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

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

.ranking-card a {
  position: relative;
  display: grid;
  grid-template-columns: 76px 96px 1fr;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  border-radius: 20px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-card a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13);
}

.ranking-index {
  color: var(--color-sky-dark);
  font-size: 26px;
  font-weight: 900;
}

.ranking-card img {
  width: 96px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-info {
  display: grid;
  gap: 7px;
}

.ranking-info strong {
  font-size: 22px;
  font-weight: 900;
}

.ranking-info em {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-info b {
  color: #0e7490;
  font-size: 13px;
}

.detail-top {
  padding: 34px 0 64px;
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
}

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

.detail-poster-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.detail-poster-meta {
  justify-content: center;
  padding: 14px;
}

.detail-poster-meta span {
  border-radius: 999px;
  padding: 4px 10px;
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
  background: #cffafe;
}

.detail-main h1 {
  margin: 4px 0 12px;
  color: var(--color-ink);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-one-line {
  margin: 0 0 18px;
  color: #475569;
  font-size: 19px;
}

.detail-badges {
  margin-bottom: 22px;
}

.player-section {
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
}

.player-frame {
  position: relative;
  width: 100%;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.48));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 6px;
  color: var(--color-sky-dark);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(14, 165, 233, 0.28);
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.content-card {
  border-radius: 22px;
  padding: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-tags-card {
  grid-column: 1 / -1;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 36px;
  padding-top: 54px;
  padding-bottom: 36px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #94a3b8;
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 18px 0 24px;
  color: #94a3b8;
  font-size: 14px;
}

[hidden],
.is-filtered {
  display: none !important;
}

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

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

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

@media (max-width: 900px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 10px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

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

  .nav-link {
    text-align: center;
  }

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

  .hero-control {
    display: none;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search input,
  .hero-search button {
    min-height: 46px;
  }

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

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

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

  .detail-poster-card {
    max-width: 320px;
  }

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

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

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    display: none;
  }

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

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

  .hero-desc {
    font-size: 15px;
  }

  .section-block,
  .category-section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

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

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

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

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

  .ranking-card a {
    grid-template-columns: 50px 78px 1fr;
    gap: 12px;
  }

  .ranking-card img {
    width: 78px;
    height: 104px;
  }

  .ranking-info strong {
    font-size: 17px;
  }

  .rank-row {
    grid-template-columns: 40px 58px 1fr;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .content-card {
    padding: 20px;
  }
}
