:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #10b981;
  --accent-2: #14b8a6;
  --accent-3: #22d3ee;
  --danger: #f43f5e;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

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 rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
}

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

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

.nav-link,
.mobile-link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #5eead4;
}

.nav-link.ghost {
  color: var(--subtle);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.84);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 0;
  padding: 12px 24px 20px;
}

.mobile-link {
  padding: 13px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%, rgba(2, 6, 23, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 52px;
  height: 100%;
  padding: 92px 0 86px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #99f6e4;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.18);
  color: #ccfbf1;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 14px 34px rgba(20, 184, 166, 0.32);
}

.btn.secondary {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: #ccfbf1;
}

.btn.subtle {
  color: var(--muted);
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-poster {
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

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

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

.hero-dot.active {
  width: 30px;
  background: #5eead4;
}

.quick-search-section {
  margin-top: -34px;
  position: relative;
  z-index: 8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 800;
}

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

.search-box input:focus,
.select-box select:focus {
  border-color: rgba(94, 234, 212, 0.54);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--subtle);
}

.section-link {
  color: #5eead4;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.36);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

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

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

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

.type-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.type-pill {
  right: 10px;
  min-height: 26px;
  padding: 0 9px;
  background: rgba(2, 6, 23, 0.76);
  color: #ccfbf1;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #fb7185, #f59e0b);
  color: white;
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.3);
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #5eead4;
}

.card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.movie-card.compact .card-body p {
  min-height: 0;
}

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

.category-tile,
.category-overview-card,
.story-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.78));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.category-tile {
  display: grid;
  gap: 14px;
  min-height: 196px;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: auto -20px -40px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), transparent 70%);
}

.category-name {
  color: #5eead4;
  font-size: 14px;
  font-weight: 900;
}

.category-tile strong {
  font-size: 20px;
  line-height: 1.45;
}

.category-samples,
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a,
.mini-links a {
  position: relative;
  z-index: 2;
  color: var(--subtle);
  font-size: 13px;
}

.category-samples a:hover,
.mini-links a:hover {
  color: #5eead4;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.24), transparent 30rem),
    linear-gradient(135deg, #020617, #111827);
}

.compact-hero {
  padding: 94px 0 74px;
}

.page-hero-inner h1 {
  max-width: 880px;
}

.page-hero-inner p {
  margin-bottom: 0;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

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

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-body h2 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.category-overview-body p {
  color: var(--muted);
  line-height: 1.7;
}

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

.detail-head {
  position: relative;
  z-index: 2;
  padding: 72px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #5eead4;
}

.detail-head-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin-bottom: 20px;
}

.detail-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.detail-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  color: var(--muted);
  padding: 8px 12px;
}

.detail-info b {
  color: #5eead4;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.8));
  color: white;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 46px rgba(20, 184, 166, 0.38);
  font-size: 28px;
}

.player-cover strong {
  font-size: 24px;
}

.player-cover em {
  color: #ccfbf1;
  font-style: normal;
  font-weight: 800;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 26px;
}

.story-card {
  padding: 26px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 34px 0 20px;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

.site-footer p,
.footer-copy {
  color: var(--subtle);
}

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

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

.footer-copy {
  padding-bottom: 28px;
  font-size: 14px;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 28px;
    padding: 82px 0 94px;
  }

  .hero-poster {
    width: min(280px, 70vw);
    justify-self: start;
  }

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

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

  .category-overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .detail-head-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(280px, 72vw);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 40px;
  }

  .hero p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    min-height: 42px;
    padding: 0 16px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    display: none;
  }

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

  .footer-grid {
    flex-direction: column;
  }
}
