* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(41, 37, 36, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: var(--stone-50);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(146, 64, 14, 0.94));
  color: #fff;
  box-shadow: 0 12px 30px rgba(41, 37, 36, 0.18);
  backdrop-filter: blur(16px);
}

.nav-shell,
.footer-shell,
.section-shell,
.hero-inner,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-500));
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 19px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(120, 53, 15, 0.98);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  display: grid;
  gap: 8px;
}

.mobile-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.mobile-sub-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.54) 48%, rgba(28, 25, 23, 0.24)), linear-gradient(90deg, rgba(120, 53, 15, 0.5), rgba(0, 0, 0, 0.12));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 44px;
  padding: 74px 0 58px;
}

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

.eyebrow,
.hero-tag,
.card-category,
.duration-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.eyebrow,
.hero-tag {
  padding: 8px 14px;
  color: var(--amber-100);
  background: rgba(217, 119, 6, 0.78);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.hero h1 {
  margin: 22px 0 12px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.2;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

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

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(41, 37, 36, 0.2);
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(28, 25, 23, 0.56);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero-panel h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

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

.hero-list a {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-list a:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.15);
}

.hero-list img {
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
}

.hero-list strong {
  display: block;
  line-height: 1.35;
}

.hero-list span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

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

.hero-controls button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-controls button.is-active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: linear-gradient(180deg, var(--stone-50), #fff);
}

.section-dark {
  color: #fff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, var(--stone-900), var(--amber-900));
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--stone-600);
}

.section-dark .section-head p,
.section-dark .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(41, 37, 36, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-900), var(--stone-900));
}

.poster-link img,
.rank-cover img,
.row-cover img,
.detail-cover img,
.category-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(217, 119, 6, 0.92);
}

.duration-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.card-body {
  padding: 17px;
}

.card-body h2,
.row-body h2,
.rank-info h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.row-body h2 a:hover,
.rank-info h2 a:hover {
  color: var(--amber-700);
}

.card-body p,
.row-body p,
.rank-info p {
  margin: 0 0 12px;
  color: var(--stone-500);
  font-size: 14px;
}

.card-meta,
.row-meta,
.rank-meta,
.rank-score,
.detail-meta,
.breadcrumb,
.related-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--stone-500);
  font-size: 13px;
}

.card-meta span,
.row-meta span,
.rank-meta span,
.rank-score span,
.detail-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--amber-50);
  color: var(--amber-800);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 26px;
  color: #fff;
  background: var(--stone-900);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.9), rgba(28, 25, 23, 0.25));
}

.category-card div {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.page-hero,
.detail-hero {
  color: #fff;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.32), transparent 34%), linear-gradient(135deg, var(--amber-900), var(--stone-900));
}

.page-hero .page-shell,
.detail-hero .page-shell {
  padding: 72px 0 58px;
}

.page-hero p,
.detail-hero p,
.page-hero .breadcrumb,
.detail-hero .breadcrumb {
  color: rgba(255, 255, 255, 0.78);
}

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

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -36px auto 40px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
  gap: 22px;
  padding: 24px;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.filter-panel h2 {
  margin: 8px 0 0;
  font-size: 24px;
  line-height: 1.25;
}

.filter-form {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 0.75fr);
  gap: 10px;
  align-items: center;
}

.filter-form input,
.filter-form select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--stone-700);
  background: #fff;
  outline: 0;
}

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

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

.movie-row,
.rank-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(41, 37, 36, 0.07);
}

.row-cover,
.rank-cover {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  border-radius: 18px;
  background: var(--stone-900);
}

.row-body,
.rank-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.row-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--amber-800);
  background: var(--amber-50);
  font-size: 13px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: stretch;
}

.rank-number {
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.22);
}

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

.player-card,
.detail-card,
.related-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18));
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 28px;
  text-indent: 4px;
}

.player-info,
.detail-card,
.related-card {
  padding: 24px;
}

.player-info h2,
.detail-card h2,
.related-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: var(--stone-900);
  box-shadow: var(--shadow);
}

.detail-cover img {
  aspect-ratio: 4 / 5;
}

.detail-side {
  display: grid;
  gap: 20px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

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

.hidden-by-filter {
  display: none !important;
}

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

.footer-shell {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand p {
  max-width: 390px;
  color: var(--stone-400);
}

.footer-links h2 {
  margin: 0 0 14px;
  color: var(--amber-100);
  font-size: 17px;
}

.footer-links div {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--stone-400);
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 16px;
  color: var(--stone-500);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.compact,
  .search-wide .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-inner,
  .detail-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 640px;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .nav-shell {
    height: 64px;
  }

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

  .hero-inner {
    padding-top: 52px;
  }

  .hero-panel {
    display: none;
  }

  .section {
    padding: 50px 0;
  }

  .section-head {
    display: grid;
  }

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

  .filter-form,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .movie-row,
  .rank-row,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .rank-number {
    min-height: 56px;
  }

  .row-cover,
  .rank-cover {
    aspect-ratio: 16 / 9;
  }

  .page-hero .page-shell,
  .detail-hero .page-shell {
    padding: 52px 0 52px;
  }
}
