:root {
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #ffffff;
  --soft: #f1f5f9;
  --line: rgba(148, 163, 184, 0.28);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #f1f5f9 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0284c7, #1d4ed8);
  box-shadow: 0 14px 40px rgba(2, 132, 199, 0.22);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo {
  font-size: 22px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0284c7;
  background: #fff;
  box-shadow: 0 10px 26px rgba(255, 255, 255, 0.25);
}

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

.nav-link {
  padding: 10px 2px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  transform: translateY(-1px);
}

.nav-search,
.footer-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-panel input,
.footer-search input,
.large-search input {
  height: 40px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-search input::placeholder,
.mobile-panel input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.mobile-panel button,
.footer-search button,
.large-search button {
  border: 0;
  cursor: pointer;
  color: #0369a1;
  background: #fff;
  height: 40px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
}

.mobile-panel {
  padding: 8px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-panel a {
  display: block;
  padding: 12px 8px;
  border-radius: 12px;
  font-weight: 800;
}

.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  padding-top: 10px;
}

.mobile-panel input {
  flex: 1;
}

.hero {
  position: relative;
  min-height: 640px;
  color: #fff;
  overflow: hidden;
  background: #082f49;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image:
    linear-gradient(90deg, rgba(8, 47, 73, 0.96), rgba(14, 116, 144, 0.78), rgba(29, 78, 216, 0.7)),
    var(--hero-image),
    linear-gradient(135deg, #0284c7, #1d4ed8);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.18), transparent 28%),
    radial-gradient(circle at 78% 62%, rgba(125, 211, 252, 0.18), transparent 32%);
}

.hero-inner {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 58px;
  padding: 72px 0 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #bae6fd;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.85;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.ghost-btn,
.small-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--brand-dark);
  background: #fff;
  box-shadow: 0 16px 36px rgba(255, 255, 255, 0.2);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.hero-poster {
  position: relative;
  display: block;
  min-height: 500px;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
  font-size: 22px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

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

.quick-cats {
  position: relative;
  margin-top: -44px;
  z-index: 5;
}

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

.quick-grid a,
.category-card {
  display: block;
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quick-grid strong,
.category-card strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 8px;
}

.quick-grid span,
.category-card span {
  color: var(--muted);
  line-height: 1.7;
}

.content-section {
  padding: 64px 0 0;
}

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

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

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more,
.small-btn {
  color: #fff;
  background: linear-gradient(90deg, #0284c7, #2563eb);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.22);
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  min-height: 330px;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.45), transparent 26%),
    linear-gradient(135deg, #0284c7, #1d4ed8 55%, #0f172a);
}

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

.poster-img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.poster-img.is-missing,
.hero-poster img.is-missing,
.detail-poster img.is-missing,
.rank-cover img.is-missing {
  display: none;
}

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

.poster::after,
.rank-cover::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.88));
}

.poster-title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 2;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.type-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(2, 132, 199, 0.88);
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0284c7;
  background: #fff;
  opacity: 0;
  transform: translate(-50%, -45%);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
  padding: 18px;
}

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

.meta-line,
.card-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-desc {
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
}

.page-hero,
.detail-hero {
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(90deg, #0284c7, #1d4ed8 62%, #0f172a);
}

.page-hero {
  padding: 74px 0;
}

.compact-hero {
  padding: 54px 0;
}

.page-hero p {
  max-width: 820px;
}

.category-cloud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 56px 0 0;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 48px 0 0;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: #0369a1;
  background: #e0f2fe;
}

.pagination span {
  color: #fff;
  background: #0284c7;
}

.rank-section {
  padding-top: 48px;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.rank-no {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #0284c7, #1d4ed8);
}

.rank-cover {
  position: relative;
  height: 142px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #0284c7, #1d4ed8);
}

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

.rank-cover span {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  bottom: 10px;
  color: #fff;
  font-weight: 900;
}

.rank-info h2,
.rank-info p {
  margin: 0;
}

.rank-info h2 {
  font-size: 22px;
}

.rank-info p {
  color: var(--muted);
  line-height: 1.7;
  margin-top: 6px;
}

.detail-hero {
  padding: 46px 0 60px;
}

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

.detail-poster {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.06));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.25);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
}

.detail-poster span {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.info-list div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.info-list dt {
  color: #bae6fd;
  font-weight: 900;
}

.info-list dd {
  margin: 5px 0 0;
  font-weight: 800;
}

.detail-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-copy .primary-btn {
  margin-top: 28px;
}

.player-section {
  padding-top: 54px;
}

.player-section h2 {
  font-size: 32px;
  margin: 0 0 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.28);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #0284c7;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
}

.play-layer[hidden] {
  display: none;
}

.play-layer span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.detail-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  padding-top: 42px;
}

.detail-article article,
.side-links {
  border-radius: var(--radius);
  padding: 28px;
  background: #fff;
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.side-links h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

.side-links a {
  display: block;
  padding: 14px 0;
  color: #0369a1;
  font-weight: 900;
  border-top: 1px solid var(--line);
}

.large-search {
  max-width: 680px;
  margin-top: 24px;
}

.large-search input {
  flex: 1;
  color: #0f172a;
  background: #fff;
  height: 52px;
}

.large-search button {
  height: 52px;
  color: #fff;
  background: #0f172a;
}

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

.site-footer {
  margin-top: 76px;
  color: #e2e8f0;
  background: linear-gradient(180deg, #1e293b, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
  padding: 48px 0;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-search input {
  width: 100%;
  color: #fff;
}

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

.footer-bottom {
  padding: 18px 0;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-poster {
    max-width: 420px;
    min-height: 420px;
  }

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

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

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

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 18px;
  }

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

  .hero-inner {
    padding-top: 44px;
  }

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

  .hero-poster img {
    min-height: 330px;
  }

  .quick-grid,
  .movie-grid,
  .category-cloud,
  .footer-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .rank-row {
    display: block;
  }

  .section-more,
  .rank-row .small-btn {
    margin-top: 16px;
  }

  .rank-cover {
    margin: 14px 0;
    width: 130px;
  }

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

  .detail-copy h1,
  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }
}
