:root {
  --page: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.74);
  --panel-lift: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-strong: #f97316;
  --sky: #0ea5e9;
  --sky-strong: #0284c7;
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 36rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 34rem),
    var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.3);
}

.brand-text {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  width: 100%;
}

.nav-link {
  color: var(--soft);
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
  padding: 12px 16px 18px;
}

.mobile-nav .nav-link {
  display: block;
  padding: 11px 4px;
}

.hero-carousel {
  position: relative;
  height: min(76vh, 760px);
  min-height: 540px;
  overflow: hidden;
  background: var(--panel);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, var(--page), transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding: 120px 0 90px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.hero-badges,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-badges span,
.detail-badges span,
.detail-badges a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #fff;
  background: rgba(14, 165, 233, 0.8);
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-badges span:nth-child(2),
.detail-badges span:nth-child(2) {
  background: rgba(51, 65, 85, 0.8);
}

.hero-badges span:nth-child(3),
.detail-badges span:nth-child(3) {
  background: rgba(245, 158, 11, 0.86);
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  font-weight: 950;
  text-shadow: 0 18px 52px rgba(0, 0, 0, 0.6);
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 30px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--sky-strong));
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.28);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(226, 232, 240, 0.2);
  backdrop-filter: blur(14px);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 38px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: var(--sky);
}

.quick-search-section {
  padding: 28px 0 0;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-search label,
.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.56);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(14, 165, 233, 0.62);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.content-section {
  padding: 66px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.42);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #7dd3fc;
  font-weight: 800;
  white-space: nowrap;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 22px;
}

.featured-side,
.related-list {
  display: grid;
  gap: 16px;
}

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

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

.movie-card,
.horizontal-card,
.info-card,
.related-card,
.filter-panel {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(30, 41, 59, 0.86);
}

.movie-card-large .poster-box {
  aspect-ratio: 16 / 9;
}

.poster-box {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-box img,
.horizontal-poster img,
.category-card img,
.info-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-box img,
.horizontal-card:hover .horizontal-poster img,
.category-card:hover img {
  transform: scale(1.06);
}

.quality-badge,
.rank-number,
.poster-category,
.mini-rank {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
}

.quality-badge {
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.rank-number {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.34);
}

.poster-category {
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.82);
  backdrop-filter: blur(10px);
}

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

.movie-card h3,
.horizontal-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.horizontal-card:hover h3 {
  color: #fbbf24;
}

.movie-card p,
.horizontal-card p {
  display: -webkit-box;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.movie-meta-row span {
  padding: 2px 8px;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.horizontal-card {
  overflow: hidden;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.horizontal-card:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(125, 211, 252, 0.26);
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.horizontal-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 15px;
  background: #0f172a;
}

.mini-rank {
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
}

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

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

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

.category-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.48;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.08));
}

.category-glow {
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 80%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 66%);
  z-index: 1;
}

.category-card strong,
.category-card small {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.category-card small {
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
}

.category-card-wide {
  min-height: 260px;
}

.page-hero {
  padding: 82px 0 58px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.18), transparent 36rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
}

.page-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 16px;
}

.filter-empty {
  display: none;
  margin: 18px 0 0;
  color: var(--muted);
}

.filter-panel.is-empty .filter-empty {
  display: block;
}

.detail-shell {
  padding: 32px 0 72px;
}

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

.detail-main,
.detail-aside {
  min-width: 0;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 26px;
  background: #000;
  box-shadow: 0 35px 90px rgba(2, 6, 23, 0.52);
}

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

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

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

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

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent, rgba(2, 6, 23, 0.52));
}

.player-trigger {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--sky-strong));
  border: 0;
  border-radius: 50%;
  box-shadow: 0 22px 52px rgba(14, 165, 233, 0.38);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.player-trigger:hover {
  transform: scale(1.06);
}

.player-trigger span {
  margin-left: 5px;
  font-size: 34px;
}

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

.detail-title {
  padding: 28px 0 8px;
}

.detail-title h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.detail-title p {
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

.detail-block,
.info-card,
.related-card {
  margin-top: 20px;
  padding: 24px;
}

.detail-block h2,
.related-card h2,
.info-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
}

.detail-block p {
  margin: 0;
  color: var(--soft);
  font-size: 16px;
  white-space: pre-line;
}

.detail-aside {
  position: sticky;
  top: 92px;
}

.info-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #0f172a;
}

.info-card dl {
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.info-card dl div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

.info-card dd {
  margin: 0;
  color: var(--text);
  text-align: right;
}

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

.tag-cloud span {
  padding: 5px 10px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 999px;
  font-size: 13px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 30px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-brand p {
  max-width: 480px;
  color: var(--muted);
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-link-grid {
  display: grid;
  gap: 8px;
}

.footer-link-grid a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-bottom {
  padding: 18px 16px 28px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

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

  .featured-layout,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 620px;
  }

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

  .hero-actions,
  .quick-search,
  .filter-row,
  .section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-dots {
    right: 22px;
    bottom: 24px;
  }

  .content-section {
    padding: 46px 0;
  }

  .movie-grid,
  .small-grid,
  .compact-grid,
  .ranking-grid,
  .ranking-list,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .horizontal-card a {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .category-card {
    min-height: 190px;
    padding: 18px;
  }

  .page-hero {
    padding: 56px 0 42px;
  }

  .player-trigger {
    width: 74px;
    height: 74px;
  }
}

@media (max-width: 480px) {
  .container,
  .header-inner,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

  .movie-grid,
  .small-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rail {
    grid-auto-columns: 78%;
  }

  .horizontal-card a {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
