:root {
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-500: #a8a29e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --black: #000000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: linear-gradient(135deg, #f5f5f4 0%, #fffbeb 52%, #e7e5e4 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-700));
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.35);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font-size: 22px;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.18) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.1) 52%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-content {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  color: var(--white);
}

.hero-panel {
  width: min(680px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(8px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-400);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
}

.hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.movie-meta-line span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  font-size: 13px;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(217, 119, 6, 0.45);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.25s ease;
}

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

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--amber-400);
}

.section {
  padding: 72px 0;
}

.section.compact {
  padding: 42px 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 8px 0 0;
  color: var(--stone-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
}

.section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--stone-600);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(41, 37, 36, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(41, 37, 36, 0.16);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 700;
}

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

.movie-meta-line {
  gap: 6px;
  margin-bottom: 9px;
}

.movie-meta-line span {
  color: var(--amber-800);
  background: #fff7ed;
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--stone-900);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.movie-card h3 a:hover {
  color: var(--amber-700);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--stone-100);
  font-size: 12px;
}

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

.category-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-900), var(--amber-900));
  box-shadow: 0 18px 40px rgba(41, 37, 36, 0.15);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.category-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 160px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(41, 37, 36, 0.08);
}

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

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(41, 37, 36, 0.08);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-700));
  font-size: 18px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 2 / 3;
  background: var(--stone-900);
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: var(--stone-600);
  font-size: 14px;
}

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

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

.detail-main,
.detail-side,
.info-card {
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(41, 37, 36, 0.1);
}

.player-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--black);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.62));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-700));
  box-shadow: 0 18px 50px rgba(217, 119, 6, 0.46);
  cursor: pointer;
  font-size: 34px;
  transition: transform 0.25s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.player-status {
  min-height: 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.info-card {
  margin-top: 22px;
  padding: 28px;
}

.info-card h1 {
  margin: 0 0 14px;
  color: var(--stone-900);
  font-size: clamp(30px, 4vw, 48px);
}

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

.detail-meta span {
  color: var(--amber-800);
  background: #fff7ed;
}

.prose h2 {
  margin: 28px 0 12px;
  color: var(--stone-900);
  font-size: 24px;
}

.prose p {
  margin: 0 0 16px;
  color: var(--stone-700);
  line-height: 1.9;
}

.detail-side {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.detail-side img {
  width: 100%;
  border-radius: 16px;
  background: var(--stone-900);
}

.side-table {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.side-table div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stone-200);
}

.side-table span:first-child {
  color: var(--stone-600);
}

.side-table span:last-child {
  color: var(--stone-900);
  font-weight: 700;
  text-align: right;
}

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

.site-footer {
  margin-top: 40px;
  padding: 36px 0;
  color: rgba(255, 255, 255, 0.76);
  background: var(--stone-950);
}

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

.footer-inner p {
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

[hidden] {
  display: none !important;
}

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

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

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.98);
  }

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

  .nav-link {
    padding: 12px 14px;
  }

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

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

  .category-grid,
  .rank-list,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

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

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

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

  .hero-panel {
    padding: 24px;
    border-radius: 22px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 76px 1fr;
    gap: 10px;
  }
}
