:root {
  --color-primary: #d97706;
  --color-primary-dark: #92400e;
  --color-primary-soft: #fef3c7;
  --color-accent: #f97316;
  --color-ink: #1f2937;
  --color-muted: #6b7280;
  --color-line: #f3e8d0;
  --color-card: #ffffff;
  --shadow-soft: 0 18px 50px rgba(146, 64, 14, 0.14);
  --shadow-card: 0 12px 32px rgba(31, 41, 55, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-ink);
  background: linear-gradient(180deg, #fff7ed 0%, #fffaf0 38%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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.18);
  background: rgba(255, 251, 235, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--color-primary-dark);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

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

.nav-links a {
  color: #78350f;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-links a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.header-search {
  display: flex;
  align-items: center;
  width: 260px;
  border: 1px solid rgba(217, 119, 6, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(146, 64, 14, 0.08);
  overflow: hidden;
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
  color: var(--color-ink);
}

.header-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--color-primary-dark);
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}

main {
  overflow: hidden;
}

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

.hero {
  position: relative;
  min-height: 660px;
  color: #ffffff;
  overflow: hidden;
  background: #1c1308;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: blur(2px) saturate(1.12);
  opacity: 0.55;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 26%, rgba(251, 191, 36, 0.35), transparent 28%),
    linear-gradient(90deg, rgba(24, 14, 3, 0.96) 0%, rgba(51, 28, 6, 0.88) 47%, rgba(92, 44, 9, 0.42) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.74));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 660px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 48px;
  align-items: center;
  padding: 74px 0 86px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(252, 211, 77, 0.38);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(146, 64, 14, 0.38);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.35rem, 5vw, 5.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 35px rgba(0, 0, 0, 0.4);
}

.hero p {
  max-width: 740px;
  margin: 22px 0 0;
  color: #ffedd5;
  font-size: 1.08rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: #78350f;
  background: #fef3c7;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.38);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 237, 213, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(254, 243, 199, 0.24);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
}

.hero-poster-info strong {
  display: block;
  font-size: 1.15rem;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 237, 213, 0.36);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
  pointer-events: auto;
}

.hero-dots {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 237, 213, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #f59e0b;
}

.section {
  padding: 70px 0;
}

.section-tight {
  padding: 42px 0;
}

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

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(1.8rem, 3vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--color-muted);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 22px;
  background: var(--color-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 58px rgba(146, 64, 14, 0.20);
}

.card-cover {
  position: relative;
  overflow: hidden;
  background: #fef3c7;
}

.card-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.06);
}

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 0.82rem;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 1.05rem;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #92400e 0%, #f59e0b 52%, #fb923c 100%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(146, 64, 14, 0.25);
}

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

.category-card p {
  margin: 0;
  color: #ffedd5;
  font-size: 0.94rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.08);
}

.rank-num {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  font-weight: 900;
  font-size: 1.2rem;
}

.rank-item img {
  width: 92px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.rank-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--color-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  padding: 74px 0 50px;
  background:
    radial-gradient(circle at 78% 20%, rgba(251, 191, 36, 0.22), transparent 28%),
    linear-gradient(135deg, #451a03 0%, #92400e 46%, #f59e0b 100%);
  color: #ffffff;
}

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

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

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

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(146, 64, 14, 0.08);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  padding: 0 16px;
  outline: 0;
  background: #ffffff;
}

.filter-panel input {
  flex: 1 1 280px;
}

.filter-panel select {
  flex: 0 1 170px;
}

.filter-chip {
  min-height: 42px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  padding: 0 15px;
  color: #92400e;
  background: #fff7ed;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip:hover {
  color: #ffffff;
  background: var(--color-primary);
}

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid rgba(217, 119, 6, 0.13);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.video-wrap {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.play-cover.is-hidden {
  display: none;
}

.play-cover span {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
  font-weight: 900;
}

.detail-body {
  padding: 26px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

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

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.side-movie {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3e8d0;
}

.side-movie:last-child {
  border-bottom: 0;
}

.side-movie img {
  width: 76px;
  height: 98px;
  border-radius: 14px;
  object-fit: cover;
}

.side-movie h3 {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-movie p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.footer {
  padding: 42px 0;
  color: #ffedd5;
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.footer a:hover {
  color: #ffffff;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 24px;
  color: #92400e;
  background: #fff7ed;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 860px) {
  .nav-shell {
    min-height: 66px;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links,
  .header-search {
    display: none;
  }

  .site-header.is-open .nav-links,
  .site-header.is-open .header-search {
    display: flex;
  }

  .site-header.is-open .nav-shell {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 0;
  }

  .site-header.is-open .nav-links {
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header.is-open .header-search {
    width: 100%;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding: 58px 0 92px;
  }

  .hero-controls {
    bottom: 20px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .nav-shell,
  .hero-content,
  .hero-controls {
    width: min(100% - 24px, 1200px);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-size: 0.96rem;
  }

  .rank-item img {
    width: 72px;
    height: 96px;
  }

  .card-body {
    padding: 12px;
  }

  .detail-body {
    padding: 20px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
