:root {
  --bg-0: #020617;
  --bg-1: #0f172a;
  --bg-2: #172554;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --danger: #fb7185;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 36rem),
    linear-gradient(180deg, var(--bg-0), var(--bg-2) 44%, var(--bg-0));
  min-height: 100vh;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.35);
}

.site-header__inner {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo__mark,
.footer-logo span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  border-radius: 999px;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
}

.logo__text {
  font-size: 24px;
  background: linear-gradient(90deg, #fde68a, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.desktop-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover {
  color: var(--accent-2);
}

.desktop-nav a:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav.is-open {
  display: grid;
}

.mobile-nav a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
}

.hero {
  width: min(1480px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  padding: 24px 0 10px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

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

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.02) 55%);
}

.hero-slide__content {
  position: absolute;
  left: clamp(24px, 6vw, 86px);
  bottom: clamp(36px, 9vh, 92px);
  width: min(720px, calc(100% - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.section-intro {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-slide__tags,
.detail-meta,
.ranking-row__meta,
.movie-card__meta,
.tag-row,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-slide__tags span,
.detail-meta span,
.tag-row span,
.pill-link {
  padding: 7px 12px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.1);
  border-radius: 999px;
  font-size: 13px;
}

.hero-slide__actions,
.section-heading,
.quick-search,
.filter-bar,
.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-slide__actions {
  justify-content: flex-start;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #1f1300;
  background: linear-gradient(135deg, #fde68a, var(--accent));
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.25);
}

.btn-ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 86px);
  bottom: 28px;
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(2, 6, 23, 0.55);
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 30px;
}

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

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

.hero-rail {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  min-height: 70vh;
}

.hero-rail h2 {
  margin: 0 0 18px;
}

.hero-rail__item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-rail__item:hover {
  transform: translateX(-3px);
  color: white;
  border-color: rgba(245, 158, 11, 0.45);
}

.hero-rail__item img {
  width: 76px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
}

.quick-search,
.section-wrap,
.page-hero,
.breadcrumb,
.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.quick-search h2,
.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.quick-search__form,
.search-panel {
  display: flex;
  gap: 12px;
  width: min(560px, 100%);
}

input,
select {
  width: 100%;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 13px 16px;
}

select {
  width: auto;
  min-width: 150px;
}

input:focus,
select:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.section-wrap {
  padding: 58px 0 0;
}

.section-wrap--glass {
  padding: 46px 28px;
  margin-top: 58px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
}

.text-link {
  color: var(--accent-2);
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 26px 60px rgba(2, 6, 23, 0.38);
}

.movie-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.movie-card__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 58%);
}

.movie-card__score {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  color: #1f1300;
  background: var(--accent-2);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.movie-card__play {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: auto;
  color: white;
  background: rgba(245, 158, 11, 0.9);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: scale(1);
}

.movie-card__body {
  padding: 13px;
}

.movie-card h3 {
  margin: 0 0 8px;
  min-height: 42px;
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card__meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.movie-card__genre {
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card__category {
  display: block;
  margin: 0 13px 13px;
  color: var(--soft);
  font-size: 12px;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
}

.category-tile__covers,
.category-overview-card__covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.category-overview-card__covers {
  grid-template-columns: repeat(4, 1fr);
}

.category-tile__covers img,
.category-overview-card__covers img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.page-hero {
  padding: 70px 0 22px;
}

.page-hero--compact {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero h1 {
  max-width: 860px;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
}

.pill-row {
  margin-top: 24px;
}

.pill-link.is-active,
.pill-link:hover {
  color: #1f1300;
  background: var(--accent-2);
}

.filter-bar {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-count,
.search-summary {
  color: var(--muted);
  white-space: nowrap;
}

.catalog-card.is-hidden {
  display: none;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 90px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-row__rank {
  font-size: 28px;
  color: var(--accent-2);
  font-weight: 900;
  text-align: center;
}

.ranking-row__poster img {
  width: 90px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.ranking-row__meta span {
  color: #fde68a;
  font-size: 13px;
}

.breadcrumb {
  padding: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--soft);
  font-size: 14px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: auto;
  color: white;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.38);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-start span {
  font-size: 34px;
  transform: translateX(3px);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.82);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  color: white;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.detail-card,
.detail-side__box,
.prose-card {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.detail-card h1 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-card blockquote {
  margin: 24px 0;
  padding: 18px;
  color: #fde68a;
  line-height: 1.8;
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.08);
}

.detail-card h2,
.prose-card h2 {
  margin: 24px 0 12px;
  color: var(--accent-2);
}

.detail-card p,
.prose-card p {
  color: var(--muted);
  line-height: 1.9;
}

.detail-side {
  position: sticky;
  top: 92px;
  align-self: start;
}

.detail-side > img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

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

.detail-side dd {
  margin: 0;
  color: var(--text);
}

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

.search-panel {
  width: 100%;
  justify-content: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.search-panel input {
  max-width: 720px;
}

.search-summary {
  margin: 18px 0;
}

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

.site-footer__inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: white;
}

.site-footer p,
.site-footer li {
  color: var(--soft);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a:hover {
  color: var(--accent-2);
}

.site-footer__bottom {
  padding: 18px;
  color: var(--soft);
  text-align: center;
  border-top: 1px solid var(--line);
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-rail,
  .detail-side {
    position: static;
    min-height: auto;
  }

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

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

@media (max-width: 720px) {
  .site-header__inner,
  .quick-search,
  .section-wrap,
  .page-hero,
  .breadcrumb,
  .detail-layout,
  .site-footer__inner,
  .mobile-nav,
  .hero {
    width: min(100% - 24px, 1280px);
  }

  .logo__text {
    font-size: 20px;
  }

  .hero,
  .hero-slider {
    min-height: 640px;
  }

  .hero-slide__content {
    left: 20px;
    bottom: 66px;
    width: calc(100% - 40px);
  }

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

  .hero p,
  .page-hero p,
  .section-intro {
    font-size: 16px;
  }

  .hero-slide__actions,
  .quick-search,
  .quick-search__form,
  .section-heading,
  .filter-bar,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  select {
    width: 100%;
  }

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

  .category-grid,
  .category-overview-grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 44px 74px 1fr;
    gap: 10px;
  }

  .ranking-row p {
    display: none;
  }

  .detail-card,
  .detail-side__box,
  .prose-card {
    padding: 20px;
  }
}
