:root {
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --amber-50: #fffbeb;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #fde68a;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 158, 11, 0.24);
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.96), rgba(255, 251, 235, 0.96));
  box-shadow: 0 6px 18px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  color: var(--amber-900);
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px 12px;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-800);
  background: rgba(245, 158, 11, 0.12);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--amber-900);
  background: rgba(245, 158, 11, 0.12);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-link {
  padding: 12px;
  border-radius: 12px;
  color: #374151;
  background: rgba(255, 255, 255, 0.72);
}

.mobile-link.is-active {
  color: var(--amber-800);
  background: rgba(245, 158, 11, 0.14);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), #ffedd5);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  color: var(--white);
}

.hero-kicker,
.section-heading span,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.hero h2 {
  max-width: 780px;
  margin: 16px 0 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.detail-tags,
.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.32);
}

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

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.text-link {
  width: fit-content;
  color: var(--amber-800);
  background: rgba(245, 158, 11, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.page-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px 0;
}

.section-heading {
  margin-bottom: 28px;
}

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

.section-heading span {
  color: var(--amber-900);
  background: rgba(245, 158, 11, 0.16);
}

.section-heading h2,
.page-hero h1,
.detail-main h1 {
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-hero p {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.compact-heading {
  margin-bottom: 20px;
}

.compact-heading h2 {
  font-size: 30px;
}

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

.compact-grid {
  gap: 18px;
}

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

.movie-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), #fed7aa);
}

.movie-thumb::after {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card a:hover .movie-thumb::after {
  opacity: 1;
}

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

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

.movie-duration,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.movie-duration {
  right: 10px;
  bottom: 10px;
  min-width: 58px;
  height: 28px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  background: var(--amber-600);
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 22px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card a:hover h3 {
  color: var(--amber-800);
}

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta-row {
  justify-content: space-between;
  margin-top: auto;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta-row span:first-child {
  color: var(--amber-800);
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 26px;
  align-items: start;
}

.ranking-panel,
.search-panel-home,
.category-band,
.content-card,
.related-panel,
.detail-title-card,
.detail-facts,
.filter-panel,
.category-overview-card a {
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.ranking-panel,
.search-panel-home,
.category-band {
  padding: 26px;
}

.media-list {
  display: grid;
  gap: 14px;
}

.media-row a {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.media-row a:hover {
  background: var(--amber-50);
  transform: translateX(3px);
}

.media-row img {
  width: 126px;
  height: 78px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 12px;
}

.media-row h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.media-row p {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.media-row span {
  color: #9ca3af;
  font-size: 12px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
}

.search-field,
.select-field {
  display: grid;
  gap: 7px;
  color: var(--amber-900);
  font-size: 13px;
  font-weight: 800;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 46px;
  border: 1px solid #fcd34d;
  outline: none;
  border-radius: 14px;
  color: var(--text);
  background: var(--white);
  padding: 0 14px;
}

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

.filter-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.category-band {
  margin-bottom: 26px;
}

.tone-blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.tone-green,
.tone-emerald {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.tone-rose,
.tone-pink {
  background: linear-gradient(135deg, #fff1f2, #fdf2f8);
}

.tone-violet {
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
}

.tone-orange,
.tone-amber {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.tone-cyan {
  background: linear-gradient(135deg, #ecfeff, #f0fdfa);
}

.tone-slate {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.subpage {
  padding-bottom: 24px;
}

.page-hero {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 52px 20px;
}

.page-hero > div {
  overflow: hidden;
  padding: 42px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  box-shadow: var(--shadow-soft);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(34px, 4vw, 54px);
}

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

.category-overview-card a {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  min-height: 210px;
  overflow: hidden;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-stack {
  position: relative;
  min-height: 170px;
}

.category-stack img {
  position: absolute;
  width: 128px;
  height: 92px;
  object-fit: cover;
  border: 4px solid var(--white);
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.category-stack img:nth-child(1) {
  top: 0;
  left: 0;
  z-index: 4;
}

.category-stack img:nth-child(2) {
  top: 28px;
  left: 52px;
  z-index: 3;
}

.category-stack img:nth-child(3) {
  top: 74px;
  left: 18px;
  z-index: 2;
}

.category-stack img:nth-child(4) {
  top: 86px;
  left: 88px;
  z-index: 1;
}

.category-overview-body span {
  color: var(--amber-700);
  font-weight: 900;
}

.category-overview-body h2 {
  margin: 10px 0;
  font-size: 28px;
}

.category-overview-body p {
  color: var(--muted);
  line-height: 1.8;
}

.category-overview-body strong {
  color: var(--amber-800);
}

.ranking-grid .movie-card:nth-child(-n+3) .rank-badge {
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.narrow-section {
  max-width: 920px;
}

.detail-page {
  background: linear-gradient(180deg, #111827 0, #111827 420px, #fff 420px);
  padding-bottom: 48px;
}

.player-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 0;
}

.backline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.backline a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.backline a:hover {
  color: var(--white);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 20px 40px rgba(217, 119, 6, 0.4);
  font-size: 44px;
}

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

.player-state {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  max-width: 1180px;
  margin: 30px auto 0;
  padding: 0 20px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.detail-title-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
}

.detail-title-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.detail-main h1 {
  margin-top: 12px;
}

.detail-title-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.detail-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--amber-800);
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  padding: 0;
}

.detail-facts div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.detail-facts span {
  display: block;
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 8px;
}

.detail-facts strong {
  color: var(--text);
  font-size: 15px;
}

.content-card {
  padding: 26px;
}

.content-card h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 2;
  white-space: pre-line;
}

.related-panel {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 22px;
}

.related-panel .media-row img {
  width: 100px;
  height: 68px;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(245, 158, 11, 0.22);
  background: linear-gradient(180deg, var(--amber-50), var(--amber-100));
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-brand p,
.footer-links a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: var(--amber-900);
  font-size: 18px;
}

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

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

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

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

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

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

  .related-panel {
    position: static;
  }
}

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

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

  .hero {
    height: 560px;
  }

  .hero-content {
    padding: 0 24px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .category-overview-card a,
  .detail-title-card,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-stack {
    min-height: 190px;
  }

  .detail-page {
    background: linear-gradient(180deg, #111827 0, #111827 280px, #fff 280px);
  }
}

@media (max-width: 540px) {
  .site-nav {
    min-height: 58px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

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

  .brand-text small {
    font-size: 11px;
  }

  .mobile-panel.is-open {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 520px;
  }

  .hero h1,
  .hero h2 {
    font-size: 32px;
  }

  .hero h2 + p,
  .hero h1 + h2 + p {
    font-size: 15px;
  }

  .page-section {
    padding-top: 38px;
  }

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

  .media-row img {
    width: 104px;
    height: 72px;
  }

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

  .player-shell {
    border-radius: 18px;
  }

  .player-cover span {
    width: 72px;
    height: 72px;
    font-size: 34px;
  }

  .content-card,
  .detail-title-card,
  .related-panel,
  .page-hero > div {
    padding: 20px;
  }
}
