:root {
  --bg: #fff7ed;
  --bg-soft: #f5f0e8;
  --paper: #ffffff;
  --ink: #3b2411;
  --muted: #8a6a4a;
  --primary: #b45309;
  --primary-dark: #7c2d12;
  --accent: #dc2626;
  --accent-deep: #7f1d1d;
  --line: rgba(146, 64, 14, 0.16);
  --shadow: 0 24px 70px rgba(92, 38, 6, 0.16);
  --radius: 22px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #f4eee6 52%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #7c2d12;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff7ed;
  background: linear-gradient(135deg, #dc2626, #b45309 58%, #7c2d12);
  box-shadow: 0 12px 30px rgba(180, 83, 9, 0.28);
}

.brand-name {
  font-size: clamp(20px, 2vw, 28px);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #7c2d12;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #b45309, #dc2626);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.top-search input,
.mobile-search input,
.search-controls input,
.search-controls select {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.top-search input {
  width: 210px;
  padding: 8px 6px 8px 14px;
}

.top-search button,
.mobile-search button,
.search-controls button {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #b45309, #dc2626);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #7c2d12;
  background: rgba(180, 83, 9, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding-left: 12px;
}

.hero {
  position: relative;
  height: min(740px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #1c1008;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 38%, rgba(245, 158, 11, 0.18), transparent 35%), linear-gradient(90deg, rgba(28, 16, 8, 0.92) 0%, rgba(28, 16, 8, 0.62) 42%, rgba(28, 16, 8, 0.22) 78%), linear-gradient(0deg, rgba(28, 16, 8, 0.92) 0%, rgba(28, 16, 8, 0.14) 45%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - var(--max)) / 2));
  bottom: 86px;
  max-width: 760px;
  color: #fff7ed;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #7c2d12;
  background: rgba(255, 247, 237, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 22px 0 14px;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.46);
}

.hero-content p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 247, 237, 0.9);
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #b45309);
  box-shadow: 0 18px 40px rgba(180, 83, 9, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 55px rgba(180, 83, 9, 0.36);
}

.ghost-btn {
  color: #fff7ed;
  border: 1px solid rgba(255, 247, 237, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff7ed;
  background: rgba(28, 16, 8, 0.36);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

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

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

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff7ed;
}

.page-section,
.inner-main,
.detail-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.page-section {
  padding: 70px 0 0;
}

.flush-section {
  padding-top: 38px;
}

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

.section-heading h2,
.rank-list-section h2 {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 44px);
  line-height: 1.1;
  color: #7c2d12;
  letter-spacing: -0.04em;
}

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

.section-heading a,
.text-link {
  color: #b45309;
  background: rgba(180, 83, 9, 0.1);
}

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

.category-pill {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 40px rgba(92, 38, 6, 0.08);
  transition: 0.22s ease;
}

.category-pill:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.22);
  box-shadow: var(--shadow);
}

.category-pill span {
  font-size: 22px;
  font-weight: 900;
  color: #7c2d12;
}

.category-pill small,
.category-card-large p {
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(92, 38, 6, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #7c2d12, #f59e0b);
}

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

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

.year-badge,
.rank-no,
.score-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(127, 29, 29, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.rank-no {
  right: 12px;
  left: auto;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.84);
  border-radius: 50%;
  color: #fff;
  background: rgba(220, 38, 38, 0.82);
  opacity: 0;
  transition: 0.24s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  color: #3b2411;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #b45309;
}

.card-meta,
.card-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.card-desc {
  min-height: 54px;
  font-size: 14px;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

.movie-card.compact .card-desc {
  display: none;
}

.rank-grid .movie-card.compact {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 180px;
}

.rank-grid .poster-link,
.related-grid .poster-link {
  aspect-ratio: 2 / 3;
}

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

.page-hero {
  margin-top: 36px;
  overflow: hidden;
  border-radius: 32px;
  color: #fff7ed;
  background: radial-gradient(circle at 82% 22%, rgba(251, 191, 36, 0.36), transparent 32%), linear-gradient(135deg, #7f1d1d, #b45309 48%, #3b2411);
  box-shadow: var(--shadow);
}

.slim-hero > div,
.category-hero > div {
  max-width: 760px;
  padding: clamp(34px, 6vw, 70px);
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.page-hero h1,
.detail-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 247, 237, 0.88);
  line-height: 1.85;
  font-size: 18px;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 42px 0 72px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 50px rgba(92, 38, 6, 0.09);
}

.category-poster-stack {
  position: relative;
  height: 210px;
}

.category-poster-stack img {
  position: absolute;
  width: 116px;
  height: 174px;
  object-fit: cover;
  border: 4px solid #fff7ed;
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(28, 16, 8, 0.22);
}

.category-poster-stack img:nth-child(1) {
  left: 0;
  top: 22px;
  transform: rotate(-8deg);
}

.category-poster-stack img:nth-child(2) {
  left: 42px;
  top: 8px;
  z-index: 2;
}

.category-poster-stack img:nth-child(3) {
  left: 82px;
  top: 28px;
  transform: rotate(8deg);
}

.category-card-large h2 {
  margin: 6px 0 10px;
  font-size: 28px;
  color: #7c2d12;
}

.category-card-large .text-link {
  margin-top: 12px;
}

.rank-list-section {
  padding-bottom: 80px;
}

.rank-list {
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  list-style: none;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.rank-row span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: #b45309;
  font-weight: 900;
}

.rank-row a {
  font-weight: 800;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.search-panel {
  padding: 42px 0 80px;
}

.search-controls {
  position: sticky;
  top: 88px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 247, 237, 0.92);
  backdrop-filter: blur(18px);
}

.search-controls input,
.search-controls select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.search-results .is-hidden {
  display: none;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 28px 0 18px;
  color: var(--muted);
}

.breadcrumb a {
  color: #9a3412;
  font-weight: 800;
}

.player-section {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: #0f0704;
}

.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f0704;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0f0704;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: #fff7ed;
  background: radial-gradient(circle at center, rgba(180, 83, 9, 0.2), rgba(15, 7, 4, 0.72));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  transition: 0.2s ease;
}

.play-cover:hover {
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.28), rgba(15, 7, 4, 0.78));
}

.video-stage.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #b45309);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
  font-size: 36px;
}

.player-state {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: #fed7aa;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  margin-top: 34px;
}

.detail-poster {
  position: sticky;
  top: 110px;
  align-self: start;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.full-btn {
  width: 100%;
  margin-top: 16px;
}

.detail-content {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(92, 38, 6, 0.08);
}

.detail-title-row {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.detail-title-row .eyebrow {
  color: #9a3412;
  background: #ffedd5;
}

.detail-content h1 {
  color: #7c2d12;
}

.score-badge {
  position: static;
  display: inline-flex;
  white-space: nowrap;
  background: linear-gradient(135deg, #dc2626, #b45309);
}

.detail-one-line {
  margin: 0 0 24px;
  color: #7c2d12;
  font-size: 20px;
  line-height: 1.8;
  font-weight: 700;
}

.movie-meta-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
}

.movie-meta-list div {
  padding: 14px;
  border-radius: 16px;
  background: #fff7ed;
}

.movie-meta-list dt {
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-list dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.detail-tags {
  margin: 22px 0;
}

.text-block {
  margin-top: 28px;
}

.text-block h2 {
  margin: 0 0 10px;
  color: #7c2d12;
  font-size: 26px;
}

.text-block p {
  margin: 0;
  color: #59402c;
  line-height: 1.95;
  font-size: 17px;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 76px;
  color: #fee2e2;
  background: linear-gradient(135deg, #7f1d1d, #3b2411);
}

.footer-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

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

.footer-about p {
  max-width: 560px;
  color: #fecaca;
  line-height: 1.8;
}

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

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #fecaca;
}

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

.copyright {
  border-top: 1px solid rgba(254, 202, 202, 0.15);
  padding: 18px 0 22px;
  text-align: center;
  color: #fecaca;
}

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

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .mobile-nav .nav-link {
    display: block;
    margin-bottom: 6px;
  }

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

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 70px;
  }

  .hero-control {
    display: none;
  }

  .category-grid,
  .movie-grid,
  .rank-grid,
  .rank-list,
  .category-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .detail-poster {
    position: static;
    max-width: 320px;
  }

  .search-controls {
    top: 82px;
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .header-shell {
    min-height: 66px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-actions,
  .in-page-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rank-grid .movie-card.compact {
    grid-template-columns: 110px 1fr;
  }

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

  .movie-meta-list {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 22px;
  }
}
