:root {
  --blue-900: #0f2a55;
  --blue-800: #1453a5;
  --blue-700: #1d6ed6;
  --cyan-600: #0891b2;
  --teal-600: #0d9488;
  --purple-600: #7c3aed;
  --pink-500: #ec4899;
  --orange-500: #f97316;
  --yellow-300: #fde047;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow-soft: 0 18px 45px rgba(15, 42, 85, 0.14);
  --shadow-hover: 0 24px 60px rgba(15, 42, 85, 0.22);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 42%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

img,
video {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue-700), var(--cyan-600), var(--teal-600));
  box-shadow: 0 10px 30px rgba(8, 91, 160, 0.24);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--blue-700);
  background: linear-gradient(135deg, #ffffff, #dff8ff);
  box-shadow: inset 0 -3px 8px rgba(6, 95, 140, 0.16);
}

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

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0.94;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--yellow-300);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 4px;
}

.mobile-category-nav {
  display: none;
  overflow-x: auto;
  padding: 0 16px 10px;
  gap: 8px;
}

.hero {
  min-height: 620px;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 34%), linear-gradient(135deg, #0b1d3c, #124e91 45%, #0f766e);
}

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

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

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(6, 18, 46, 0.92) 0%, rgba(6, 18, 46, 0.72) 44%, rgba(6, 18, 46, 0.28) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 24%, rgba(45, 212, 191, 0.26), transparent 28%), radial-gradient(circle at 18% 88%, rgba(124, 58, 237, 0.24), transparent 26%);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #dffbff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 780px;
  margin: 22px 0 10px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 42px);
  color: var(--yellow-300);
}

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

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0;
}

.hero-tags span,
.tag-cloud a,
.detail-meta span,
.ranking-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.tag-cloud a {
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink-500), var(--purple-600));
  box-shadow: 0 14px 35px rgba(124, 58, 237, 0.35);
}

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

.btn-soft {
  color: var(--blue-800);
  background: #ffffff;
}

.hero-poster,
.detail-poster,
.card-cover,
.ranking-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background-image: linear-gradient(135deg, rgba(29, 110, 214, 0.92), rgba(8, 145, 178, 0.72)), var(--cover-image);
  background-size: cover;
  background-position: center;
}

.hero-poster {
  aspect-ratio: 3 / 4;
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.poster-play,
.play-hover,
.player-overlay span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
}

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

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

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

.section-block {
  padding: 58px 0;
}

.featured-strip {
  position: relative;
  z-index: 8;
  margin-top: -70px;
}

.featured-grid,
.movie-grid,
.category-grid,
.overview-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

.section-head h2,
.rank-head h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: 28px;
  line-height: 1.2;
}

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

.section-link,
.rank-head a {
  color: var(--blue-700);
  font-weight: 800;
}

.movie-card,
.overview-card,
.ranking-item,
.filter-panel,
.detail-article,
.detail-side,
.player-shell,
.rank-panel {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-soft);
}

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

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

.card-cover {
  aspect-ratio: 3 / 4;
}

.movie-card-large .card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover::after,
.ranking-cover::after,
.detail-poster::after,
.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
  transition: opacity 0.2s ease;
}

.card-region,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.card-region {
  right: 10px;
  background: linear-gradient(90deg, var(--blue-700), var(--cyan-600));
}

.rank-badge {
  left: 10px;
  background: linear-gradient(90deg, var(--pink-500), var(--orange-500));
}

.play-hover {
  width: 54px;
  height: 54px;
  opacity: 0;
  z-index: 3;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  padding: 14px;
}

.card-body h3 {
  min-height: 46px;
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-large .card-body h3 {
  min-height: auto;
  font-size: 20px;
}

.card-body h3 a:hover,
.ranking-content h3 a:hover,
.overview-card h2 a:hover,
.side-links a:hover {
  color: var(--blue-700);
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--gray-500);
}

.card-meta span {
  padding: 3px 8px;
  background: var(--gray-100);
}

.category-band,
.page-hero {
  background: linear-gradient(135deg, rgba(29, 110, 214, 0.08), rgba(8, 145, 178, 0.08));
}

.category-band {
  padding: 58px 0;
}

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

.category-tile,
.overview-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile {
  min-height: 172px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 28%), linear-gradient(135deg, var(--blue-700), var(--purple-600));
  box-shadow: var(--shadow-soft);
}

.category-tile:hover,
.overview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.category-tile span,
.category-tile strong,
.category-tile em {
  display: block;
}

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

.category-tile strong {
  margin: 12px 0;
  color: var(--yellow-300);
}

.category-tile em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: var(--radius-lg);
  padding: 22px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-list.compact-list {
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 12px;
}

.compact-list .ranking-item {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 8px;
  box-shadow: none;
}

.ranking-cover {
  min-height: 176px;
  border-radius: 12px;
}

.compact-list .ranking-cover {
  min-height: 92px;
}

.ranking-content {
  position: relative;
}

.list-rank {
  display: inline-flex;
  min-width: 34px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink-500), var(--orange-500));
  font-size: 13px;
  font-weight: 900;
}

.ranking-content h3 {
  margin: 9px 0 8px;
  color: var(--gray-900);
  font-size: 20px;
}

.compact-list .ranking-content h3 {
  margin: 6px 0;
  font-size: 15px;
}

.ranking-content p {
  margin: 0 0 12px;
  color: var(--gray-500);
}

.compact-list .ranking-content p {
  display: none;
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-meta span {
  padding: 4px 9px;
  color: var(--gray-700);
  background: var(--gray-100);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700) 48%, var(--teal-600));
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

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

.overview-card {
  padding: 26px;
  border-radius: var(--radius-lg);
}

.overview-card h2 {
  margin: 0 0 12px;
  color: var(--gray-900);
}

.overview-card p {
  color: var(--gray-500);
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.overview-links a,
.side-links a {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--blue-700);
  background: rgba(29, 110, 214, 0.08);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--gray-800);
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 4px rgba(29, 110, 214, 0.12);
}

.detail-hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: #ffffff;
  background: var(--blue-900);
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb a:hover {
  color: var(--yellow-300);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

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

.detail-meta span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 96px;
  height: 96px;
  font-size: 32px;
}

.detail-article,
.detail-side {
  border-radius: var(--radius-lg);
  padding: 28px;
}

.detail-article p {
  color: var(--gray-700);
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: var(--gray-900);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p,
.site-footer ul {
  margin: 12px 0 0;
  padding: 0;
}

.site-footer li {
  list-style: none;
  margin: 8px 0;
}

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

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

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

@media (max-width: 1080px) {
  .movie-grid.six-col,
  .movie-grid.five-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 42, 85, 0.96);
    box-shadow: var(--shadow-hover);
  }

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

  .mobile-category-nav {
    display: flex;
  }

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

  .hero-content {
    gap: 26px;
    padding-top: 46px;
  }

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

  .featured-grid,
  .movie-grid.four-col,
  .movie-grid.five-col,
  .movie-grid.six-col,
  .overview-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: span 2;
  }
}

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

  .hero {
    min-height: 680px;
  }

  .hero-content {
    min-height: 680px;
  }

  .featured-grid,
  .movie-grid.four-col,
  .movie-grid.five-col,
  .movie-grid.six-col,
  .overview-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .ranking-item,
  .compact-list .ranking-item {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .ranking-cover,
  .compact-list .ranking-cover {
    min-height: 120px;
  }

  .section-head,
  .rank-head {
    align-items: start;
    flex-direction: column;
  }
}
