:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --text: #171717;
  --muted: #737373;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
}

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

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

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

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  overflow: hidden;
}

.desktop-nav a,
.mobile-links a {
  color: #3f3f46;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select,
.search-box input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 14px;
  outline: none;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nav-search button,
.mobile-panel button,
.search-box button {
  border: 0;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  color: #262626;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px 24px 22px;
}

.mobile-panel form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mobile-panel input {
  flex: 1;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-panel.open {
  display: block;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  max-height: 820px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 26%, rgba(37, 99, 235, 0.42), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.56) 46%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.eyebrow {
  color: #93c5fd;
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 13px;
}

.hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  max-width: 760px;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  max-width: 740px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta span,
.hero-meta a {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 14px 28px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.ghost-btn {
  padding: 13px 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

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

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 32px;
  background: #ffffff;
}

.hero-rail {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 78px;
  z-index: 3;
  width: 380px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(15px);
}

.compact-card img {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card span {
  font-weight: 800;
  line-height: 1.35;
}

.compact-card em {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
  font-size: 13px;
}

.page-main,
.content-section,
.page-hero,
.detail-page {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.content-section {
  padding-top: 58px;
  padding-bottom: 26px;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
}

.section-head h2 {
  font-size: 34px;
}

.section-head p,
.page-hero p,
.detail-title p {
  color: var(--muted);
  line-height: 1.75;
  margin: 8px 0 0;
}

.section-more {
  color: var(--primary);
  font-weight: 800;
}

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

.movie-card {
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #eef2ff);
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.88);
}

.card-body {
  padding: 16px;
}

.meta-row,
.tag-row,
.breadcrumbs,
.rank-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-row span,
.tag-row span,
.breadcrumbs a,
.breadcrumbs span,
.rank-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  color: #1d4ed8;
  background: #dbeafe;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.4;
}

.movie-card h3 a:hover {
  color: var(--primary);
}

.movie-card p {
  margin: 0 0 12px;
  color: #525252;
  font-size: 13px;
  line-height: 1.65;
}

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

.category-card {
  padding: 24px;
  border-radius: 26px;
  color: #ffffff;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 20px 44px rgba(79, 70, 229, 0.18);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.category-card span {
  margin-top: 20px;
  font-weight: 800;
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  padding: 30px;
  border-radius: 32px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border: 1px solid #dbeafe;
}

.rank-lead {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 26px;
  color: #ffffff;
  display: flex;
  align-items: end;
  padding: 28px;
  background: #0f172a;
}

.rank-lead img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}

.rank-lead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 62%);
}

.rank-lead-content {
  position: relative;
  z-index: 2;
}

.rank-lead h3 {
  margin: 0 0 12px;
  font-size: 36px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e0e7ff;
}

.rank-no {
  color: var(--primary);
  font-weight: 900;
  font-size: 20px;
}

.rank-item img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 13px;
}

.rank-item h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.small-btn {
  padding: 9px 14px;
  color: #ffffff;
  background: var(--primary);
  font-size: 13px;
}

.page-hero {
  padding-top: 54px;
  padding-bottom: 12px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.filter-bar,
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}

.filter-bar input,
.search-box input {
  min-width: min(100%, 340px);
  flex: 1;
}

.filter-bar select {
  min-width: 150px;
}

.detail-page {
  padding-top: 36px;
  padding-bottom: 40px;
}

.breadcrumbs {
  margin-bottom: 22px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-side,
.text-card {
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-box {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  cursor: pointer;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.32);
}

.play-cover.hidden {
  display: none;
}

.play-cover span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-tags {
  margin-top: 18px;
}

.text-card {
  padding: 26px;
  margin-top: 24px;
}

.text-card h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-card p,
.detail-side p {
  color: #404040;
  line-height: 1.9;
}

.detail-side {
  padding: 22px;
}

.side-poster {
  width: 100%;
  border-radius: 22px;
  margin-bottom: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.related-list {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.related-list a {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: #f8fafc;
}

.related-list img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.related-list strong {
  display: block;
  margin-bottom: 4px;
}

.related-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.full-rank-list .rank-item {
  grid-template-columns: 52px 70px 1fr auto;
}

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

.result-card {
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

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

.result-card div {
  padding: 16px;
}

.result-card h3 {
  margin: 0 0 8px;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state {
  padding: 34px;
  border-radius: 26px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.site-footer {
  margin-top: 50px;
  padding: 44px 24px;
  color: #d4d4d8;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-inner strong {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0;
}

.footer-links a:hover {
  color: #ffffff;
}

.copyright {
  color: #a1a1aa;
}

.is-hidden {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .nav-search {
    margin-left: auto;
  }

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

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

  .hero-rail {
    display: none;
  }
}

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

  .hero {
    min-height: 620px;
  }

  .section-head,
  .page-hero-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .rank-item,
  .full-rank-list .rank-item {
    grid-template-columns: 36px 60px 1fr;
  }

  .rank-item .small-btn {
    grid-column: 2 / -1;
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .hero-content,
  .page-main,
  .content-section,
  .page-hero,
  .detail-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    font-size: 18px;
  }

  .movie-grid,
  .category-strip,
  .search-results {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 600px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .rank-panel {
    padding: 18px;
  }
}
