:root {
  --forest-950: #0a140d;
  --forest-930: #102014;
  --forest-900: #152819;
  --forest-850: #1a331e;
  --forest-800: #224126;
  --forest-700: #2f5a34;
  --earth-950: #1c1710;
  --earth-900: #352b1f;
  --earth-850: #403424;
  --earth-800: #4a3d2b;
  --moss-700: #4b5a35;
  --moss-600: #59693f;
  --moss-500: #6d8350;
  --moss-400: #a8b892;
  --parchment-100: #f5f2ed;
  --parchment-200: #ebe4d9;
  --parchment-300: #d8cbbb;
  --parchment-400: #b9aa98;
  --shadow-soft: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 2px 10px -3px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 6px 32px -6px rgba(0, 0, 0, 0.12), 0 8px 28px -8px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 8px 40px -8px rgba(0, 0, 0, 0.15), 0 15px 50px -10px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--parchment-100);
  background: linear-gradient(180deg, var(--forest-950) 0%, var(--forest-900) 45%, var(--earth-950) 100%);
}

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(21, 40, 25, 0.95);
  border-bottom: 1px solid rgba(47, 90, 52, 0.72);
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(12px);
}

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

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

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

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

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

.brand-name {
  color: var(--parchment-100);
  font-size: 20px;
  font-weight: 800;
}

.brand-tagline {
  color: var(--parchment-300);
  font-size: 12px;
  margin-top: 2px;
}

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

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

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--parchment-100);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(47, 90, 52, 0.72);
  padding: 12px 16px 18px;
  background: rgba(21, 40, 25, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
  animation: slideDown 0.24s ease both;
}

.mobile-link {
  display: block;
  padding: 10px 8px;
}

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

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

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

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

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

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 0 64px;
}

.hero-panel {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--moss-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at center, var(--moss-400) 0 32%, transparent 34% 100%);
  border: 1px solid var(--moss-400);
}

.hero h1 {
  margin: 0 0 18px;
  color: var(--parchment-100);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--parchment-200);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.72;
}

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

.hero-meta {
  margin-bottom: 28px;
  color: var(--parchment-300);
}

.hero-meta span,
.detail-meta span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(34, 65, 38, 0.72);
  color: var(--parchment-200);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(168, 184, 146, 0.12);
}

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

.button-primary,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.button-secondary,
.button-ghost {
  background: rgba(0, 0, 0, 0.45);
  color: var(--parchment-100);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 237, 0.12);
  backdrop-filter: blur(8px);
}

.button-secondary:hover,
.button-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 24px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.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;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  padding: 72px 0;
}

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

.section.deep {
  background: rgba(21, 40, 25, 0.42);
}

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

.section-title {
  margin: 0;
  color: var(--parchment-100);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

.section-desc {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--parchment-300);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 220px);
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid rgba(109, 131, 80, 0.22);
  border-radius: 18px;
  background: rgba(53, 43, 31, 0.35);
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(109, 131, 80, 0.32);
  border-radius: 12px;
  outline: none;
  background: rgba(10, 20, 13, 0.72);
  color: var(--parchment-100);
  padding: 0 14px;
}

.search-panel input::placeholder {
  color: var(--parchment-400);
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(53, 43, 31, 0.42);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: scale(1.02);
  background: rgba(74, 61, 43, 0.6);
  box-shadow: var(--shadow-strong);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--earth-800);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(89, 105, 63, 0.9);
  color: white;
  font-size: 24px;
  padding-left: 4px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-tags {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poster-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: rgba(34, 65, 38, 0.9);
  color: var(--parchment-100);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--parchment-100);
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: var(--moss-400);
}

.card-body em {
  display: -webkit-box;
  min-height: 44px;
  margin: 9px 0 14px;
  overflow: hidden;
  color: var(--parchment-300);
  font-size: 14px;
  font-style: normal;
  line-height: 1.58;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact .card-body strong {
  min-height: auto;
  font-size: 16px;
}

.movie-card.compact .card-body em {
  min-height: auto;
}

.meta-row {
  gap: 8px;
}

.meta-row span {
  padding: 5px 8px;
  color: var(--parchment-400);
  font-size: 12px;
  background: rgba(21, 40, 25, 0.6);
}

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

.category-card {
  min-height: 172px;
  padding: 22px;
  border: 1px solid rgba(109, 131, 80, 0.22);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(34, 65, 38, 0.72), rgba(53, 43, 31, 0.72));
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--parchment-100);
  font-size: 22px;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 88px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(53, 43, 31, 0.4);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.rank-number {
  color: var(--moss-400);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 88px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--earth-800);
}

.rank-item strong {
  display: block;
  color: var(--parchment-100);
  font-size: 16px;
  line-height: 1.35;
}

.rank-item em {
  display: block;
  margin-top: 6px;
  color: var(--parchment-400);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.page-hero {
  padding: 64px 0 44px;
  background: radial-gradient(circle at top right, rgba(109, 131, 80, 0.2), transparent 36%), linear-gradient(180deg, rgba(21, 40, 25, 0.75), transparent);
}

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

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

.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--parchment-100);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--parchment-300);
  font-size: 18px;
  line-height: 1.82;
}

.detail-shell {
  padding: 54px 0 76px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
  gap: 34px;
  align-items: start;
}

.player-card,
.detail-copy,
.side-card {
  overflow: hidden;
  border: 1px solid rgba(109, 131, 80, 0.22);
  border-radius: 22px;
  background: rgba(53, 43, 31, 0.42);
  box-shadow: var(--shadow-medium);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.22);
  color: white;
  cursor: pointer;
}

.player-mask.hidden {
  display: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(89, 105, 63, 0.92);
  box-shadow: var(--shadow-strong);
  font-size: 34px;
  padding-left: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-mask:hover .big-play {
  background: var(--moss-500);
  transform: scale(1.05);
}

.player-info {
  padding: 20px 22px 24px;
}

.player-info h1 {
  margin: 0 0 12px;
  color: var(--parchment-100);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.player-info p {
  margin: 0;
  color: var(--parchment-300);
  line-height: 1.82;
}

.detail-copy {
  padding: 28px;
}

.detail-copy h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--parchment-100);
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 20px;
  color: var(--parchment-300);
  line-height: 1.9;
}

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

.tag-cloud span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(34, 65, 38, 0.74);
  color: var(--parchment-200);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.side-stack {
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 22px;
}

.side-card .movie-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

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

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

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

.footer-logo strong,
.footer-logo em,
.site-footer a,
.site-footer h2 {
  display: block;
}

.footer-logo strong {
  color: var(--parchment-100);
  font-size: 18px;
}

.footer-logo em {
  color: var(--parchment-400);
  font-size: 12px;
  font-style: normal;
}

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

.site-footer a {
  margin: 9px 0;
  color: var(--parchment-300);
  font-size: 14px;
  transition: color 0.2s ease;
}

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

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

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 18px;
  background: rgba(53, 43, 31, 0.4);
  color: var(--parchment-300);
  text-align: center;
}

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

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

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 76vh;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

  .movie-grid,
  .category-grid,
  .rank-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .brand-tagline {
    display: none;
  }

  .hero h1 {
    font-size: 38px;
  }

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

  .movie-grid,
  .category-grid,
  .rank-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--earth-950);
}

::-webkit-scrollbar-thumb {
  background: #4a8c4a;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d7340;
}

::selection {
  background: var(--moss-500);
  color: var(--parchment-100);
}
