:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-400: #f59e0b;
  --accent-600: #d97706;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 28px 65px rgba(15, 23, 42, 0.18);
}

* {
  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(--secondary-900);
  background: var(--secondary-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-400));
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.28);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand.mini .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.brand.mini .brand-text {
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--secondary-700);
  font-weight: 650;
  transition: 0.22s ease;
}

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

.nav-chip {
  font-size: 14px;
  color: var(--secondary-600);
}

.quick-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--secondary-200);
  border-radius: 14px;
  background: #fff;
}

.quick-search input {
  width: 170px;
  border: 0;
  outline: 0;
  padding: 10px 12px;
}

.quick-search button,
.search-main button {
  border: 0;
  cursor: pointer;
  padding: 10px 16px;
  color: #fff;
  background: var(--primary-600);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  background: var(--secondary-100);
  color: var(--secondary-800);
  cursor: pointer;
}

.hero {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: #000;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  left: max(22px, calc((100vw - 1180px) / 2));
  bottom: 82px;
  width: min(720px, calc(100% - 44px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--accent-400);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1,
.detail-info h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.genre-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 700;
}

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

.hero-actions,
.detail-info .btn {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn.primary {
  color: #fff;
  background: var(--primary-600);
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.34);
}

.btn.ghost {
  margin-left: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

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

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

.hero-prev,
.hero-next {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  font-size: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: 0.22s ease;
}

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

.section {
  padding: 64px 0 0;
}

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

.section-head h2 {
  margin: 0;
  color: var(--secondary-900);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--secondary-500);
}

.section-head a {
  flex: none;
  color: var(--primary-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--secondary-200);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  transition: 0.28s ease;
}

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

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

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 60%);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 12px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(2, 132, 199, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-400), var(--primary-600));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.movie-info {
  padding: 16px;
}

.movie-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--secondary-500);
  font-size: 13px;
}

.movie-info h3,
.compact-info h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 56px;
  margin: 8px 0;
  color: var(--secondary-900);
  font-size: 20px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info p,
.compact-info p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--secondary-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.category-grid,
.region-grid {
  display: grid;
  gap: 16px;
}

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

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

.category-tile,
.region-tile,
.region-panel {
  border: 1px solid var(--secondary-200);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.category-tile,
.region-tile {
  display: block;
  padding: 20px;
  transition: 0.24s ease;
}

.category-tile:hover,
.region-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary-100);
  box-shadow: var(--shadow-soft);
}

.category-tile span,
.region-tile strong {
  display: block;
  color: var(--secondary-900);
  font-size: 20px;
  font-weight: 850;
}

.category-tile p,
.region-tile span {
  display: block;
  margin: 8px 0 0;
  color: var(--secondary-500);
}

.region-panel {
  padding: 24px;
  background: linear-gradient(135deg, #fff, var(--primary-50));
}

.region-panel h2 {
  margin: 0 0 18px;
}

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

.page {
  padding-top: 36px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
  box-shadow: var(--shadow-soft);
}

.page-hero {
  min-height: 300px;
  padding: 58px;
}

.small-hero {
  min-height: 260px;
}

.listing-hero {
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-600), var(--accent-600));
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-input,
.filter-select,
.search-main input {
  border: 1px solid var(--secondary-200);
  border-radius: 14px;
  outline: 0;
  padding: 13px 14px;
  background: #fff;
}

.filter-input {
  flex: 1;
}

.filter-select {
  width: 160px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
}

.compact-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: var(--secondary-200);
}

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

.compact-info h3 {
  min-height: auto;
}

.detail-page {
  background: var(--secondary-50);
}

.detail-hero {
  min-height: 650px;
  border-radius: 0;
}

.detail-backdrop,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  opacity: 0.5;
  filter: saturate(1.1);
}

.detail-shade {
  background: linear-gradient(to top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.18));
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  min-height: 650px;
  padding: 96px 0 56px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
}

.breadcrumbs a:hover {
  color: #fff;
}

.detail-tags {
  margin: 18px 0 0;
}

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

.detail-stats span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.player-section {
  margin-top: -46px;
  position: relative;
  z-index: 4;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow-hover);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(2, 132, 199, 0.18), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-700);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

.player-cover strong {
  max-width: min(720px, 90%);
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.2;
  text-align: center;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding-top: 54px;
}

.story-block,
.detail-meta-grid {
  border: 1px solid var(--secondary-200);
  border-radius: 24px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.story-block h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.story-block p {
  margin: 0;
  color: var(--secondary-700);
  font-size: 17px;
}

.accent-block {
  grid-column: 1 / 2;
  border-left: 5px solid var(--accent-400);
}

.detail-meta-grid {
  grid-row: span 2;
  display: grid;
  gap: 16px;
  align-content: start;
}

.detail-meta-grid div {
  display: grid;
  gap: 4px;
}

.detail-meta-grid strong {
  color: var(--secondary-500);
  font-size: 14px;
}

.detail-meta-grid span,
.detail-meta-grid a {
  color: var(--secondary-900);
  font-weight: 750;
}

.genre-row {
  grid-column: 1 / -1;
}

.search-main {
  display: flex;
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.search-main input {
  flex: 1;
  border-radius: 18px 0 0 18px;
}

.search-main button {
  min-width: 120px;
}

.site-footer {
  margin-top: 78px;
  color: var(--secondary-300);
  background: var(--secondary-900);
}

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

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--secondary-400);
}

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

.footer-links div {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  border-top: 1px solid var(--secondary-800);
  padding: 20px 0;
  color: var(--secondary-500);
  text-align: center;
}

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

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

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

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

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

  .detail-inner {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-wrap: wrap;
    order: 3;
  }

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

  .hero {
    height: 72vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 94px;
  }

  .movie-grid,
  .movie-grid.dense,
  .catalog-grid,
  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-inner {
    grid-template-columns: 1fr;
    align-items: end;
  }

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

  .page-hero {
    padding: 34px;
  }
}

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

  .hero h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 34px;
  }

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

  .btn.ghost {
    margin-left: 0;
    margin-top: 10px;
  }

  .hero-actions {
    display: grid;
    justify-items: start;
  }

  .section-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.dense,
  .catalog-grid,
  .all-categories,
  .ranking-list {
    grid-template-columns: 1fr;
  }

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

  .filter-select {
    width: 100%;
  }

  .page-hero {
    min-height: 220px;
    padding: 28px;
  }

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