:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #06b6d4;
  --warning: #f59e0b;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 1.25rem;
}

* {
  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(14, 165, 233, 0.14), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0%, #eef6ff 48%, #f8fafc 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #06b6d4 58%, #22c55e);
  box-shadow: 0 14px 32px rgba(14, 165, 233, 0.32);
}

.logo-text {
  font-size: 1.18rem;
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-link,
.mobile-link,
.footer-links a {
  padding: 0.66rem 0.9rem;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.footer-links a:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--primary-dark);
  background: #e0f2fe;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--primary-dark);
  background: #e0f2fe;
  font-size: 1.35rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 1rem;
  padding: 0.65rem;
  border-radius: 20px;
  background: rgba(240, 249, 255, 0.9);
}

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

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: clamp(1.5rem, 3vw, 4rem);
  width: 100%;
  padding: clamp(5rem, 8vw, 8rem) max(24px, calc((100vw - 1180px) / 2));
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.65s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(3, 105, 161, 0.72), rgba(2, 6, 23, 0.72)),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.38), transparent 26rem);
}

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

.hero-copy,
.hero-media {
  position: relative;
  z-index: 2;
}

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

.eyebrow {
  margin: 0 0 0.7rem;
  color: #0284c7;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-slider .eyebrow,
.page-hero .eyebrow,
.ranking-page-hero .eyebrow,
.category-page-hero .eyebrow {
  color: #7dd3fc;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(2.6rem, 6vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
}

.hero-copy h2 {
  margin-top: 0.9rem;
  font-size: clamp(2rem, 4.6vw, 4.8rem);
}

.hero-summary {
  max-width: 680px;
  margin: 1.4rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.32);
}

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

.ghost-btn.dark {
  color: var(--primary-dark);
  border-color: rgba(14, 165, 233, 0.24);
  background: #e0f2fe;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.hero-media {
  justify-self: end;
  width: min(430px, 100%);
  aspect-ratio: 3 / 4;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 2rem;
  z-index: 5;
  display: flex;
  gap: 0.7rem;
}

.hero-controls button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 2rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.section-block {
  width: min(1180px, calc(100% - 32px));
  margin: 4.5rem auto;
}

.compact-section {
  margin-top: 2rem;
}

.section-heading {
  margin-bottom: 1.4rem;
}

.section-heading.between {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.2rem;
}

.section-heading h2,
.page-hero h1,
.detail-content h1,
.detail-content h2 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.045em;
}

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
}

.section-heading p,
.page-hero p,
.detail-content p,
.footer-inner p {
  color: var(--muted);
}

.text-link {
  color: var(--primary-dark);
  font-weight: 900;
}

.filter-panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.filter-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
  gap: 1rem;
}

.filter-fields label {
  display: grid;
  gap: 0.4rem;
  color: #334155;
  font-weight: 800;
}

.filter-fields input,
.filter-fields select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 15px;
  padding: 0 1rem;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.filter-fields input:focus,
.filter-fields select:focus {
  border-color: rgba(14, 165, 233, 0.72);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 1.15rem;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.38);
  box-shadow: var(--shadow);
}

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

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.72));
}

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.82);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  left: 0.75rem;
  top: 0.75rem;
  min-width: 38px;
  height: 38px;
  padding: 0 0.6rem;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.movie-card-body {
  padding: 1rem;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0.45rem 0 0;
  font-size: 1.06rem;
  line-height: 1.28;
}

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

.movie-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.tag-row span,
.detail-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 0.8rem;
  font-weight: 800;
}

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 1.35rem;
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.85));
}

.category-name,
.category-desc {
  position: absolute;
  left: 1rem;
  right: 1rem;
  z-index: 2;
}

.category-name {
  bottom: 4.25rem;
  font-size: 1.3rem;
  font-weight: 900;
}

.category-desc {
  bottom: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  width: min(1180px, calc(100% - 32px));
  margin: 2rem auto 0;
  padding: clamp(3rem, 7vw, 6rem);
  border-radius: 2rem;
  color: #ffffff;
  background:
    radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.42), transparent 28rem),
    linear-gradient(135deg, #0f172a, #075985 52%, #0e7490);
  box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.page-hero p {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 1.5rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.3rem;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.54));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-button span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.42);
  font-size: 2rem;
}

.player-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-aside {
  display: grid;
  gap: 1rem;
}

.detail-poster {
  width: 100%;
  border-radius: 1.35rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-content {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.detail-content h1 {
  margin-bottom: 1rem;
}

.detail-content h2 {
  margin-top: 2rem;
  font-size: 1.55rem;
}

.lead-text {
  font-size: 1.12rem;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}

.site-footer {
  margin-top: 5rem;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 3rem 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.footer-inner p {
  max-width: 560px;
  color: #94a3b8;
}

.footer-logo {
  color: #ffffff;
  font-size: 1.2rem;
}

.footer-links a {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 1.1rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-media {
    justify-self: start;
    width: min(320px, 72vw);
  }

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

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

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

  .detail-aside {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 0.35rem;
  }

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

  .hero-slide {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }

  .section-heading.between,
  .footer-inner,
  .detail-aside {
    display: grid;
  }

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

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

  .movie-card-body {
    padding: 0.85rem;
  }

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

  .page-hero {
    padding: 2.5rem 1.4rem;
  }

  .player-button span {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 2.25rem;
  }
}
