
:root {
  --bg: #141618;
  --bg-soft: #1c2026;
  --bg-card: #24272c;
  --bg-card-2: #2d323a;
  --primary: #1890ff;
  --primary-soft: rgba(24, 144, 255, 0.16);
  --primary-strong: #096dd9;
  --text: #f7fafc;
  --muted: #a8b3c5;
  --muted-2: #748094;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(24, 144, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 0, rgba(114, 46, 209, 0.14), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 22, 24, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #40a9ff 48%, #722ed1);
  border-radius: 13px;
  box-shadow: 0 14px 34px rgba(24, 144, 255, 0.35);
}

.brand-text {
  font-size: 19px;
}

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

.nav-link {
  color: #d9e2f2;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #40a9ff;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-panel a {
  padding: 9px 12px;
  color: #e5eefb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mobile-panel.is-open {
  display: flex;
}

.hero {
  position: relative;
  max-width: 1240px;
  min-height: 610px;
  margin: 28px auto 0;
  padding: 0 22px;
}

.hero-slider {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #0c1117;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 42%);
  align-items: end;
  min-height: 600px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24, 144, 255, 0.22), rgba(114, 46, 209, 0.12)),
    #0c1117;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 17, 23, 0.96) 0%, rgba(12, 17, 23, 0.74) 48%, rgba(12, 17, 23, 0.24) 100%),
    linear-gradient(0deg, rgba(12, 17, 23, 0.9), transparent 58%);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transform: scale(1.04);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding: 64px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #40a9ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.section-heading p,
.detail-one-line {
  color: #c8d2e2;
  line-height: 1.8;
}

.hero-summary {
  max-width: 610px;
  margin: 24px 0 0;
  font-size: 17px;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #d8ecff;
  background: var(--primary-soft);
  border: 1px solid rgba(64, 169, 255, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 16px 36px rgba(24, 144, 255, 0.28);
}

.ghost-btn,
.section-more {
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}

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

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  width: 30px;
  background: #40a9ff;
}

.section,
.page-hero,
.detail-hero,
.breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 22px 0;
}

.intro-section {
  padding-top: 44px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h1,
.section-heading h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 760px;
  margin: 12px 0 0;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.15);
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid transparent;
  border-radius: 14px;
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(64, 169, 255, 0.55);
}

.search-hint {
  white-space: nowrap;
  color: var(--muted-2);
  font-size: 13px;
  padding-right: 8px;
}

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

.category-tile {
  min-height: 218px;
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.rank-card:hover,
.content-card:hover {
  transform: translateY(-4px);
  border-color: rgba(64, 169, 255, 0.42);
}

.tile-covers {
  display: flex;
  height: 82px;
  margin-bottom: 18px;
}

.mini-cover {
  width: 58px;
  height: 82px;
  margin-right: -14px;
  overflow: hidden;
  background: linear-gradient(135deg, #243447, #111827);
  border: 2px solid #1d232c;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

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

.movie-card,
.rank-card,
.content-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card {
  overflow: hidden;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(24, 144, 255, 0.25), rgba(114, 46, 209, 0.18)),
    #1a2029;
}

.movie-card .poster-wrap {
  aspect-ratio: 2 / 3;
}

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

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

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
}

.poster-wrap img + .poster-fallback {
  display: none;
}

.score-badge,
.year-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 5px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.score-badge {
  left: 10px;
  background: rgba(24, 144, 255, 0.86);
}

.year-badge {
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-info h2 a:hover {
  color: #40a9ff;
}

.card-meta,
.card-desc {
  color: var(--muted);
  font-size: 13px;
}

.card-meta {
  margin: 8px 0 0;
}

.card-desc {
  margin: 8px 0 12px;
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 26px;
}

.rank-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 78px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  align-items: center;
}

.rank-number {
  min-width: 36px;
  color: #40a9ff;
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  width: 78px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.rank-info p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-hero {
  min-height: 350px;
  display: flex;
  align-items: end;
  margin-top: 28px;
  padding-bottom: 50px;
  background:
    linear-gradient(135deg, rgba(24, 144, 255, 0.24), rgba(114, 46, 209, 0.12)),
    linear-gradient(180deg, #202630, #141618);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.page-hero > div {
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #40a9ff;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info {
  padding: 34px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.detail-one-line {
  margin: 20px 0 0;
  font-size: 17px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.meta-grid span {
  padding: 12px;
  color: #dbe8f8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 14px;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  background: #05070a;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(24, 144, 255, 0.26), transparent 22rem),
    linear-gradient(180deg, rgba(5, 7, 10, 0.12), rgba(5, 7, 10, 0.72));
  border: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(24, 144, 255, 0.35);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid #fff;
}

.play-overlay strong {
  font-size: 20px;
}

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

.content-card {
  padding: 26px;
}

.content-card p {
  margin: 16px 0 0;
  color: #c8d2e2;
  line-height: 2;
}

.site-footer {
  margin-top: 72px;
  padding: 42px 22px 54px;
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid var(--line);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 20px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

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

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner,
  .section,
  .page-hero,
  .detail-hero,
  .breadcrumb,
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .hero-slider,
  .hero-slide {
    min-height: 560px;
  }

  .hero-content {
    padding: 34px 24px 78px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

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

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

  .search-hint {
    padding-left: 4px;
  }

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

  .rank-card {
    grid-template-columns: auto 64px minmax(0, 1fr);
  }

  .rank-poster {
    width: 64px;
  }

  .detail-info {
    padding: 24px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .category-grid,
  .movie-grid,
  .compact-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .section-more {
    width: 100%;
  }
}
