:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --shadow-soft: 0 18px 40px rgba(28, 25, 23, 0.16);
  --shadow-hover: 0 28px 55px rgba(28, 25, 23, 0.24);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone-50);
  color: var(--stone-900);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(41, 37, 36, 0.96);
  color: var(--stone-50);
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.25);
  backdrop-filter: blur(14px);
}

.nav-bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand {
  font-size: 21px;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.32);
  font-size: 13px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
}

.desktop-nav a,
.mobile-menu a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.footer-links a:hover {
  color: var(--amber-400);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  background: var(--stone-700);
  border-radius: 999px;
  padding: 5px;
  min-width: 230px;
}

.nav-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  color: #fff;
  background: transparent;
  outline: 0;
  padding: 8px 10px 8px 14px;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: var(--stone-400);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
}

.nav-search button,
.mobile-search button,
.primary-btn {
  color: #fff;
  background: var(--amber-600);
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  background: #b45309;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 26px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(214, 211, 209, 0.18);
  padding: 14px 16px 18px;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-700), #78350f);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  transform: scale(1.05);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 20%, rgba(251, 191, 36, 0.24), transparent 34%), linear-gradient(90deg, rgba(28, 25, 23, 0.95), rgba(28, 25, 23, 0.62), rgba(28, 25, 23, 0.18));
}

.hero-inner {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 44px;
  color: #fff;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  color: var(--amber-400);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 12px;
}

.hero-copy h1,
.detail-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-copy p,
.page-hero p,
.detail-line {
  color: var(--stone-200);
  font-size: clamp(17px, 2vw, 22px);
  margin: 22px 0;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: #92400e;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags a {
  color: var(--amber-300);
  background: rgba(245, 158, 11, 0.22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover {
  color: var(--amber-300);
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
  aspect-ratio: 3 / 4;
}

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

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

.hero-dots button {
  width: 36px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--amber-400);
}

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

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

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

.section-head a {
  color: var(--amber-600);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.poster-box {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--stone-300);
}

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

.movie-link:hover .poster-box img {
  transform: scale(1.07);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.78);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.movie-info {
  padding: 16px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-info h2 {
  margin: 8px 0 7px;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--stone-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.stone-strip {
  background: var(--stone-100);
}

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

.category-card {
  display: block;
  min-height: 190px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(135deg, #fff, #fffbeb);
  box-shadow: var(--shadow-hover);
}

.category-card span {
  color: var(--amber-600);
  font-weight: 900;
}

.category-card h2 {
  margin: 12px 0 10px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: var(--stone-600);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 88px;
  background: var(--stone-900);
  color: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.inverted-head a,
.dark-head a {
  color: var(--amber-300);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(251, 191, 36, 0.16);
  transform: translateX(4px);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--amber-600);
  border-radius: 999px;
  font-weight: 900;
}

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

.rank-row h2 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.3;
}

.rank-row p {
  margin: 0 0 4px;
  color: var(--stone-300);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-row span:last-child {
  color: var(--stone-400);
  font-size: 12px;
}

.dark-feature {
  background: var(--stone-900);
  color: #fff;
}

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

.feature-card {
  position: relative;
  display: block;
  height: 430px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--stone-800);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

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

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

.feature-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.2), transparent);
}

.feature-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px;
}

.feature-copy span,
.feature-copy div {
  color: var(--amber-300);
  font-weight: 800;
}

.feature-copy h2 {
  margin: 8px 0;
  font-size: 26px;
}

.feature-copy p {
  margin: 0 0 12px;
  color: var(--stone-200);
}

.page-hero {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-700), #78350f);
  overflow: hidden;
}

.compact-hero {
  padding: 90px 0 86px;
}

.page-hero .container {
  position: relative;
}

.page-hero p {
  max-width: 760px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  outline: 0;
  padding: 0 16px;
  color: var(--stone-800);
  background: var(--stone-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.empty-state {
  margin: 20px 0;
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  color: var(--stone-600);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-hero {
  position: relative;
  min-height: 560px;
  color: #fff;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

.detail-head {
  position: relative;
  padding: 50px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  color: var(--stone-300);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  width: 280px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
}

.detail-copy {
  max-width: 780px;
}

.detail-meta {
  margin: 18px 0;
  color: var(--stone-200);
}

.detail-main {
  margin-top: -54px;
  position: relative;
  z-index: 2;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 80px rgba(28, 25, 23, 0.35);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  color: #fff;
  border: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.32);
  font-size: 28px;
  padding-left: 4px;
}

.player-cover strong {
  font-size: 20px;
}

.story-card {
  margin-top: 36px;
  padding: 34px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.story-card p {
  margin: 0 0 26px;
  color: var(--stone-700);
}

.story-card p:last-child {
  margin-bottom: 0;
}

.related-block {
  padding-top: 52px;
}

.full-rank .rank-row {
  color: var(--stone-900);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.full-rank .rank-row p {
  color: var(--stone-600);
}

.full-rank .rank-row span:last-child {
  color: var(--stone-500);
}

.ranking-feature {
  padding-top: 20px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 42px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
  margin-bottom: 14px;
}

.site-footer h2 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 19px;
}

.site-footer p {
  max-width: 460px;
  margin: 12px 0 0;
  color: var(--stone-400);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.footer-bottom {
  margin-top: 42px;
  border-top: 1px solid rgba(214, 211, 209, 0.12);
  padding: 22px 16px;
  text-align: center;
  color: var(--stone-500);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

  .nav-search {
    min-width: 190px;
  }

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 70px 0 92px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .detail-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .detail-poster {
    width: 180px;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-inner {
    min-height: 520px;
  }

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

  .movie-grid,
  .small-grid,
  .catalog-grid,
  .category-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 34px 56px minmax(0, 1fr);
  }

  .rank-row img {
    width: 56px;
    height: 76px;
  }

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

  .detail-poster {
    width: min(230px, 68vw);
  }

  .detail-main {
    margin-top: -28px;
  }

  .story-card {
    padding: 24px;
  }
}
