:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(31, 41, 55, 0.54);
  --panel-strong: rgba(17, 24, 39, 0.92);
  --line: rgba(75, 85, 99, 0.52);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --accent: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(75, 85, 99, 0.34), transparent 32rem),
    radial-gradient(circle at 86% 18%, rgba(31, 41, 55, 0.42), transparent 30rem),
    linear-gradient(180deg, #030712 0%, #111827 52%, #030712 100%);
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #111827, #374151);
}

img.image-off {
  opacity: 0;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.88);
  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: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #030712;
  background: linear-gradient(135deg, #ffffff, #9ca3af);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link,
.filter-buttons button,
.filter-buttons a {
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  transition: 0.25s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active,
.filter-buttons button:hover,
.filter-buttons button.active,
.filter-buttons a:hover {
  color: var(--text);
  border-color: rgba(156, 163, 175, 0.22);
  background: rgba(31, 41, 55, 0.72);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(31, 41, 55, 0.72);
}

.mobile-nav {
  display: none;
  gap: 8px;
  padding: 0 16px 16px;
  overflow-x: auto;
}

.mobile-link {
  flex: 0 0 auto;
  padding: 10px 14px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(75, 85, 99, 0.32);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(0.9) contrast(1.08);
}

.hero-bg::after,
.hero-bg::before {
  position: absolute;
  inset: 0;
  content: "";
}

.hero-bg::after {
  background:
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.82) 42%, rgba(3, 7, 18, 0.2) 100%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.62) 45%, rgba(3, 7, 18, 0.18) 100%);
}

.hero-bg::before {
  background: radial-gradient(circle at 74% 42%, rgba(255, 255, 255, 0.12), transparent 22rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 78vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: 48px;
  padding: 104px 0 92px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 86px);
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 780px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-cloud,
.card-meta,
.detail-meta,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-cloud a,
.detail-meta span,
.card-meta span,
.card-meta a {
  border: 1px solid rgba(156, 163, 175, 0.18);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(31, 41, 55, 0.62);
  backdrop-filter: blur(10px);
}

.hero-tags span,
.tag-cloud a,
.detail-meta span {
  padding: 7px 12px;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  transition: 0.25s ease;
}

.primary-button {
  color: #030712;
  background: #f9fafb;
  box-shadow: 0 18px 48px rgba(255, 255, 255, 0.14);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: #d1d5db;
}

.primary-button.small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
}

.ghost-button,
.section-more {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(17, 24, 39, 0.58);
}

.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  background: rgba(55, 65, 81, 0.8);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  width: min(360px, 100%);
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(31, 41, 55, 0.68);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #6b7280;
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.active {
  width: 42px;
  background: #f9fafb;
}

.content-section,
.page-main {
  padding: 70px 0;
}

.page-main {
  min-height: 70vh;
}

.soft-band {
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.64), transparent);
}

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

.section-heading h2,
.site-footer h2,
.player-section h2,
.story-section h2,
.category-panel h2 {
  margin: 0;
  color: var(--text);
  font-weight: 300;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.feature-grid,
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

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

.rail {
  display: grid;
  grid-auto-columns: minmax(260px, 320px);
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x proximity;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(156, 163, 175, 0.14);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
  transition: 0.28s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(209, 213, 219, 0.28);
  background: rgba(55, 65, 81, 0.62);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #111827, #374151);
}

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

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

.card-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 62%);
  content: "";
}

.card-year,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.card-year {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  font-size: 12px;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  font-size: 13px;
}

.card-body {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-meta {
  margin-top: auto;
  font-size: 12px;
}

.card-meta span,
.card-meta a {
  padding: 4px 8px;
}

.wide-card {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.wide-card .card-media {
  height: 100%;
  aspect-ratio: auto;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(156, 163, 175, 0.14);
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.42);
}

.ranking-row > span,
.rank-tile > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: #030712;
  background: #f9fafb;
}

.compact-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 16px;
}

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

.compact-card strong,
.compact-card small {
  display: block;
}

.compact-card strong {
  color: var(--text);
  font-weight: 500;
}

.compact-card small {
  margin-top: 6px;
  color: var(--muted);
}

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

.category-tile,
.category-panel {
  border: 1px solid rgba(156, 163, 175, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.86), rgba(17, 24, 39, 0.68));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

.category-tile {
  display: block;
  min-height: 170px;
  padding: 24px;
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.26);
}

.category-tile span {
  display: block;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 24px;
  font-weight: 300;
}

.category-tile strong {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
}

.filter-panel {
  position: sticky;
  top: 76px;
  z-index: 20;
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(156, 163, 175, 0.14);
  border-radius: 20px;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(18px);
}

.filter-panel input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  padding: 0 16px;
  color: var(--text);
  background: rgba(17, 24, 39, 0.88);
}

.filter-buttons button,
.filter-buttons a {
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
}

.page-hero {
  margin-bottom: 34px;
  padding: 52px;
  border: 1px solid rgba(156, 163, 175, 0.14);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(31, 41, 55, 0.86), rgba(17, 24, 39, 0.68)),
    radial-gradient(circle at 76% 30%, rgba(255, 255, 255, 0.1), transparent 20rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
}

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

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

.category-panels {
  display: grid;
  gap: 24px;
}

.category-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  padding: 26px;
}

.category-panel p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.rank-tile {
  position: relative;
}

.rank-tile > span {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
}

.detail-main {
  padding-top: 34px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 34px;
  align-items: end;
  margin-bottom: 42px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(31, 41, 55, 0.6);
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.detail-meta {
  margin: 22px 0;
}

.player-section,
.story-section article {
  border: 1px solid rgba(156, 163, 175, 0.14);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
}

.player-section {
  padding: 24px;
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 0;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.16), transparent 12rem),
    rgba(0, 0, 0, 0.58);
  cursor: pointer;
  transition: 0.25s ease;
}

.player-cover:hover {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.22), transparent 14rem),
    rgba(0, 0, 0, 0.46);
}

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

.play-circle {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #030712;
  background: #f9fafb;
  box-shadow: 0 0 48px rgba(255, 255, 255, 0.28);
}

.player-cover strong {
  max-width: min(680px, 90%);
  text-align: center;
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 300;
}

.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.story-section article {
  padding: 28px;
}

.story-section h2 {
  margin-bottom: 16px;
  font-size: 26px;
}

.story-section p {
  color: var(--soft);
  line-height: 1.9;
}

.related-section {
  padding-bottom: 0;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.site-footer p,
.footer-links a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(75, 85, 99, 0.38);
  color: #6b7280;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

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

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

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

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

  .mobile-nav.open {
    display: flex;
  }

  .hero,
  .hero-content {
    min-height: 86vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 92px;
  }

  .hero-poster {
    display: none;
  }

  .feature-grid,
  .latest-grid,
  .category-panel,
  .rank-grid,
  .story-section,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .wide-card .card-media {
    aspect-ratio: 16 / 10;
  }

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

  .page-hero {
    padding: 32px;
  }

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

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

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

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

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

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

  .card-body {
    min-height: auto;
  }

  .filter-panel {
    top: 66px;
  }

  .compact-card {
    grid-template-columns: 84px 1fr;
  }

  .compact-card img {
    width: 84px;
    height: 64px;
  }

  .story-section article,
  .player-section {
    padding: 18px;
  }
}
