:root {
  --forest-950: #0a140d;
  --forest-900: #152819;
  --forest-800: #224126;
  --forest-700: #2f5a33;
  --earth-950: #1c1710;
  --earth-900: #352b1f;
  --earth-800: #4a3d2b;
  --moss-700: #455234;
  --moss-600: #59693f;
  --moss-500: #6d8350;
  --moss-400: #8a9f6e;
  --moss-300: #a8b892;
  --parchment-100: #f5f2ed;
  --parchment-200: #ebe4d9;
  --parchment-300: #dfd4c1;
  --parchment-400: #d3c4a9;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .28), 0 10px 20px -2px rgba(0, 0, 0, .18);
  --shadow-strong: 0 8px 40px -8px rgba(0, 0, 0, .35), 0 15px 50px -10px rgba(0, 0, 0, .32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--parchment-200);
  background: var(--forest-950);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 40, 25, .95);
  border-bottom: 1px solid var(--forest-700);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .22);
  backdrop-filter: blur(8px);
}

.nav-shell,
.footer-shell,
.section-block,
.hero-content,
.hero-search-section,
.breadcrumb,
.page-hero,
.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  color: var(--parchment-100);
  background: var(--moss-700);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  transition: background .25s ease, transform .25s ease;
}

.brand:hover .brand-icon {
  background: var(--moss-600);
  transform: translateY(-1px);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  color: var(--parchment-100);
  font-size: 20px;
  letter-spacing: .02em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--parchment-300);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  color: var(--parchment-200);
  font-weight: 600;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--parchment-100);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--parchment-100);
  background: rgba(53, 43, 31, .55);
}

.page-bg {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--forest-950), var(--forest-900) 54%, var(--earth-950));
}

.inner-page {
  padding: 32px 0 80px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--forest-950) 0%, rgba(10, 20, 13, .82) 48%, rgba(10, 20, 13, .2) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 2;
  max-width: 1280px;
}

.hero-content > * {
  max-width: 760px;
}

.hero-kicker,
.eyebrow {
  margin-bottom: 16px;
  color: var(--moss-400);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 14px;
}

.hero-title,
.page-hero h1 {
  margin: 0 0 18px;
  color: var(--parchment-100);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero-desc,
.page-hero p {
  margin: 0 0 24px;
  color: var(--parchment-200);
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--parchment-200);
  background: rgba(34, 65, 38, .72);
  border: 1px solid rgba(109, 131, 80, .38);
  border-radius: 999px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.btn.primary {
  color: #fff;
  background: var(--moss-600);
  box-shadow: var(--shadow-soft);
}

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

.btn.ghost {
  color: var(--parchment-100);
  background: rgba(53, 43, 31, .42);
  border-color: rgba(223, 212, 193, .18);
}

.btn.ghost:hover {
  border-color: rgba(168, 184, 146, .5);
  background: rgba(74, 61, 43, .68);
}

.btn.full {
  width: 100%;
  margin-top: 12px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  font-size: 36px;
  line-height: 1;
  transition: background .2s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: var(--moss-500);
}

.hero-search-section {
  position: relative;
  z-index: 6;
  margin-top: -34px;
  padding: 0 0 36px;
}

.hero-search,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  background: rgba(21, 40, 25, .86);
  border: 1px solid rgba(109, 131, 80, .35);
  border-radius: 18px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(8px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  color: var(--parchment-100);
  background: rgba(10, 20, 13, .72);
  border: 1px solid rgba(223, 212, 193, .14);
  border-radius: 12px;
  padding: 0 14px;
  outline: 0;
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--moss-500);
}

.hero-search button,
.reset-filter {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  font-weight: 800;
  background: var(--moss-600);
  border: 0;
  border-radius: 12px;
}

.quick-links {
  margin-top: 14px;
}

.quick-links a {
  padding: 8px 13px;
  color: var(--parchment-200);
  background: rgba(53, 43, 31, .42);
  border: 1px solid rgba(223, 212, 193, .12);
  border-radius: 999px;
  font-size: 14px;
}

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

.section-block.compact {
  padding: 56px 0;
}

.section-band {
  background: rgba(53, 43, 31, .3);
}

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

.section-head.left-only {
  justify-content: flex-start;
}

.section-head h2 {
  margin: 0;
  flex: 1;
  color: var(--parchment-100);
  font-size: clamp(26px, 3vw, 34px);
}

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

.section-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: var(--moss-300);
  background: rgba(69, 82, 52, .55);
  border-radius: 10px;
}

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

.all-grid {
  margin-top: 28px;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(53, 43, 31, .4);
  border: 1px solid rgba(223, 212, 193, .08);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(168, 184, 146, .3);
  box-shadow: var(--shadow-strong);
}

.movie-card.is-hidden {
  display: none;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--earth-800);
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, .1));
  opacity: 0;
  transition: opacity .3s ease;
}

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

.play-badge,
.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%) scale(.78);
  color: #fff;
  background: rgba(89, 105, 63, .9);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease, background .2s ease;
}

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

.card-label {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  color: var(--parchment-100);
  background: rgba(34, 65, 38, .9);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 10px;
  color: var(--parchment-100);
  font-size: 18px;
  line-height: 1.35;
  transition: color .2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover .card-title {
  color: var(--moss-300);
}

.card-desc {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--parchment-300);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--parchment-400);
  font-size: 12px;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(34, 65, 38, .85), rgba(53, 43, 31, .88));
  border: 1px solid rgba(168, 184, 146, .22);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 184, 146, .55);
  box-shadow: var(--shadow-strong);
}

.category-glow {
  position: absolute;
  right: -36px;
  top: -36px;
  width: 120px;
  height: 120px;
  background: rgba(168, 184, 146, .18);
  border-radius: 999px;
  filter: blur(4px);
}

.category-card strong {
  position: relative;
  z-index: 1;
  color: var(--parchment-100);
  font-size: 24px;
}

.category-card em {
  position: relative;
  z-index: 1;
  color: var(--parchment-300);
  font-size: 14px;
  line-height: 1.65;
  font-style: normal;
}

.two-column {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 36px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(53, 43, 31, .4);
  border: 1px solid rgba(223, 212, 193, .08);
  border-radius: 14px;
  transition: background .2s ease, transform .2s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  background: rgba(74, 61, 43, .65);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--parchment-100);
  background: var(--moss-700);
  border-radius: 10px;
  font-weight: 900;
}

.rank-item img {
  width: 88px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rank-copy strong {
  color: var(--parchment-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-copy em {
  color: var(--parchment-400);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: center;
  padding: 42px;
  background: linear-gradient(135deg, rgba(21, 40, 25, .92), rgba(53, 43, 31, .76));
  border: 1px solid rgba(168, 184, 146, .22);
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
}

.page-hero.small h1 {
  font-size: clamp(34px, 4vw, 54px);
}

.ranking-hero {
  min-height: 420px;
}

.ranking-hero > div {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.ranking-hero img {
  position: absolute;
  inset: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--parchment-400);
  font-size: 14px;
}

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

.breadcrumb strong {
  color: var(--parchment-200);
}

.filter-panel {
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 180px)) auto;
  margin-bottom: 28px;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--parchment-400);
  font-size: 13px;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, .85fr);
  gap: 32px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  box-shadow: var(--shadow-strong);
}

.movie-player,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 2;
  padding: 0;
  border: 0;
  background: #000;
}

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

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

.player-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .58);
}

.player-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.player-cover:hover .player-play {
  background: var(--moss-500);
  transform: translate(-50%, -50%) scale(1.06);
}

.movie-detail-copy,
.info-panel {
  margin-top: 22px;
  padding: 26px;
  background: rgba(53, 43, 31, .4);
  border: 1px solid rgba(223, 212, 193, .08);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.movie-detail-copy h1 {
  margin: 0 0 16px;
  color: var(--parchment-100);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.18;
}

.movie-detail-copy h2,
.info-panel h2 {
  margin: 28px 0 12px;
  color: var(--parchment-100);
  font-size: 22px;
}

.movie-detail-copy h2:first-of-type,
.info-panel h2:first-child {
  margin-top: 0;
}

.movie-detail-copy p {
  margin: 0 0 18px;
  color: var(--parchment-300);
  line-height: 1.9;
  white-space: pre-line;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.detail-side {
  position: relative;
}

.detail-side .info-panel {
  position: sticky;
  top: 92px;
  margin-top: 0;
  margin-bottom: 20px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px 18px;
  margin: 0;
}

.info-panel dt {
  color: var(--parchment-400);
}

.info-panel dd {
  margin: 0;
  color: var(--parchment-100);
  font-weight: 700;
}

.detail-related {
  padding-top: 40px;
}

.site-footer {
  background: var(--forest-950);
  border-top: 1px solid var(--forest-800);
}

.footer-shell {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--parchment-300);
  line-height: 1.8;
}

.footer-logo .brand-icon {
  box-shadow: none;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: var(--parchment-100);
  font-size: 17px;
}

.footer-links a {
  color: var(--parchment-300);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--parchment-100);
}

.footer-bottom {
  padding: 18px 16px 28px;
  color: var(--parchment-400);
  border-top: 1px solid var(--forest-800);
  text-align: center;
  font-size: 14px;
}

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

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

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    background: rgba(21, 40, 25, .98);
    border-bottom: 1px solid var(--forest-700);
  }

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

  .nav-link {
    padding: 12px 0;
  }

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

  .hero-content {
    bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-grid.large,
  .rank-list.columns,
  .footer-shell {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 560px) {
  .nav-shell,
  .footer-shell,
  .section-block,
  .hero-content,
  .hero-search-section,
  .breadcrumb,
  .page-hero,
  .detail-layout {
    width: min(100% - 24px, 1280px);
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

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

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

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

  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-grid.large,
  .rank-list.columns,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 76px minmax(0, 1fr);
  }

  .rank-item img {
    width: 76px;
    height: 48px;
  }

  .movie-detail-copy,
  .info-panel {
    padding: 20px;
  }

  .info-panel dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
