:root {
  --forest-950: #0a140d;
  --forest-900: #152819;
  --forest-850: #1a3320;
  --forest-800: #224126;
  --earth-950: #1c1710;
  --earth-900: #352b1f;
  --earth-850: #403425;
  --moss-700: #455234;
  --moss-600: #59693f;
  --moss-500: #6d8350;
  --moss-400: #8a9f6e;
  --parchment-100: #f5f2ed;
  --parchment-200: #ebe4d9;
  --parchment-300: #dfd4c1;
  --parchment-400: #d3c4a9;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.18), 0 10px 20px -2px rgba(0, 0, 0, 0.16);
  --shadow-medium: 0 4px 25px -5px rgba(0, 0, 0, 0.28), 0 10px 30px -5px rgba(0, 0, 0, 0.22);
  --shadow-strong: 0 8px 40px -8px rgba(0, 0, 0, 0.42), 0 15px 50px -10px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment-200);
  background: linear-gradient(180deg, var(--forest-950) 0%, var(--forest-900) 48%, var(--earth-950) 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 40, 25, 0.95);
  border-bottom: 1px solid rgba(34, 65, 38, 0.95);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--parchment-100);
  background: var(--moss-700);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(245, 242, 237, 0.08);
  transition: background 0.25s ease, transform 0.25s ease;
}

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

.brand-text,
.footer-logo span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-text small,
.footer-logo small {
  margin-top: 2px;
  color: var(--parchment-400);
  font-size: 12px;
}

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

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

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

.menu-toggle {
  display: none;
  color: var(--parchment-100);
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(34, 65, 38, 0.9);
  animation: slideDown 0.35s ease;
}

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

.mobile-link {
  padding: 10px 8px;
  border-radius: 10px;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(53, 43, 31, 0.65);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--forest-950);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--forest-950) 0%, rgba(10, 20, 13, 0.82) 44%, rgba(10, 20, 13, 0.18) 100%);
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--moss-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--parchment-100);
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-summary,
.page-hero p {
  max-width: 760px;
  color: var(--parchment-200);
  font-size: 18px;
  line-height: 1.72;
}

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

.hero-meta {
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--parchment-300);
  background: rgba(34, 65, 38, 0.72);
  border: 1px solid rgba(138, 159, 110, 0.16);
  border-radius: 999px;
  font-size: 13px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

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

.button.primary {
  color: #ffffff;
  background: var(--moss-600);
  box-shadow: var(--shadow-medium);
}

.button.primary:hover {
  background: var(--moss-500);
}

.button.ghost {
  color: var(--parchment-100);
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(245, 242, 237, 0.16);
  backdrop-filter: blur(8px);
}

.button.ghost:hover {
  background: rgba(0, 0, 0, 0.54);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  border: 0;
  border-radius: 999px;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.04);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.section {
  padding-top: 64px;
  padding-bottom: 64px;
}

.slim-section {
  padding-top: 42px;
  padding-bottom: 42px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.section-title span:first-child {
  color: var(--moss-500);
  font-size: 24px;
}

.section-title h2,
.ranking-layout h2 {
  margin: 0;
  color: var(--parchment-100);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
}

.section-title a {
  margin-left: auto;
  color: var(--moss-400);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(53, 43, 31, 0.42);
  border: 1px solid rgba(245, 242, 237, 0.06);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(138, 159, 110, 0.22);
  box-shadow: var(--shadow-strong);
  transform: translateY(-4px) scale(1.012);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--earth-900);
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16), transparent);
  transition: opacity 0.28s ease;
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: rgba(89, 105, 63, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.74);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.movie-tags {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: var(--parchment-100);
  background: rgba(34, 65, 38, 0.9);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--parchment-100);
  font-size: 18px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-body h3 a:hover {
  color: var(--moss-400);
}

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

.movie-meta {
  gap: 8px;
}

.movie-meta span {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 12px;
}

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

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

.category-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(135deg, rgba(34, 65, 38, 0.75), rgba(53, 43, 31, 0.72));
  border: 1px solid rgba(245, 242, 237, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  border-color: rgba(138, 159, 110, 0.28);
  box-shadow: var(--shadow-strong);
  transform: translateY(-3px);
}

.category-card strong {
  color: var(--parchment-100);
  font-size: 24px;
}

.category-card p {
  color: var(--parchment-300);
  line-height: 1.7;
}

.category-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card div span {
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  color: var(--parchment-200);
  background: rgba(10, 20, 13, 0.36);
  border-radius: 999px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  padding-top: 64px;
  padding-bottom: 24px;
}

.page-hero h1 {
  margin-bottom: 16px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  background: rgba(53, 43, 31, 0.44);
  border: 1px solid rgba(245, 242, 237, 0.06);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

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

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  width: 100%;
  color: var(--parchment-100);
  background: rgba(10, 20, 13, 0.54);
  border: 1px solid rgba(138, 159, 110, 0.18);
  border-radius: 12px;
  outline: 0;
  padding: 0 12px;
}

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

.empty-state {
  display: none;
  padding: 60px 20px;
  color: var(--parchment-300);
  text-align: center;
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}

.ranking-layout p {
  max-width: 480px;
  color: var(--parchment-300);
  line-height: 1.75;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 10px;
  background: rgba(53, 43, 31, 0.46);
  border: 1px solid rgba(245, 242, 237, 0.06);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  border-color: rgba(138, 159, 110, 0.24);
  transform: translateX(4px);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--parchment-100);
  background: var(--moss-600);
  border-radius: 12px;
  font-weight: 900;
}

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

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

.rank-item small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--parchment-400);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 32px 0 18px;
  color: var(--parchment-400);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.75fr);
  gap: 32px;
  align-items: start;
}

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

.player-card video,
.player-card .player-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.player-card video {
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 0;
  cursor: pointer;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
}

.player-start {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  color: #fff;
  background: rgba(89, 105, 63, 0.94);
  border-radius: 999px;
  box-shadow: var(--shadow-strong);
  font-size: 34px;
  transition: transform 0.24s ease, background 0.24s ease;
}

.player-cover:hover .player-start {
  background: var(--moss-500);
  transform: scale(1.06);
}

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

.detail-info-card,
.side-card {
  margin-top: 24px;
  padding: 26px;
  background: rgba(53, 43, 31, 0.44);
  border: 1px solid rgba(245, 242, 237, 0.06);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

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

.detail-info-card h2,
.side-card h2 {
  margin: 26px 0 12px;
  color: var(--parchment-100);
  font-size: 22px;
}

.detail-info-card p {
  margin: 0;
  color: var(--parchment-300);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

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

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

.side-card {
  margin-top: 0;
}

.side-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 18px 0 0;
}

.side-card dt {
  color: var(--parchment-400);
}

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

.side-card dd a {
  color: var(--moss-400);
}

.related-section {
  padding-top: 56px;
}

.site-footer {
  margin-top: 40px;
  background: var(--forest-950);
  border-top: 1px solid rgba(34, 65, 38, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 36px;
  padding-top: 48px;
  padding-bottom: 38px;
}

.footer-brand p,
.footer-links a {
  color: var(--parchment-300);
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--parchment-100);
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 18px 0 28px;
  color: var(--parchment-400);
  border-top: 1px solid rgba(34, 65, 38, 0.7);
  font-size: 14px;
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .detail-sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    bottom: 86px;
  }

  .hero-control {
    width: 42px;
    height: 42px;
    font-size: 34px;
  }

  .hero-control.prev {
    left: 12px;
  }

  .hero-control.next {
    right: 12px;
  }

  .movie-grid,
  .four-grid,
  .wide-grid,
  .category-grid,
  .wide-category-grid,
  .ranking-page-list,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title a {
    margin-left: 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

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

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

  .brand-text small {
    font-size: 11px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1 {
    font-size: 36px;
  }

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

  .detail-info-card,
  .side-card {
    padding: 20px;
  }
}
