
:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.10);
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --blue: #3b82f6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #07111f 44%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

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

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f59e0b, #fb923c);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.48);
}

.brand-text {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.95);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.22);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  border-top: 1px solid var(--line);
}

.mobile-link {
  display: block;
  margin-top: 8px;
}

.hero {
  position: relative;
  height: min(72vh, 680px);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.18) 74%),
    linear-gradient(0deg, #020617 0%, transparent 35%, rgba(2, 6, 23, 0.55) 100%);
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber-soft);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.055em;
  background: linear-gradient(90deg, #fff7ed, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h2 {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.7rem);
  line-height: 1.18;
}

.hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 1.12rem;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost,
.filter-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.32);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-ghost,
.filter-link,
.text-link {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.26);
}

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

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

.hero-dot {
  width: 42px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.section-shell,
.split-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.split-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.56), rgba(30, 64, 175, 0.20));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading.center {
  text-align: center;
}

.section-heading.between {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading p {
  margin: 0 0 8px;
  color: var(--amber-soft);
  font-weight: 850;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  line-height: 1.15;
}

.section-heading span {
  display: block;
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
}

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

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

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

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

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

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.94));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.34), 0 0 34px rgba(245, 158, 11, 0.14);
}

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

.movie-card.featured .poster-wrap {
  aspect-ratio: 4 / 3;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 54%);
}

.play-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(239, 68, 68, 0.9);
  backdrop-filter: blur(10px);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.meta-line {
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card strong {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.32;
}

.movie-card em {
  min-height: 3.2em;
  color: var(--muted);
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-size: 0.76rem;
}

.category-tile {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.52);
}

.category-tile strong {
  position: relative;
  display: block;
  font-size: 1.34rem;
  margin-bottom: 12px;
}

.category-tile em {
  position: relative;
  color: #cbd5e1;
  font-style: normal;
}

.tile-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -62px;
  top: -64px;
  border-radius: 50%;
  opacity: 0.32;
  background: radial-gradient(circle, #f59e0b, transparent 65%);
}

.accent-blue .tile-glow { background: radial-gradient(circle, #3b82f6, transparent 65%); }
.accent-pink .tile-glow { background: radial-gradient(circle, #ec4899, transparent 65%); }
.accent-orange .tile-glow { background: radial-gradient(circle, #f97316, transparent 65%); }
.accent-cyan .tile-glow { background: radial-gradient(circle, #06b6d4, transparent 65%); }
.accent-rose .tile-glow { background: radial-gradient(circle, #f43f5e, transparent 65%); }
.accent-purple .tile-glow { background: radial-gradient(circle, #a855f7, transparent 65%); }
.accent-red .tile-glow { background: radial-gradient(circle, #ef4444, transparent 65%); }
.accent-indigo .tile-glow { background: radial-gradient(circle, #6366f1, transparent 65%); }
.accent-green .tile-glow { background: radial-gradient(circle, #22c55e, transparent 65%); }
.accent-lime .tile-glow { background: radial-gradient(circle, #84cc16, transparent 65%); }
.accent-gold .tile-glow { background: radial-gradient(circle, #eab308, transparent 65%); }

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

.rank-item {
  display: grid;
  grid-template-columns: auto 70px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.92);
}

.rank-num {
  color: #fbbf24;
  font-size: 1.2rem;
  font-weight: 950;
}

.rank-item img {
  width: 70px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-item strong {
  color: #fff;
  line-height: 1.35;
}

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

.page-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.30), #020617),
    radial-gradient(circle at 30% 10%, rgba(245, 158, 11, 0.28), transparent 26rem),
    radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.28), transparent 30rem);
  text-align: center;
}

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 18px auto 0;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.74);
  outline: none;
}

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

.empty-state {
  display: none;
  margin: 34px 0 0;
  padding: 30px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
}

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

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

.sticky-rank {
  position: sticky;
  top: 92px;
  grid-template-columns: 1fr;
}

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

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

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(6px) saturate(1.1);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68)),
    linear-gradient(0deg, #020617, transparent 52%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 600px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: #cbd5e1;
}

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

.detail-info p:not(.eyebrow) {
  max-width: 800px;
  color: #dbeafe;
  font-size: 1.1rem;
}

.detail-tags {
  margin-top: 18px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.player-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #111827;
  font-size: 2.1rem;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.55);
}

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

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.45rem;
}

.content-card p {
  margin: 0 0 22px;
  color: #cbd5e1;
}

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

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

.info-grid dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.info-grid dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 800;
}

.site-footer {
  margin-top: 42px;
  padding: 58px 0 28px;
  color: #cbd5e1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), #000);
  border-top: 1px solid var(--line);
}

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

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

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
}

@media (max-width: 1024px) {
  .featured-grid,
  .movie-grid,
  .index-grid,
  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .sticky-rank {
    position: static;
  }
}

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

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

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

  .hero {
    min-height: 620px;
    height: auto;
  }

  .hero-content {
    padding-top: 90px;
    padding-bottom: 90px;
  }

  .hero-gradient {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.68) 50%, rgba(2, 6, 23, 0.78) 100%);
  }

  .section-heading.between,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .featured-grid,
  .movie-grid,
  .index-grid,
  .related-grid,
  .category-grid,
  .category-grid.large,
  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 520px) {
  .nav-shell,
  .section-shell,
  .footer-inner,
  .detail-layout {
    width: min(100% - 24px, 1180px);
  }

  .hero-actions,
  .detail-actions {
    width: 100%;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: auto 56px minmax(0, 1fr);
  }

  .rank-item img {
    width: 56px;
    height: 72px;
  }

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