:root {
  --color-amber: #d97706;
  --color-orange: #f97316;
  --color-amber-dark: #b45309;
  --color-dark: #111827;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-soft: #f9fafb;
  --color-line: #e5e7eb;
  --shadow-card: 0 12px 30px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.08);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
  box-shadow: 0 10px 26px rgba(180, 83, 9, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  min-height: 64px;
  padding: 0 24px;
  margin: 0 auto;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--color-amber-dark);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.brand-text {
  font-size: 1.35rem;
}

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

.nav-link {
  padding: 20px 0;
  opacity: 0.96;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff7ed;
  opacity: 1;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  color: #ffffff;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  padding: 0 24px 18px;
  margin: 0 auto;
}

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

.mobile-link {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-link.active {
  background: rgba(255, 255, 255, 0.22);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1280px;
  padding: 48px 24px 56px;
  margin: 0 auto;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 14px;
  color: #fff7ed;
  background: rgba(217, 119, 6, 0.78);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 740px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  color: #fef3c7;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(217, 119, 6, 0.34);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: #ffffff;
}

.container {
  max-width: 1280px;
  padding: 48px 24px;
  margin: 0 auto;
}

.page-hero {
  padding: 64px 24px 36px;
  color: #ffffff;
  background: linear-gradient(135deg, #92400e, #f97316 65%, #f59e0b);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #fff7ed;
  font-size: 1.05rem;
}

.section {
  margin-bottom: 56px;
}

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

.section-title {
  margin: 0;
  color: var(--color-dark);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.section-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--color-muted);
}

.rail {
  display: grid;
  grid-auto-columns: minmax(240px, 300px);
  grid-auto-flow: column;
  gap: 22px;
  padding: 4px 4px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.rail > * {
  scroll-snap-align: start;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.68));
  opacity: 0.86;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 30px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--color-amber-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card h2 {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--color-dark);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.85em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span,
.detail-tags span {
  padding: 4px 8px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

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

.movie-card-wide .poster-link {
  aspect-ratio: auto;
  min-height: 100%;
}

.category-panel {
  padding: 28px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0 0 18px;
  color: #fff7ed;
}

.category-card span {
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  color: var(--color-dark);
  background: #f9fafb;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.empty-state {
  display: none;
  padding: 26px;
  color: var(--color-muted);
  text-align: center;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

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

.rank-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 28px;
}

.rank-list,
.compact-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.rank-row img {
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.rank-row p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  border-radius: 12px;
  font-weight: 900;
}

.rank-dot {
  width: 10px;
  height: 10px;
  background: var(--color-amber);
  border-radius: 999px;
}

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

.compact-item a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.compact-title {
  min-width: 0;
  overflow: hidden;
  color: var(--color-dark);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-meta {
  color: var(--color-muted);
  font-size: 0.86rem;
}

.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.78), transparent 30%), linear-gradient(135deg, #111827, #78350f 55%, #111827);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(260px, 390px) 1fr;
  gap: 34px;
  align-items: center;
  max-width: 1280px;
  padding: 46px 24px;
  margin: 0 auto;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #fde68a;
  font-weight: 800;
}

.detail-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.08;
}

.detail-lead {
  max-width: 760px;
  margin: 0 0 18px;
  color: #f3f4f6;
  font-size: 1.12rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-weight: 800;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 28px;
}

.content-card {
  padding: 28px;
  margin-bottom: 28px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--color-dark);
  font-size: 1.5rem;
}

.content-card p {
  margin: 0 0 16px;
  color: #374151;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  border: 0;
  border-radius: 50%;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  cursor: pointer;
}

.player-button svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.side-card {
  position: sticky;
  top: 90px;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1280px;
  padding: 46px 24px 22px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

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

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

.footer-bottom {
  padding-top: 22px;
  margin-top: 30px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: none;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.back-top.show {
  display: block;
}

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

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

  .desktop-nav {
    gap: 14px;
    font-size: 0.95rem;
  }
}

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

  .mobile-toggle {
    display: flex;
  }

  .hero {
    height: 430px;
  }

  .hero-content {
    padding: 34px 22px 54px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .side-card {
    position: static;
  }

  .rank-row {
    grid-template-columns: 44px 92px 1fr;
  }

  .rank-row img {
    height: 62px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand-text {
    font-size: 1.12rem;
  }

  .container {
    padding: 34px 16px;
  }

  .page-hero {
    padding: 48px 16px 28px;
  }

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

  .movie-card h2 {
    font-size: 0.95rem;
  }

  .movie-card p,
  .card-tags {
    display: none;
  }

  .card-body {
    padding: 12px;
  }

  .compact-item a {
    grid-template-columns: auto 1fr;
  }

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

  .content-card {
    padding: 20px;
  }

  .player-button {
    width: 74px;
    height: 74px;
  }
}
