:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #0b1120;
  --panel: rgba(31, 41, 55, 0.48);
  --panel-strong: rgba(17, 24, 39, 0.88);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --accent: #ffffff;
  --accent-text: #111827;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(75, 85, 99, 0.35), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(30, 41, 59, 0.45), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.is-menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 7, 18, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #111827;
  background: #f9fafb;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(249, 250, 251, 0.16);
}

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

.desktop-nav a,
.mobile-panel nav a {
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 12px;
  transition: color 0.25s ease, background 0.25s ease;
}

.desktop-nav a:hover,
.mobile-panel nav a:hover {
  color: var(--text);
  background: rgba(55, 65, 81, 0.58);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  padding: 6px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 7px 14px;
  color: var(--accent-text);
  background: var(--accent);
  border-radius: 999px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mobile-panel {
  padding: 0 16px 18px;
  background: rgba(3, 7, 18, 0.96);
  border-top: 1px solid var(--line);
}

.mobile-panel nav {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-layer,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #030712 0%, rgba(3, 7, 18, 0.86) 34%, rgba(3, 7, 18, 0.12) 100%),
    linear-gradient(to right, rgba(3, 7, 18, 0.84), rgba(3, 7, 18, 0.28), rgba(3, 7, 18, 0.14));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker::before,
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  font-weight: 300;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-lead {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.tag-row span,
.movie-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #d1d5db;
  background: rgba(31, 41, 55, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

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

.btn-primary,
.btn-ghost,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  color: var(--accent-text);
  background: var(--accent);
  font-weight: 600;
}

.btn-ghost {
  color: var(--text);
  background: rgba(31, 41, 55, 0.58);
  border: 1px solid var(--line);
}

.btn-primary:hover,
.btn-ghost:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 42px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(156, 163, 175, 0.6);
  border: 0;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: #ffffff;
}

.quick-categories {
  display: grid;
  grid-template-columns: 1.15fr repeat(5, 1fr);
  gap: 14px;
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.quick-card {
  min-height: 128px;
  padding: 18px;
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.quick-card:hover,
.movie-card:hover,
.ranking-row:hover,
.category-card:hover,
.compact-card:hover {
  transform: translateY(-4px);
}

.quick-card span {
  color: var(--muted);
  font-size: 13px;
}

.quick-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.35;
}

.quick-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
}

.main-quick {
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.16), rgba(31, 41, 55, 0.74));
}

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

.wide-section {
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.62), transparent);
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
}

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

.featured-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  background: rgba(55, 65, 81, 0.56);
  box-shadow: var(--shadow);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent);
}

.poster-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  color: #e5e7eb;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 8px;
}

.movie-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.movie-title:hover,
.ranking-title:hover,
.category-title:hover {
  color: #ffffff;
}

.movie-card p,
.ranking-copy p,
.category-card p,
.footer-grid p,
.prose-card p,
.info-card dd {
  color: var(--muted);
}

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  font-size: 12px;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.large-card .poster-link {
  aspect-ratio: 16 / 11;
}

.large-card .movie-title {
  font-size: 20px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 330px);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 22px;
  scroll-snap-type: x mandatory;
}

.scroll-card {
  scroll-snap-align: start;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 34px;
}

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

.ranking-panel,
.prose-card,
.info-card,
.filter-panel,
.category-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.ranking-panel {
  align-self: start;
  padding: 20px;
  position: sticky;
  top: 96px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head span {
  font-size: 20px;
  font-weight: 600;
}

.panel-head a,
.text-link {
  color: #e5e7eb;
}

.ranking-row {
  display: grid;
  grid-template-columns: 46px 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(17, 24, 39, 0.58);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.ranking-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #111827;
  background: #ffffff;
  border-radius: 999px;
  font-weight: 700;
}

.ranking-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
  border-radius: 12px;
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-title {
  display: inline-block;
  color: var(--text);
  font-weight: 600;
}

.ranking-copy p {
  margin: 4px 0 8px;
  font-size: 14px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(3, 7, 18, 0.98)),
    var(--bg-soft);
}

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

.compact-hero {
  border-bottom: 1px solid var(--line);
}

.category-hero {
  min-height: 320px;
}

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

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

.category-list {
  display: grid;
  gap: 22px;
}

.category-card {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.category-cover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 190px;
  overflow: hidden;
  border-radius: 18px;
}

.category-cover-grid img,
.compact-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

.category-title {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 500;
}

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

.compact-card {
  position: relative;
  min-height: 88px;
  overflow: hidden;
  border-radius: 14px;
  transition: transform 0.25s ease;
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.compact-card span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  color: #ffffff;
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  height: 44px;
  padding: 0 14px;
  background: rgba(3, 7, 18, 0.62);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.filter-panel option {
  color: #111827;
}

.empty-state {
  padding: 48px;
  color: var(--muted);
  text-align: center;
  background: rgba(17, 24, 39, 0.58);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

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

.detail-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: blur(2px);
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  min-height: 680px;
  padding: 112px 0 70px;
}

.detail-poster {
  overflow: hidden;
  background: #111827;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  max-width: 820px;
}

.player-section {
  padding: 72px 0 40px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.26), rgba(3, 7, 18, 0.78));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  color: #111827;
  background: #ffffff;
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 18px 60px rgba(255, 255, 255, 0.22);
}

.play-mask strong {
  font-size: 22px;
  letter-spacing: 0.08em;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  padding: 32px 0 40px;
}

.prose-card,
.info-card {
  padding: 26px;
}

.prose-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 500;
}

.prose-card p {
  margin: 0 0 26px;
  font-size: 17px;
}

.prose-card p:last-child {
  margin-bottom: 0;
}

.info-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-card div {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-card dt {
  color: #e5e7eb;
  font-size: 13px;
}

.info-card dd {
  margin: 0;
}

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

.site-footer {
  margin-top: 40px;
  padding: 48px 0 30px;
  background: rgba(3, 7, 18, 0.94);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-grid p {
  max-width: 620px;
  margin: 14px 0 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  color: #6b7280;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .desktop-nav a:nth-last-child(-n + 4) {
    display: none;
  }

  .quick-categories {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    min-height: 78vh;
  }

  .quick-categories,
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .related-grid,
  .two-column-layout,
  .detail-content,
  .detail-layout,
  .category-card,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .detail-layout {
    align-items: start;
    min-height: auto;
    padding-top: 100px;
  }

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

  .footer-grid {
    flex-direction: column;
  }
}

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

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

  .site-logo {
    font-size: 17px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero-content {
    bottom: 12%;
  }

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

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 24px;
  }

  .quick-categories {
    margin-top: -28px;
  }

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

  .section-heading {
    display: block;
  }

  .ranking-row {
    grid-template-columns: 40px 82px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

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

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

  .detail-layout {
    gap: 24px;
    padding-bottom: 44px;
  }

  .player-section {
    padding-top: 46px;
  }

  .play-icon {
    width: 62px;
    height: 62px;
    font-size: 24px;
  }

  .footer-links,
  .hero-actions,
  .center-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
