:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-600: #ea580c;
  --orange-800: #9a3412;
  --slate-950: #0f172a;
  --text: #3b2608;
  --muted: #845514;
  --surface: #ffffff;
  --shadow: 0 24px 60px rgba(120, 53, 15, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--amber-50), #fffaf0 40%, var(--orange-50));
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber-900), var(--orange-800), var(--amber-900));
  box-shadow: 0 14px 40px rgba(69, 26, 3, 0.25);
}

.nav-shell {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--amber-50);
  flex-shrink: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: var(--amber-100);
  color: var(--amber-900);
  font-weight: 900;
  box-shadow: inset 0 -4px 10px rgba(217, 119, 6, 0.2);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 24px;
  line-height: 1;
}

.brand-text em {
  font-size: 12px;
  color: var(--amber-200);
  font-style: normal;
}

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

.nav-menu a {
  color: var(--amber-50);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--amber-200);
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.top-search input {
  width: 210px;
  border: 1px solid rgba(253, 230, 138, 0.35);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--amber-50);
  background: rgba(69, 26, 3, 0.36);
  outline: none;
}

.top-search input::placeholder {
  color: rgba(253, 230, 138, 0.78);
}

.top-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--amber-500);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.12);
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--amber-50);
}

.hero-section {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: var(--amber-50);
}

.hero-bg,
.detail-hero-bg,
.category-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, var(--amber-600), var(--amber-900) 50%, #1c1204);
}

.hero-bg img,
.detail-hero-bg img,
.category-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68) saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(120, 53, 15, 0.32), rgba(154, 52, 18, 0.22) 40%, var(--amber-50)),
    radial-gradient(circle at 75% 35%, rgba(251, 191, 36, 0.26), transparent 34%);
}

.hero-content {
  position: relative;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 52px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(253, 230, 138, 0.52);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(120, 53, 15, 0.28);
  color: var(--amber-200);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(46px, 8vw, 86px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 42px rgba(69, 26, 3, 0.52);
}

.hero-lead {
  max-width: 760px;
  margin: 0 0 14px;
  color: var(--amber-100);
  font-size: clamp(18px, 2.4vw, 26px);
  text-shadow: 0 12px 34px rgba(69, 26, 3, 0.48);
}

.hero-film {
  max-width: 740px;
  margin: 0 0 28px;
  color: var(--amber-200);
  font-size: 17px;
}

.hero-film a {
  color: #fff;
  font-weight: 900;
  border-bottom: 1px solid rgba(255, 251, 235, 0.5);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px) scale(1.02);
}

.button.primary {
  background: var(--amber-600);
  color: #fff;
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.36);
}

.button.primary:hover {
  background: var(--amber-700);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--amber-900);
  box-shadow: 0 16px 36px rgba(255, 251, 235, 0.22);
}

.button.soft {
  background: rgba(120, 53, 15, 0.34);
  color: var(--amber-50);
  border: 1px solid rgba(253, 230, 138, 0.4);
}

.hero-panel {
  border: 1px solid rgba(253, 230, 138, 0.28);
  border-radius: var(--radius-xl);
  padding: 28px;
  background: rgba(69, 26, 3, 0.42);
  box-shadow: 0 30px 80px rgba(69, 26, 3, 0.34);
  backdrop-filter: blur(18px);
}

.hero-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.hero-panel a {
  display: grid;
  gap: 6px;
  padding: 16px 0;
  border-top: 1px solid rgba(253, 230, 138, 0.22);
}

.hero-panel strong {
  color: #fff;
  font-size: 18px;
}

.hero-panel span {
  color: var(--amber-200);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.section {
  padding: 78px 0;
}

.warm-section {
  background: linear-gradient(90deg, var(--amber-100), var(--orange-100), var(--amber-100));
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 38px;
  text-align: center;
}

.section-heading.left {
  margin-left: 0;
  text-align: left;
}

.section-heading.light h2,
.section-heading.light p {
  color: var(--amber-50);
}

.section-heading span {
  color: var(--amber-700);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 8px 0 12px;
  color: var(--amber-900);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
}

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

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

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

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

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

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

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 72px rgba(120, 53, 15, 0.28);
}

.poster-media {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-700), var(--orange-600));
}

.movie-grid.dense .poster-media {
  height: 220px;
}

.poster-media img,
.rank-media img,
.category-media img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.media-fallback.is-missing::after {
  content: attr(data-title);
  position: absolute;
  inset: auto 14px 14px 14px;
  color: var(--amber-50);
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 8px 20px rgba(69, 26, 3, 0.5);
}

.media-fallback.is-missing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, var(--amber-700), var(--orange-800));
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.movie-card-meta,
.movie-card-tags,
.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-card-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--amber-100);
  color: var(--amber-800);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--amber-900);
  font-size: 21px;
  line-height: 1.22;
}

.movie-grid.dense .movie-card h3 {
  font-size: 18px;
}

.movie-card p {
  margin: 0 0 16px;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card-tags {
  margin-top: auto;
}

.movie-card-tags span,
.detail-tags span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--orange-100);
  color: var(--orange-800);
  font-size: 12px;
  font-weight: 800;
}

.section-more {
  margin-top: 38px;
  text-align: center;
}

.split-section {
  background: var(--amber-50);
}

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

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--amber-900);
  color: var(--amber-50);
}

.category-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--amber-800), var(--orange-600));
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(69, 26, 3, 0.86));
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0 18px;
}

.category-tile span {
  margin-top: 132px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile em {
  margin-top: 6px;
  color: var(--amber-200);
  font-style: normal;
  font-size: 14px;
}

.ranking-box {
  border-radius: var(--radius-xl);
  padding: 28px;
  background: linear-gradient(160deg, var(--amber-900), var(--orange-800));
  color: var(--amber-50);
  box-shadow: var(--shadow);
}

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

.rank-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 36px rgba(120, 53, 15, 0.12);
  overflow: hidden;
}

.ranking-box .rank-item {
  background: rgba(255, 251, 235, 0.12);
}

.rank-link {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
}

.rank-no {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--amber-600);
  color: #fff;
  font-weight: 900;
}

.rank-media {
  position: relative;
  width: 64px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--amber-700);
}

.rank-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-text strong {
  overflow: hidden;
  color: var(--amber-900);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-box .rank-text strong {
  color: var(--amber-50);
}

.rank-text em {
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-style: normal;
}

.ranking-box .rank-text em {
  color: var(--amber-200);
}

.ranking-more,
.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--amber-700);
  font-weight: 900;
}

.ranking-box .ranking-more {
  color: var(--amber-200);
}

.page-main {
  min-height: 50vh;
}

.page-hero,
.category-hero {
  position: relative;
  overflow: hidden;
  color: var(--amber-50);
  background: linear-gradient(135deg, var(--amber-900), var(--orange-800));
}

.compact-hero {
  padding: 86px 0;
}

.compact-hero h1,
.category-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
}

.compact-hero p,
.category-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--amber-100);
  font-size: 19px;
}

.category-hero {
  min-height: 430px;
}

.category-hero-content {
  position: relative;
  z-index: 2;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.filter-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  border: 1px solid rgba(146, 64, 14, 0.12);
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 40px rgba(120, 53, 15, 0.1);
}

.large-filter {
  display: grid;
}

.filter-input {
  width: min(100%, 520px);
  border: 1px solid rgba(146, 64, 14, 0.18);
  border-radius: 999px;
  padding: 14px 18px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.filter-input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips a,
.filter-chips button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--amber-100);
  color: var(--amber-900);
  cursor: pointer;
  font-weight: 800;
}

.stacked-sections {
  display: grid;
  gap: 62px;
}

.category-preview {
  border-bottom: 1px solid rgba(146, 64, 14, 0.16);
  padding-bottom: 50px;
}

.category-preview:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.narrow {
  max-width: 940px;
}

.detail-hero-section {
  position: relative;
  overflow: hidden;
  color: var(--amber-50);
}

.detail-hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(69, 26, 3, 0.88), rgba(120, 53, 15, 0.68), rgba(255, 251, 235, 0.78)),
    linear-gradient(180deg, transparent, var(--amber-50));
}

.detail-hero-grid {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  z-index: 2;
}

.detail-poster {
  position: relative;
  height: 460px;
  overflow: hidden;
  border: 8px solid rgba(255, 251, 235, 0.22);
  border-radius: 30px;
  background: var(--amber-900);
  box-shadow: 0 36px 90px rgba(69, 26, 3, 0.46);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--amber-200);
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  text-shadow: 0 18px 42px rgba(69, 26, 3, 0.42);
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--amber-100);
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 16px;
}

.detail-meta span {
  background: rgba(255, 251, 235, 0.18);
  color: #fff;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #090909;
  box-shadow: 0 32px 72px rgba(15, 23, 42, 0.3);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.62));
  color: #fff;
  cursor: pointer;
  text-align: center;
}

.play-mask.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-icon {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--amber-600);
  box-shadow: 0 20px 50px rgba(217, 119, 6, 0.45);
  font-size: 30px;
}

.play-mask strong {
  font-size: 22px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.content-card {
  border-radius: var(--radius-xl);
  padding: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--amber-900);
  font-size: 30px;
}

.content-card p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.site-footer {
  background: linear-gradient(135deg, var(--amber-900), var(--orange-800), #3b1604);
  color: var(--amber-100);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
  padding: 52px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
}

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

.site-footer p {
  margin: 0;
  max-width: 360px;
  color: var(--amber-200);
}

.site-footer a {
  display: block;
  margin: 7px 0;
  color: var(--amber-200);
}

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

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 24px;
  border-top: 1px solid rgba(253, 230, 138, 0.18);
  padding: 18px;
  color: var(--amber-300);
  font-size: 14px;
}

[data-search-card].is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .hero-panel {
    max-width: 620px;
  }

  .detail-poster {
    width: min(320px, 100%);
    height: 440px;
  }
}

@media (max-width: 840px) {
  .nav-shell {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0 16px;
  }

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

  .nav-menu a {
    width: 100%;
    padding: 12px 0;
  }

  .top-search {
    order: 4;
    width: 100%;
    margin-left: 0;
    padding-bottom: 16px;
  }

  .top-search input {
    flex: 1;
    width: auto;
  }

  .hero-section,
  .hero-content {
    min-height: 600px;
  }

  .hero-content {
    gap: 28px;
    padding: 48px 0;
  }

  .hero-panel {
    display: none;
  }

  .filter-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-input {
    width: 100%;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(var(--container), calc(100% - 22px));
  }

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

  .brand-text em {
    display: none;
  }

  .section {
    padding: 54px 0;
  }

  .movie-grid,
  .movie-grid.featured-grid,
  .movie-grid.four,
  .movie-grid.dense {
    grid-template-columns: 1fr;
  }

  .poster-media,
  .movie-grid.dense .poster-media {
    height: 300px;
  }

  .detail-hero-grid {
    min-height: auto;
    padding: 42px 0;
  }

  .detail-poster {
    height: 420px;
  }

  .rank-link {
    grid-template-columns: 42px 56px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-media {
    width: 56px;
    height: 76px;
  }
}
