:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --panel-soft: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --brand: #3b82f6;
  --brand-strong: #2563eb;
  --accent: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.24), transparent 32rem),
    radial-gradient(circle at 86% 12%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

body.nav-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;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.32);
}

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

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: white;
  background: rgba(59, 130, 246, 0.16);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(30, 41, 59, 0.9);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.38) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 36%, rgba(59, 130, 246, 0.32), transparent 24rem),
    radial-gradient(circle at 18% 74%, rgba(245, 158, 11, 0.2), transparent 22rem);
}

.hero-content {
  position: relative;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 84px 0 96px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}

.hero-copy h2 a {
  display: inline-block;
  margin-top: 10px;
  color: #bfdbfe;
}

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.9;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.hero-search button {
  color: white;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: 0 18px 45px rgba(59, 130, 246, 0.28);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.55);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.hero-search,
.page-search {
  display: flex;
  gap: 10px;
  width: min(620px, 100%);
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
}

.hero-search input,
.page-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 14px;
}

.hero-search input::placeholder,
.page-search input::placeholder {
  color: #94a3b8;
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.18);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111827;
}

.hero-poster span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  color: white;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  opacity: 0.45;
}

.hero-dot.is-active {
  width: 30px;
  opacity: 1;
  background: var(--brand);
}

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

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

.section-heading h2,
.side-panel h2,
.content-card h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}

.section-more {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.52);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.86));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.055);
  filter: saturate(1.12);
}

.score-badge,
.rank-badge,
.detail-poster span {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 30px;
  border-radius: 999px;
  font-weight: 900;
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.28);
}

.score-badge {
  right: 12px;
  top: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  color: white;
  background: linear-gradient(135deg, #ef4444, #7c3aed);
}

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

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

.movie-card-body h3 a:hover {
  color: #93c5fd;
}

.movie-meta,
.movie-desc,
.content-card p,
.site-footer p,
.category-overview-card p,
.category-card p,
.detail-one-line,
.detail-meta,
.page-hero p,
.side-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.movie-meta {
  margin: 0 0 10px;
  font-size: 0.86rem;
}

.movie-desc {
  min-height: 78px;
  margin: 0 0 14px;
  font-size: 0.94rem;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.78rem;
}

.movie-card.is-compact .movie-card-body h3 {
  font-size: 1rem;
}

.movie-card.is-compact .movie-desc {
  min-height: 56px;
  font-size: 0.88rem;
}

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

.category-card,
.category-overview-card,
.side-panel,
.content-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.category-card {
  padding: 22px;
  min-height: 190px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.46);
}

.category-card span,
.category-title {
  display: block;
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
}

.category-card small {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  color: #bfdbfe;
}

.category-overview-card {
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-overview-card ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: #cbd5e1;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
}

.side-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 24px;
}

.quick-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.12);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.compact-hero {
  padding: 86px 0 54px;
  background:
    radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.24), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.98));
}

.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.page-search {
  margin-top: 24px;
}

.page-search input {
  min-height: 46px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #93c5fd;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.54)),
    var(--detail-image) center / cover no-repeat;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.02);
}

.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 620px;
  padding: 64px 0;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-poster span {
  right: 16px;
  top: 16px;
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 4.9rem);
}

.detail-meta {
  margin: 18px 0 0;
}

.detail-one-line {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: 1.08rem;
}

.player-section {
  margin-top: -70px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: 0 18px 55px rgba(59, 130, 246, 0.38);
  font-size: 1.8rem;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.content-card {
  padding: 28px;
}

.content-card p {
  margin: 16px 0 0;
  font-size: 1rem;
}

.empty-state {
  display: none;
  margin: 32px 0 0;
  color: #cbd5e1;
  text-align: center;
}

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

.site-footer {
  margin-top: 40px;
  padding: 58px 0 0;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr;
  gap: 28px;
}

.footer-bottom {
  margin-top: 36px;
  padding: 20px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid var(--line);
}

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 760px;
  }

  .hero-content,
  .detail-grid,
  .split-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    align-content: center;
    gap: 28px;
    padding-top: 52px;
  }

  .hero-poster {
    max-width: 240px;
    transform: none;
  }

  .detail-grid {
    gap: 28px;
  }

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

  .side-panel {
    position: static;
  }

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

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

@media (max-width: 560px) {
  .container,
  .site-header-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-copy h1,
  .hero-copy h2,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }

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

  .detail-hero,
  .detail-grid {
    min-height: auto;
  }

  .detail-grid {
    padding: 42px 0 104px;
  }

  .player-section {
    margin-top: -52px;
  }

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