:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: #1e293b;
  --line: #334155;
  --line-soft: rgba(148, 163, 184, 0.22);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --yellow: #facc15;
  --rose: #fb7185;
  --shadow: 0 22px 70px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  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(15, 23, 42, 0.95);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), #2563eb 60%, #7c3aed);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-text strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.desktop-nav > a,
.nav-dropdown > button {
  border: 0;
  padding: 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.nav-dropdown > button:hover,
.mobile-menu a:hover {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  width: 230px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #1e293b;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-panel a:hover {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.75);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
}

.nav-search input,
.big-search input,
.filter-bar input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  height: 40px;
  border-radius: 12px;
  padding: 0 12px;
}

.nav-search input:focus,
.big-search input:focus,
.filter-bar input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.95);
}

.nav-search button,
.big-search button {
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--cyan-strong);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button {
  height: 40px;
  padding: 0 14px;
}

.nav-search button:hover,
.big-search button:hover,
.btn-primary:hover {
  background: #0891b2;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: white;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 18px;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
}

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

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.hero-content h1 {
  width: min(720px, 100%);
  margin: 18px 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  width: min(640px, 100%);
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

.hero-kicker,
.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.section-eyebrow,
.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 750;
}

.hero-kicker span:first-child,
.section-eyebrow {
  padding: 7px 12px;
  color: #ffffff;
  background: var(--cyan-strong);
}

.hero-kicker span:last-child,
.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(12px);
}

.hero-tags {
  margin-bottom: 28px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: white;
  background: var(--cyan-strong);
  box-shadow: 0 14px 32px rgba(6, 182, 212, 0.28);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.62);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

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

.hero-dot {
  width: 40px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

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

.band {
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  background: rgba(2, 6, 23, 0.36);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  padding: 34px 0;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-panel h2 {
  color: #ffffff;
}

.search-panel h2 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 4vw, 42px);
}

.search-panel p,
.section-heading p,
.page-hero p,
.category-overview-card p,
.footer-grid p,
.text-panel p,
.detail-one {
  color: var(--muted);
  line-height: 1.8;
}

.big-search {
  display: flex;
  gap: 10px;
}

.big-search input {
  height: 54px;
  padding: 0 18px;
  border-radius: 16px;
}

.big-search button {
  min-width: 110px;
  padding: 0 20px;
}

.inline-search {
  margin-top: 24px;
  max-width: 680px;
}

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

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

.section-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 720px;
  margin: 0;
}

.section-link {
  flex: 0 0 auto;
  color: var(--cyan);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 22px 58px rgba(6, 182, 212, 0.16);
  transform: translateY(-4px);
}

.category-card:hover img,
.movie-card:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
  opacity: 0.52;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 19px;
  background: rgba(30, 41, 59, 0.55);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card.is-hidden {
  display: none;
}

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

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

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

.score-badge {
  top: 10px;
  right: 10px;
  min-width: 44px;
  height: 28px;
  color: #111827;
  background: var(--yellow);
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.22);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  color: white;
  background: rgba(244, 63, 94, 0.92);
}

.play-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: all 0.25s ease;
}

.movie-card:hover .play-pulse {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-content {
  padding: 14px;
}

.card-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-content h3 {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.45;
}

.card-content h3 a:hover {
  color: var(--cyan);
}

.card-line {
  min-height: 3.3em;
  margin: 0 0 12px;
  color: #aab7c8;
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span {
  padding: 5px 8px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.11);
  font-size: 12px;
  font-weight: 700;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 28rem);
}

.compact-hero .container {
  padding: 68px 0;
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.55);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-cover {
  overflow: hidden;
  border-radius: 16px;
  background: #020617;
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-overview-card h2 {
  margin: 12px 0 8px;
  color: #ffffff;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.64);
  font-size: 13px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.5);
}

.filter-bar input {
  max-width: 520px;
  height: 46px;
  padding: 0 15px;
  border-radius: 14px;
}

.filter-bar span {
  color: var(--muted);
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
  filter: blur(2px);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.78) 58%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 55%);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  padding: 70px 0;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.large-score {
  top: 16px;
  right: 16px;
  min-width: 56px;
  height: 36px;
  font-size: 18px;
}

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

.breadcrumb a:hover {
  color: var(--cyan);
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one {
  max-width: 820px;
  margin: 0 0 22px;
  font-size: 19px;
}

.detail-tags {
  margin: 20px 0 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2)),
    radial-gradient(circle at center, rgba(6, 182, 212, 0.22), transparent 22rem);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--cyan-strong);
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.32);
  font-size: 30px;
}

.player-overlay strong {
  max-width: min(86%, 720px);
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.25;
}

.text-panel {
  padding: 30px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.55);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.text-panel h2:not(:first-child) {
  margin-top: 30px;
}

.text-panel p {
  margin: 0;
  font-size: 17px;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  background: #020617;
}

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

.footer-grid h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.footer-grid p {
  max-width: 520px;
  margin: 14px 0 0;
}

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: var(--muted);
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
  }

  .nav-search {
    width: 220px;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 590px;
  }

  .search-panel,
  .detail-layout,
  .footer-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    gap: 16px;
  }

  .category-cover {
    aspect-ratio: 16 / 8;
  }

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

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

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

@media (max-width: 680px) {
  .container,
  .nav-wrap,
  .mobile-menu,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-content h1,
  .detail-info h1 {
    letter-spacing: -0.02em;
  }

  .hero-content p,
  .detail-one {
    font-size: 16px;
  }

  .hero-actions,
  .big-search,
  .section-heading,
  .filter-bar,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .big-search button {
    min-height: 50px;
  }

  .section-link {
    align-self: flex-start;
  }

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

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

  .card-content {
    padding: 12px;
  }

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

  .card-line {
    font-size: 13px;
  }

  .compact-hero .container,
  .detail-layout {
    padding: 46px 0;
  }

  .player-shell {
    border-radius: 16px;
  }

  .text-panel {
    padding: 22px;
  }
}
