:root {
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-100: #fef3c7;
  --white: #ffffff;
  --shadow-soft: 0 20px 45px rgba(28, 25, 23, 0.14);
  --shadow-strong: 0 25px 65px rgba(28, 25, 23, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--stone-900);
  background: linear-gradient(135deg, #f5f5f4 0%, #fffbeb 48%, #e7e5e4 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(41, 37, 36, 0.96);
  box-shadow: 0 8px 26px rgba(28, 25, 23, 0.18);
  backdrop-filter: blur(16px);
}

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--stone-900);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-100));
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #d6d3d1;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-950);
}

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

.hero-slide {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.04);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-inner {
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(760px, 100%);
  padding-top: 36px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  color: var(--amber-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.detail-hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.detail-hero p,
.page-hero p {
  width: min(760px, 100%);
  margin: 20px 0 0;
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag-row span {
  padding: 7px 12px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.hero-actions,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-400), #fcd34d);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.26);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

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

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

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: min(560px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-strong);
  transform: translateX(-50%);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--stone-900);
  background: var(--white);
  font-size: 15px;
}

.hero-search input {
  padding: 15px 18px;
}

.hero-search button {
  border: 0;
  padding: 0 22px;
  color: var(--stone-950);
  background: var(--amber-400);
  font-weight: 800;
  cursor: pointer;
}

.section-block,
.page-main {
  padding: 68px 0;
}

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

.section-head h2 {
  margin: 0;
  color: var(--stone-950);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.more-link {
  color: #92400e;
  font-weight: 800;
}

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

.category-card,
.category-overview-card a {
  min-height: 155px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-900), var(--stone-700));
  box-shadow: var(--shadow-soft);
}

.category-card:nth-child(2n),
.category-overview-card:nth-child(2n) a {
  background: linear-gradient(135deg, #78350f, #a16207);
}

.category-card span,
.category-overview-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 14px 0 0;
  color: #e7e5e4;
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(120, 113, 108, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
}

.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

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

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

.movie-card:hover .poster-link img,
.rank-item:hover .rank-cover img {
  transform: scale(1.06);
}

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

.movie-year,
.movie-type {
  position: absolute;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--stone-950);
  background: var(--amber-400);
  font-size: 12px;
  font-weight: 900;
}

.movie-year {
  left: 10px;
}

.movie-type {
  right: 10px;
  color: var(--white);
  background: rgba(28, 25, 23, 0.72);
}

.movie-body {
  padding: 14px;
}

.movie-title {
  display: block;
  color: var(--stone-950);
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover {
  color: #b45309;
}

.movie-body p {
  min-height: 44px;
  margin: 8px 0 10px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.6;
}

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

.movie-meta span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f5f5f4;
}

.hot-panel {
  padding-top: 36px;
}

.page-hero {
  padding: 56px;
  border-radius: 32px;
  color: var(--white);
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.98), rgba(120, 53, 15, 0.9));
  box-shadow: var(--shadow-strong);
}

.small-hero {
  margin-bottom: 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 12px;
  margin: 28px 0;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
}

.filter-bar input,
.filter-bar select {
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #e7e5e4;
}

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

.category-overview-grid {
  margin-top: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 86px 58px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
}

.rank-cover {
  overflow: hidden;
  width: 86px;
  height: 112px;
  border-radius: 16px;
  background: var(--stone-800);
}

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

.rank-index {
  color: #b45309;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.rank-copy a {
  color: var(--stone-950);
  font-size: 20px;
  font-weight: 900;
}

.rank-copy p {
  margin: 8px 0 10px;
  color: var(--stone-600);
  line-height: 1.7;
}

.heat {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--stone-950);
  background: var(--amber-400);
  font-weight: 900;
}

.detail-main {
  padding-bottom: 60px;
}

.detail-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  color: var(--white);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  padding: 90px 0 70px;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--amber-400);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: -80px;
}

.detail-content,
.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  color: var(--stone-950);
  background: var(--amber-400);
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
}

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

.player-shell.playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.content-card,
.side-card {
  padding: 28px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--stone-950);
  font-size: 24px;
}

.content-card p {
  margin: 0 0 14px;
  color: #44403c;
  line-height: 1.9;
}

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

.side-card dt {
  color: var(--stone-600);
}

.side-card dd {
  margin: 0;
  color: var(--stone-950);
  font-weight: 800;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hidden {
  display: none !important;
}

.site-footer {
  padding: 46px 0;
  color: #d6d3d1;
  background: var(--stone-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
}

.footer-grid p {
  max-width: 520px;
  color: #a8a29e;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 20px;
}

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

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    background: rgba(41, 37, 36, 0.98);
  }

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

  .hero-carousel {
    height: 640px;
  }

  .hero-copy {
    padding-right: 24px;
  }

  .hero-search {
    bottom: 38px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .rank-item {
    grid-template-columns: 72px 42px 1fr;
  }

  .rank-cover {
    width: 72px;
    height: 96px;
  }

  .heat {
    display: none;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

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

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

  .hero-search button {
    height: 46px;
  }

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

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

  .page-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .detail-hero {
    min-height: 520px;
  }

  .detail-layout {
    margin-top: -44px;
  }
}
