:root {
  --mist-50: #f7faf8;
  --mist-100: #eef4f0;
  --mist-200: #dce7df;
  --mist-300: #bfd1c6;
  --mist-500: #6c8476;
  --mist-600: #52675c;
  --mist-700: #3d4f45;
  --mist-800: #27352e;
  --mist-900: #17221d;
  --forest-500: #2f8f5b;
  --forest-600: #247448;
  --forest-700: #1f5d3c;
  --gold-400: #e7b65f;
  --white: #ffffff;
  --black: #030806;
  --shadow-soft: 0 16px 45px rgba(23, 34, 29, 0.12);
  --shadow-card: 0 12px 32px rgba(23, 34, 29, 0.10);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--mist-900);
  background: var(--mist-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

.soft-bg {
  background:
    radial-gradient(circle at top left, rgba(47, 143, 91, 0.16), transparent 36%),
    linear-gradient(135deg, #f8fbf9 0%, #eef4f0 100%);
}

.mist-bg {
  background: linear-gradient(180deg, var(--mist-100), var(--mist-50));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 231, 223, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--forest-500), var(--mist-900));
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(47, 143, 91, 0.28);
}

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

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

.nav-link,
.mobile-nav-link {
  color: var(--mist-600);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--forest-700);
  background: rgba(47, 143, 91, 0.10);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--mist-100);
  border: 0;
  border-radius: 50%;
}

.mobile-menu-button span {
  width: 19px;
  height: 2px;
  background: var(--mist-900);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

.hero-section {
  position: relative;
  height: 60vh;
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
  background: var(--mist-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,
.page-hero img,
.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay,
.detail-hero-layer,
.page-hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 8, 6, 0.82) 0%, rgba(3, 8, 6, 0.38) 48%, rgba(3, 8, 6, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  color: var(--forest-700);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(17px, 2vw, 22px);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--forest-500), var(--forest-700));
  box-shadow: 0 16px 34px rgba(47, 143, 91, 0.26);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.primary-button.small {
  min-height: 40px;
  padding: 0 18px;
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(12px);
}

.section-more {
  color: var(--forest-700);
  background: rgba(47, 143, 91, 0.10);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: background 0.25s ease;
  font-size: 40px;
  line-height: 1;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

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

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

.section-head h2,
.ranking-panel h2,
.detail-content h2,
.info-card h2,
.category-overview-card h2 {
  margin: 0;
  color: var(--mist-900);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--mist-600);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 30px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(220, 231, 223, 0.95);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--mist-600);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--mist-900);
  background: var(--mist-50);
  border: 1px solid var(--mist-200);
  border-radius: 999px;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(47, 143, 91, 0.58);
  box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.10);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--mist-600);
  background: var(--mist-100);
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

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

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(220, 231, 223, 0.82);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(47, 143, 91, 0.34);
  box-shadow: var(--shadow-soft);
  transform: translateY(-6px);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mist-200), var(--mist-100));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(3, 8, 6, 0.40);
  transition: opacity 0.28s ease;
}

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

.play-chip {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 13px;
  color: var(--mist-900);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--mist-500);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  color: var(--mist-900);
  font-size: 20px;
  line-height: 1.25;
  transition: color 0.25s ease;
}

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

.movie-card p {
  margin: 0;
  color: var(--mist-600);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag-row span {
  padding: 5px 9px;
  color: var(--forest-700);
  background: rgba(47, 143, 91, 0.10);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

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

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(3, 8, 6, 0.08), rgba(3, 8, 6, 0.72));
}

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

.category-card div {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.ranking-panel,
.info-card,
.player-card,
.detail-content,
.category-overview-card {
  background: var(--white);
  border: 1px solid rgba(220, 231, 223, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.ranking-panel h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  grid-template-areas: "cover title" "cover meta";
  gap: 4px 12px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.25s ease;
}

.rank-item:hover {
  background: var(--mist-100);
}

.rank-item img {
  grid-area: cover;
  width: 74px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item span {
  grid-area: title;
  color: var(--mist-900);
  font-weight: 900;
}

.rank-item small {
  grid-area: meta;
  color: var(--mist-500);
}

.page-hero {
  position: relative;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  place-items: center start;
  color: var(--white);
}

.page-hero.soft-bg {
  color: var(--mist-900);
}

.page-hero.soft-bg p {
  color: var(--mist-600);
}

.page-hero .container-custom {
  position: relative;
  z-index: 1;
  padding: 86px 0;
}

.category-hero .ghost-button {
  width: max-content;
}

.overview-stack,
.ranking-sections {
  display: grid;
  gap: 34px;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-overview-head p {
  margin: 8px 0 0;
  color: var(--mist-600);
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
  background: var(--mist-900);
}

.detail-hero-content {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

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

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

.player-column {
  display: grid;
  gap: 26px;
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--black);
  border-radius: var(--radius-lg);
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  gap: 12px;
  place-items: center;
  align-content: center;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(3, 8, 6, 0.22), rgba(3, 8, 6, 0.70));
  border: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  padding-left: 5px;
  color: var(--mist-900);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  font-size: 28px;
}

.detail-content {
  padding: 28px;
}

.detail-content h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-content p {
  margin: 0 0 24px;
  color: var(--mist-700);
  font-size: 17px;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
}

.info-card {
  padding: 24px;
}

.info-card h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
}

.info-card dl div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mist-100);
}

.info-card dt {
  color: var(--mist-500);
  font-weight: 900;
}

.info-card dd {
  margin: 0;
  color: var(--mist-900);
}

.info-card a {
  color: var(--forest-700);
  font-weight: 900;
}

.site-footer {
  padding: 54px 0;
  color: var(--mist-200);
  background: var(--mist-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 34px;
}

.footer-logo {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--mist-300);
}

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

.site-footer a,
.site-footer span {
  display: block;
  margin: 8px 0;
  color: var(--mist-300);
}

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

.is-filtered-out {
  display: none !important;
}

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

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

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

  .ranking-panel,
  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 820px) {
  .section-padding {
    padding: 52px 0;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .hero-content {
    bottom: 84px;
  }

  .hero-arrow {
    top: auto;
    bottom: 24px;
    width: 44px;
    height: 44px;
    font-size: 32px;
    transform: none;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    right: 18px;
  }

  .hero-dots {
    bottom: 40px;
  }

  .section-head,
  .category-overview-head,
  .filter-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .filter-panel {
    display: grid;
  }

  .filter-buttons {
    justify-content: flex-start;
  }

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

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

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

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

  .hero-content h1,
  .page-hero h1,
  .detail-hero h1 {
    font-size: 38px;
  }

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

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .ghost-button,
  .section-more {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .mini-card-row,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 220px;
  }

  .detail-hero {
    min-height: 560px;
  }

  .detail-content,
  .info-card,
  .category-overview-card {
    padding: 20px;
  }

  .info-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
