:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-850: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-500: #a8a29e;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --bronze-800: #846358;
  --bronze-700: #916c60;
  --bronze-600: #a18072;
  --bronze-500: #bc9b8e;
  --bronze-400: #d2bab0;
  --bronze-200: #eadbd7;
  --bronze-100: #f2e8e5;
  --bronze-50: #fdf8f6;
  --shadow-soft: 0 18px 50px rgba(28, 25, 23, 0.12);
  --shadow-deep: 0 30px 90px rgba(12, 10, 9, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-900);
  background: var(--stone-50);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--stone-100);
  background: rgba(28, 25, 23, 0.96);
  box-shadow: 0 18px 45px rgba(12, 10, 9, 0.22);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--bronze-200), var(--bronze-600));
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(210, 186, 176, 0.22);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.03em;
}

.brand-text em {
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--stone-300);
}

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

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--bronze-400);
}

.mobile-menu {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.mobile-menu span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--stone-100);
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: white;
  background: var(--stone-950);
}

.hero-stage,
.hero-slide,
.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 54px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-backdrop {
  left: 50%;
  right: auto;
  width: 100vw;
  margin-left: -50vw;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: blur(4px) saturate(0.8);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(210, 186, 176, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.68) 48%, rgba(12, 10, 9, 0.92));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--bronze-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow,
.detail-info .eyebrow {
  color: var(--bronze-400);
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 700px;
  margin: 0;
  color: var(--stone-200);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.aside-meta,
.rank-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin: 26px 0 34px;
}

.hero-tags span,
.tag-pill,
.aside-meta span,
.rank-meta span {
  border: 1px solid rgba(210, 186, 176, 0.3);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--bronze-100);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.primary-btn,
.secondary-btn,
.search-form button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-form button {
  color: white;
  background: var(--bronze-600);
  box-shadow: 0 14px 30px rgba(161, 128, 114, 0.28);
}

.primary-btn:hover,
.search-form button:hover,
.ghost-link:hover {
  transform: translateY(-2px);
  background: var(--bronze-700);
}

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

.secondary-btn:hover {
  transform: translateY(-2px);
  border-color: var(--bronze-400);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  box-shadow: var(--shadow-deep);
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, var(--stone-900), var(--stone-800));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--bronze-400);
}

.quick-search,
.section-block {
  padding: 72px 0;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 32px;
  align-items: center;
  margin-top: -62px;
  position: relative;
  z-index: 7;
  border: 1px solid var(--stone-200);
  border-radius: 28px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.watch-aside h2,
.detail-side h2 {
  margin: 8px 0 10px;
  color: var(--stone-900);
  line-height: 1.18;
}

.search-panel h2,
.section-head h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.search-panel p,
.page-hero p,
.catalog-card p,
.category-card p,
.card-body p,
.rank-info p,
.detail-line,
.watch-aside p,
.detail-article p,
.detail-side dd,
.site-footer p {
  color: var(--stone-600);
}

.search-form,
.filter-bar {
  display: flex;
  gap: 12px;
}

.search-form input,
.filter-bar input {
  min-width: 0;
  flex: 1;
  height: 48px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--stone-900);
  background: white;
  outline: 0;
}

.search-form input:focus,
.filter-bar input:focus {
  border-color: var(--bronze-600);
  box-shadow: 0 0 0 4px rgba(161, 128, 114, 0.12);
}

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

.text-link {
  color: var(--bronze-700);
  font-weight: 800;
}

.text-link:hover {
  color: var(--stone-900);
}

.muted-section {
  background: var(--stone-100);
}

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

.category-card,
.catalog-card {
  display: block;
  min-height: 160px;
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  padding: 24px;
  background: white;
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.catalog-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-5px);
  border-color: var(--bronze-400);
  box-shadow: var(--shadow-soft);
}

.category-card span,
.catalog-card h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--stone-900);
  font-size: 22px;
  font-weight: 900;
}

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

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

.category-movie-grid {
  margin-top: 26px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--stone-200);
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.poster-link,
.poster-shell {
  display: block;
}

.poster-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--stone-200), var(--bronze-100));
}

.movie-card.compact .poster-shell {
  aspect-ratio: 4 / 3;
}

.poster-shell img,
.rank-cover img,
.detail-poster img,
.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-shell img {
  transition: transform 0.5s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.72), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.region-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: white;
  background: var(--bronze-600);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: rgba(12, 10, 9, 0.78);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body h3 a:hover {
  color: var(--bronze-700);
}

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

.card-meta {
  align-items: center;
  justify-content: space-between;
  color: var(--stone-500);
  font-size: 12px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: var(--stone-950);
}

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

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(210, 186, 176, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(12, 10, 9, 1), rgba(28, 25, 23, 0.92));
}

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

.page-hero h1,
.page-hero p {
  color: white;
  max-width: 820px;
}

.page-hero p {
  color: var(--stone-300);
  font-size: 18px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  color: var(--stone-300);
  font-size: 14px;
}

.crumbs a:hover {
  color: var(--bronze-400);
}

.filter-bar {
  align-items: center;
  border: 1px solid var(--stone-200);
  border-radius: 24px;
  padding: 18px;
  background: white;
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.06);
}

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

.filter-actions button {
  min-height: 42px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--stone-700);
  background: white;
  cursor: pointer;
}

.filter-actions button:hover,
.filter-actions button.is-active {
  color: white;
  border-color: var(--bronze-600);
  background: var(--bronze-600);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  padding: 14px;
  background: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--stone-900);
  font-weight: 900;
}

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
  background: var(--stone-200);
}

.rank-info h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.rank-info h3 a:hover {
  color: var(--bronze-700);
}

.rank-info p {
  margin: 0 0 8px;
}

.rank-meta span {
  color: var(--stone-700);
  background: var(--bronze-50);
}

.ghost-link {
  color: white;
  background: var(--bronze-600);
}

.detail-hero {
  min-height: 520px;
  padding: 86px 0;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.26;
  filter: blur(6px) saturate(0.9);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.97), rgba(12, 10, 9, 0.72), rgba(12, 10, 9, 0.94));
}

.detail-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  aspect-ratio: 4 / 5;
  background: var(--stone-800);
  box-shadow: var(--shadow-deep);
}

.detail-info h1 {
  color: white;
  font-size: clamp(38px, 6vw, 74px);
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 780px;
  color: var(--stone-200);
  font-size: 19px;
}

.detail-tags {
  margin: 24px 0 30px;
}

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

.player-card,
.watch-aside,
.detail-article,
.detail-side {
  border: 1px solid var(--stone-200);
  border-radius: 24px;
  background: white;
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.07);
}

.player-card {
  overflow: hidden;
  background: var(--stone-950);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--stone-950);
}

.video-shell video {
  object-fit: contain;
  background: var(--stone-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.22), rgba(12, 10, 9, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  background: var(--bronze-600);
  box-shadow: 0 20px 44px rgba(12, 10, 9, 0.42);
}

.play-icon::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid white;
}

.watch-aside,
.detail-article,
.detail-side {
  padding: 24px;
}

.watch-aside h2,
.detail-article h2,
.detail-side h2 {
  font-size: 26px;
}

.aside-meta span {
  color: var(--stone-700);
  background: var(--bronze-50);
}

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

.detail-article p {
  margin: 0 0 28px;
  font-size: 17px;
  white-space: pre-line;
}

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

.detail-side dt {
  color: var(--stone-500);
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
}

.site-footer {
  color: var(--stone-300);
  background: var(--stone-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1fr 1fr;
  gap: 36px;
  padding: 56px 0 42px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--stone-400);
}

.site-footer a:hover {
  color: var(--bronze-400);
}

.footer-brand {
  margin-bottom: 14px;
  color: white;
  font-size: 22px;
}

.footer-bottom {
  border-top: 1px solid var(--stone-800);
  padding: 22px 16px;
  text-align: center;
  color: var(--stone-500);
}

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

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

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

  .player-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .brand-text em {
    display: none;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 22px;
    background: var(--stone-900);
    border-top: 1px solid var(--stone-800);
  }

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

  .site-nav a {
    padding: 12px 0;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    min-height: 760px;
  }

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

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
  }

  .search-panel,
  .filter-bar,
  .section-head,
  .detail-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .detail-head {
    display: grid;
  }

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

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .quick-search,
  .section-block {
    padding: 48px 0;
  }

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

  .card-body {
    padding: 13px;
  }

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

  .rank-row {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .rank-row .ghost-link {
    grid-column: 2 / 4;
    justify-self: start;
  }

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

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

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