:root {
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f0f9ff;
  --line: #dbeafe;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  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, #ecfeff 0%, #ffffff 32%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(240, 249, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.12);
}

.nav-wrap {
  max-width: 1240px;
  height: 76px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

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

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

.nav-link {
  display: inline-flex;
  padding: 10px 15px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 20px rgba(6, 182, 212, 0.25);
}

.nav-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 2px solid rgba(6, 182, 212, 0.22);
  background: #ffffff;
  border-radius: 999px;
}

.nav-search input,
.mobile-search input,
.hero-search input {
  width: 230px;
  border: 0;
  outline: 0;
  padding: 11px 14px 11px 18px;
  background: transparent;
}

.nav-search button,
.mobile-search button,
.hero-search button {
  border: 0;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(125, 211, 252, 0.35);
  background: #ffffff;
}

.mobile-panel.open {
  display: block;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  padding: 16px 22px 8px;
}

.mobile-search {
  margin: 8px 22px 18px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 55%, #0f172a 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.32), transparent 22%),
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.55));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: blur(2px) saturate(1.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 640px;
  margin: 0 auto;
  padding: 86px 22px 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 64px;
}

.hero-copy {
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(125, 211, 252, 0.45);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 22px 0;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #cffafe;
  font-size: clamp(18px, 2.3vw, 26px);
  line-height: 1.7;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 13px;
  font-weight: 800;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn.primary {
  color: var(--cyan-dark);
  background: #ffffff;
  box-shadow: 0 18px 30px rgba(255, 255, 255, 0.25);
}

.btn.ghost {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.78);
}

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

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #67e8f9, #bfdbfe);
  box-shadow: 0 35px 70px rgba(15, 23, 42, 0.38);
}

.hero-poster img,
.poster img,
.detail-poster img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.image-missing {
  opacity: 0;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

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

.stats-panel {
  max-width: 1120px;
  margin: -50px auto 0;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 22px;
}

.stats-panel div {
  min-height: 110px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.stats-panel strong {
  color: var(--cyan-dark);
  font-size: 32px;
  line-height: 1;
}

.stats-panel span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.section-wrap,
.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 68px 22px;
}

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

.section-head.centered {
  justify-content: center;
  text-align: center;
}

.section-head.slim {
  align-items: center;
}

.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 10px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.more-link {
  color: var(--cyan-dark);
  font-weight: 900;
}

.soft-bg {
  max-width: none;
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.8), rgba(207, 250, 254, 0.8));
}

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

.featured-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 55px rgba(14, 165, 233, 0.2);
}

.movie-card.featured {
  background: linear-gradient(180deg, #ffffff, #ecfeff);
}

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

.poster-badge,
.poster-score {
  position: absolute;
  top: 12px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.poster-badge {
  left: 12px;
}

.poster-score {
  right: 12px;
  background: rgba(6, 182, 212, 0.9);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--cyan-dark);
  font-size: 13px;
  font-weight: 900;
}

.card-body h3 {
  margin: 10px 0;
  font-size: 20px;
  line-height: 1.3;
}

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

.movie-card.compact .card-body p {
  -webkit-line-clamp: 2;
  min-height: 48px;
}

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

.category-pill {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 112px;
  justify-content: center;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.12);
  transition: 0.25s ease;
}

.category-pill:hover {
  transform: translateY(-5px);
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

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

.category-pill em {
  color: var(--muted);
  font-style: normal;
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 68px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-index {
  font-size: 22px;
  font-weight: 900;
  color: var(--cyan-dark);
}

.rank-row img {
  width: 68px;
  height: 92px;
  border-radius: 12px;
}

.rank-info {
  display: grid;
  gap: 8px;
}

.rank-info strong {
  font-size: 17px;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 62px 22px;
}

.compact-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 26px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 24%),
    linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: var(--shadow);
}

.compact-hero .section-kicker {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

.compact-hero p {
  color: #dff9ff;
}

.hero-search {
  min-width: min(460px, 100%);
}

.hero-search input {
  width: 100%;
}

.catalog-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 22px 76px;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  gap: 30px;
}

.filter-panel {
  position: sticky;
  top: 104px;
  align-self: start;
  display: grid;
  gap: 22px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-block {
  display: grid;
  gap: 12px;
}

.filter-block label,
.filter-block span {
  color: #334155;
  font-weight: 900;
}

.filter-block input,
.filter-block select {
  width: 100%;
  border: 2px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 14px;
  outline: 0;
  background: #ffffff;
}

.filter-block input:focus,
.filter-block select:focus {
  border-color: var(--cyan);
}

.filter-buttons {
  display: grid;
  gap: 8px;
}

.filter-buttons button {
  border: 0;
  padding: 11px 13px;
  border-radius: 13px;
  color: #334155;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.result-bar {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

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

.category-page-list {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 22px 76px;
  display: grid;
  gap: 30px;
}

.category-block {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.category-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-block h2 {
  margin: 12px 0 8px;
  font-size: 34px;
}

.category-block p {
  margin: 0;
  color: var(--muted);
}

.rank-table-wrap {
  overflow: auto;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.rank-table th,
.rank-table td {
  padding: 17px 18px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.rank-table th {
  color: #0f766e;
  background: #ecfeff;
}

.table-rank {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.table-title {
  font-weight: 900;
}

.detail-main {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0e7490 55%, #2563eb);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.72));
}

.detail-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 560px;
  margin: 0 auto;
  padding: 74px 22px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
  display: flex;
  gap: 10px;
  color: #a5f3fc;
  font-weight: 800;
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(42px, 6vw, 76px);
}

.detail-line {
  max-width: 820px;
  color: #dff9ff;
  font-size: 22px;
  line-height: 1.7;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-row.large span {
  background: rgba(255, 255, 255, 0.9);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.3);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  color: #ffffff;
  background: radial-gradient(circle at 50% 42%, rgba(6, 182, 212, 0.36), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.42);
  font-size: 30px;
}

.player-start strong {
  font-size: 22px;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.story-card {
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.story-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.story-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

.site-footer {
  color: #ffffff;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 36px;
}

.footer-grid p {
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-grid h3 {
  color: #67e8f9;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

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

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

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

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

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

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

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

  .catalog-layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }
}

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

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

  .nav-wrap {
    height: 66px;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content,
  .detail-content {
    grid-template-columns: 1fr;
    padding-top: 50px;
    text-align: left;
  }

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

  .stats-panel {
    margin-top: 22px;
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head,
  .category-block-head,
  .compact-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .small-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 17px;
  }

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

  .hero-copy p,
  .detail-line {
    font-size: 17px;
  }

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .small-grid,
  .mini-grid,
  .category-cloud,
  .stats-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .section-wrap,
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }
}
