:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --orange: #f97316;
  --rose: #f43f5e;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(15, 23, 42, 0.10);
  --card: #ffffff;
  --paper: #fff7ed;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 45%, #fff1f2 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  background: linear-gradient(90deg, var(--amber), var(--orange), var(--rose));
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.25);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.78;
  }
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff7d6;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.nav-search input {
  width: 180px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 10px;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.primary-btn,
.ghost-btn,
.inline-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-search button {
  color: var(--amber-dark);
  background: #fff;
  padding: 8px 14px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 35%, rgba(245, 158, 11, 0.35), transparent 28%), linear-gradient(90deg, rgba(0, 0, 0, 0.80), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08));
}

.hero-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%), linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%);
  background-size: 42px 42px;
}

.hero-content {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100% - 1180px) / 2));
  top: 50%;
  width: min(620px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #fff;
}

.eyebrow {
  margin: 0 0 18px;
  color: #fde68a;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-desc {
  margin: 0 0 24px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.pill-row a,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  padding: 13px 26px;
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.30);
}

.ghost-btn {
  color: #fff;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.inline-btn:hover,
.nav-search button:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}

.hero-dots button.active {
  width: 34px;
  background: var(--amber);
}

.page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.section-block {
  margin-bottom: 68px;
}

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

.section-heading h2,
.page-title h1,
.detail-info h1 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

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

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

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

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

.movie-card {
  min-width: 0;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.compact .poster-frame,
.small-grid .poster-frame {
  aspect-ratio: 1 / 1;
}

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

.movie-card:hover img,
.category-tile:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.05));
  transition: opacity 180ms ease;
}

.movie-card:hover .poster-frame::after {
  opacity: 1;
}

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
}

.score-badge {
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.movie-card-body {
  padding: 16px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card h2,
.movie-card h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.02rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 180ms ease;
}

.movie-card:hover h2,
.movie-card:hover h3 {
  color: var(--amber-dark);
}

.movie-card p {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags span {
  color: #b45309;
  background: linear-gradient(90deg, #fef3c7, #ffedd5);
  padding: 5px 9px;
}

.feature-band {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #14b8a6);
  box-shadow: var(--shadow);
  color: #fff;
}

.feature-band .section-heading h2,
.feature-band .section-more {
  color: #fff;
}

.horizontal-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-strip .movie-card {
  width: 270px;
  flex: 0 0 270px;
  scroll-snap-align: start;
}

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

.mosaic-grid .movie-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease;
}

.rank-item:hover {
  transform: translateX(4px);
}

.rank-item > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item strong {
  color: #111827;
  line-height: 1.4;
}

.rank-item em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
}

.rank-item b {
  color: var(--amber-dark);
}

.page-title {
  padding: 46px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.22), transparent 26%), linear-gradient(135deg, var(--amber), var(--orange), var(--rose));
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}

.page-title h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.page-title p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.75;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.pill-row a,
.filter-chip {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 9px 13px;
}

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

.category-tile {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 150px;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.category-text {
  padding: 20px;
}

.category-text h2 {
  margin: 0 0 8px;
}

.category-text p {
  margin: 0 0 16px;
  color: #4b5563;
  line-height: 1.65;
}

.category-text span,
.inline-btn {
  display: inline-flex;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 750;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 0 18px;
  background: #fff;
}

.filter-bar button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
}

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

.player-card,
.detail-info,
.related-box,
.copy-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
  background: #000;
}

.player-shell {
  position: relative;
  background: #000;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.08));
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-button {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  font-size: 1.7rem;
  padding-left: 4px;
}

.detail-info {
  padding: 28px;
  margin-top: 22px;
}

.detail-info h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  color: #4b5563;
  font-weight: 750;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.detail-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #111827;
}

.detail-section p {
  margin: 0;
  color: #374151;
  line-height: 1.85;
}

.review-box {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

.related-box {
  padding: 22px;
  position: sticky;
  top: 88px;
}

.related-box h2 {
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-box h2::before {
  content: "";
  width: 5px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), var(--orange));
}

.related-list {
  display: grid;
  gap: 15px;
}

.related-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: center;
}

.related-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.related-card strong {
  display: block;
  color: #111827;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card span {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.85rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-weight: 700;
}

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

.copy-card {
  padding: 30px;
  line-height: 1.85;
}

.copy-card h1,
.copy-card h2 {
  color: #111827;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #111827);
  padding: 48px 0 22px;
}

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

.footer-logo {
  color: #fff;
}

.footer-brand p,
.footer-column a,
.footer-bottom {
  color: #94a3b8;
}

.footer-brand p {
  margin: 16px 0 0;
  line-height: 1.75;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.05rem;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.20);
  font-size: 0.9rem;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 22px;
  text-align: center;
  background: #fff;
  color: #6b7280;
  box-shadow: var(--shadow-soft);
}

.empty-state.visible {
  display: block;
}

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

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

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

  .related-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    width: min(100% - 24px, 1180px);
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 0 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 10px 2px;
  }

  .nav-search {
    width: 100%;
  }

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

  .hero {
    min-height: 72vh;
  }

  .hero-content {
    top: 54%;
  }

  .page-wrap {
    width: min(100% - 24px, 1180px);
    padding: 34px 0;
  }

  .page-title {
    padding: 28px;
  }

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

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

  .mosaic-grid .movie-card:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  .feature-band {
    padding: 24px;
    border-radius: 22px;
  }

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

  .related-card {
    grid-template-columns: 104px 1fr;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.small-grid,
  .movie-grid.wide-grid,
  .category-grid,
  .mosaic-grid {
    grid-template-columns: 1fr;
  }

  .mosaic-grid .movie-card:first-child {
    grid-column: span 1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
