:root {
  --page-bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #172033;
  --muted: #667085;
  --line: #dbe6f3;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --yellow: #fde047;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.22);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --content: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(219, 230, 243, 0.75);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  width: var(--content);
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.brand-copy {
  display: grid;
  line-height: 1.18;
}

.brand-copy strong {
  font-size: 20px;
  color: #1f2937;
}

.brand-copy small {
  color: #667085;
  font-size: 12px;
}

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

.nav-link {
  color: #475467;
  font-size: 15px;
  font-weight: 600;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
}

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

.nav-cta,
.mobile-nav-cta,
.button-primary {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f2f4f7;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: #344054;
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  width: var(--content);
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(219, 230, 243, 0.9);
}

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

.mobile-nav-link,
.mobile-nav-cta {
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-nav-link.is-active {
  color: var(--blue);
  background: #eff6ff;
}

main {
  padding-top: 76px;
}

.hero-section {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 52%, #14b8a6 100%);
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(253, 224, 71, 0.28), transparent 28%),
              radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.26), transparent 24%),
              linear-gradient(90deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.08));
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: var(--content);
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  align-items: center;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
  gap: 48px;
  align-items: center;
  padding: 70px 0 84px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 560ms ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: var(--yellow);
}

.hero-copy h1 {
  margin: 0 0 10px;
  max-width: 780px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 44px);
  color: #fef3c7;
}

.hero-copy p {
  margin: 0 0 30px;
  max-width: 760px;
  color: #eff6ff;
  font-size: clamp(17px, 2vw, 22px);
}

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

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

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-ghost {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
}

.button-ghost.dark {
  color: var(--blue-dark);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.hero-poster {
  position: relative;
  min-height: 430px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(15, 23, 42, 0.22));
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  z-index: 3;
  pointer-events: none;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transform: scale(1.01);
}

.hero-poster strong {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  color: #ffffff;
  font-size: 24px;
}

.poster-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 24%, rgba(2, 6, 23, 0.76));
  pointer-events: none;
}

.image-missing .poster-gradient,
.movie-poster.image-missing,
.ranking-thumb.image-missing,
.detail-cover.image-missing,
.hero-poster.image-missing {
  background: linear-gradient(135deg, #1d4ed8, #06b6d4 55%, #0f172a);
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 48px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 36px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.section {
  padding: 76px 0;
}

.white-section {
  background: #ffffff;
}

.soft-section {
  background: linear-gradient(180deg, #f7fbff, #edf6ff);
}

.section-heading {
  width: var(--content);
  margin: 0 auto 32px;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.section-heading.with-link,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
}

.section-heading.with-link p,
.category-overview-head p {
  margin-left: 0;
}

.left-heading {
  text-align: left;
}

.left-heading p {
  margin-left: 0;
}

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

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

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

.all-movie-grid {
  align-items: stretch;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(219, 230, 243, 0.85);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: #eaf2ff;
}

.movie-card-compact .movie-poster {
  height: 210px;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.movie-badge,
.movie-year {
  position: absolute;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.92);
  backdrop-filter: blur(8px);
}

.movie-badge {
  left: 12px;
  top: 12px;
}

.movie-year {
  right: 12px;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.72);
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  color: #101828;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-compact .movie-title {
  min-height: 44px;
  font-size: 16px;
}

.movie-meta {
  margin: 8px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: #667085;
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card a {
  display: grid;
  gap: 10px;
  min-height: 210px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.category-card:nth-child(2n) a {
  background: linear-gradient(135deg, #0f766e, #06b6d4);
}

.category-card:nth-child(3n) a {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

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

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card strong {
  font-size: 46px;
  line-height: 1;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.mini-links {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  font-size: 13px;
}

.mini-links a {
  color: rgba(255, 255, 255, 0.88);
}

.ranking-grid,
.ranking-list {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ranking-list {
  grid-template-columns: 1fr;
}

.ranking-item {
  display: grid;
  grid-template-columns: 62px 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--blue);
  background: #eff6ff;
  font-size: 20px;
  font-weight: 900;
}

.top-rank .ranking-number {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.ranking-thumb {
  position: relative;
  overflow: hidden;
  height: 110px;
  border-radius: 16px;
  background: #eaf2ff;
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-copy a {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.ranking-copy span {
  display: block;
  margin: 4px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.ranking-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.filter-panel {
  width: var(--content);
  margin: 0 auto 28px;
  padding: 20px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.search-box,
.filter-selects label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.filter-selects select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
  color: #101828;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

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

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.empty-state {
  display: none;
  width: var(--content);
  margin: 24px auto 0;
  padding: 28px;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: #f8fbff;
}

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

.page-main {
  background: #ffffff;
}

.page-hero {
  width: var(--content);
  margin: 0 auto;
  padding: 80px 0 36px;
  text-align: center;
}

.small-hero,
.category-hero,
.ranking-hero {
  padding-top: 92px;
}

.center-actions {
  justify-content: center;
  margin-top: 22px;
}

.category-overview-block {
  width: var(--content);
  margin: 0 auto 36px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.category-overview-head {
  margin-bottom: 24px;
}

.breadcrumb {
  width: var(--content);
  margin: 0 auto;
  padding: 26px 0 0;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-main {
  background: #f7fbff;
}

.detail-hero {
  width: var(--content);
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 30px;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  box-shadow: var(--shadow-md);
}

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

.detail-info {
  padding: 38px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.detail-info .lead {
  margin: 18px 0 24px;
  color: #475467;
  font-size: 19px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fbff;
}

.detail-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-meta dd {
  margin: 0;
  color: #111827;
  font-weight: 900;
}

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

.player-section {
  width: var(--content);
  margin: 58px auto 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.30), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.36);
  font-size: 32px;
}

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

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  padding: 6px 11px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  font-size: 13px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: var(--content);
  margin: 0 auto;
  background: transparent;
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

.content-card p {
  margin: 0;
  color: #475467;
  font-size: 17px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: var(--content);
  margin: 0 auto;
  padding: 52px 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid p {
  margin: 0;
  color: #cbd5e1;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  width: var(--content);
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .nav-links {
    gap: 14px;
  }

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

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

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

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

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

  .hero-slide,
  .detail-hero,
  .detail-content,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .hero-slide {
    padding: 46px 0 92px;
  }

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

  .hero-dots {
    left: 0;
    bottom: 34px;
  }

  .section-heading.with-link,
  .category-overview-head {
    display: grid;
  }

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

  .filter-selects {
    display: grid;
  }
}

@media (max-width: 640px) {
  :root {
    --content: min(100vw - 22px, 1180px);
  }

  .brand-copy small {
    display: none;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

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

  .movie-poster,
  .movie-card-compact .movie-poster {
    height: 260px;
  }

  .ranking-item {
    grid-template-columns: 46px 72px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-number {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .ranking-thumb {
    height: 88px;
  }

  .detail-cover {
    min-height: 420px;
  }

  .detail-info {
    padding: 24px;
  }

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

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