:root {
  --rain-900: #121416;
  --rain-800: #212529;
  --rain-700: #343a40;
  --rain-600: #495057;
  --rain-500: #6c757d;
  --rain-300: #adb5bd;
  --rain-200: #dee2e6;
  --rain-100: #e9ecef;
  --mist-700: #334e68;
  --mist-600: #486581;
  --mist-500: #627d98;
  --mist-300: #9fb3c8;
  --mist-100: #d9e2ec;
  --mist-50: #f0f4f8;
  --alley-50: #faf9f7;
  --white: #ffffff;
  --shadow: 0 10px 25px rgba(18, 20, 22, 0.08);
  --shadow-xl: 0 24px 50px rgba(18, 20, 22, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--rain-800);
  background: var(--alley-50);
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  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);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(222, 226, 230, 0.9);
}

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

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--mist-700), var(--mist-500));
  border-radius: 50%;
  box-shadow: 0 12px 22px rgba(72, 101, 129, 0.28);
  font-size: 13px;
}

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

.nav-link,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--rain-700);
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover {
  color: var(--mist-700);
  background: var(--mist-50);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.18s ease;
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--rain-700);
  font-weight: 700;
}

.dropdown-menu a:hover {
  color: var(--mist-700);
  background: var(--mist-50);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--mist-50);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--rain-800);
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--rain-100);
  background: var(--white);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--rain-700);
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--mist-700);
  background: var(--mist-50);
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--rain-900);
}

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

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

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

.hero-slide.active img {
  animation: heroZoom 6s ease both;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 96px;
  color: var(--white);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #facc15;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  color: var(--rain-900);
  background: var(--white);
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: var(--mist-100);
  transform: translateY(-1px);
}

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

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

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 22px;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.34);
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
}

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

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

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

.main-section.mist {
  background: var(--mist-50);
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  color: var(--rain-800);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--rain-600);
  line-height: 1.75;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--mist-700), var(--mist-500));
  border-radius: 13px;
  box-shadow: 0 12px 24px rgba(72, 101, 129, 0.22);
}

.section-more {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--mist-700);
  background: var(--mist-50);
  font-weight: 800;
}

.section-more:hover {
  color: var(--white);
  background: var(--mist-600);
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(222, 226, 230, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

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

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

.movie-card-large .poster-link {
  aspect-ratio: 16 / 11;
}

.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);
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rain-900);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transform: scale(0.94);
  transition: 0.2s ease;
}

.movie-card:hover .play-dot {
  transform: scale(1);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  min-width: 38px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(18, 20, 22, 0.72);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 15px;
}

.movie-card-body {
  padding: 18px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--mist-700);
}

.movie-meta {
  margin: 0 0 12px;
  color: var(--rain-500);
  font-size: 13px;
}

.movie-meta span:first-child {
  padding: 3px 8px;
  color: var(--mist-700);
  background: var(--mist-50);
  border-radius: 999px;
  font-weight: 800;
}

.movie-desc {
  min-height: 48px;
  margin: 0;
  color: var(--rain-600);
  line-height: 1.65;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--rain-700);
  background: var(--rain-100);
  font-size: 12px;
  font-weight: 700;
}

.horizontal-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(245px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.horizontal-strip .movie-card {
  scroll-snap-align: start;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  padding: 22px;
  overflow: hidden;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--mist-700), var(--rain-800));
  box-shadow: var(--shadow);
}

.category-tile:after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 42px 82px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.compact-card:hover {
  transform: translateX(3px);
  border-color: var(--mist-300);
}

.compact-rank {
  color: var(--mist-700);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.compact-card img {
  width: 82px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--rain-100);
}

.compact-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--rain-800);
}

.compact-card em {
  display: block;
  color: var(--rain-500);
  font-style: normal;
  font-size: 13px;
}

.filter-panel {
  margin: 0 0 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 190px));
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rain-200);
  border-radius: 14px;
  color: var(--rain-800);
  background: var(--alley-50);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--mist-500);
  box-shadow: 0 0 0 4px rgba(98, 125, 152, 0.12);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px auto 0;
  color: var(--rain-500);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--mist-700);
}

.detail-hero {
  padding: 40px 0 72px;
  background: linear-gradient(180deg, var(--white), var(--alley-50));
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--rain-900);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  cursor: pointer;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--rain-900);
  object-fit: cover;
}

.player-cover {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.62;
  transition: 0.25s ease;
}

.player-shell.is-active .player-cover,
.player-shell.is-active .player-layer {
  opacity: 0;
  pointer-events: none;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.52));
  color: var(--white);
  transition: 0.25s ease;
}

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--rain-900);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: 28px;
  transition: 0.2s ease;
}

.play-button:hover {
  transform: scale(1.05);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

.detail-panel {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 16px;
  color: var(--rain-500);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--mist-50);
  color: var(--mist-700);
  font-weight: 800;
  font-size: 13px;
}

.detail-one-line {
  margin: 16px 0 0;
  color: var(--rain-700);
  line-height: 1.8;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.article-block {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 0;
}

.article-block h2 {
  margin: 0 0 18px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.article-block p {
  margin: 0 0 28px;
  color: var(--rain-700);
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  color: var(--rain-100);
  background: var(--rain-800);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 56px 0 34px;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  color: var(--rain-300);
  line-height: 1.8;
}

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

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

.site-footer a {
  color: var(--rain-300);
}

.site-footer a:hover {
  color: var(--mist-300);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--rain-700);
  color: var(--rain-300);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 44px;
  text-align: center;
  color: var(--rain-500);
  background: var(--white);
  border: 1px dashed var(--rain-200);
  border-radius: 18px;
}

.empty-state.visible {
  display: block;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

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

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

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

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

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

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

  .menu-button {
    display: inline-block;
  }

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

  .hero {
    height: 76vh;
    min-height: 560px;
  }

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

  .hero p {
    font-size: 16px;
  }

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

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

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

  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

  .detail-hero {
    padding-top: 24px;
  }

  .detail-panel {
    padding: 20px;
  }

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

@media (max-width: 480px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .movie-grid.large {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 34px 72px 1fr;
  }

  .compact-card img {
    width: 72px;
    height: 52px;
  }
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 14px;
  align-items: stretch;
}

.overview-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.overview-thumbs img {
  width: 100%;
  height: 81px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--rain-100);
}

@media (max-width: 900px) {
  .category-overview-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }
}
