: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;
  --amber-700: #b45309;
  --white: #ffffff;
  --shadow-sm: 0 4px 14px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 24px 50px rgba(28, 25, 23, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: linear-gradient(135deg, var(--stone-100) 0%, #fffbeb 52%, var(--stone-200) 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: rgba(28, 25, 23, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--stone-900);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.38);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.nav-drop-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  color: var(--stone-200);
  background: transparent;
  border-radius: 999px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-drop-button:hover {
  color: var(--amber-400);
  background: rgba(255, 255, 255, 0.07);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  display: grid;
  min-width: 180px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.98);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-dropdown:hover .nav-drop-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-drop-panel a {
  padding: 9px 12px;
  color: var(--stone-200);
  border-radius: 10px;
}

.nav-drop-panel a:hover {
  color: var(--amber-400);
  background: rgba(255, 255, 255, 0.08);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 28vw);
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.top-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 8px 10px;
}

.top-search input::placeholder {
  color: var(--stone-400);
}

.top-search button,
.btn-primary,
.btn-ghost,
.hero-arrow,
.play-button {
  border: 0;
  cursor: pointer;
}

.top-search button,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.top-search button:hover,
.btn-primary:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  backdrop-filter: blur(12px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--white);
}

.hero {
  position: relative;
  min-height: 620px;
  color: var(--white);
  background: var(--stone-900);
  overflow: hidden;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.25));
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding: 96px 0 112px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--amber-400);
  font-size: 15px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: var(--stone-200);
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 32px;
  color: var(--stone-200);
}

.hero-meta span,
.meta-pill,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: var(--amber-300);
  font-size: 13px;
  font-weight: 750;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  font-size: 28px;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

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

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

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

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

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

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

main {
  min-height: 60vh;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: rgba(255, 255, 255, 0.42);
}

.section.dark {
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-800), var(--stone-900));
}

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

.section-title {
  margin: 0;
  color: var(--stone-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section.dark .section-title,
.section.dark .section-lead {
  color: var(--white);
}

.section-lead {
  margin: 10px 0 0;
  color: var(--stone-600);
  font-size: 17px;
}

.more-link {
  color: var(--amber-700);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-hover:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--stone-200);
}

.poster-link img,
.compact-card img,
.category-tile img,
.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover img,
.category-tile:hover img,
.ranking-item:hover .ranking-cover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.type-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.type-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: var(--stone-900);
  background: var(--amber-400);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--stone-500);
  font-size: 13px;
}

.movie-meta-line span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--stone-400);
}

.movie-card h2,
.ranking-copy h2,
.detail-copy h1 {
  margin: 0;
  color: var(--stone-800);
  font-weight: 900;
}

.movie-card h2 {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card h2 a:hover,
.ranking-copy h2 a:hover {
  color: var(--amber-700);
}

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

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

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.category-tile strong {
  bottom: 68px;
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
}

.category-tile em {
  bottom: 22px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--stone-200);
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.compact-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 16px;
  color: var(--white);
  background: var(--stone-800);
  box-shadow: var(--shadow-sm);
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 72%);
}

.compact-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: -webkit-box;
  overflow: hidden;
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 70px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-800), var(--stone-900));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.1;
  font-weight: 950;
}

.page-hero p {
  max-width: 850px;
  margin: 0;
  color: var(--stone-300);
  font-size: 18px;
}

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

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

.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.filter-panel input {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  outline: 0;
  padding: 0 14px;
  color: var(--stone-800);
  background: var(--white);
}

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

.filter-panel span {
  color: var(--stone-600);
  font-weight: 750;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  padding: 12px;
}

.ranking-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--stone-200);
}

.ranking-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 30px;
  border-radius: 999px;
  color: var(--stone-900);
  background: var(--amber-400);
  font-weight: 950;
}

.ranking-copy {
  align-self: center;
}

.ranking-copy h2 {
  font-size: 22px;
}

.ranking-copy p {
  margin: 8px 0 12px;
  color: var(--stone-600);
}

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

.player-card,
.detail-copy,
.side-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

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

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.36);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding-left: 6px;
  border-radius: 50%;
  color: var(--stone-900);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  font-size: 38px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.42);
}

.detail-copy {
  padding: 28px;
  margin-top: 22px;
}

.detail-copy h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 26px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--amber-700);
  background: rgba(245, 158, 11, 0.12);
  font-weight: 750;
}

.detail-copy h2,
.side-card h2 {
  margin: 26px 0 10px;
  color: var(--stone-800);
  font-size: 24px;
  font-weight: 900;
}

.detail-copy p {
  margin: 0 0 14px;
  color: var(--stone-700);
  font-size: 17px;
  line-height: 1.85;
}

.side-card {
  padding: 18px;
}

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

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

.side-list .compact-card {
  min-height: 150px;
}

.search-empty {
  display: none;
  padding: 42px;
  border-radius: var(--radius);
  color: var(--stone-600);
  text-align: center;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 54px 0;
}

.footer-grid p {
  max-width: 560px;
  margin: 16px 0 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--stone-400);
}

.footer-grid a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  padding: 18px 0;
  color: var(--stone-500);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
  .top-search {
    display: none;
  }

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.98);
    box-shadow: var(--shadow-lg);
  }

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

  .nav-link,
  .nav-drop-button {
    justify-content: flex-start;
    border-radius: 12px;
  }

  .nav-dropdown {
    display: none;
  }

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

  .hero-arrow {
    display: none;
  }

  .section-head {
    display: block;
  }

  .more-link {
    display: inline-block;
    margin-top: 12px;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

@media (max-width: 540px) {
  .container-custom {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

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

  .hero-inner {
    padding: 76px 0 96px;
  }

  .hero-actions {
    display: grid;
  }

  .section {
    padding: 52px 0;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-strip {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 92px 1fr;
    gap: 12px;
  }

  .ranking-copy h2 {
    font-size: 18px;
  }

  .filter-panel {
    display: grid;
  }

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