:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --indigo: #4f46e5;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, .10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 48%, #eff6ff 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, .78);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-size: 18px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 12px 26px rgba(37, 99, 235, .32);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

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

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: .2s ease;
}

.main-nav a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.nav-search {
  width: 310px;
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.nav-search input,
.hero-search input,
.search-page-form input,
.local-filter,
.sort-select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.nav-search input {
  padding: 0 12px;
}

.nav-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  cursor: pointer;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: white;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(96, 165, 250, .42), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(129, 140, 248, .46), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, .15), rgba(15, 23, 42, .70));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 52px;
  align-items: center;
  padding: 80px 0 96px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  color: #dbeafe;
  font-weight: 800;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .86);
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span,
.detail-meta span {
  color: #dbeafe;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .20);
}

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

.btn-primary,
.btn-ghost,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: .22s ease;
}

.btn-primary {
  min-height: 48px;
  padding: 0 24px;
  color: white;
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  box-shadow: 0 18px 30px rgba(37, 99, 235, .36);
}

.btn-primary:hover,
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, .38);
}

.btn-ghost {
  min-height: 48px;
  padding: 0 22px;
  color: white;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .38);
  backdrop-filter: blur(10px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, .18);
  box-shadow: 0 28px 70px rgba(15, 23, 42, .42);
  transform: rotate(2deg);
}

.hero-poster img {
  height: 510px;
  object-fit: cover;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: white;
}

.quick-panel,
.section-block,
.split-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -44px;
  position: relative;
  z-index: 6;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-panel span {
  display: block;
  color: var(--blue);
  font-weight: 900;
}

.quick-panel strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(24px, 3vw, 34px);
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
}

.hero-search input,
.search-page-form input {
  padding: 0 16px;
}

.section-block {
  margin-top: 56px;
  padding: 34px;
  border: 1px solid rgba(226, 232, 240, .75);
  border-radius: 30px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 42px rgba(15, 23, 42, .06);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.section-title > span {
  width: 6px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--indigo));
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-title > a {
  margin-left: auto;
  color: var(--blue);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
  transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, .12);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
}

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  background: rgba(37, 99, 235, .92);
}

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

.meta-line {
  display: flex;
  gap: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-card p {
  margin: 0;
  display: -webkit-box;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  padding: 6px 10px;
  color: #1d4ed8;
  background: #eff6ff;
}

.card-link {
  min-height: 40px;
  margin-top: 16px;
  padding: 0 16px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

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

.category-tile,
.category-panel {
  display: grid;
  gap: 12px;
  min-height: 132px;
  padding: 20px;
  border-radius: 24px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 18px 38px rgba(37, 99, 235, .22);
  transition: transform .22s ease;
}

.category-tile:hover,
.category-panel:hover {
  transform: translateY(-4px);
}

.category-tile strong,
.category-panel strong {
  font-size: 22px;
}

.category-tile span,
.category-panel span {
  color: rgba(255, 255, 255, .82);
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 28px;
  margin-top: 0;
}

.split-section .section-block {
  width: auto;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  transition: .2s ease;
}

.rank-item a:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .10);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
}

.rank-item img {
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  background: #eff6ff;
}

.rank-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-main {
  padding: 34px 0 72px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-radius: 34px;
}

.page-hero {
  padding: 64px;
  color: white;
  background: linear-gradient(135deg, #1e3a8a, #2563eb 48%, #4f46e5);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 820px;
}

.soft-hero {
  color: var(--text);
  background: rgba(255, 255, 255, .88);
}

.soft-hero p {
  color: var(--muted);
}

.soft-hero .eyebrow {
  color: var(--blue);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  max-width: 720px;
  margin-top: 28px;
}

.local-filter,
.sort-select {
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, .16);
}

.local-filter::placeholder {
  color: rgba(255, 255, 255, .78);
}

.sort-select option {
  color: var(--text);
}

.category-hero,
.rank-hero {
  background: linear-gradient(135deg, #172554, #2563eb 45%, #6366f1);
}

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

.detail-hero {
  min-height: 540px;
  color: white;
  background: #111827;
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 64px;
}

.detail-poster {
  height: 420px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .38);
}

.detail-copy .eyebrow {
  color: #dbeafe;
}

.detail-meta {
  margin-top: 22px;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
  aspect-ratio: 16 / 9;
}

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

.video-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, .24), rgba(2, 6, 23, .72));
  cursor: pointer;
}

.video-cover span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 20px 42px rgba(37, 99, 235, .35);
}

.video-cover strong {
  font-size: 22px;
}

.video-shell.is-playing .video-cover {
  display: none;
}

.prose-block h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.prose-block p {
  margin: 0 0 28px;
  color: #374151;
  font-size: 17px;
  line-height: 1.95;
}

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

.search-page-form {
  max-width: 680px;
  margin-top: 28px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 16px;
  color: var(--muted);
}

.footer-logo {
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text);
  font-weight: 800;
}

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

  .hero-content,
  .detail-inner,
  .split-section,
  .quick-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 360px;
  }

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

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

  .full-rank {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding: 14px 0;
  }

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

  .main-nav {
    order: 4;
    display: none;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
  }

  .main-nav.is-open {
    display: grid;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-content {
    gap: 28px;
    padding: 42px 0 86px;
  }

  .hero-poster img {
    height: 360px;
  }

  .quick-panel,
  .section-block,
  .page-hero,
  .detail-inner {
    padding: 22px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    height: auto;
    max-height: 460px;
  }

  .rank-item a {
    grid-template-columns: 38px 52px minmax(0, 1fr);
  }
}
