:root {
  --bg: #f6f8ff;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #7c3aed;
  --line: rgba(148, 163, 184, 0.28);
  --shadow: 0 24px 80px rgba(30, 41, 59, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34rem),
    linear-gradient(180deg, #f7f9ff 0%, #eef4ff 48%, #ffffff 100%);
  min-height: 100vh;
}

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

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

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

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.global-search-form {
  display: flex;
  align-items: center;
  width: 282px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.global-search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  background: transparent;
  color: var(--ink);
}

.global-search-form button {
  border: 0;
  padding: 11px 15px;
  color: #ffffff;
  font-weight: 800;
  background: var(--brand);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #eff6ff;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #1e3a8a;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 800;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: saturate(1.08);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.64) 46%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.82) 100%);
}

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

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: #60a5fa;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  color: #ffffff;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.85rem;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

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

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.34);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn.light {
  color: var(--brand);
  background: #ffffff;
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.38);
  transform: translate(-50%, -50%);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 1.4rem;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.main-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 82px;
}

.content-section {
  margin-top: 58px;
}

.content-section:first-child {
  margin-top: 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.section-heading p:not(.eyebrow) {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: none;
  border-radius: 999px;
  padding: 11px 16px;
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: 900;
}

.category-strip,
.category-grid {
  display: grid;
  gap: 18px;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 162px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.28), transparent 12rem),
    linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-card small {
  display: inline-flex;
  margin-top: 16px;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e0e7ff;
}

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.76) 100%);
}

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

.play-dot {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 14px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
}

.movie-card-compact .poster-link img {
  height: 100%;
}

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

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 68px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.22), transparent 18rem),
    linear-gradient(135deg, #172554, #2563eb 52%, #7c3aed);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.page-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  letter-spacing: -0.07em;
  line-height: 1.03;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.9;
}

.listing-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.listing-controls input,
.listing-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.player-panel,
.detail-card,
.side-card,
.search-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
}

.player-cover span {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 20px 54px rgba(37, 99, 235, 0.4);
  font-size: 1.6rem;
}

.player-cover.hidden {
  display: none;
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h2,
.side-card h2,
.search-panel h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
}

.detail-card p {
  color: #334155;
  line-height: 2;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.side-card {
  padding: 18px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  line-height: 1.35;
}

.side-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.search-panel {
  padding: 28px;
}

.search-large {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 24px;
}

.search-large input {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 16px;
  outline: 0;
}

.search-large button {
  border: 0;
  border-radius: 18px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-weight: 900;
  cursor: pointer;
}

.site-footer {
  color: rgba(255, 255, 255, 0.86);
  background: #0f172a;
}

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

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

.footer-inner p {
  max-width: 680px;
  margin: 14px 0 0;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 18px;
  align-content: start;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 800;
}

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

.empty-state {
  padding: 30px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .global-search-form {
    display: none;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-poster {
    max-width: 320px;
    transform: none;
  }

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

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

  .hero-content {
    gap: 28px;
    padding: 44px 0 88px;
  }

  .hero-poster {
    display: none;
  }

  .hero-controls {
    bottom: 18px;
  }

  .main-wrap {
    padding: 38px 0 58px;
  }

  .section-heading,
  .listing-controls,
  .search-large {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .movie-card-compact {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .category-strip,
  .category-grid,
  .movie-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 58px 0 48px;
  }

  .movie-card-compact {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}
