:root {
  --bg-start: #fff7ed;
  --bg-end: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f3e8d7;
  --card: #ffffff;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --accent: #ea580c;
  --shadow: 0 18px 50px rgba(146, 64, 14, 0.12);
  --shadow-soft: 0 10px 30px rgba(146, 64, 14, 0.08);
  --radius: 1.1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 48%, #fff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 119, 6, 0.12);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--brand-dark);
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.22);
}

.logo-text {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

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

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

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  color: var(--text);
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.player-overlay button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.player-overlay button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.28);
}

.secondary-button {
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid rgba(217, 119, 6, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-soft);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--brand-dark);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.38), transparent 34%), linear-gradient(135deg, #78350f 0%, #b45309 45%, #f97316 100%);
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(67, 20, 7, 0.76), rgba(67, 20, 7, 0.28), rgba(67, 20, 7, 0.68));
  z-index: 1;
}

.hero-slide {
  display: none;
  position: relative;
  z-index: 2;
  min-height: 640px;
  align-items: center;
  padding: 70px 0;
}

.hero-slide.active {
  display: flex;
  animation: heroFade 0.7s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #78350f;
  background: rgba(254, 243, 199, 0.94);
  border-radius: 999px;
  font-weight: 900;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 560px;
}

.stat-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

.stat-card strong {
  display: block;
  font-size: 1.35rem;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.hero-poster-wrap {
  position: relative;
  min-height: 420px;
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  border-radius: 32px;
  box-shadow: 0 36px 80px rgba(67, 20, 7, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster-card img {
  width: 100%;
  height: 470px;
  object-fit: cover;
}

.hero-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.74));
}

.hero-floating {
  position: absolute;
  left: -24px;
  bottom: 26px;
  right: 26px;
  z-index: 3;
  padding: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-floating h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 1.18rem;
}

.hero-floating p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.hero-dot {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.section {
  padding: 70px 0;
}

.section.tight {
  padding: 44px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(217, 119, 6, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(217, 119, 6, 0.28);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  background: rgba(146, 64, 14, 0.86);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 800;
}

.play-chip {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

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

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

.movie-card h3 {
  margin: 8px 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.94rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-list span {
  padding: 4px 8px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

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

.category-card {
  min-height: 150px;
  padding: 22px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: var(--radius);
  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);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 1.18rem;
}

.category-card span {
  color: var(--muted);
  font-size: 0.94rem;
}

.category-card em {
  display: inline-flex;
  margin-top: 16px;
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

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

.filter-panel input,
.filter-panel select {
  width: 100%;
  border-radius: 14px;
}

.filter-count {
  padding: 10px 14px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 50px 66px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(217, 119, 6, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.rank-row:hover {
  border-color: rgba(217, 119, 6, 0.25);
  transform: translateY(-2px);
}

.row-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  border-radius: 14px;
  font-weight: 900;
}

.rank-row img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: #fed7aa;
}

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

.rank-row-main em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.rank-row-type {
  color: var(--brand-dark);
  font-weight: 900;
}

.page-hero {
  padding: 64px 0 36px;
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.2), transparent 42%);
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 28px;
  align-items: start;
}

.detail-cover {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #fed7aa;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.info-card,
.player-card,
.text-card {
  background: #fff;
  border: 1px solid rgba(217, 119, 6, 0.1);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.info-card,
.text-card {
  padding: 24px;
}

.info-card h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.detail-meta span,
.detail-meta a {
  padding: 7px 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
}

.lead-text {
  color: #374151;
  font-size: 1.08rem;
}

.player-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  background: #111827;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #111827;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.72));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}

.player-title {
  padding: 18px 22px;
  color: #111827;
  font-weight: 900;
}

.text-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 1.42rem;
}

.text-card p {
  margin: 0;
  color: #374151;
  white-space: pre-line;
}

.site-footer {
  margin-top: 70px;
  padding: 44px 0;
  background: #78350f;
  color: rgba(255, 255, 255, 0.78);
}

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

.footer-logo {
  color: #fff;
  font-size: 1.18rem;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1rem;
}

.site-footer p {
  max-width: 420px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.empty-result {
  display: none;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 119, 6, 0.12);
}

@media (max-width: 1024px) {
  .top-search {
    display: none;
  }

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

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

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

  .hero-poster-wrap {
    min-height: auto;
  }

  .detail-cover {
    position: static;
    max-width: 420px;
  }

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 52px 0 76px;
  }

  .hero-grid {
    gap: 28px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-poster-card,
  .hero-poster-card img {
    min-height: 360px;
    height: 360px;
  }

  .hero-floating {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-row-type {
    display: none;
  }
}

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

  .logo-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

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

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