:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-2: #0891b2;
  --cyan: #22d3ee;
  --dark: #020617;
  --dark-2: #0f172a;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  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: linear-gradient(180deg, #f8fafc 0%, #eef6ff 45%, #ffffff 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-links a:hover,
.nav-links a.active,
.mobile-menu a:hover,
.mobile-menu a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 320px;
}

.nav-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.nav-search button {
  border: 0;
  color: #ffffff;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 8px 20px 20px;
  background: rgba(2, 6, 23, 0.98);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 52%, #164e63);
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.82) 43%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--blue);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 18px 0 10px;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.1;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 1.1rem;
}

.hero-actions,
.section-head,
.detail-wrap,
.filter-bar,
.player-overlay,
.ranking-row,
.rank-list a,
.mini-card {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-panel {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  width: min(1232px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

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

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

.hero-rank-link,
.text-link {
  color: var(--blue);
  font-weight: 800;
}

.hero-rank-link {
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.section {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-lift {
  margin-top: -24px;
}

.section-head {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head.compact {
  margin-bottom: 20px;
}

.section-head h2,
.page-hero h1,
.detail-info h1,
.content-card h2,
.category-card h2 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head h2,
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

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

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

.movie-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.35);
}

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

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.movie-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-card h3,
.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.category-card h2 a:hover {
  color: var(--blue);
}

.movie-line {
  margin: 0 0 14px;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag.large {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  overflow: hidden;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  isolation: isolate;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
}

.category-tile::before,
.category-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
}

.category-tile span {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile strong {
  font-size: 0.9rem;
  font-weight: 500;
  color: #dbeafe;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.recommend-panel,
.content-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

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

.rank-list a {
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.rank-list a:hover {
  background: #eff6ff;
}

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

.rank-no {
  width: 34px;
  color: var(--blue);
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  display: grid;
}

.rank-title strong,
.mini-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-title em,
.mini-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.85rem;
}

.page-hero {
  width: min(1280px, calc(100% - 48px));
  margin: 32px auto 0;
  min-height: 300px;
  border-radius: 32px;
  padding: 56px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.28), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e3a8a 55%, #164e63);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 1.05rem;
}

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

.category-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.category-cover {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  color: #ffffff;
  isolation: isolate;
  background-size: cover;
  background-position: center;
}

.category-cover span {
  font-size: 1.55rem;
  font-weight: 900;
}

.category-card-body {
  padding: 26px;
}

.category-card-body p {
  color: var(--muted);
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-samples a {
  color: var(--blue);
  background: #eff6ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.filter-bar {
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar select {
  max-width: 180px;
}

.empty-state {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 48px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px dashed var(--line);
}

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

.ranking-table {
  display: grid;
  gap: 16px;
}

.ranking-row {
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.ranking-index {
  width: 58px;
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.ranking-poster img {
  width: 168px;
  height: 96px;
  object-fit: cover;
  border-radius: 18px;
}

.ranking-info {
  flex: 1;
  min-width: 0;
}

.ranking-info p {
  margin: 0;
  color: #475569;
}

.ranking-score {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
}

.detail-hero {
  position: relative;
  min-height: 620px;
  color: #ffffff;
  overflow: hidden;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-size: cover;
  background-position: center;
  filter: blur(1px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 18%, rgba(34, 211, 238, 0.2), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.52));
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 48px));
  min-height: 620px;
  margin: 0 auto;
  gap: 38px;
}

.detail-poster {
  width: min(360px, 34vw);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-info {
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: #bfdbfe;
}

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

.detail-info h1 {
  font-size: clamp(2.5rem, 6vw, 5.2rem);
}

.detail-line {
  color: #dbeafe;
  font-size: 1.18rem;
  max-width: 760px;
  margin: 18px 0 24px;
}

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

.detail-section {
  padding-bottom: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.18), transparent 32%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.32);
  font-size: 2rem;
  padding-left: 4px;
}

.player-overlay strong {
  max-width: 80%;
  text-align: center;
  font-size: 1.25rem;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: 32px;
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 1.6rem;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 1.04rem;
}

.mini-card {
  min-width: 0;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  background: #eff6ff;
}

.mini-card img {
  width: 92px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
}

.mini-card span {
  display: grid;
  min-width: 0;
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 36px;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.35fr;
  gap: 38px;
}

.site-footer p {
  color: #94a3b8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  padding: 18px 24px;
}

.footer-bottom p {
  margin: 0;
}

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

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

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

  .nav-search {
    min-width: 260px;
  }
}

@media (max-width: 860px) {
  .site-nav {
    height: 66px;
  }

  .nav-links,
  .nav-search {
    display: none;
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-content {
    width: calc(100% - 40px);
    margin: 0 20px;
  }

  .hero-panel {
    width: calc(100% - 40px);
  }

  .section,
  .page-hero,
  .detail-wrap,
  .footer-grid {
    width: calc(100% - 32px);
  }

  .section {
    padding: 50px 0;
  }

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

  .category-card {
    grid-template-columns: 1fr;
  }

  .category-cover {
    min-height: 180px;
  }

  .page-hero {
    padding: 38px 26px;
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar select {
    max-width: none;
  }

  .detail-wrap {
    min-height: auto;
    padding: 120px 0 56px;
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-poster {
    width: min(300px, 80vw);
  }

  .ranking-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ranking-poster img {
    width: 132px;
    height: 84px;
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .section-head,
  .hero-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-dots button {
    width: 28px;
  }

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

  .page-hero {
    border-radius: 24px;
  }

  .ranking-index {
    width: auto;
  }

  .ranking-score {
    width: 58px;
    height: 58px;
  }

  .mini-card img {
    width: 82px;
    height: 58px;
  }
}
