:root {
  --primary-50: #fef6ee;
  --primary-100: #fdecd8;
  --primary-400: #f29148;
  --primary-600: #e0561b;
  --primary-700: #ba4118;
  --secondary-50: #f7f7f5;
  --secondary-100: #e8e6df;
  --secondary-200: #d1cec0;
  --secondary-300: #b4af9b;
  --secondary-600: #6f6753;
  --secondary-800: #514b40;
  --secondary-900: #413d35;
  --accent-600: #16a34a;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 20px 60px rgba(65, 61, 53, 0.14);
  --soft-shadow: 0 10px 30px rgba(65, 61, 53, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--secondary-900);
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50) 42%, #ffffff);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(209, 206, 192, 0.65);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 360px) auto;
  gap: 24px;
  align-items: center;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary-900);
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(224, 86, 27, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--secondary-600);
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.header-search,
.hero-search,
.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--secondary-100);
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
}

.header-search input,
.hero-search input,
.search-panel input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 12px;
  color: var(--secondary-900);
}

.header-search button,
.hero-search button,
.search-panel button,
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 12px 28px rgba(224, 86, 27, 0.24);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--secondary-100);
  border-radius: 14px;
  background: #ffffff;
  color: var(--secondary-900);
}

.hero {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  background: var(--secondary-900);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(242, 145, 72, 0.46), transparent 32%),
    linear-gradient(90deg, rgba(31, 28, 22, 0.94), rgba(65, 61, 53, 0.72) 48%, rgba(65, 61, 53, 0.28)),
    linear-gradient(0deg, rgba(65, 61, 53, 0.96), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 48px;
  align-items: center;
  color: #ffffff;
  padding-top: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-desc,
.detail-one,
.page-title p {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-card span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(260px, 540px) auto;
  gap: 18px;
  align-items: center;
  margin-top: -92px;
  color: #ffffff;
}

.hero-dots {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

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

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

.hero-cats {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.hero-cats a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--secondary-800);
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
}

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

.page-section.no-pad {
  padding-top: 30px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--secondary-600);
  line-height: 1.65;
}

.section-more {
  color: var(--primary-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(209, 206, 192, 0.8);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--secondary-100);
}

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 360ms ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(224, 86, 27, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--secondary-900);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover {
  color: var(--primary-700);
}

.card-meta {
  margin: 8px 0;
  color: var(--secondary-600);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--secondary-800);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.movie-card .tag-row span {
  color: var(--primary-700);
  background: var(--primary-50);
}

.compact .card-title {
  min-height: 42px;
  font-size: 16px;
}

.compact .card-body {
  padding: 14px;
}

.compact .card-desc {
  min-height: 44px;
  -webkit-line-clamp: 2;
}

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

.hot-aside,
.detail-side,
.search-panel,
.search-result,
.category-card,
.player-box,
.detail-article {
  border: 1px solid rgba(209, 206, 192, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.hot-aside {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.hot-aside h2 {
  margin: 0 0 8px;
}

.hot-aside > p {
  margin: 0 0 16px;
  color: var(--secondary-600);
  line-height: 1.55;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--secondary-100);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: var(--primary-600);
  font-size: 19px;
  font-weight: 900;
}

.rank-num.muted {
  color: var(--secondary-300);
}

.rank-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  font-weight: 850;
}

.rank-content p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0;
  color: var(--secondary-600);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--secondary-600);
  font-size: 12px;
}

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

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

.category-card {
  display: block;
  padding: 22px;
  transition: transform 220ms ease, border-color 220ms ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(224, 86, 27, 0.45);
}

.category-card span {
  display: block;
  color: var(--primary-700);
  font-weight: 900;
  margin-bottom: 8px;
}

.category-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.category-card p {
  margin: 0;
  color: var(--secondary-600);
  line-height: 1.6;
}

.inner-page {
  padding: 54px 0 80px;
}

.page-title {
  margin-bottom: 34px;
}

.page-title h1 {
  color: var(--secondary-900);
  font-size: clamp(38px, 6vw, 64px);
}

.page-title p {
  color: var(--secondary-600);
}

.page-title.with-search {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.filter-box {
  min-width: 280px;
  display: grid;
  gap: 8px;
  color: var(--secondary-600);
  font-weight: 700;
}

.filter-box input {
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  background: #ffffff;
  outline: 0;
  padding: 13px 16px;
}

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

.category-preview {
  margin-bottom: 54px;
}

.category-preview h2 {
  margin: 0 0 18px;
}

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

.ranking-list .rank-row {
  padding: 14px;
  border: 1px solid rgba(209, 206, 192, 0.82);
  border-radius: 18px;
  background: #ffffff;
}

.detail-page {
  background: linear-gradient(180deg, var(--secondary-900) 0, var(--secondary-900) 520px, var(--secondary-50) 520px);
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
}

.detail-head {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--primary-400);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.17);
}

.player-section {
  margin-top: -36px;
  position: relative;
  z-index: 5;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #111111;
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.68));
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 18px 40px rgba(224, 86, 27, 0.36);
  font-size: 30px;
}

.player-status {
  min-height: 28px;
  padding: 10px 4px 0;
  color: var(--secondary-600);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 36px;
}

.detail-article {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article p {
  color: var(--secondary-800);
  font-size: 17px;
  line-height: 1.9;
}

.detail-side {
  padding: 24px;
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  color: var(--secondary-600);
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: 6px 0 16px;
  color: var(--secondary-900);
  line-height: 1.5;
}

.related-section {
  padding-bottom: 90px;
}

.search-page {
  min-height: 620px;
}

.search-panel {
  max-width: 740px;
  margin-bottom: 22px;
}

.search-summary {
  margin-bottom: 18px;
  color: var(--secondary-600);
  font-weight: 700;
}

.search-results {
  display: grid;
  gap: 14px;
}

.search-result {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  padding: 14px;
}

.search-result img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.search-result h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.search-result p {
  margin: 0 0 8px;
  color: var(--secondary-600);
  line-height: 1.55;
}

.site-footer {
  padding: 54px 0;
  color: var(--secondary-100);
  background: var(--secondary-900);
}

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

.site-footer p {
  color: var(--secondary-300);
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer a {
  display: block;
  margin-bottom: 10px;
  color: var(--secondary-200);
}

.site-footer a:hover {
  color: var(--primary-400);
}

body.menu-open .nav,
body.menu-open .header-search {
  display: flex;
}

@media (max-width: 1080px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav {
    justify-content: flex-end;
  }

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

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

  .split-layout,
  .detail-content-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .hot-aside {
    position: static;
  }
}

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

  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .logo span:last-child {
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--secondary-100);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .header-search {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 256px;
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 650px;
    gap: 22px;
    padding-top: 30px;
  }

  .hero-card {
    width: 170px;
    transform: none;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    margin-top: -126px;
  }

  .hero-dots {
    justify-content: flex-start;
  }

  .hero-search {
    border-radius: 22px;
    align-items: stretch;
    flex-direction: column;
  }

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

  .page-title.with-search,
  .section-head {
    display: block;
  }

  .filter-box {
    min-width: 0;
    margin-top: 18px;
  }

  .detail-head {
    grid-template-columns: 130px 1fr;
    gap: 18px;
    min-height: 520px;
  }

  .detail-info h1 {
    font-size: 34px;
  }

  .detail-one {
    font-size: 15px;
    line-height: 1.6;
  }

  .detail-meta span,
  .detail-tags span {
    font-size: 12px;
    padding: 6px 9px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.dense,
  .catalog-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .detail-head {
    grid-template-columns: 1fr;
    padding: 34px 0;
  }

  .detail-poster {
    width: 150px;
  }

  .hero-copy h1,
  .page-title h1 {
    font-size: 38px;
  }
}
