:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: linear-gradient(180deg, #fffbeb 0%, var(--stone-50) 42%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #fffbeb 0%, #fafaf9 50%, #fffbeb 100%);
  border-bottom: 1px solid rgba(231, 229, 228, 0.8);
  box-shadow: 0 8px 24px rgba(41, 37, 36, 0.08);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-dark), var(--stone-700));
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

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

.brand-text strong {
  font-size: 20px;
  color: var(--stone-800);
}

.brand-text small {
  margin-top: 4px;
  color: var(--stone-600);
  font-size: 12px;
}

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

.nav-link {
  font-weight: 700;
  color: var(--stone-700);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-dark);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
}

.header-search input,
.mobile-search input,
.large-search input,
.search-box-row input {
  width: 100%;
  border: 1px solid var(--stone-200);
  background: #fff;
  color: var(--stone-800);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.search-box-row input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.large-search button,
.search-box-row button,
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: var(--amber);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.search-box-row button:hover,
.primary-button:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.32);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  background: #fff;
  color: var(--stone-700);
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(41, 37, 36, 0.08);
}

.mobile-nav {
  display: none;
  padding: 16px 24px 24px;
  background: #fff;
  border-top: 1px solid var(--stone-200);
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--stone-700);
  font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--amber-dark);
  background: #fffbeb;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

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

.hero-slide.is-active {
  opacity: 1;
  z-index: 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(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 46%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 78px;
  max-width: 760px;
  color: #fff;
}

.hero-labels,
.detail-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-labels span,
.detail-labels span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(41, 37, 36, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.hero-labels span:first-child,
.detail-labels span:first-child {
  background: var(--amber);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(245, 245, 244, 0.92);
  font-size: 18px;
  line-height: 1.75;
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: rgba(41, 37, 36, 0.42);
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ghost-button:hover {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.18);
}

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

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

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

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

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

.section-heading.centered {
  display: grid;
  justify-items: center;
  text-align: center;
}

.section-heading h2,
.panel-heading h2,
.side-card h2 {
  margin: 0;
  color: var(--stone-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

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

.section-heading a {
  color: var(--amber-dark);
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-search {
  padding-bottom: 22px;
}

.large-search {
  max-width: 760px;
  margin: 28px auto 0;
  display: flex;
  gap: 12px;
}

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

.compact-grid {
  gap: 18px;
}

.movie-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  color: inherit;
}

.movie-card.is-hidden {
  display: none;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-600));
  box-shadow: 0 10px 26px rgba(41, 37, 36, 0.16);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.cover-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 9px;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.cover-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 14px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cover-mask em {
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
}

.movie-card:hover .cover-mask {
  opacity: 1;
}

.movie-info {
  display: grid;
  gap: 4px;
}

.movie-info strong {
  overflow: hidden;
  color: var(--stone-800);
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong {
  color: var(--amber-dark);
}

.movie-info span,
.movie-info small {
  overflow: hidden;
  color: var(--stone-500);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

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

.category-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: var(--stone-800);
}

.category-card img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.2));
}

.category-card-content {
  position: relative;
  z-index: 2;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
  color: #fff;
}

.category-card-content strong {
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card-content small {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-panel,
.side-card,
.detail-card,
.search-panel {
  border: 1px solid rgba(231, 229, 228, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.panel-heading {
  margin-bottom: 16px;
}

.rank-list,
.side-list {
  display: grid;
  gap: 14px;
}

.rank-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.rank-line > b,
.ranking-num {
  color: var(--amber-dark);
  font-size: 20px;
  font-weight: 900;
}

.rank-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.rank-item img {
  width: 56px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-item span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-item strong {
  overflow: hidden;
  color: var(--stone-800);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item small {
  overflow: hidden;
  color: var(--stone-500);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 26px;
}

.filter-strip a,
.filter-button {
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: var(--stone-700);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter-strip a:hover,
.filter-button:hover,
.filter-button.is-active {
  border-color: var(--amber);
  background: var(--amber);
  color: #fff;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-dark), var(--stone-700));
}

.page-hero:after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.page-hero > div {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero .eyebrow {
  color: #ffedd5;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--stone-500);
  font-size: 14px;
}

.crumbs a:hover {
  color: var(--amber-dark);
}

.ranking-grid {
  display: grid;
  gap: 14px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.ranking-card .movie-card {
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
}

.ranking-card .movie-cover {
  border-radius: 12px;
}

.search-panel {
  padding-top: 28px;
  padding-bottom: 38px;
}

.search-box-row {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.filters {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.filter-row strong {
  padding-top: 8px;
  color: var(--stone-700);
}

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

.detail-top {
  background: linear-gradient(180deg, #fafaf9 0%, #ffffff 100%);
}

.detail-wrap {
  padding-top: 34px;
}

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

.detail-main {
  min-width: 0;
}

.player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-orb {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.32);
}

.player-cover strong {
  max-width: 78%;
  text-align: center;
  font-size: 22px;
}

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

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.detail-card .lead {
  margin: 0 0 24px;
  color: var(--amber-dark);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.7;
}

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

.info-grid div {
  border-radius: 16px;
  padding: 14px;
  background: var(--stone-100);
}

.info-grid small {
  display: block;
  color: var(--stone-500);
  margin-bottom: 6px;
}

.info-grid strong {
  color: var(--stone-800);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}

.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--stone-700);
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 13px;
  font-weight: 700;
}

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

.detail-card p {
  color: var(--stone-600);
  font-size: 16px;
  line-height: 1.9;
}

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

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 22px;
}

.side-card {
  padding: 22px;
}

.site-footer {
  color: var(--stone-200);
  background: linear-gradient(135deg, var(--stone-900), var(--stone-800) 48%, #78350f 100%);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.footer-brand p {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--stone-200);
  line-height: 1.7;
}

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

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(231, 229, 228, 0.16);
  padding: 18px 24px;
  text-align: center;
  color: var(--stone-200);
  font-size: 14px;
}

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }

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

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

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

  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    min-height: 520px;
  }

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

  .hero p {
    font-size: 16px;
  }

  .section-wrap {
    padding: 42px 18px;
  }

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

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

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

  .large-search,
  .search-box-row {
    flex-direction: column;
  }

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

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

@media (max-width: 540px) {
  .brand-text small {
    display: none;
  }

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

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

  .ranking-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .ranking-card .movie-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

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

  .detail-card {
    padding: 22px;
  }

  .player-cover strong {
    font-size: 18px;
  }
}
