:root {
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-hot: #f97316;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.site-header__inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.logo__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #0369a1 52%, #0f172a);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.logo__text em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  color: var(--soft);
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
}

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

.header-search input,
.mobile-search input,
.big-search input,
.filter-search input {
  width: 220px;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  outline: none;
  padding: 10px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.header-search button,
.mobile-search button,
.big-search button {
  color: white;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  padding: 10px 16px;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  width: auto;
}

.mobile-link {
  display: block;
  color: var(--soft);
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 620px;
  border-bottom: 1px solid var(--line);
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.65s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.28) 0%, #020617 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1200px) / 2));
  bottom: 88px;
  max-width: 680px;
  padding-right: 32px;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: white;
  background: rgba(14, 165, 233, 0.92);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 22px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 20px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #020617;
  background: white;
}

.secondary-button {
  color: white;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line-strong);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  color: white;
  background: var(--accent);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  color: white;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid var(--line);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  font-size: 38px;
  line-height: 1;
}

.hero-arrow--prev {
  left: 22px;
}

.hero-arrow--next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.page-main {
  padding: 32px 0 56px;
}

.page-section {
  margin-top: 56px;
}

.section-heading,
.category-preview__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading > div,
.category-preview__head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2,
.category-preview__head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
}

.section-more,
.category-preview__head a {
  color: var(--accent);
  font-weight: 700;
}

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

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.46);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.4);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.movie-card:hover .poster img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.02);
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 8px;
}

.score {
  right: 10px;
  bottom: 10px;
  background: rgba(14, 165, 233, 0.92);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  background: rgba(249, 115, 22, 0.92);
}

.movie-card__body {
  padding: 15px;
}

.movie-title {
  display: block;
  min-height: 2.8em;
  color: white;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.movie-title:hover {
  color: var(--accent);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 9px 0;
  color: var(--muted);
  font-size: 12px;
}

.movie-card__body p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  min-height: 25px;
}

.tag-row span {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.11);
}

.movie-card--wide {
  display: grid;
  grid-template-columns: 126px 1fr;
  align-items: stretch;
}

.movie-card--wide .poster {
  aspect-ratio: auto;
  min-height: 184px;
}

.movie-list-compact {
  display: grid;
  gap: 16px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: start;
}

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

.category-tile {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.88), rgba(2, 132, 199, 0.78));
  border-color: rgba(186, 230, 253, 0.42);
}

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

.category-tile strong {
  color: #bae6fd;
  font-size: 14px;
}

.category-tile em {
  color: var(--soft);
  font-size: 13px;
  font-style: normal;
}

.category-tile:hover em,
.category-tile:hover strong {
  color: white;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 26rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(30px, 6vw, 64px);
}

.page-hero h1 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.category-preview {
  margin-top: 52px;
}

.category-preview__head {
  align-items: end;
}

.category-preview__head > div {
  display: block;
}

.category-preview__head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-search input {
  flex: 1;
  width: auto;
}

.filter-search span,
.search-status {
  color: var(--muted);
  font-size: 14px;
}

.filter-group {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: start;
  gap: 12px;
}

.filter-group strong {
  color: white;
  padding-top: 7px;
}

.filter-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
}

.filter-chip span {
  color: var(--muted);
  font-size: 12px;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: white;
  background: rgba(14, 165, 233, 0.74);
  border-color: rgba(186, 230, 253, 0.38);
}

.big-search {
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin-top: 26px;
}

.big-search input {
  flex: 1;
  width: auto;
  padding: 14px 18px;
}

.search-status {
  margin-bottom: 18px;
}

.detail-main {
  padding-bottom: 70px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 5vw, 42px);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #0f172a;
  box-shadow: 0 22px 80px rgba(2, 6, 23, 0.46);
}

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

.detail-info h1 {
  margin: 16px 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-info p {
  max-width: 800px;
  margin: 0 0 20px;
  color: var(--soft);
  font-size: 19px;
}

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

.detail-meta-grid span {
  display: grid;
  gap: 3px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: white;
  font-weight: 800;
}

.detail-meta-grid b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.player-section {
  margin-top: 44px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: black;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.player-play-icon {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: #020617;
  background: white;
  border-radius: 50%;
  box-shadow: 0 20px 64px rgba(2, 6, 23, 0.5);
  font-size: 34px;
  padding-left: 6px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 42px;
}

.detail-article,
.detail-side {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vw, 30px);
}

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

.detail-article p {
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 16px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: white;
}

.detail-side a {
  color: var(--accent);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.62);
}

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

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

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: white;
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
  text-align: center;
}

[data-movie-card].is-hidden {
  display: none;
}

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

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

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

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

  .hero,
  .hero-stage,
  .hero-slide img {
    min-height: 560px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
    bottom: 78px;
    padding-right: 0;
  }

  .hero-arrow {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }

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

  .split-section,
  .detail-hero,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 360px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header__inner {
    height: 66px;
  }

  .logo__text strong {
    font-size: 18px;
  }

  .logo__text em {
    display: none;
  }

  .hero,
  .hero-stage,
  .hero-slide img {
    min-height: 520px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

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

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .category-preview__head,
  .filter-search,
  .big-search {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid--two,
  .movie-grid--four,
  .movie-grid--five,
  .movie-grid--six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card__body {
    padding: 12px;
  }

  .movie-title {
    font-size: 14px;
  }

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

  .movie-card--wide {
    grid-template-columns: 96px 1fr;
  }

  .movie-card--wide .poster {
    min-height: 150px;
  }

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

  .detail-meta-grid,
  .detail-side dl {
    grid-template-columns: 1fr;
  }

  .player-play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
