:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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.96);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #ffffff;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38);
}

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

.nav-link,
.mobile-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 25% 12%, rgba(59, 130, 246, 0.42), transparent 32%), linear-gradient(135deg, #020617 0%, #0f172a 46%, #1e293b 100%);
}

.hero-bg-glow {
  position: absolute;
  inset: auto -12% -42% 34%;
  height: 420px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.5), transparent 66%);
  pointer-events: none;
}

.hero-track {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 44px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 48px 40% 48px -8%;
  z-index: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.42)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.1);
  opacity: 0.28;
  border-radius: 42px;
}

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

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-heading span,
.page-hero span {
  display: inline-block;
  margin-bottom: 10px;
  color: #93c5fd;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn,
.quick-search button,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary,
.quick-search button,
.search-panel button {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.btn:hover,
.quick-search button:hover,
.search-panel button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  min-height: 420px;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #334155);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
  background: #ffffff;
}

.home-search-band,
.section-wrap,
.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -48px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-search-band h2,
.section-heading h2,
.ranking-panel h2,
.ranking-board h2,
.content-card h2,
.side-card h2,
.search-result-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.home-search-band p {
  margin: 8px 0 0;
  color: var(--muted);
}

.quick-search,
.search-panel,
.filter-panel {
  display: flex;
  gap: 12px;
  align-items: end;
}

.quick-search input,
.search-panel input,
.search-panel select,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

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

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

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

.section-heading.inline {
  margin-bottom: 20px;
}

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

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

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

.movie-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.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-missing {
  display: none !important;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #ffffff;
  text-align: center;
  font-weight: 900;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.45), transparent 42%), linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-link img:not(.poster-missing) + .poster-fallback,
.detail-poster img:not(.poster-missing) + .poster-fallback {
  display: none;
}

.poster-fallback.large {
  font-size: 22px;
}

.movie-badge,
.play-mini {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.movie-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.76);
  font-size: 12px;
}

.play-mini {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

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

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

.movie-card h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.soft-panel {
  width: min(1180px, calc(100% - 32px));
  padding: 40px;
  margin-top: 72px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

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

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-tile::after,
.category-card-large::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile span,
.category-card-large h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 23px;
  font-weight: 900;
}

.category-tile strong,
.category-card-large p {
  display: block;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 500;
}

.category-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 900;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.ranking-board,
.content-card,
.side-card,
.player-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ranking-panel,
.ranking-board {
  padding: 24px;
}

.ranking-panel ol,
.ranking-board ol {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rank-item + .rank-item {
  border-top: 1px solid var(--line);
}

.rank-item a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
}

.rank-index {
  color: var(--accent);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-score {
  color: var(--primary);
  font-weight: 900;
}

.site-footer {
  margin-top: 84px;
  padding: 46px 0;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr) minmax(180px, 0.6fr);
  gap: 34px;
}

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

.footer-grid p,
.footer-grid ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 25% 0%, rgba(37, 99, 235, 0.5), transparent 32%), linear-gradient(135deg, #020617, #0f172a 58%, #1e3a8a);
}

.small-hero {
  padding: 86px 0;
}

.page-hero > div,
.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb em {
  font-style: normal;
  opacity: 0.6;
}

.filter-panel,
.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.filter-panel label,
.search-panel label {
  flex: 1;
}

.filter-panel span,
.search-panel span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 28px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.pager a,
.pager span {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.pager .current,
.pager a:hover {
  background: var(--primary);
  color: #ffffff;
}

.search-result-title {
  margin-bottom: 22px;
}

.detail-hero {
  padding: 58px 0;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.58)), var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(10px);
  transform: scale(1.04);
  opacity: 0.36;
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  border-radius: 26px;
  background: linear-gradient(135deg, #0f172a, #334155);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 760px;
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.58));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
  font-size: 30px;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: #bfdbfe;
  font-size: 13px;
}

.content-card,
.side-card {
  padding: 24px;
}

.content-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 16px;
}

.detail-side {
  display: grid;
  gap: 20px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 16px 0 0;
}

.side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
}

.side-link {
  display: block;
  padding: 12px 0;
  color: var(--primary);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

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

  .menu-toggle {
    display: block;
  }

  .hero-slide,
  .home-search-band,
  .two-column,
  .detail-layout,
  .detail-hero-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-track,
  .hero-slide {
    min-height: 760px;
  }

  .hero-poster {
    min-height: 330px;
  }

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

@media (max-width: 640px) {
  .nav-shell,
  .mobile-nav,
  .home-search-band,
  .section-wrap,
  .footer-grid,
  .page-hero > div,
  .detail-hero-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 22px;
    align-content: center;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 270px;
  }

  .home-search-band,
  .soft-panel,
  .filter-panel,
  .search-panel {
    padding: 18px;
  }

  .quick-search,
  .search-panel,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .movie-strip {
    grid-auto-columns: 84%;
  }

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

  .detail-poster {
    width: min(280px, 100%);
  }

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

  .rank-score {
    grid-column: 2;
  }
}
