:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e5edf7;
  --muted: #94a3b8;
  --emerald: #34d399;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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 top left, rgba(16, 185, 129, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.13), transparent 30rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

a {
  color: inherit;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(22px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.26);
}

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

.nav-link,
.mobile-nav-link {
  text-decoration: none;
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--emerald);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-strong);
}

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

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

.hero-shell {
  position: relative;
  padding: 34px 0 48px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  border: 1px solid var(--border);
  border-radius: 34px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  align-items: center;
  gap: 44px;
  padding: 78px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.25)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.92));
}

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

.eyebrow,
.section-heading span,
.ranking-title span,
.category-overview-card span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
}

.hero-content h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

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

.hero-tags {
  margin: 24px 0 32px;
}

.hero-tags span,
.movie-tags span,
.detail-tags a,
.detail-meta span {
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  color: #bbf7d0;
  background: rgba(6, 78, 59, 0.28);
  text-decoration: none;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.22);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.6);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 38px;
  height: 5px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

.hero-search-panel {
  width: min(980px, calc(100% - 36px));
  margin: -40px auto 0;
  position: relative;
  z-index: 5;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.hero-search input,
.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.7);
}

.hero-search button {
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  color: #022c22;
  font-weight: 900;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  cursor: pointer;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.quick-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 800;
}

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

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

.section-heading h2,
.ranking-title h2,
.category-overview-card h2 {
  margin: 5px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading a,
.ranking-more {
  color: var(--emerald);
  text-decoration: none;
  font-weight: 900;
}

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

.movie-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.9));
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #022c22;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  min-height: 3em;
  margin: 10px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

.movie-card h3 a {
  text-decoration: none;
}

.movie-card p {
  min-height: 4.8em;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

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

.category-card,
.category-overview-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 18px;
  text-decoration: none;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(6, 78, 59, 0.22));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.36);
}

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

.category-card p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-thumb-row,
.category-overview-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.category-thumb-row img,
.category-overview-visual img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.ranking-item {
  display: grid;
  grid-template-columns: 34px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-decoration: none;
}

.ranking-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.ranking-number {
  color: var(--amber);
  font-weight: 900;
}

.ranking-copy strong {
  display: block;
  line-height: 1.4;
}

.ranking-copy em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.ranking-more {
  display: inline-flex;
  margin-top: 16px;
}

.page-hero,
.detail-hero {
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(6, 78, 59, 0.28), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 22rem);
  box-shadow: var(--shadow);
}

.slim-hero {
  min-height: 260px;
  display: grid;
  align-items: center;
}

.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.category-hero,
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 30px;
  align-items: center;
}

.page-hero-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  transform: rotate(1deg);
}

.page-hero-posters img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-bottom: 24px;
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  background: var(--panel);
}

.ranking-list-block {
  padding: 36px 0;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 12px 22px;
  background: rgba(15, 23, 42, 0.72);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  color: var(--muted);
}

.breadcrumb a {
  color: #cbd5e1;
  text-decoration: none;
}

.detail-hero {
  grid-template-columns: 300px minmax(0, 1fr);
}

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

.detail-one-line {
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

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

.player-section {
  padding: 34px 0 18px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: var(--text);
  background: linear-gradient(rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.28);
}

.article-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.detail-text-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

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

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 12px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 800;
}

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px;
  }

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

  .category-grid,
  .category-overview-grid,
  .ranking-list,
  .detail-text-block,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero {
    padding: 28px;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main,
  .header-inner,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1240px);
  }

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

  .hero-slider {
    min-height: 680px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .feature-main .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card p {
    min-height: auto;
  }

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

  .hero-dots {
    bottom: 104px;
  }
}
