:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.16);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #ffffff;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.25), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-text strong {
  font-size: 20px;
  color: var(--white);
  letter-spacing: 0.02em;
}

.brand-text em {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #cbd5e1;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 8px;
  flex-direction: column;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.68);
  color: #cbd5e1;
}

.hero-carousel {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: var(--bg);
}

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.10) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.96) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 610px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 86px 0 92px;
}

.hero-copy {
  width: min(670px, 100%);
}

.eyebrow,
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(79, 70, 229, 0.78);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--white);
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 620px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  color: #cbd5e1;
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.secondary-button,
.small-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  color: var(--white);
  background: var(--accent-strong);
  box-shadow: 0 16px 42px rgba(79, 70, 229, 0.3);
}

.secondary-button {
  min-height: 46px;
  padding: 0 22px;
  color: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.secondary-button:hover,
.small-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: var(--white);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.active {
  width: 28px;
  background: var(--white);
}

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

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

.page-section.tight {
  padding-top: 34px;
}

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

.section-title h2,
.section-title h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 8px 0 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.75;
}

.section-title a,
.text-link {
  color: #a5b4fc;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin: 0 0 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-panel input,
.search-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.52);
  outline: none;
  padding: 0 15px;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(99, 102, 241, 0.68);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips button {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.65);
  cursor: pointer;
  padding: 0 15px;
}

.filter-chips button.active {
  color: var(--white);
  border-color: var(--accent);
  background: rgba(79, 70, 229, 0.58);
}

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

.movie-grid.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(30, 41, 59, 0.82);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.96));
}

.movie-card-featured .movie-cover {
  aspect-ratio: 16 / 9;
}

.movie-cover img,
.wide-image img,
.ranking-thumb img,
.side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img,
.wide-card:hover .wide-image img {
  transform: scale(1.08);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(79, 70, 229, 0.86);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--white);
  background: rgba(79, 70, 229, 0.92);
  font-weight: 800;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
}

.movie-card h3,
.wide-card h3,
.ranking-info h3 {
  margin: 10px 0 8px;
  color: var(--white);
  line-height: 1.35;
}

.movie-card h3 {
  font-size: 17px;
}

.movie-card h3 a:hover,
.wide-card h3 a:hover,
.ranking-info h3 a:hover {
  color: #a5b4fc;
}

.movie-card p,
.wide-card p,
.ranking-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-list span,
.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  padding: 0 9px;
  font-size: 12px;
}

.large-tags span {
  min-height: 32px;
  padding: 0 12px;
}

.wide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.wide-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.62);
}

.wide-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.wide-content {
  padding: 20px;
}

.wide-content h3 {
  font-size: 21px;
}

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

.category-card {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.26), transparent 10rem),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.5);
}

.category-card strong {
  color: var(--white);
  font-size: 20px;
}

.category-card span {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.category-card em {
  color: #a5b4fc;
  font-style: normal;
  font-size: 14px;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 66px 84px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--white);
  background: rgba(99, 102, 241, 0.22);
  font-weight: 900;
  font-size: 18px;
}

.ranking-thumb {
  display: block;
  width: 84px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-soft);
}

.ranking-info h3 {
  margin-top: 0;
  font-size: 19px;
}

.small-button {
  min-height: 38px;
  padding: 0 15px;
  color: var(--white);
  background: rgba(99, 102, 241, 0.85);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding: 34px 0 68px;
}

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

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

.player-panel,
.detail-card,
.content-card,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
  margin-bottom: 22px;
  background: #000000;
}

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

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000000;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.player-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.big-play {
  position: relative;
  z-index: 2;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(79, 70, 229, 0.92);
  box-shadow: 0 20px 60px rgba(79, 70, 229, 0.4);
  font-size: 30px;
}

.detail-card,
.content-card {
  margin-bottom: 22px;
  padding: 26px;
}

.detail-card h1 {
  margin: 18px 0 14px;
  color: var(--white);
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.03em;
}

.lead-text {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.content-card h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 22px;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-side {
  position: relative;
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.58);
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-card:hover {
  background: rgba(51, 65, 85, 0.88);
  transform: translateX(3px);
}

.side-card img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: var(--bg-soft);
}

.side-card strong {
  display: block;
  color: var(--white);
  line-height: 1.4;
}

.side-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.side-rank {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #a5b4fc;
  font-weight: 800;
}

.compact-title {
  align-items: center;
  margin-bottom: 20px;
}

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

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

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  text-align: center;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: flex;
  }

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

  .hero-content {
    padding-bottom: 76px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 52px 72px 1fr;
  }

  .ranking-row .small-button {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    font-size: 11px;
  }

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

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

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

  .detail-card,
  .content-card {
    padding: 18px;
  }
}
