:root {
  --bg: #f8f5ef;
  --bg-soft: #fffaf0;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.14);
  --brand-dark: #78350f;
  --brand: #d97706;
  --brand-light: #f59e0b;
  --accent: #f97316;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(31, 41, 55, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fffbeb 0%, #f9fafb 42%, #f3f4f6 100%);
}

body.is-locked {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #78350f 0%, #92400e 48%, #c2410c 100%);
  color: #fff;
  box-shadow: 0 12px 32px rgba(67, 20, 7, 0.28);
}

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

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.brand-text {
  font-size: 22px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 4px;
}

.hero {
  position: relative;
  height: min(720px, calc(100vh - 68px));
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-layer,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 40%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.72) 44%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 72px;
  width: min(650px, calc(100% - 64px));
  color: #fff;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.quick-search-text span,
.category-showcase span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff7ed;
  font-size: 13px;
  font-weight: 700;
}

.movie-tags span {
  background: #fff7ed;
  color: #92400e;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.34);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 64px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: rgba(17, 24, 39, 0.42);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #f59e0b;
}

.panel-section,
.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: 24px;
  align-items: center;
  margin-top: -46px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-panel h2,
.info-card h2,
.side-panel h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.quick-search p,
.section-heading p,
.page-hero p,
.category-showcase p,
.side-panel p,
.text-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.search-strip,
.filter-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-strip input,
.filter-box input,
.filter-box select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-strip button,
.filter-box button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f97316);
  font-weight: 900;
  cursor: pointer;
}

.content-section {
  padding: 72px 0 0;
}

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

.section-heading p {
  margin: 8px 0 0;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(31, 41, 55, 0.14);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.05;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.62), transparent 28%),
    linear-gradient(135deg, #78350f, #111827);
}

.movie-poster img,
.category-card img,
.category-showcase img,
.rank-item img,
.ranking-row img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge,
.poster-year {
  position: absolute;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.poster-badge {
  left: 10px;
}

.poster-year {
  right: 10px;
  background: rgba(217, 119, 6, 0.9);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  min-height: 48px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: #d97706;
}

.movie-card-body p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta span {
  padding: 5px 8px;
  border-radius: 8px;
  background: #f3f4f6;
}

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

.category-card,
.category-showcase {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: var(--radius-md);
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img,
.category-showcase img {
  position: absolute;
  inset: 0;
  opacity: 0.52;
}

.category-card::after,
.category-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.18));
}

.category-card span,
.category-card p,
.category-showcase div {
  position: relative;
  z-index: 2;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 18px;
}

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

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

.rank-item,
.ranking-row {
  display: grid;
  align-items: center;
  gap: 14px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
}

.rank-item {
  grid-template-columns: 52px 64px 1fr auto;
  min-height: 78px;
  padding: 10px 14px;
}

.rank-num,
.ranking-index {
  color: #d97706;
  font-size: 24px;
  font-weight: 1000;
}

.rank-item img {
  width: 52px;
  height: 60px;
  border-radius: 12px;
}

.rank-title,
.ranking-name {
  color: #111827;
  font-weight: 900;
}

.rank-meta,
.ranking-info {
  color: var(--muted);
  font-size: 14px;
}

.side-panel,
.info-card,
.text-panel,
.search-panel {
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 28px;
  align-self: start;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.28), transparent 35%),
    #fff;
}

.site-footer {
  margin-top: 84px;
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 28px;
  padding: 44px 0 26px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  margin: 8px 0 0;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.compact-hero {
  width: min(1180px, calc(100% - 32px));
  min-height: 260px;
  margin: 34px auto 0;
  border-radius: var(--radius-lg);
  padding: 52px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.35), transparent 34%),
    linear-gradient(135deg, #111827, #78350f 52%, #c2410c);
}

.compact-hero h1 {
  color: #fff;
  font-size: clamp(38px, 6vw, 70px);
}

.compact-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.category-showcase {
  display: grid;
  min-height: 240px;
  padding: 28px;
  align-items: end;
}

.category-showcase h2 {
  margin: 0;
  color: #fff;
  font-size: 34px;
}

.category-showcase p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  color: #92400e;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

.pagination a.is-active {
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f97316);
}

.ranking-row {
  grid-template-columns: 64px 72px minmax(0, 1fr) auto auto;
  padding: 12px 18px;
}

.ranking-row img {
  width: 58px;
  height: 72px;
  border-radius: 12px;
}

.ranking-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: #d97706;
  font-weight: 900;
}

.filter-box {
  grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
  margin-bottom: 22px;
}

.search-status {
  margin-bottom: 18px;
  color: #92400e;
  font-weight: 900;
}

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

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  color: #fff;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4.1;
  border-radius: 28px;
  background: linear-gradient(135deg, #78350f, #111827);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
}

.detail-info h1 {
  max-width: 780px;
  color: #fff;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1;
}

.detail-info p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.detail-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 26px;
}

.detail-cats a,
.detail-cats span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(146, 64, 14, 0.5);
  font-weight: 900;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.28), transparent 26%),
    rgba(0, 0, 0, 0.48);
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 20px 42px rgba(249, 115, 22, 0.38);
  font-size: 30px;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.68);
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.text-panel,
.info-card,
.search-panel {
  padding: 26px;
}

.text-panel h2,
.info-card h2 {
  font-size: 26px;
}

.text-panel p {
  margin-bottom: 0;
  font-size: 16px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin: 18px 0 0;
}

.info-card dt {
  color: #92400e;
  font-weight: 900;
}

.info-card dd {
  margin: 0;
  color: var(--muted);
}

.side-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.side-links a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 900;
}

.image-missing {
  background:
    radial-gradient(circle at 30% 18%, rgba(251, 191, 36, 0.5), transparent 26%),
    linear-gradient(135deg, #78350f, #111827);
}

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

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

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

  .detail-hero-inner {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .navbar {
    width: min(100% - 24px, 1180px);
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 18px;
    background: rgba(120, 53, 15, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 13px 14px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .hero-control {
    display: none;
  }

  .quick-search,
  .filter-box {
    grid-template-columns: 1fr;
  }

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

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

  .compact-hero {
    padding: 34px 24px;
  }

  .ranking-row {
    grid-template-columns: 48px 60px minmax(0, 1fr);
  }

  .ranking-info,
  .ranking-play {
    display: none;
  }

  .detail-hero-inner {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 34px 0;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-content h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-content p,
  .detail-info p {
    font-size: 15px;
  }

  .panel-section,
  .content-section,
  .compact-hero,
  .detail-hero-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

  .rank-item {
    grid-template-columns: 44px 54px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .search-strip {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .text-panel,
  .info-card,
  .search-panel {
    padding: 20px;
  }
}
