:root {
  --color-primary: 41 128 185;
  --color-primary-dark: 30 97 140;
  --color-primary-light: 93 173 226;
  --color-accent: 46 204 113;
  --color-neutral-50: 249 250 251;
  --color-neutral-100: 243 244 246;
  --color-neutral-200: 229 231 235;
  --color-neutral-300: 209 213 219;
  --color-neutral-400: 156 163 175;
  --color-neutral-500: 107 114 128;
  --color-neutral-600: 75 85 99;
  --color-neutral-700: 55 65 81;
  --color-neutral-800: 31 41 55;
  --color-neutral-900: 17 24 39;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: rgb(var(--color-neutral-50));
  color: rgb(var(--color-neutral-900));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.section-spacing {
  padding: 72px 0;
}

.bg-white {
  background: #fff;
}

.soft-bg {
  background: rgb(var(--color-neutral-100));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-primary-light)));
  box-shadow: 0 10px 22px rgba(41, 128, 185, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgb(var(--color-neutral-700));
  font-weight: 600;
}

.desktop-nav > a,
.nav-dropdown > a {
  transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.nav-dropdown > a:hover,
.dropdown-panel a:hover {
  color: rgb(var(--color-primary));
}

.nav-dropdown {
  position: relative;
  padding: 20px 0;
}

.dropdown-panel {
  position: absolute;
  top: 58px;
  left: 0;
  display: grid;
  gap: 2px;
  width: 210px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a,
.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgb(var(--color-neutral-700));
}

.dropdown-panel a:hover,
.mobile-nav a:hover {
  background: rgb(var(--color-neutral-100));
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.large-search input,
.local-filter {
  width: 250px;
  border: 1px solid rgb(var(--color-neutral-300));
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: #fff;
  color: rgb(var(--color-neutral-800));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.large-search input:focus,
.local-filter:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.12);
}

.header-search button,
.large-search button,
.sort-actions button,
.button-primary,
.button-secondary,
.panel-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.header-search button,
.large-search button,
.button-primary,
.panel-more {
  color: #fff;
  background: rgb(var(--color-primary));
}

.header-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.large-search button:hover,
.button-primary:hover,
.panel-more:hover {
  background: rgb(var(--color-primary-dark));
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgb(var(--color-neutral-100));
  color: rgb(var(--color-neutral-800));
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgb(var(--color-neutral-200));
  padding: 10px 16px 16px;
  background: #fff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 3px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: rgb(var(--color-neutral-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-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  max-width: 1280px;
  color: #fff;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgb(var(--color-primary));
  font-size: 14px;
  font-weight: 700;
}

.hero-label {
  padding: 6px 14px;
  margin-bottom: 18px;
}

.hero-title {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 0 12px;
  color: rgb(var(--color-neutral-100));
  font-size: 20px;
  font-weight: 700;
}

.hero-copy {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgb(var(--color-neutral-200));
  font-size: 17px;
}

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

.button-primary,
.button-secondary {
  padding: 13px 28px;
}

.button-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.26);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.78);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

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

.section-head h2,
.content-block h2,
.side-card h2 {
  margin: 0;
  color: rgb(var(--color-neutral-900));
  font-size: 30px;
  line-height: 1.2;
}

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

.section-kicker {
  padding: 4px 12px;
  margin-bottom: 10px;
}

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

.movie-card,
.rank-item,
.category-panel,
.side-card,
.watch-box,
.content-block {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.rank-item:hover,
.category-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.14);
}

.movie-cover,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgb(var(--color-neutral-200));
}

.movie-cover {
  aspect-ratio: 16 / 9;
}

.movie-cover img,
.rank-cover img,
.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .movie-cover img,
.rank-item:hover .rank-cover img {
  transform: scale(1.05);
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  background: rgba(41, 128, 185, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: 0.25s ease;
}

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

.movie-body {
  padding: 16px;
}

.movie-title,
.rank-title,
.category-panel-title {
  display: block;
  color: rgb(var(--color-neutral-900));
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-title:hover,
.rank-title:hover,
.category-panel-title:hover {
  color: rgb(var(--color-primary));
}

.movie-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: rgb(var(--color-neutral-600));
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-category {
  display: inline-flex;
  margin-top: 12px;
  color: rgb(var(--color-primary));
  font-size: 13px;
  font-weight: 700;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 120px 48px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.rank-cover {
  width: 120px;
  height: 78px;
  border-radius: 12px;
}

.rank-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-accent)));
  font-weight: 900;
}

.rank-info p {
  margin: 6px 0 10px;
  color: rgb(var(--color-neutral-600));
  font-size: 14px;
}

.category-chip-grid,
.category-panels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.category-chip,
.category-panel {
  display: block;
  padding: 22px;
  border: 1px solid rgb(var(--color-neutral-200));
  border-radius: 18px;
  background: #fff;
}

.category-chip strong,
.category-panel-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.category-chip span,
.category-panel p,
.site-footer p {
  color: rgb(var(--color-neutral-600));
  font-size: 14px;
}

.category-panel ul {
  margin: 16px 0;
  padding-left: 18px;
  color: rgb(var(--color-neutral-700));
}

.category-panel li + li {
  margin-top: 6px;
}

.panel-more {
  padding: 10px 16px;
  font-size: 14px;
}

.page-hero {
  padding: 72px 0;
  color: #fff;
  background: linear-gradient(135deg, rgb(var(--color-primary-dark)), rgb(var(--color-primary-light)));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.large-search {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin-top: 28px;
}

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

.large-search button {
  padding: 10px 24px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.sort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sort-actions button {
  padding: 10px 16px;
  color: rgb(var(--color-neutral-700));
  background: rgb(var(--color-neutral-100));
}

.sort-actions button.is-active,
.sort-actions button:hover {
  color: #fff;
  background: rgb(var(--color-primary));
}

.empty-state {
  padding: 42px;
  border-radius: 18px;
  background: rgb(var(--color-neutral-100));
  color: rgb(var(--color-neutral-600));
  text-align: center;
}

.detail-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: rgb(var(--color-neutral-900));
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-shade {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.2));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 0 54px;
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.detail-hero p {
  max-width: 760px;
  color: rgb(var(--color-neutral-100));
  font-size: 18px;
}

.detail-meta-line span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.watch-box {
  padding: 0;
  background: rgb(var(--color-neutral-900));
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0.34);
  transition: opacity 0.2s ease;
}

.player-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #fff;
  background: rgba(41, 128, 185, 0.92);
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.content-block {
  padding: 28px;
}

.content-block p {
  margin: 16px 0 0;
  color: rgb(var(--color-neutral-700));
  font-size: 16px;
}

.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.detail-side {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 84px;
}

.poster {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.18);
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 16px 0 0;
}

.side-card dt {
  color: rgb(var(--color-neutral-500));
}

.side-card dd {
  margin: 0;
  color: rgb(var(--color-neutral-800));
}

.side-card a {
  color: rgb(var(--color-primary));
  font-weight: 700;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-cloud a {
  padding: 6px 10px;
  border-radius: 999px;
  color: rgb(var(--color-primary));
  background: rgba(41, 128, 185, 0.1);
  font-size: 13px;
}

.site-footer {
  background: rgb(var(--color-neutral-800));
  color: rgb(var(--color-neutral-300));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  color: #fff;
  margin-bottom: 14px;
}

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

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: rgb(var(--color-primary-light));
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  color: rgb(var(--color-neutral-400));
  text-align: center;
  font-size: 14px;
}

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

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

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

  .detail-side {
    position: static;
    grid-template-columns: 260px 1fr;
  }
}

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

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

  .hero {
    height: 560px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-grid,
  .compact-rank,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item {
    grid-template-columns: 96px 38px 1fr;
  }

  .rank-cover {
    width: 96px;
    height: 64px;
  }

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

@media (max-width: 620px) {
  .container-custom {
    width: min(100% - 24px, 1280px);
  }

  .section-spacing {
    padding: 48px 0;
  }

  .hero {
    height: 520px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .movie-grid,
  .compact-rank,
  .related-grid,
  .category-chip-grid,
  .category-panels,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 86px 34px 1fr;
    gap: 10px;
  }

  .rank-cover {
    width: 86px;
    height: 58px;
  }

  .large-search {
    flex-direction: column;
  }
}
