:root {
  --page: #f6f9ff;
  --ink: #12213f;
  --muted: #60708d;
  --line: rgba(32, 63, 120, 0.12);
  --brand: #246bfe;
  --brand-dark: #144ab8;
  --brand-soft: rgba(36, 107, 254, 0.12);
  --card: rgba(255, 255, 255, 0.88);
  --shadow: 0 18px 45px rgba(25, 59, 120, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(75, 140, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(94, 234, 212, 0.14), transparent 28rem),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 48%, #f7fbff 100%);
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(218, 228, 244, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(18, 33, 63, 0.06);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, #246bfe, #20c4ff);
  box-shadow: 0 14px 28px rgba(36, 107, 254, 0.28);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-nav-link {
  color: #334261;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-soft);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--brand);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

.home-hero {
  position: relative;
  min-height: 670px;
  overflow: hidden;
  color: #ffffff;
  background: #071225;
}

.hero-track,
.hero-slide,
.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

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

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

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #246bfe;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero .hero-label,
.detail-hero .hero-label {
  color: #b9d5ff;
}

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

.hero-copy p,
.detail-copy p,
.compact-hero p {
  max-width: 740px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  color: #d9e9ff;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.tag-row span {
  color: #3c5d93;
  border-color: rgba(36, 107, 254, 0.12);
  background: rgba(36, 107, 254, 0.08);
}

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

.primary-button,
.ghost-button,
.section-more,
.line-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #20c4ff);
  box-shadow: 0 18px 34px rgba(36, 107, 254, 0.32);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  aspect-ratio: 2 / 3;
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
}

.hero-poster span,
.play-dot {
  position: absolute;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(36, 107, 254, 0.92);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.hero-poster span {
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

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

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

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

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: -44px 0 54px;
  position: relative;
  z-index: 10;
}

.stat-strip a,
.info-card,
.category-tile,
.search-panel,
.movie-card,
.rank-row,
.info-grid > div {
  border: 1px solid rgba(218, 228, 244, 0.92);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-strip a {
  padding: 22px;
  border-radius: 22px;
}

.stat-strip strong {
  display: block;
  font-size: 18px;
}

.stat-strip span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.content-section {
  padding: 28px 0 46px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more,
.line-button {
  color: var(--brand);
  background: var(--brand-soft);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chips a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  color: #27426d;
  font-weight: 900;
  border: 1px solid rgba(36, 107, 254, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chips a:hover,
.category-tile:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
}

.category-chips span {
  color: var(--brand);
  font-size: 12px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #dbe8fb;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.62));
}

.play-dot {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a18, #ff2d55);
}

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

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

.card-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-card h3,
.rank-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-copy h3 a:hover {
  color: var(--brand);
}

.movie-card p,
.rank-copy p {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.compact .card-body {
  padding: 14px;
}

.compact h3 {
  font-size: 16px;
}

.compact p {
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 86px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  transition: transform 0.2s ease;
}

.rank-poster {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #dbe8fb;
}

.rank-poster img {
  height: 100%;
  object-fit: cover;
}

.rank-number {
  color: var(--brand);
  font-size: 28px;
  font-weight: 950;
}

.compact-rank .rank-row:nth-child(n + 5) {
  display: none;
}

.page-hero {
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(4, 13, 35, 0.96), rgba(18, 79, 168, 0.86)),
    radial-gradient(circle at 85% 10%, rgba(32, 196, 255, 0.45), transparent 28rem);
}

.compact-hero {
  padding: 92px 0 72px;
}

.compact-hero .section-kicker {
  color: #cce0ff;
}

.compact-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.compact-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.list-page {
  margin-top: 12px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 13px;
  border-radius: 14px;
  color: #344668;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.pagination strong {
  color: #ffffff;
  background: var(--brand);
}

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

.category-tile {
  padding: 22px;
  border-radius: 20px;
  transition: transform 0.2s ease;
}

.category-tile strong {
  display: block;
  font-size: 19px;
}

.category-tile span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.search-panel {
  margin-top: -28px;
  padding: 24px;
  border-radius: 24px;
  position: relative;
  z-index: 5;
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  flex: 1;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: #ffffff;
}

.search-box input:focus {
  border-color: rgba(36, 107, 254, 0.56);
  box-shadow: 0 0 0 4px rgba(36, 107, 254, 0.1);
}

.search-box button,
.filter-row button {
  border: 0;
  cursor: pointer;
  color: var(--brand);
  font-weight: 900;
  border-radius: 16px;
  background: var(--brand-soft);
}

.search-box button {
  padding: 0 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-row button {
  min-height: 38px;
  padding: 0 14px;
}

.filter-row button.is-active {
  color: #ffffff;
  background: var(--brand);
}

.search-grid .movie-card.is-hidden {
  display: none;
}

.detail-hero {
  min-height: 620px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  min-height: 620px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  padding: 64px 0;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 78px rgba(0, 0, 0, 0.34);
  aspect-ratio: 2 / 3;
}

.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.detail-layout {
  margin-top: -56px;
  position: relative;
  z-index: 3;
}

.player-section,
.detail-info,
.related-section {
  margin-bottom: 34px;
}

.player-section {
  padding: 22px;
  border: 1px solid rgba(218, 228, 244, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020814;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #20c4ff);
  box-shadow: 0 20px 46px rgba(36, 107, 254, 0.38);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-overlay span {
  margin-left: 4px;
  font-size: 30px;
}

.player-frame.is-playing .play-overlay,
.player-frame.is-ready .play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.info-card {
  padding: 24px;
  border-radius: 24px;
}

.info-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.info-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.info-grid > div {
  padding: 18px;
  border-radius: 20px;
}

.info-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.detail-nav-links {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.detail-nav-links a {
  flex: 1;
  padding: 16px 18px;
  color: var(--brand);
  font-weight: 900;
  border-radius: 18px;
  background: var(--brand-soft);
}

.site-footer {
  margin-top: 42px;
  color: #dce9ff;
  background: linear-gradient(135deg, #061127, #0e2b61);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 42px 0;
}

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

.footer-inner p {
  max-width: 520px;
  color: rgba(220, 233, 255, 0.82);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 14px 24px;
  align-content: center;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 24px;
  color: rgba(220, 233, 255, 0.68);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

  .hero-content {
    grid-template-columns: 1fr 260px;
  }

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

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

  .mobile-menu-button {
    display: block;
  }

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

  .hero-content,
  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 250px;
  }

  .detail-hero,
  .detail-hero-inner {
    min-height: auto;
  }

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

  .rank-row {
    grid-template-columns: 74px 44px 1fr;
  }

  .rank-row .line-button {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 560px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 64px;
  }

  .logo-text {
    font-size: 17px;
  }

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

  .hero-content {
    padding: 52px 0 76px;
  }

  .hero-copy h1,
  .detail-copy h1,
  .compact-hero h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .detail-copy p,
  .compact-hero p {
    font-size: 16px;
  }

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

  .section-head,
  .search-box,
  .detail-nav-links {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 64px 1fr;
  }

  .rank-number {
    position: absolute;
    left: 22px;
    top: 18px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  }
}
