:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.76);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --brand: #f59e0b;
  --brand-strong: #d97706;
  --brand-soft: rgba(245, 158, 11, 0.16);
  --danger: #ef4444;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.14), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  max-width: var(--max);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.34);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(245, 158, 11, 0.14);
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 52%, rgba(2, 6, 23, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  min-height: 72vh;
  margin: 0 auto;
  padding: 88px 22px 78px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 38px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 20px;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5.45rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.36);
}

.btn-primary {
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.48);
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #111827;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.96);
}

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

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.hero-dot.is-active {
  background: var(--brand);
}

.section,
.page-hero,
.detail-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 22px;
}

.page-hero {
  padding-top: 64px;
  padding-bottom: 36px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title i {
  width: 12px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbbf24, #f97316);
}

.section h2,
.page-hero h2,
.detail-wrap h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.15;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--subtle);
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.movie-card-large .card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-cover-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #fcd34d;
  font-size: 0.83rem;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-desc {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.card-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.66);
  font-size: 0.82rem;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
}

.movie-card-horizontal .card-cover {
  aspect-ratio: 4 / 3;
  height: 100%;
}

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

.category-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.17), transparent 45%),
    rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.category-card strong {
  display: inline-flex;
  margin-top: 18px;
  color: #fcd34d;
}

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

.mini-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.76);
}

.mini-link img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  object-fit: cover;
}

.mini-link strong,
.mini-link em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-link em {
  color: var(--subtle);
  font-style: normal;
  font-size: 0.88rem;
}

.mini-rank {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #111827;
  font-weight: 900;
  background: var(--brand);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 820px;
  margin-top: 28px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-row a,
.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.66);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.08);
  opacity: 0.45;
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 100%);
}

.detail-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 22px 54px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

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

.breadcrumb a {
  color: #fcd34d;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
}

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

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

.player-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), rgba(2, 6, 23, 0.76));
}

.play-button {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.38);
}

.play-button svg {
  width: 34px;
  height: 34px;
  margin-left: 5px;
  fill: currentColor;
}

.content-panel {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
}

.content-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner p {
  margin: 8px 0 0;
}

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

.footer-links a {
  color: #fcd34d;
}

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

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

  .hero-panel {
    max-width: 560px;
  }
}

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

  .nav-links {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-content {
    min-height: 82vh;
  }

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

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

  .movie-card-horizontal {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 280px;
  }

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

@media (max-width: 520px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero-content,
  .section,
  .page-hero,
  .detail-wrap,
  .detail-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .movie-grid.three,
  .movie-grid.compact,
  .category-grid,
  .mini-list {
    grid-template-columns: 1fr;
  }
}
