:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --paper: #fffbeb;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(28, 25, 23, 0.16);
  --soft-shadow: 0 14px 40px rgba(28, 25, 23, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(250, 250, 249, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 1px solid rgba(214, 211, 209, 0.72);
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #b45309, #292524);
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.34);
}

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

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--stone-700);
  font-weight: 650;
}

.desktop-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--amber-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--stone-800);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

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

.mobile-nav a:hover {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-dark);
}

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

.hero {
  position: relative;
  height: min(640px, calc(100vh - 72px));
  min-height: 480px;
  overflow: hidden;
  background: var(--stone-950);
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  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 {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.72) 38%, rgba(12, 10, 9, 0.20) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.88) 0%, rgba(12, 10, 9, 0) 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 32px));
  margin-left: max(24px, calc((100% - 1200px) / 2));
  padding-top: 128px;
  color: #fff;
}

.hero-kicker,
.detail-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-kicker span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-kicker span:first-child,
.tag-row span {
  background: var(--amber);
  color: #fff;
}

.hero-kicker span:not(:first-child),
.detail-meta span {
  background: rgba(41, 37, 36, 0.78);
  color: #fff;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

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

.hero-actions,
.detail-info .primary-btn {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border: 0;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.hero-search button {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.34);
}

.primary-btn:hover,
.hero-search button:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-panel {
  position: absolute;
  right: max(24px, calc((100% - 1200px) / 2));
  bottom: 42px;
  z-index: 3;
  width: min(360px, calc(100% - 48px));
}

.hero-search-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  color: #fff;
  background: rgba(28, 25, 23, 0.64);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-search-card strong {
  display: block;
  font-size: 24px;
}

.hero-search-card span {
  display: block;
  margin: 6px 0 16px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.hero-search input,
.search-line input {
  min-width: 0;
  height: 46px;
  border: 1px solid rgba(214, 211, 209, 0.9);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--stone-800);
  background: #fff;
  outline: none;
}

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

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

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

.home-strip {
  width: min(1200px, calc(100% - 32px));
  margin: -42px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.strip-card {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.strip-card strong,
.strip-card span {
  display: block;
}

.strip-card strong {
  font-size: 22px;
  color: var(--stone-900);
}

.strip-card span {
  margin-top: 6px;
  color: var(--stone-600);
}

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 0;
}

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

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

.section-heading h2,
.rank-head h2,
.story-panel h2 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

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

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

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

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

.movie-card {
  min-width: 0;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: var(--stone-200);
  box-shadow: var(--soft-shadow);
}

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

.movie-card:hover .poster-frame img,
.mini-card:hover img,
.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  font-size: 12px;
  font-weight: 850;
}

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

.movie-title {
  display: block;
  color: var(--stone-900);
  font-size: 18px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--amber-dark);
}

.movie-meta {
  margin-top: 5px;
  color: var(--stone-600);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card p {
  margin: 9px 0 0;
  color: var(--stone-700);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 12px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-dark);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--stone-900);
  box-shadow: var(--soft-shadow);
}

.category-tile img,
.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile span,
.category-tile strong,
.category-overview-card span,
.category-overview-card em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #fff;
}

.category-tile span,
.category-overview-card span {
  bottom: 48px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile strong,
.category-overview-card em {
  bottom: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-style: normal;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(160deg, var(--stone-900), #451a03);
  box-shadow: var(--shadow);
}

.rank-head span {
  color: var(--amber);
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rank-head h2 {
  color: #fff;
  margin-top: 6px;
}

.rank-list,
.ranking-list-page {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.rank-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.rank-list span,
.rank-number {
  color: var(--amber);
  font-weight: 950;
}

.rank-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: rgba(255, 255, 255, 0.55);
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--stone-950);
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: end;
  padding: 84px max(24px, calc((100% - 1200px) / 2)) 52px;
}

.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.9), rgba(12, 10, 9, 0.46));
}

.page-hero > div {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

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

.page-hero p,
.detail-one-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.search-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--stone-800);
  font-weight: 850;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  color: var(--stone-700);
  background: #fff;
  cursor: pointer;
}

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

.empty-result {
  display: none;
  margin-top: 24px;
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  color: var(--stone-600);
  background: #fff;
}

.empty-result.is-visible {
  display: block;
}

.ranking-list-page {
  display: grid;
  gap: 12px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
}

.ranking-row img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-copy strong,
.ranking-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy strong {
  color: var(--stone-900);
  font-size: 18px;
}

.ranking-copy em {
  margin-top: 4px;
  color: var(--stone-600);
  font-style: normal;
}

.ranking-row b {
  color: var(--amber-dark);
}

.detail-hero {
  min-height: 560px;
}

.detail-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  transform: scale(1.05);
  opacity: 0.44;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 54px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: end;
  gap: 38px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

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

.detail-info .tag-row {
  margin: 20px 0 24px;
}

.large-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.player-section {
  width: min(1200px, calc(100% - 32px));
  margin: -36px auto 0;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), rgba(0, 0, 0, 0.46));
  cursor: pointer;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--amber);
  box-shadow: 0 24px 54px rgba(245, 158, 11, 0.38);
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.story-panel {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.story-panel p {
  margin: 16px 0 0;
  color: var(--stone-700);
  font-size: 16px;
  line-height: 1.9;
}

.mini-card {
  display: block;
  min-width: 0;
}

.site-footer {
  margin-top: 70px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--stone-950);
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

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

.site-footer p {
  max-width: 440px;
  line-height: 1.8;
}

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

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

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

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

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 16px;
    font-size: 14px;
  }

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

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

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

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-wrap {
    height: 64px;
  }

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

  .brand-text small {
    display: none;
  }

  .hero {
    height: 620px;
  }

  .hero-content {
    margin: 0 auto;
    padding-top: 86px;
  }

  .hero-panel {
    left: 16px;
    right: 16px;
    bottom: 20px;
    width: auto;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .home-strip {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .content-section {
    padding-top: 40px;
  }

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

  .movie-grid,
  .library-grid,
  .dense-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .movie-title {
    font-size: 16px;
  }

  .search-line {
    grid-template-columns: 1fr;
  }

  .ranking-row a {
    grid-template-columns: 42px 52px minmax(0, 1fr);
  }

  .ranking-row b {
    display: none;
  }

  .ranking-row img {
    width: 52px;
    height: 72px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

  .detail-poster {
    width: min(260px, 74vw);
  }

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

@media (max-width: 430px) {
  .movie-grid,
  .library-grid,
  .dense-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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