:root {
  --primary-900: #6f2f12;
  --primary-800: #954217;
  --primary-700: #bb5413;
  --primary-600: #e17015;
  --primary-500: #f08d1f;
  --primary-100: #fdf2d7;
  --primary-50: #fef9ee;
  --secondary-50: #faf9f6;
  --secondary-100: #f5f3ec;
  --secondary-700: #897256;
  --text: #141313;
  --muted: #6b645d;
  --line: #eee6da;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(86, 46, 18, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fffaf2 0%, #ffffff 38%, #f8f6f1 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-800), var(--primary-700), var(--primary-600));
  box-shadow: 0 10px 30px rgba(149, 66, 23, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 -8px 20px rgba(225, 112, 21, 0.14);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--primary-100);
  font-size: 12px;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  white-space: nowrap;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.94);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #fff4d4;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 22px;
}

.hero-carousel {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  background: #150906;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

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

.hero-slide > img,
.detail-hero > img,
.rank-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-hero-layer,
.rank-hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 18%, rgba(240, 141, 31, 0.3), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 88px;
}

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

.hero-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffe4a6;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-copy h1,
.detail-hero-content h1,
.rank-hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.detail-hero-content p,
.rank-hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn,
.text-link,
.section-more,
.rank-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary,
.rank-play {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 12px 26px rgba(225, 112, 21, 0.35);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.btn:hover,
.text-link:hover,
.section-more:hover,
.rank-play:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 42px;
  line-height: 1;
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #fff;
}

.content-section,
.page-main {
  padding: 62px 0;
}

.soft-band {
  background: linear-gradient(90deg, var(--primary-50), var(--secondary-50));
}

.section-heading,
.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.page-title {
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: 32px;
}

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.16;
}

.section-heading p,
.page-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--primary-700);
  background: var(--primary-100);
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(238, 230, 218, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(86, 46, 18, 0.2);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-100));
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary-800);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ffbc4a, var(--primary-700));
}

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

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

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.related-item:hover strong,
.meta-card a:hover {
  color: var(--primary-700);
}

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card .tag-row span,
.detail-tags span {
  color: var(--primary-700);
  background: var(--primary-100);
  backdrop-filter: none;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #1b0e08;
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.05);
  opacity: 0.88;
}

.category-tile span {
  position: absolute;
  inset: auto 16px 16px 16px;
  color: #fff;
}

.category-tile strong {
  display: block;
  font-size: 20px;
}

.category-tile small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 4px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  padding: 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

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

.category-card-large p {
  color: var(--muted);
}

.filter-bar,
.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: #fffaf2;
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(225, 112, 21, 0.24);
  border-color: var(--primary-500);
}

.rank-hero,
.detail-hero {
  position: relative;
  height: 48vh;
  min-height: 420px;
  overflow: hidden;
  color: #fff;
  background: #120805;
}

.rank-hero-content,
.detail-hero-content {
  position: absolute;
  left: 50%;
  bottom: 54px;
  z-index: 2;
  transform: translateX(-50%);
}

.rank-hero-content span {
  color: #ffe4a6;
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-number {
  color: var(--primary-700);
  font-size: 28px;
  font-weight: 900;
}

.rank-thumb img {
  width: 96px;
  height: 132px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb.light {
  color: rgba(255, 255, 255, 0.82);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 48px 0 70px;
}

.player-card,
.detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.56));
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-800));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
  font-size: 36px;
}

.detail-card {
  padding: 26px;
  margin-top: 24px;
}

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

.detail-card p {
  margin: 0;
  color: #3d3833;
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 96px;
  align-self: start;
}

.meta-card dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px 14px;
  margin: 0 0 18px;
}

.meta-card dt {
  color: var(--muted);
}

.meta-card dd {
  margin: 0;
  font-weight: 750;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.related-item strong,
.related-item small {
  display: block;
}

.related-item small {
  margin-top: 4px;
  color: var(--muted);
}

.search-results .movie-grid:empty::before,
.list-grid:empty::before {
  content: "暂无匹配影片";
  grid-column: 1 / -1;
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #23120c, #080504);
  padding: 46px 0;
}

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

.footer-brand {
  color: #fff;
  font-size: 24px;
}

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

.site-footer p {
  max-width: 560px;
}

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

.footer-links a:hover {
  color: #ffe4a6;
}

[data-search-card].is-hidden,
.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

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

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

  .nav-links {
    gap: 14px;
    font-size: 14px;
  }

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 68px;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--primary-800), var(--primary-700));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  }

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

  .nav-links a {
    padding: 10px 12px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

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

  .hero-arrow {
    display: none;
  }

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

  .six-grid,
  .four-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card-large {
    grid-template-columns: 1fr;
  }

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

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

  .rank-thumb img {
    width: 76px;
    height: 104px;
  }

  .rank-play {
    grid-column: 2 / -1;
  }

  .detail-hero,
  .rank-hero {
    min-height: 360px;
  }

  .detail-layout {
    padding-top: 28px;
  }

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

@media (max-width: 480px) {
  .container,
  .nav-wrap {
    width: min(100% - 24px, 1180px);
  }

  .six-grid,
  .four-grid,
  .category-grid {
    gap: 14px;
  }

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

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

  .movie-card p {
    display: none;
  }

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