:root {
  --color-amber: #f59e0b;
  --color-orange: #f97316;
  --color-rose: #fb7185;
  --color-slate: #111827;
  --color-slate-soft: #1f2937;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-line: rgba(17, 24, 39, 0.12);
  --color-card: rgba(255, 255, 255, 0.92);
  --shadow-soft: 0 16px 48px rgba(15, 23, 42, 0.14);
  --shadow-lifted: 0 24px 70px rgba(15, 23, 42, 0.22);
  --radius-large: 28px;
  --radius-card: 20px;
  --max-width: 1180px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #fffbeb 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.96), rgba(249, 115, 22, 0.96));
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.26);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  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.8s ease-in-out infinite;
}

.brand-text {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link,
.mobile-link {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fef3c7;
  opacity: 1;
}

.nav-link:hover {
  transform: translateY(-1px);
}

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

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 10px 0;
}

.hero {
  position: relative;
  height: min(760px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.12));
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.32), transparent 28%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.08) 75%, transparent 75%);
  background-size: auto, 46px 46px;
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 710px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-weight: 800;
  color: var(--color-amber);
  letter-spacing: 0.04em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 5.4rem);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 670px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.75;
}

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

.hero-meta {
  margin: 26px 0;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.card-meta span {
  background: #fff7ed;
  color: #92400e;
}

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

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

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

.button-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
  box-shadow: 0 15px 36px rgba(249, 115, 22, 0.35);
}

.button-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

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

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

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

.home-intro {
  margin-top: -42px;
  position: relative;
  z-index: 6;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 22px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.stat-card strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #b45309;
}

.stat-card span {
  color: var(--color-muted);
  font-weight: 700;
}

.page-stack {
  padding-block: 56px;
}

.content-section,
.gradient-section {
  margin-bottom: 64px;
}

.gradient-section {
  padding: clamp(24px, 4vw, 42px);
  border-radius: var(--radius-large);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.gradient-blue {
  background: linear-gradient(120deg, #2563eb, #06b6d4 54%, #14b8a6);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.gradient-section .section-heading p {
  color: rgba(255, 255, 255, 0.82);
}

.section-heading a {
  flex: 0 0 auto;
  color: #b45309;
  font-weight: 900;
}

.gradient-section .section-heading a {
  color: #fff7ed;
}

.movie-grid,
.poster-grid,
.mini-grid,
.split-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card,
.compact-card,
.text-panel,
.filter-panel,
.ranking-item {
  background: var(--color-card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover,
.compact-cover,
.ranking-cover,
.detail-poster,
.category-tile,
.mosaic-item {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.card-cover img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .card-cover img,
.compact-card:hover img,
.category-tile:hover img,
.mosaic-item:hover img,
.ranking-item:hover img {
  transform: scale(1.08);
}

.card-badge,
.play-float,
.rank-number,
.ranking-cover span {
  position: absolute;
  z-index: 2;
}

.card-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.play-float {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h3,
.compact-card h3,
.ranking-body h2 {
  margin: 0 0 8px;
  line-height: 1.35;
}

.card-body h3 {
  font-size: 1.02rem;
}

.card-body p,
.compact-card p,
.ranking-body p {
  margin: 0 0 13px;
  color: var(--color-muted);
  line-height: 1.65;
  font-size: 0.93rem;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fffbeb;
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 46% 1fr;
}

.movie-card-wide .card-cover img {
  height: 100%;
  min-height: 260px;
}

.movie-card-rail {
  width: 268px;
  flex: 0 0 268px;
}

.movie-card-poster .card-cover img {
  aspect-ratio: 1 / 1.18;
}

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

.horizontal-scroller .movie-card {
  scroll-snap-align: start;
}

.compact-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: stretch;
  padding: 12px;
}

.compact-cover {
  min-height: 120px;
  border-radius: 16px;
}

.compact-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.mosaic-large {
  grid-column: span 2;
  grid-row: span 2;
}

.mosaic-item {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.mosaic-item img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.mosaic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
}

.mosaic-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: #ffffff;
}

.mosaic-content strong {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.6rem);
}

.mosaic-content em {
  display: block;
  margin-top: 7px;
  color: #fde68a;
  font-style: normal;
  font-weight: 800;
}

.page-main {
  padding: 40px 0 72px;
}

.page-hero {
  margin-bottom: 32px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 82% 20%, rgba(251, 191, 36, 0.45), transparent 26%),
    linear-gradient(135deg, #111827, #7c2d12 62%, #f97316);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.page-hero p:last-child {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
  font-size: 1.05rem;
}

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

.category-tile {
  min-height: 210px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.category-tile img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.category-info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  color: #ffffff;
}

.category-info strong,
.category-info em {
  display: block;
}

.category-info strong {
  font-size: 1.35rem;
}

.category-info em {
  margin-top: 6px;
  color: #fde68a;
  font-style: normal;
  font-weight: 800;
}

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

.filter-search label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
  color: #7c2d12;
}

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

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

.filter-fields {
  display: grid;
  grid-template-columns: repeat(3, 160px);
  gap: 10px;
}

.filter-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--color-muted);
  font-weight: 700;
}

.listing-grid .movie-card[hidden],
.ranking-list [hidden] {
  display: none;
}

.ranking-wrap {
  display: grid;
  gap: 24px;
}

.ranking-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 178px 1fr;
  gap: 18px;
  padding: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lifted);
}

.ranking-cover {
  min-height: 116px;
  border-radius: 16px;
}

.ranking-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.ranking-cover span,
.rank-number {
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  font-weight: 900;
}

.detail-page {
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 7vw, 84px) 0;
  color: #ffffff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(4px);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.58));
}

.detail-backdrop img {
  height: 100%;
  object-fit: cover;
}

.detail-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  box-shadow: var(--shadow-lifted);
}

.detail-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  font-size: 1.12rem;
}

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

.detail-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #fde68a;
}

.player-section,
.detail-content {
  padding-top: 42px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow-lifted);
}

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

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  box-shadow: 0 20px 60px rgba(249, 115, 22, 0.45);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.big-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.video-shell.is-playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.player-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.82);
  text-align: center;
  font-weight: 800;
}

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

.text-panel {
  padding: clamp(22px, 4vw, 34px);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.text-panel p {
  margin: 0;
  color: #4b5563;
  line-height: 1.95;
}

.accent-panel {
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.site-footer {
  margin-top: 72px;
  padding: 46px 0 20px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 32px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.footer-grid p {
  margin: 12px 0 0;
  color: #9ca3af;
  line-height: 1.75;
}

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-button {
  display: inline-flex !important;
  margin-top: 16px !important;
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff !important;
  background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
  font-weight: 900;
}

.footer-bottom {
  width: min(100% - 32px, var(--max-width));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  font-size: 0.92rem;
}

.image-unavailable {
  opacity: 0.14;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .stats-row,
  .four-columns,
  .poster-grid,
  .mini-grid,
  .split-grid,
  .category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 220px 1fr;
  }

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

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

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

  .hero {
    min-height: 660px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.36));
  }

  .hero-content {
    align-items: end;
    padding-bottom: 86px;
  }

  .stats-row,
  .four-columns,
  .poster-grid,
  .mini-grid,
  .split-grid,
  .category-grid,
  .detail-grid,
  .detail-content,
  .footer-grid,
  .ranking-item {
    grid-template-columns: 1fr;
  }

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

  .compact-card {
    grid-template-columns: 118px 1fr;
  }

  .mosaic-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 230px;
  }

  .mosaic-large {
    grid-column: auto;
    grid-row: auto;
  }

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

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

  .section-heading {
    display: grid;
  }

  .big-play {
    width: 68px;
    height: 68px;
  }
}
