:root {
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-solid: #111827;
  --panel-soft: rgba(31, 41, 55, 0.72);
  --text: #f9fafb;
  --muted: #9ca3af;
  --muted-light: #d1d5db;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ffffff;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 255, 255, 0.08), transparent 26rem),
    radial-gradient(circle at 85% 10%, rgba(156, 163, 175, 0.11), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
}

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

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

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #9ca3af);
  color: #030712;
  font-size: 13px;
  box-shadow: 0 18px 45px rgba(255, 255, 255, 0.14);
}

.site-nav,
.header-categories,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav {
  margin-left: auto;
}

.nav-link,
.header-categories a,
.mobile-nav a,
.footer-links a {
  color: var(--muted-light);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.header-categories a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #ffffff;
}

.header-categories {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255,255,255,0.08);
}

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

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-slider {
  position: relative;
  min-height: 78vh;
  margin: 0 calc(50% - 50vw) 64px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 380px);
  align-items: center;
  gap: 48px;
  padding: 112px max(32px, calc((100vw - 1280px) / 2 + 24px)) 64px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

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

.eyebrow {
  margin: 0 0 12px;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted-light);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  color: #f3f4f6;
  background: rgba(255,255,255,0.08);
  font-size: 12px;
}

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

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

.primary-button {
  background: #ffffff;
  color: #030712;
  box-shadow: 0 16px 42px rgba(255,255,255,0.18);
}

.ghost-button {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

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

.hero-poster {
  display: block;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: max(32px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 34px;
  z-index: 2;
  display: flex;
  gap: 9px;
}

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

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

.page-hero {
  margin: 42px 0 34px;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(31,41,55,0.9), rgba(3,7,18,0.78));
  box-shadow: var(--shadow);
}

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

.section-block {
  margin: 64px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.section-heading > a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0,0,0,0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 28px 80px rgba(0,0,0,0.34);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.card-poster img {
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  transition: transform 0.42s ease, opacity 0.32s ease;
}

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

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #030712;
  font-size: 15px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.28);
}

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

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

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 800;
}

.card-body p {
  margin: 0;
  color: var(--muted-light);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  margin-top: auto;
}

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

.category-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(140deg, rgba(255,255,255,0.11), rgba(31,41,55,0.76));
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 14px 0 24px;
  color: var(--muted-light);
  line-height: 1.7;
}

.category-card span {
  color: #ffffff;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin: 24px 0 28px;
}

.search-box,
.select-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.07);
}

.search-box span,
.select-box span {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.select-box select option {
  color: #111827;
}

.no-results {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted-light);
  background: rgba(255,255,255,0.06);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17,24,39,0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(255,255,255,0.18);
}

.rank-number {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  font-size: 17px;
  line-height: 1.35;
}

.rank-copy em {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin: 34px 0 64px;
}

.detail-title {
  margin: 42px 0 26px;
}

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

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

.breadcrumb a:hover {
  color: #ffffff;
}

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

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #030712;
  background: linear-gradient(135deg, rgba(3,7,18,0.18), rgba(0,0,0,0.68));
  transition: opacity 0.22s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  font-size: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(17,24,39,0.76);
  box-shadow: var(--shadow);
}

.detail-panel {
  margin-top: 24px;
  padding: 28px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 900;
}

.detail-panel p {
  margin: 0 0 20px;
  color: var(--muted-light);
  font-size: 16px;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

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

.side-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  transition: background 0.2s ease;
}

.side-card:hover {
  background: rgba(255,255,255,0.1);
}

.side-card img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.side-card strong,
.side-card span {
  display: block;
}

.side-card strong {
  line-height: 1.35;
}

.side-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 30px;
}

.footer-inner p {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .header-categories {
    display: none;
  }

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

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

  .side-panel {
    position: static;
  }
}

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

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

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

  .hero-slider {
    min-height: 88vh;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 96px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    transform: none;
  }

  .filter-panel,
  .footer-inner,
  .rank-layout {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .header-inner {
    height: 64px;
  }

  .site-logo span:last-child {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .hero-summary,
  .page-hero p,
  .detail-title p {
    font-size: 15px;
  }

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

  .rank-item {
    grid-template-columns: 44px 68px minmax(0, 1fr);
    gap: 12px;
  }

  .detail-panel {
    padding: 22px;
  }
}
