:root {
  --page-bg: #f9fafb;
  --text-main: #111827;
  --text-soft: #6b7280;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --danger: #ef4444;
  --panel: #ffffff;
  --dark: #111827;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: 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 {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  font-size: 14px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.28);
}

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--brand);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
}

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

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

.hero-slide {
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

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

.hero-copy h1,
.hero-copy h2 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-badges,
.detail-tags,
.card-tags,
.filter-chips,
.hero-actions,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-badges {
  margin-bottom: 18px;
}

.hero-badges span,
.card-tags span,
.detail-tags span,
.category-accent {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.hero-badges span:nth-child(2),
.hero-badges span:nth-child(3) {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.btn-primary,
.hero-search-form button {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover,
.hero-search-form button:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.26);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.hero-search {
  position: absolute;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 72px;
  z-index: 6;
  width: min(430px, calc(100% - 32px));
}

.hero-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.hero-search-form input,
.library-tools input {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  min-height: 48px;
  padding: 0 16px;
  color: var(--text-main);
  background: #ffffff;
}

.section-wrap,
.page-hero,
.detail-main,
.footer-wrap {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

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

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

.section-head.compact {
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.rank-panel h2,
.spotlight-panel h2,
.side-links h2,
.detail-card h2 {
  margin: 0;
  color: var(--text-main);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head h2,
.rank-panel h2,
.spotlight-panel h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.section-head a {
  color: var(--brand);
  font-weight: 900;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: #111827;
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
}

.movie-card:hover .card-shade {
  background: rgba(0, 0, 0, 0.32);
}

.card-type {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.card-body strong {
  min-height: 52px;
  color: var(--text-main);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover .card-body strong {
  color: var(--brand);
}

.card-desc {
  min-height: 46px;
  color: var(--text-soft);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.card-tags span {
  padding: 5px 9px;
  color: #374151;
  background: #f3f4f6;
  font-size: 12px;
}

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

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #111827;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.category-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.64;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover .category-bg {
  opacity: 0.82;
  transform: scale(1.06);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.8));
}

.category-panel {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 20px;
  color: #ffffff;
}

.category-panel strong {
  font-size: 24px;
  font-weight: 900;
}

.category-panel span:not(.category-accent),
.category-panel em {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-style: normal;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.rank-panel,
.spotlight-panel,
.library-tools,
.detail-card,
.poster-card,
.side-links {
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-panel,
.library-tools,
.detail-card,
.side-links {
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 76px 1fr auto;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  padding: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  font-weight: 900;
}

.rank-item img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-copy strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 900;
}

.rank-copy span,
.rank-year {
  color: var(--text-soft);
  font-size: 13px;
}

.full-rank-list .rank-item {
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.spotlight-panel {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  color: #ffffff;
}

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

.spotlight-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.82));
}

.spotlight-panel div {
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  bottom: 28px;
}

.spotlight-panel h2 {
  color: #ffffff;
  margin: 10px 0;
}

.spotlight-panel p {
  max-height: 120px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
}

.page-main {
  padding-bottom: 70px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  padding: 70px 42px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

.page-hero.small {
  min-height: 330px;
  display: grid;
  align-items: end;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.page-hero.small div {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.page-hero.small h1,
.page-hero.small p,
.page-hero.small .eyebrow {
  color: #ffffff;
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  color: var(--text-soft);
  font-size: 18px;
}

.library-tools {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.library-tools label {
  font-weight: 900;
  font-size: 20px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #ffffff;
  background: var(--brand);
}

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

.detail-main {
  padding: 28px 0 74px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--text-soft);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.86fr);
  gap: 30px;
  align-items: start;
}

.detail-content {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.76));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  font-size: 30px;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.38);
}

.player-title {
  max-width: 80%;
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 900;
  text-align: center;
}

.detail-card {
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 16px;
  color: var(--text-soft);
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: #f3f4f6;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-tags span {
  color: #374151;
  background: #eff6ff;
}

.detail-card h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.detail-sidebar {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 88px;
}

.poster-card {
  overflow: hidden;
}

.poster-card img {
  width: 100%;
  height: 410px;
  object-fit: cover;
  background: #111827;
}

.poster-card strong,
.poster-card span {
  display: block;
  margin: 18px 18px 0;
}

.poster-card strong {
  font-size: 22px;
  font-weight: 900;
}

.poster-card span {
  margin-bottom: 18px;
  color: var(--text-soft);
}

.side-grid {
  display: grid;
  gap: 16px;
}

.side-grid .movie-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  border-radius: 14px;
}

.side-grid .card-media {
  height: 100%;
  min-height: 128px;
}

.side-grid .card-body {
  padding: 12px;
}

.side-grid .card-body strong {
  min-height: auto;
  font-size: 14px;
}

.side-grid .card-desc,
.side-grid .card-tags {
  display: none;
}

.site-footer {
  margin-top: 30px;
  color: #d1d5db;
  background: #111827;
}

.footer-wrap {
  padding: 44px 0 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  color: #ffffff;
}

.footer-main p {
  max-width: 520px;
  color: #9ca3af;
}

.footer-main h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 16px;
}

.footer-main ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-main a:hover {
  color: #60a5fa;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 34px;
  padding-top: 22px;
  color: #9ca3af;
  text-align: center;
}

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

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

  .detail-sidebar {
    position: static;
  }
}

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

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

  .hero-carousel {
    height: auto;
    min-height: 650px;
  }

  .hero-copy {
    padding-top: 86px;
    justify-content: flex-start;
  }

  .hero-search {
    right: 16px;
    bottom: 84px;
  }

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

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

  .movie-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .card-media {
    height: 210px;
  }

  .card-body strong {
    min-height: 44px;
    font-size: 15px;
  }

  .card-desc {
    display: none;
  }

  .page-hero {
    padding: 42px 24px;
  }

  .rank-item {
    grid-template-columns: 34px 64px 1fr;
  }

  .rank-year {
    display: none;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

  .side-grid .movie-card {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .player-start {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
}
