:root {
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --secondary-900: #111827;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f3f4f6;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.nav-layout {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 16px 28px rgba(79, 70, 229, 0.26);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  color: #0f172a;
  font-weight: 800;
  font-size: 20px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

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

.site-nav > a,
.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  color: #374151;
  font-weight: 700;
  border-radius: 12px;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.nav-dropdown > a.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  left: 0;
  top: 46px;
  width: 180px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

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

.nav-dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #4b5563;
  font-size: 14px;
}

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

.nav-search input,
.filter-input,
.search-box input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  background: #fff;
  min-width: 180px;
  transition: 0.2s ease;
}

.nav-search input:focus,
.filter-input:focus,
.search-box input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.nav-search button,
.primary-button,
.search-box button {
  border: 0;
  border-radius: 14px;
  padding: 11px 18px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 16px 32px rgba(79, 70, 229, 0.24);
  transition: 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover,
.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(79, 70, 229, 0.32);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(99, 102, 241, 0.34), transparent 26%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.74) 44%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 90px 0 150px;
}

.hero-content {
  max-width: 680px;
  animation: fadeUp 0.6s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.86);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 74px);
}

.hero p {
  max-width: 660px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #d1d5db;
  margin-top: 18px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-weight: 800;
  transition: 0.2s ease;
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

.hero-thumbs {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(16px);
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  border-color: rgba(129, 140, 248, 0.8);
  background: rgba(79, 70, 229, 0.68);
}

.hero-thumb img {
  width: 52px;
  height: 68px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.hero-thumb span {
  display: block;
  margin-top: 4px;
  color: #d1d5db;
  font-size: 12px;
}

.section {
  padding: 58px 0;
}

.section.white {
  background: #fff;
}

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

.section-title h2,
.page-hero h1,
.detail-copy h1 {
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
}

.section-title p,
.page-hero p,
.detail-copy p,
.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #3730a3);
}

.compact-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px;
}

.card-body h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.card-body p {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  margin-top: auto;
  padding-top: 14px;
  color: #6b7280;
  font-size: 13px;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.mini-tags span,
.tag-list span {
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.category-card span {
  color: var(--primary-700);
  font-weight: 900;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 58px 64px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.rank-row a:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-number {
  color: var(--primary-600);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.rank-row img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: #111827;
  font-size: 16px;
}

.rank-info em {
  margin-top: 5px;
  color: #6b7280;
  font-style: normal;
  font-size: 13px;
}

.score-pill {
  color: #b45309;
  background: #fffbeb;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 950;
}

.page-hero {
  padding: 58px 0 34px;
  background:
    radial-gradient(circle at 18% 18%, rgba(99, 102, 241, 0.18), transparent 30%),
    linear-gradient(180deg, #fff, #f8fafc);
  border-bottom: 1px solid var(--line);
}

.page-hero p {
  max-width: 760px;
  margin-top: 14px;
}

.filter-bar,
.search-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-input {
  min-width: min(100%, 360px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #6b7280;
  font-size: 14px;
  padding: 26px 0 0;
}

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

.detail-hero {
  padding: 28px 0 56px;
  background:
    radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.16), transparent 32%),
    linear-gradient(180deg, #fff, #f8fafc);
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

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

.detail-copy p {
  max-width: 860px;
  font-size: 17px;
}

.detail-meta span {
  color: #4338ca;
  background: var(--primary-50);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.player-section {
  padding: 50px 0;
  background: #0f172a;
  color: #fff;
}

.player-section h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68));
  transition: 0.25s ease;
}

.play-layer:hover .play-circle {
  transform: scale(1.06);
}

.play-circle {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 18px 40px rgba(99, 102, 241, 0.36);
  font-size: 30px;
  transition: 0.2s ease;
}

.player-shell.is-started .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.article-section {
  padding: 54px 0;
  background: #fff;
}

.article-box {
  max-width: 900px;
}

.article-box h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 26px;
  font-weight: 900;
}

.article-box p {
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 28px;
}

.site-footer {
  background: #111827;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 38px;
  padding: 48px 0;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

.footer-brand strong {
  color: #fff;
  font-size: 18px;
}

.footer-brand p,
.footer-text {
  color: #94a3b8;
  margin: 5px 0 0;
  line-height: 1.7;
}

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

.site-footer a:hover {
  color: #a5b4fc;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
  font-size: 14px;
}

.search-results-empty {
  color: #6b7280;
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 20px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .nav-layout {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .site-nav,
  .nav-search {
    display: none;
    width: 100%;
  }

  .site-nav.is-open,
  .nav-search.is-open {
    display: grid;
  }

  .site-nav {
    gap: 8px;
    align-items: stretch;
  }

  .site-nav > a,
  .nav-dropdown > a {
    justify-content: center;
  }

  .nav-dropdown-panel {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: 8px;
  }

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

  .hero {
    min-height: 720px;
  }

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

  .hero-thumb {
    display: none;
  }

  .hero-thumb.is-active {
    display: flex;
  }

  .card-grid,
  .card-grid.large,
  .category-grid,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    align-items: start;
  }
}

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

  .brand-title {
    font-size: 18px;
  }

  .hero-inner {
    padding: 70px 0 140px;
  }

  .hero-actions,
  .section-head,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .card-grid,
  .card-grid.large,
  .category-grid,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row a {
    grid-template-columns: 44px 54px 1fr;
  }

  .score-pill {
    grid-column: 3;
    width: fit-content;
  }
}
