:root {
  --forest-950: #0a140d;
  --forest-900: #152819;
  --forest-800: #224126;
  --forest-700: #2e5634;
  --earth-950: #211a13;
  --earth-900: #352b1f;
  --earth-800: #4a3d2b;
  --moss-700: #455234;
  --moss-600: #59693f;
  --moss-500: #6d8350;
  --moss-400: #8a9f6e;
  --parchment-100: #f5f2ed;
  --parchment-200: #ebe4d9;
  --parchment-300: #dfd4c1;
  --parchment-400: #d3c4a9;
  --ink-soft: rgba(0, 0, 0, 0.45);
  --line-soft: rgba(245, 242, 237, 0.08);
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.18), 0 10px 20px -2px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 8px 40px -8px rgba(0, 0, 0, 0.45), 0 15px 50px -10px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 242, 237, 0.08);
  background: rgba(10, 20, 13, 0.92);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--moss-500), var(--moss-700));
  box-shadow: var(--shadow-soft);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--parchment-400);
  font-size: 12px;
}

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

.nav-link {
  color: var(--parchment-300);
  font-weight: 650;
  transition: color 0.22s ease, transform 0.22s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--parchment-100);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line-soft);
  background: rgba(10, 20, 13, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
  animation: slideDown 0.32s ease-out;
}

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

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

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  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.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 42%, rgba(109, 131, 80, 0.28), transparent 32%),
    linear-gradient(0deg, var(--forest-950) 0%, rgba(10, 20, 13, 0.88) 34%, rgba(10, 20, 13, 0.32) 100%);
}

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

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

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 780px;
  margin: 0 0 22px;
  color: var(--parchment-200);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(245, 242, 237, 0.08);
  border-radius: 999px;
  color: var(--parchment-200);
  background: rgba(34, 65, 38, 0.72);
  font-size: 12px;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--parchment-300);
}

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

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.primary-btn,
.ghost-btn,
.panel-more {
  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;
}

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

.primary-btn:hover,
.panel-more:hover {
  background: var(--moss-500);
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--parchment-100);
  border: 1px solid rgba(245, 242, 237, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover {
  border-color: rgba(245, 242, 237, 0.38);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transition: background 0.22s ease, transform 0.22s ease;
}

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

.hero-arrow.prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-arrow.next {
  right: 24px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 242, 237, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--moss-400);
}

.quick-search {
  margin-top: 28px;
}

.search-panel {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.search-panel input {
  width: 100%;
  min-height: 58px;
  padding: 0 58px 0 22px;
  border: 1px solid rgba(245, 242, 237, 0.11);
  border-radius: 18px;
  outline: 0;
  color: var(--parchment-100);
  background: rgba(53, 43, 31, 0.72);
  box-shadow: var(--shadow-soft);
}

.search-panel input:focus {
  border-color: rgba(138, 159, 110, 0.65);
}

.search-icon {
  position: absolute;
  right: 22px;
  top: 50%;
  color: var(--parchment-400);
  transform: translateY(-50%);
  font-size: 26px;
}

.content-section {
  padding: 64px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--moss-400);
  background: rgba(53, 43, 31, 0.72);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--parchment-400);
  line-height: 1.65;
}

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

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

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

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 65%);
  transition: opacity 0.3s ease;
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(89, 105, 63, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.corner-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  color: var(--parchment-100);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.corner-badge {
  left: 12px;
  padding: 5px 10px;
  background: rgba(34, 65, 38, 0.88);
}

.rank-badge {
  right: 12px;
  width: 38px;
  height: 28px;
  display: grid;
  place-items: center;
  background: rgba(89, 105, 63, 0.92);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 50px;
  color: var(--parchment-100);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.card-meta {
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.movie-card-compact .card-title {
  font-size: 16px;
}

.split-section {
  padding: 64px 0;
  background: rgba(53, 43, 31, 0.28);
}

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

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

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 116px;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(245, 242, 237, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(109, 131, 80, 0.18), transparent 46%),
    rgba(34, 65, 38, 0.44);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(138, 159, 110, 0.45);
  background:
    radial-gradient(circle at top right, rgba(109, 131, 80, 0.28), transparent 50%),
    rgba(53, 43, 31, 0.64);
}

.category-card span {
  font-size: 20px;
  font-weight: 850;
}

.category-card small {
  color: var(--parchment-400);
  line-height: 1.5;
}

.category-card.large {
  min-height: 132px;
}

.rank-panel,
.info-panel,
.detail-card {
  border: 1px solid rgba(245, 242, 237, 0.08);
  border-radius: 20px;
  background: rgba(53, 43, 31, 0.42);
  box-shadow: var(--shadow-soft);
}

.rank-panel {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 96px;
}

.panel-title {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 900;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 242, 237, 0.07);
}

.rank-row:hover .rank-title {
  color: var(--moss-400);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(89, 105, 63, 0.86);
  font-size: 13px;
  font-weight: 900;
}

.rank-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
  transition: color 0.2s ease;
}

.rank-info {
  grid-column: 2;
  color: var(--parchment-400);
  font-size: 13px;
}

.panel-more {
  width: 100%;
  margin-top: 18px;
  color: white;
  background: var(--moss-600);
}

.library-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.library-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(245, 242, 237, 0.1);
  border-radius: 999px;
  color: var(--parchment-200);
  background: rgba(53, 43, 31, 0.58);
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.library-links a:hover {
  border-color: rgba(138, 159, 110, 0.5);
  background: rgba(34, 65, 38, 0.72);
  transform: translateY(-2px);
}

.page-hero {
  padding: 76px 0 52px;
  border-bottom: 1px solid rgba(245, 242, 237, 0.08);
  background:
    radial-gradient(circle at 76% 18%, rgba(109, 131, 80, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(21, 40, 25, 0.98), rgba(53, 43, 31, 0.86));
}

.page-hero h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
}

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

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

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
}

.pager:last-child {
  margin: 32px 0 0;
}

.pager a {
  min-width: 42px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--parchment-200);
  background: rgba(53, 43, 31, 0.62);
}

.pager a.current,
.pager a:hover {
  color: white;
  background: var(--moss-600);
}

.detail-layout {
  padding: 34px 0 70px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: black;
  box-shadow: var(--shadow-strong);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--parchment-100);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.34));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(89, 105, 63, 0.94);
  box-shadow: var(--shadow-strong);
  font-size: 30px;
}

.player-state,
.player-error {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  min-height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--parchment-100);
  background: rgba(0, 0, 0, 0.7);
  font-size: 13px;
}

.player-shell.is-loading .player-state,
.player-shell.has-error .player-error {
  display: flex;
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-card h2,
.info-panel h2 {
  margin: 24px 0 12px;
  font-size: 22px;
}

.detail-card h2:first-of-type {
  margin-top: 0;
}

.detail-card p {
  margin: 0 0 16px;
  color: var(--parchment-300);
  line-height: 1.85;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 96px;
}

.info-panel {
  padding: 22px;
}

.info-panel h2 {
  margin-top: 0;
}

.info-list {
  display: grid;
  gap: 16px;
}

.info-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(245, 242, 237, 0.08);
}

.info-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list small {
  display: block;
  margin-bottom: 6px;
  color: var(--parchment-400);
}

.info-list strong {
  color: var(--parchment-100);
  line-height: 1.5;
}

.related-section {
  padding-bottom: 0;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(245, 242, 237, 0.08);
  background: rgba(10, 20, 13, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 40px 0 26px;
}

.footer-brand .brand-mark {
  width: 38px;
  height: 38px;
}

.footer-text {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--parchment-400);
  line-height: 1.7;
}

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

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

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

.footer-bottom {
  padding: 18px 0 30px;
  border-top: 1px solid rgba(245, 242, 237, 0.07);
  color: var(--parchment-400);
  font-size: 14px;
}

[data-card].hidden {
  display: none;
}

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

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

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

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

  .brand-copy small {
    display: none;
  }

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

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

  .hero-content h1 {
    font-size: 36px;
  }

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

  .hero-actions {
    gap: 10px;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1 1 160px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

  .content-section,
  .split-section {
    padding: 46px 0;
  }

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