:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(255, 255, 255, 0.1);
  --muted: #94a3b8;
  --text: #f8fafc;
  --subtext: #cbd5e1;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --blue: #2563eb;
  --green: #22c55e;
  --rose: #fb7185;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.6rem;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  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(37, 99, 235, 0.24), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(245, 158, 11, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  min-height: 100vh;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.site-nav {
  width: min(1280px, 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.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber), #fb923c);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.52);
}

.brand-text,
.footer-brand {
  font-size: 1.28rem;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #dbeafe;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: saturate(1.06) contrast(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, #020617 0%, transparent 34%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 48px;
  padding: 80px 0 90px;
}

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

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: var(--amber-soft);
  color: #fde68a;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.9;
}

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

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

.hero-meta span,
.tag-row span,
.meta-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.84rem;
}

.hero-actions,
.section-actions,
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber), #f97316);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.3);
}

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

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}

.btn-ghost {
  color: #fde68a;
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 1.15rem;
}

.hero-panel h2 {
  margin: 16px 0 8px;
  font-size: 1.45rem;
}

.hero-panel p {
  margin: 0;
  color: var(--subtext);
  line-height: 1.7;
}

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

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, #fde68a, var(--amber));
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent 24rem),
    linear-gradient(180deg, rgba(30, 58, 138, 0.42), transparent);
}

.page-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1,
.section-heading h1,
.section-heading h2 {
  margin: 14px 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p,
.section-heading p {
  max-width: 780px;
  color: var(--subtext);
  font-size: 1.08rem;
  line-height: 1.85;
}

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

.section-heading h2 {
  font-size: clamp(1.85rem, 3vw, 3rem);
}

.quick-search,
.filter-panel {
  padding: 22px;
  margin: 26px 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-input,
.select-input {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  outline: none;
}

.search-input {
  flex: 1 1 280px;
  padding: 0 16px;
}

.select-input {
  flex: 0 0 160px;
  padding: 0 12px;
}

.search-input:focus,
.select-input:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.category-grid,
.movie-grid,
.ranking-grid,
.feature-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.category-card,
.feature-card,
.content-panel {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.76));
  box-shadow: var(--shadow);
}

.category-card::after,
.feature-card::after,
.content-panel::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -70px;
  top: -70px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  filter: blur(6px);
}

.category-card h2,
.feature-card h2,
.content-panel h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.category-card p,
.feature-card p,
.content-panel p,
.content-panel li {
  position: relative;
  z-index: 1;
  color: var(--subtext);
  line-height: 1.8;
}

.category-card:hover,
.movie-card:hover,
.compact-card:hover,
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.movie-card,
.compact-card,
.category-card,
.feature-card {
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.poster-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: rgba(15, 23, 42, 0.94);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

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

.poster-frame figcaption,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.poster-frame figcaption {
  left: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber));
}

.rank-badge {
  right: 12px;
  color: #fff;
  background: rgba(225, 29, 72, 0.86);
}

.card-body {
  padding: 16px;
}

.meta-line {
  color: var(--muted);
  font-size: 0.86rem;
  justify-content: space-between;
}

.card-body h2 {
  margin: 10px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.4em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--subtext);
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.compact-card img {
  width: 76px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

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

.compact-card strong {
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card span:not(.compact-rank) {
  color: var(--muted);
  font-size: 0.92rem;
}

.compact-rank {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, var(--amber));
}

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

.breadcrumbs a {
  color: #fde68a;
}

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

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

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 3;
}

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

.player-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber), #f97316);
  box-shadow: 0 0 42px rgba(245, 158, 11, 0.54);
  font-size: 2rem;
  cursor: pointer;
}

.detail-copy {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: rgba(15, 23, 42, 0.72);
}

.detail-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-copy p {
  color: var(--subtext);
  line-height: 1.9;
}

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

.info-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
}

.info-list span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.info-list strong {
  font-size: 1rem;
}

.side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.side-panel .content-panel {
  padding: 20px;
}

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

.no-results {
  display: none;
  padding: 26px;
  text-align: center;
  color: var(--subtext);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
}

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

.pagination-note {
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 30px;
}

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

.footer-grid a {
  display: block;
  margin-top: 8px;
}

.footer-grid a:hover {
  color: #fde68a;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #fde68a;
  font-size: 1.06rem;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: #64748b;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .nav-menu {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 54px;
  }

  .hero-panel {
    display: none;
  }

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

  .section-heading {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-nav,
  .main-section,
  .page-section,
  .page-hero-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .hero-slider,
  .hero-inner {
    min-height: 580px;
  }

  .movie-grid,
  .category-grid,
  .ranking-grid,
  .feature-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

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

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 1.5rem;
  }
}
