:root {
  --cyan-50: #ecfeff;
  --cyan-100: #cffafe;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --cyan-700: #0e7490;
  --blue-50: #eff6ff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 55px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: var(--slate-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--slate-900);
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-600), #2563eb);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.26);
}

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

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--slate-600);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan-700);
  background: var(--cyan-50);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--slate-700);
  background: var(--slate-100);
  cursor: pointer;
}

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 260px;
}

.site-search input,
.filter-panel input {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--slate-700);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus,
.filter-panel input:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.site-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--cyan-600);
  cursor: pointer;
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: 440px;
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
}

.search-panel.is-open {
  display: grid;
  gap: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: var(--slate-100);
}

.search-result img {
  width: 60px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--slate-200);
}

.search-result strong {
  display: block;
  color: var(--slate-900);
  font-size: 14px;
  line-height: 1.3;
}

.search-result span {
  color: var(--slate-500);
  font-size: 12px;
}

.hero-slider {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: 78px;
}

.hero-copy {
  max-width: 700px;
  color: var(--white);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  font-size: clamp(24px, 4vw, 42px);
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

.hero-meta span:first-child {
  background: var(--cyan-600);
}

.hero-actions,
.spotlight-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: var(--cyan-600);
  box-shadow: 0 15px 30px rgba(8, 145, 178, 0.25);
}

.primary-btn:hover,
.more-link:hover {
  transform: translateY(-2px);
  background: var(--cyan-700);
  box-shadow: 0 20px 38px rgba(8, 145, 178, 0.28);
}

.primary-btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 64px 0;
}

.section.light {
  background: var(--slate-50);
}

.section.white {
  background: var(--white);
}

.section.gradient {
  background: linear-gradient(135deg, var(--white), rgba(239, 246, 255, 0.72), rgba(236, 254, 255, 0.82));
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading.tight {
  margin-bottom: 20px;
}

.section-heading h2,
.mini-heading h3,
.category-overview-card h2,
.text-panel h2,
.spotlight-panel h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.section-heading p,
.category-overview-card p,
.spotlight-panel p,
.text-panel p {
  margin: 0;
  color: var(--slate-600);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--cyan-700);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-category,
.card-year {
  position: absolute;
  top: 12px;
  border-radius: 8px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.card-category {
  left: 12px;
  background: var(--cyan-600);
}

.card-year {
  right: 12px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 18px;
}

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

.card-body h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body h2 a:hover {
  color: var(--cyan-700);
}

.card-body p {
  min-height: 45px;
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.card-meta {
  margin-bottom: 10px;
  color: var(--slate-500);
  font-size: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-size: 12px;
}

.large-tags span {
  padding: 7px 11px;
  color: var(--slate-700);
  background: var(--white);
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.scroll-card {
  width: 300px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.category-strip a,
.spotlight-links a {
  display: block;
  border: 1px solid rgba(8, 145, 178, 0.16);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-strip a:hover,
.spotlight-links a:hover {
  border-color: var(--cyan-500);
  transform: translateY(-3px);
}

.category-strip strong {
  display: block;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.category-strip span {
  display: block;
  color: var(--slate-500);
  font-size: 13px;
}

.showcase-stack,
.category-overview-list {
  display: grid;
  gap: 34px;
}

.category-showcase,
.category-overview-card,
.text-panel,
.spotlight-panel,
.filter-panel {
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-md);
}

.mini-heading,
.overview-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.mini-heading h3 {
  font-size: 24px;
}

.mini-heading a {
  color: var(--cyan-700);
  font-weight: 700;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 30px;
  align-items: start;
}

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

.wide-rank {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-item img {
  width: 76px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-200);
}

.rank-num {
  font-weight: 900;
  color: var(--slate-400);
  font-size: 20px;
  text-align: center;
}

.rank-item.top .rank-num {
  color: var(--cyan-600);
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: var(--slate-900);
  line-height: 1.35;
}

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

.more-link {
  margin-top: 18px;
  color: var(--white);
  background: var(--cyan-600);
}

.spotlight-panel {
  position: sticky;
  top: 92px;
  background: linear-gradient(135deg, var(--slate-900), #164e63);
}

.spotlight-panel h2,
.spotlight-panel p {
  color: var(--white);
}

.spotlight-panel p {
  color: #cbd5e1;
  margin-bottom: 20px;
}

.spotlight-links {
  flex-direction: column;
}

.spotlight-links a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.38), transparent 32%), linear-gradient(135deg, var(--slate-900), #172554 60%, #164e63);
}

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

.compact-hero h1 {
  max-width: 860px;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bae6fd;
  font-size: 14px;
}

.breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.42);
}

.filter-panel {
  margin-bottom: 26px;
  display: grid;
  gap: 16px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--slate-600);
  background: var(--white);
  cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover {
  color: var(--white);
  border-color: var(--cyan-600);
  background: var(--cyan-600);
}

.detail-hero {
  padding: 70px 0;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 19px;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.16);
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--cyan-700);
  background: rgba(255, 255, 255, 0.92);
  font-size: 30px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

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

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.text-panel p {
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  padding: 48px 0 24px;
  color: var(--slate-400);
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--slate-400);
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-links a:hover {
  color: var(--cyan-100);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .catalog-grid,
  .small-grid,
  .category-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-search {
    min-width: 220px;
  }
}

@media (max-width: 900px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-links {
    order: 3;
    width: 100%;
    display: none;
    flex-wrap: wrap;
    padding-top: 8px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .site-search {
    order: 2;
    min-width: 100%;
  }

  .hero-slider {
    height: 590px;
  }

  .hero-content {
    padding-bottom: 76px;
  }

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .small-grid,
  .category-strip,
  .wide-rank,
  .detail-content,
  .ranking-layout,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    gap: 28px;
  }

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

  .spotlight-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

  .section {
    padding: 44px 0;
  }

  .hero-control {
    display: none;
  }

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

  .hero-actions,
  .overview-top,
  .mini-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .category-showcase,
  .category-overview-card,
  .text-panel,
  .spotlight-panel,
  .filter-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .rank-item {
    grid-template-columns: 40px 64px 1fr;
  }

  .rank-item img {
    width: 64px;
    height: 48px;
  }
}
