:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #fbbf24;
  --orange: #f97316;
  --red: #ef4444;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

img.image-hidden {
  opacity: 0;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 34px rgba(249, 115, 22, 0.32);
}

.brand-text,
.footer-brand {
  font-size: 1.4rem;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--soft);
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--amber);
}

.mobile-toggle {
  width: 44px;
  height: 44px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.6);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 4px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 10px;
  flex-direction: column;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s ease;
  display: flex;
  align-items: center;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #431407);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 48%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 4;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 112px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  color: var(--amber);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero-content h1,
.inner-hero h1,
.movie-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 880px;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--soft);
  font-size: clamp(1.06rem, 2vw, 1.35rem);
}

.hero-tags,
.tag-row,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.card-meta span {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.68);
}

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

.slim-actions {
  margin-top: 24px;
}

.btn,
.search-form button,
.filter-buttons button,
.section-link,
.arrow-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.btn.primary,
.search-form button {
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.26);
}

.btn.ghost,
.btn.text,
.section-link,
.filter-buttons button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

.btn.text {
  color: var(--amber);
}

.btn:hover,
.search-form button:hover,
.filter-buttons button:hover,
.section-link:hover,
.arrow-link:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.45);
}

.filter-buttons button.is-active {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

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

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.search-strip,
.section-shell,
.inner-hero,
.movie-hero-inner,
.site-footer {
  width: min(1200px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-strip {
  margin-top: -52px;
  position: relative;
  z-index: 12;
  padding: 22px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 20px;
  align-items: center;
}

.search-strip h2,
.section-heading h2,
.text-card h2,
.player-card h2,
.aside-card h2 {
  margin: 5px 0 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.search-form,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-form input,
.filter-bar input {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.66);
  padding: 0 18px;
}

.search-form input:focus,
.filter-bar input:focus {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

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

.section-heading p,
.inner-hero p,
.category-card p,
.movie-card p,
.ranking-copy p,
.detail-one-line,
.text-card p,
.footer-grid p {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.86));
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.ranking-item:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.32);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.cover-link,
.cover-box {
  display: block;
}

.cover-box {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #7c2d12);
}

.cover-box img,
.ranking-cover img,
.detail-poster img,
.category-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111827;
  font-style: normal;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 12px 0 9px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.card-body h3 a:hover,
.ranking-copy h2 a:hover,
.breadcrumb a:hover,
.aside-card a:hover {
  color: var(--amber);
}

.card-body p,
.ranking-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.2em;
}

.tag-row {
  margin-top: 14px;
}

.compact-card .card-body p {
  -webkit-line-clamp: 1;
  min-height: auto;
}

.categories-stack {
  padding-bottom: 24px;
}

.category-preview {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
}

.compact-heading {
  align-items: center;
}

.inner-hero {
  padding: 86px 0 28px;
}

.inner-hero h1 {
  margin: 10px 0 16px;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  letter-spacing: -0.055em;
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card-link {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 220px;
}

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  background: linear-gradient(135deg, #0f172a, #7c2d12);
}

.category-card-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-card-body h2 {
  margin: 8px 0 10px;
  font-size: 1.8rem;
}

.arrow-link {
  align-self: flex-start;
  margin-top: 18px;
  min-height: 38px;
  color: var(--amber);
}

.filter-area {
  padding-top: 40px;
}

.filter-bar {
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.wide-filter {
  align-items: stretch;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 64px 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ranking-index {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #7c2d12);
}

.ranking-copy h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.movie-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: end;
}

.movie-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f172a, #7c2d12);
}

.movie-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
  opacity: 0.38;
}

.movie-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 55%, rgba(2, 6, 23, 0.72) 100%);
}

.movie-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  padding: 86px 0 58px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #7c2d12);
  border: 1px solid rgba(251, 191, 36, 0.22);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-one-line {
  max-width: 820px;
  font-size: 1.18rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.detail-main,
.detail-aside {
  display: grid;
  gap: 24px;
}

.player-card,
.text-card,
.aside-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.movie-player {
  margin-top: 18px;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
}

.play-overlay span {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #111827;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 42px rgba(249, 115, 22, 0.34);
}

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

.text-card p {
  margin: 14px 0 0;
  font-size: 1.03rem;
}

.aside-card dl {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
}

.aside-card dt {
  color: var(--muted);
}

.aside-card dd {
  margin: 0;
  color: var(--text);
}

.nav-card a {
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.78);
}

.site-footer {
  margin-top: 88px;
  padding: 44px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}

.footer-grid a:hover {
  color: var(--amber);
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

[data-card].is-filtered {
  display: none;
}

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

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

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

  .hero-content {
    padding: 86px 0 104px;
  }

  .search-strip,
  .section-heading,
  .filter-bar,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .search-strip {
    display: grid;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .four-grid,
  .category-grid,
  .footer-grid,
  .detail-aside {
    grid-template-columns: 1fr 1fr;
  }

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

  .category-mosaic {
    min-height: 170px;
  }

  .movie-hero-inner {
    grid-template-columns: 150px 1fr;
    gap: 18px;
  }

  .ranking-item {
    grid-template-columns: 48px 92px 1fr;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .search-strip,
  .section-shell,
  .inner-hero,
  .movie-hero-inner,
  .site-footer {
    width: min(100% - 22px, 1200px);
  }

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

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-content h1,
  .inner-hero h1,
  .movie-hero h1 {
    letter-spacing: -0.035em;
  }

  .hero-actions,
  .filter-buttons {
    align-items: stretch;
  }

  .btn,
  .section-link,
  .filter-buttons button {
    width: 100%;
  }

  .movie-grid,
  .four-grid,
  .category-grid,
  .footer-grid,
  .detail-aside {
    grid-template-columns: 1fr;
  }

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

  .movie-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 84px;
  }

  .detail-poster {
    width: min(68vw, 230px);
  }

  .ranking-item {
    grid-template-columns: 42px 78px 1fr;
    gap: 12px;
  }

  .ranking-index {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }
}
