:root {
  --page-bg: #050816;
  --card-bg: rgba(15, 23, 42, 0.82);
  --card-bg-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #a7b1c2;
  --soft: #dbeafe;
  --accent: #f59e0b;
  --accent-2: #ef4444;
  --accent-3: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(56, 189, 248, 0.18), transparent 34rem),
    radial-gradient(circle at 86% 8%, rgba(245, 158, 11, 0.16), transparent 32rem),
    linear-gradient(180deg, #07111f 0%, #050816 42%, #070a14 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem clamp(1rem, 3vw, 3rem);
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.95rem;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #fb7185 55%, #38bdf8);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 1.12rem;
}

.site-nav,
.nav-categories,
.footer-links,
.inline-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.site-nav {
  justify-content: center;
}

.nav-link,
.nav-categories a,
.footer-links a,
.inline-links a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  color: var(--muted);
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-categories a:hover,
.footer-links a:hover,
.inline-links a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: clamp(5rem, 9vw, 9rem) clamp(1rem, 6vw, 6rem) clamp(5rem, 7vw, 7rem);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s ease;
}

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

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  z-index: -3;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 8, 22, 0.96) 0%, rgba(5, 8, 22, 0.76) 38%, rgba(5, 8, 22, 0.22) 100%),
    linear-gradient(0deg, rgba(5, 8, 22, 0.92) 0%, transparent 52%);
}

.hero-content {
  max-width: 46rem;
  animation: riseIn 0.9s ease both;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-line {
  max-width: 44rem;
  margin: 1.2rem 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags {
  margin-top: 1.4rem;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.38rem 0.68rem;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 999px;
  padding: 0.72rem 1.25rem;
  font-weight: 850;
  transition: 0.25s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f97316 56%, #fb7185);
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.33);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.42);
}

.ghost-btn,
.text-link {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover,
.text-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  color: var(--text);
  font-size: 2.2rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.82);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: clamp(1rem, 6vw, 6rem);
  bottom: 2rem;
  z-index: 5;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 2.2rem;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 3.6rem;
  background: linear-gradient(90deg, #f59e0b, #fb7185);
}

.section-block,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.section-block {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-head h2,
.detail-content h2,
.player-section h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head a {
  color: var(--accent);
  font-weight: 800;
}

.category-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.category-chip,
.category-card,
.movie-card,
.ranking-card,
.rank-row,
.detail-hero,
.player-shell,
.detail-content,
.filter-panel,
.page-hero {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.category-chip {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
  gap: 1rem;
  border-radius: var(--radius);
  padding: 0.75rem;
  min-height: 7rem;
  transition: 0.25s ease;
}

.category-chip:hover,
.movie-card:hover,
.category-card:hover,
.ranking-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-chip img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1rem;
}

.category-chip strong,
.category-chip em {
  display: block;
}

.category-chip strong {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.category-chip em,
.movie-card p,
.card-meta,
.ranking-body p,
.category-card p,
.detail-content p,
.copyright {
  color: var(--muted);
  font-style: normal;
  line-height: 1.75;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: 0.25s ease;
}

.poster-link,
.ranking-poster,
.category-cover,
.detail-cover {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: 0.45s ease;
}

.movie-card:hover img,
.ranking-card:hover img,
.category-card:hover img {
  transform: scale(1.05);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(5, 8, 22, 0.88), transparent);
}

.movie-card-body {
  padding: 0.9rem;
}

.movie-card h3,
.ranking-body h2,
.category-card h2 {
  margin: 0.35rem 0;
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.35;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.tag-row {
  margin-top: 0.65rem;
}

.tag-row span {
  color: #dbeafe;
  font-size: 0.75rem;
  background: rgba(59, 130, 246, 0.15);
}

.ranking-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 3rem 4.6rem 1fr;
  align-items: center;
  gap: 0.8rem;
  border-radius: 1.2rem;
  padding: 0.7rem;
  transition: 0.25s ease;
}

.rank-row:hover {
  transform: translateX(6px);
  border-color: rgba(56, 189, 248, 0.34);
}

.rank-index {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 950;
}

.rank-row img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.9rem;
}

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

.rank-info em {
  margin-top: 0.25rem;
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.page-main,
.detail-main {
  padding: 2rem 0 4rem;
}

.page-hero {
  overflow: hidden;
  position: relative;
  margin-bottom: 1.4rem;
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2rem, 6vw, 4rem);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -30% auto auto 55%;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 68%);
}

.category-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.category-card {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  border-radius: var(--radius);
  padding: 0.8rem;
  transition: 0.25s ease;
}

.category-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 1.1rem;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.category-samples a {
  color: #bfdbfe;
  font-size: 0.86rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.2rem;
}

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

.page-search,
.genre-filter,
.category-filter {
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 1rem;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  outline: none;
}

.page-search:focus,
.genre-filter:focus,
.category-filter:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.page-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.ranking-card {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.25s ease;
}

.ranking-poster img {
  height: 100%;
  min-height: 12rem;
  object-fit: cover;
}

.rank-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #fb923c);
}

.ranking-body {
  padding: 1rem 1rem 1rem 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(1rem, 3vw, 2rem);
}

.detail-cover img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: var(--radius);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-meta {
  margin: 1.2rem 0 0.7rem;
}

.detail-tags {
  margin-bottom: 1.4rem;
}

.player-section,
.detail-content {
  margin-top: 1.5rem;
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 0.9rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  background: #020617;
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #111827;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.68));
  transition: 0.25s ease;
}

.video-overlay span {
  display: grid;
  place-items: center;
  width: clamp(4rem, 9vw, 6rem);
  height: clamp(4rem, 9vw, 6rem);
  border-radius: 50%;
  padding-left: 0.25rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  background: linear-gradient(135deg, #fde68a, #f97316 60%, #fb7185);
  box-shadow: 0 20px 70px rgba(249, 115, 22, 0.42);
}

.video-overlay:hover {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(2, 6, 23, 0.76));
}

.video-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-content h2:not(:first-child) {
  margin-top: 1.5rem;
}

.related-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 22, 0.75);
}

.footer-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.footer-inner p {
  max-width: 48rem;
}

.is-filtered-out {
  display: none !important;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    justify-self: end;
  }

  .site-nav,
  .nav-categories {
    display: none;
    grid-column: 1 / -1;
    justify-content: start;
  }

  .site-header.nav-open .site-nav,
  .site-header.nav-open .nav-categories {
    display: flex;
  }

  .hero-arrow {
    display: none;
  }

  .ranking-panel,
  .detail-hero,
  .filter-panel,
  .wide-filter {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 19rem;
  }
}

@media (max-width: 640px) {
  .hero-slider {
    min-height: 78vh;
  }

  .hero-slide {
    align-items: end;
    padding: 5rem 1rem 5rem;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(5, 8, 22, 0.96) 0%, rgba(5, 8, 22, 0.82) 44%, rgba(5, 8, 22, 0.24) 100%);
  }

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

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

  .category-card,
  .ranking-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-row img {
    width: 6rem;
  }

  .ranking-body {
    padding: 1rem;
  }
}
