:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
  --shadow-soft: 0 20px 50px rgba(41, 37, 36, 0.10);
  --shadow-card: 0 10px 30px rgba(41, 37, 36, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--stone-50) 0%, #ffffff 42%, var(--amber-50) 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(214, 211, 209, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(41, 37, 36, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 22px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-700));
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.28);
}

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

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

.brand-text small {
  font-size: 12px;
  color: var(--stone-500);
}

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

.desktop-nav a {
  position: relative;
  padding: 8px 0;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--amber-600);
  transition: width 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--amber-700);
}

.desktop-nav a:hover::after {
  width: 100%;
}

.header-search,
.mobile-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.inline-search input {
  border: 1px solid var(--stone-300);
  border-radius: 999px;
  background: var(--white);
  color: var(--stone-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 240px;
  padding: 10px 16px;
}

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

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: var(--amber-600);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--stone-100);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--stone-700);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--stone-200);
  background: rgba(255, 255, 255, 0.98);
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--stone-700);
  background: var(--stone-50);
  font-weight: 650;
}

.mobile-search input {
  flex: 1;
  padding: 11px 16px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 30px 0 18px;
}

.hero-shell {
  position: relative;
  min-height: 560px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--stone-900);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(251, 191, 36, 0.26), transparent 28%),
    linear-gradient(90deg, rgba(28, 25, 23, 0.95), rgba(28, 25, 23, 0.70) 48%, rgba(28, 25, 23, 0.28));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(34px, 7vw, 86px);
  width: min(620px, calc(100% - 48px));
  color: var(--white);
}

.hero-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-kicker {
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 640px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.footer-badges,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.footer-badges span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--amber-50);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.32);
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: 24px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 32px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.hero-side-panel {
  align-self: stretch;
  min-height: 560px;
  padding: 26px;
  border: 1px solid rgba(214, 211, 209, 0.75);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.hero-side-panel h2 {
  margin: 18px 0 10px;
  font-size: 30px;
  line-height: 1.18;
}

.hero-side-panel p {
  color: var(--stone-600);
  line-height: 1.8;
}

.hero-mini-list,
.category-mini-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.mini-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: var(--stone-50);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  background: var(--amber-50);
}

.mini-card img {
  width: 76px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.mini-card strong,
.mini-card small {
  display: block;
}

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

.mini-card small {
  margin-top: 4px;
  color: var(--stone-500);
}

.content-section {
  padding: 46px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-article h1 {
  margin: 12px 0 0;
  color: var(--stone-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.section-link {
  color: var(--amber-700);
  background: var(--amber-100);
  padding: 10px 16px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(214, 211, 209, 0.75);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(41, 37, 36, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, var(--stone-200), var(--amber-100));
}

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

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(28, 25, 23, 0.72));
}

.card-type {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  color: var(--white);
  background: rgba(28, 25, 23, 0.72);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--amber-700);
  font-size: 12px;
  font-weight: 800;
}

.card-body h2 {
  margin: 8px 0 8px;
  overflow: hidden;
  color: var(--stone-800);
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  color: var(--stone-600);
  background: var(--stone-100);
}

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

.category-card,
.category-detail-card {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(214, 211, 209, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 26px rgba(41, 37, 36, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-detail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

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

.category-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-card h3,
.category-detail-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p,
.category-detail-card p {
  margin: 0;
  color: var(--stone-600);
  line-height: 1.75;
}

.category-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-title-row a:last-child {
  color: var(--amber-700);
  font-weight: 800;
}

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

.rank-row,
.ranking-line {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(214, 211, 209, 0.75);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  padding: 14px;
  border-radius: 18px;
}

.rank-row:hover,
.ranking-line:hover {
  transform: translateX(4px);
  background: var(--amber-50);
}

.rank-row span,
.ranking-index {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  border-radius: 12px;
  font-weight: 900;
}

.rank-row strong,
.ranking-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em,
.ranking-meta {
  color: var(--stone-500);
  font-size: 13px;
  font-style: normal;
}

.page-main {
  padding: 28px 0 54px;
}

.page-hero {
  margin-bottom: 34px;
  padding: clamp(28px, 6vw, 64px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.24), transparent 28%),
    linear-gradient(135deg, var(--white), var(--amber-50));
  border: 1px solid rgba(214, 211, 209, 0.75);
  box-shadow: var(--shadow-soft);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--stone-600);
  font-size: 18px;
  line-height: 1.85;
}

.inline-search {
  margin-top: 24px;
}

.inline-search input {
  width: min(680px, 100%);
  padding: 14px 18px;
}

.wide-search input {
  width: min(820px, 100%);
}

.filter-bar {
  margin-top: 18px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--stone-700);
  background: var(--white);
  box-shadow: 0 4px 12px rgba(41, 37, 36, 0.08);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: var(--white);
  background: var(--amber-600);
}

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

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

.ranking-line {
  grid-template-columns: 52px minmax(0, 1fr) minmax(160px, auto);
  padding: 12px 16px;
  border-radius: 16px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--stone-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 800;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62);
}

.play-circle {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.play-circle span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.detail-article,
.detail-info {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid rgba(214, 211, 209, 0.75);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(41, 37, 36, 0.06);
}

.detail-article .lead {
  margin: 16px 0 24px;
  color: var(--stone-600);
  font-size: 18px;
  line-height: 1.85;
}

.detail-article h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-article p {
  color: var(--stone-700);
  line-height: 2;
}

.detail-side {
  position: sticky;
  top: 104px;
}

.detail-poster {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow-card);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(145deg, var(--stone-200), var(--amber-100));
}

.detail-info h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-info dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-info dl div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  color: var(--stone-700);
}

.detail-info dt {
  color: var(--stone-500);
}

.detail-info dd {
  margin: 0;
  font-weight: 750;
}

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

.full-button {
  width: 100%;
}

.site-footer {
  color: var(--stone-300);
  background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 18px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.site-footer p {
  margin: 14px 0 0;
  color: var(--stone-400);
  line-height: 1.8;
}

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

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

.footer-badges {
  margin-top: 16px;
}

.footer-badges span {
  color: var(--stone-200);
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  color: var(--stone-400);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1180px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-side-panel {
    min-height: auto;
  }

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

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

@media (max-width: 920px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  body.menu-open .mobile-panel {
    display: block;
  }

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

  .detail-side {
    position: static;
  }

  .detail-poster {
    max-width: 360px;
  }

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

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

  .ranking-meta {
    grid-column: 2;
  }
}

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

  .header-inner {
    height: 66px;
  }

  .brand-text small {
    display: none;
  }

  .hero-section {
    padding-top: 18px;
  }

  .hero-shell {
    min-height: 520px;
    border-radius: 26px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.18), rgba(28, 25, 23, 0.95));
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 52px;
    width: auto;
  }

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

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

  .movie-grid,
  .listing-grid,
  .category-grid,
  .category-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 12px;
  }

  .page-hero {
    border-radius: 24px;
  }

  .detail-article,
  .detail-info {
    padding: 20px;
    border-radius: 20px;
  }

  .play-circle {
    width: 70px;
    height: 70px;
  }
}
