*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --primary: #d97706;
  --primary-dark: #92400e;
  --primary-soft: #fef3c7;
  --line: #fde68a;
  --dark: #451a03;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 44%, #fff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
  border-bottom: 1px solid rgba(217, 119, 6, 0.25);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(146, 64, 14, 0.12);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  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;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #92400e, #f97316, #b45309);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: #78350f;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: #d97706;
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.22);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fef3c7;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #92400e;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  background: rgba(255, 251, 235, 0.95);
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 18px;
}

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

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

.hero-section {
  min-height: 520px;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-image,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay,
.detail-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(69, 26, 3, 0.95), rgba(146, 64, 14, 0.88), rgba(124, 45, 18, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(960px, calc(100% - 32px));
  padding: 74px 0;
  color: #fffbeb;
}

.left-content {
  text-align: left;
  width: min(1180px, calc(100% - 32px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  color: #fef3c7;
  background: rgba(255, 251, 235, 0.12);
  border: 1px solid rgba(254, 243, 199, 0.24);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-title-block h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fffbeb;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hero-lead,
.hero-content > p,
.page-hero p,
.detail-title-block p {
  max-width: 820px;
  margin: 20px auto 0;
  color: #fde68a;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.left-content p,
.detail-title-block p {
  margin-left: 0;
}

.hero-feature {
  width: min(760px, 100%);
  margin: 26px auto 0;
  padding: 18px;
  background: rgba(255, 251, 235, 0.12);
  border: 1px solid rgba(254, 243, 199, 0.22);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.hero-feature span {
  color: #fcd34d;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-feature strong {
  display: block;
  margin-top: 8px;
  color: #fff7ed;
  font-size: 1.55rem;
}

.hero-feature p {
  margin: 8px auto 0;
  color: #ffedd5;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.left-content .hero-actions {
  justify-content: flex-start;
}

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

.primary-btn {
  color: #fff;
  background: #d97706;
  box-shadow: 0 16px 28px rgba(217, 119, 6, 0.28);
}

.primary-btn:hover,
.secondary-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.primary-btn:hover {
  background: #b45309;
}

.secondary-btn {
  color: #fffbeb;
  background: rgba(255, 251, 235, 0.14);
  border: 1px solid rgba(254, 243, 199, 0.3);
}

.home-container,
.listing-container {
  padding: 52px 0 76px;
}

.content-section {
  margin-top: 58px;
}

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

.section-heading h2 {
  margin: 0;
  color: #78350f;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
}

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

.section-link {
  color: #92400e;
  background: #fef3c7;
}

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

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

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

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

.movie-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.movie-card {
  min-width: 0;
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 65px rgba(120, 53, 15, 0.22);
}

.movie-card[hidden] {
  display: none;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #451a03, #92400e);
}

.featured-grid .poster-wrap,
.wide-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.62));
  opacity: 0.9;
}

.type-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.type-pill {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(217, 119, 6, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f97316, #b45309);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  min-height: 2.7em;
  margin: 0;
  color: #111827;
  font-size: 1.05rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h2 {
  color: #b45309;
}

.card-meta {
  margin: 8px 0 0;
  color: #92400e;
  font-size: 0.88rem;
  font-weight: 700;
}

.card-desc {
  min-height: 3.1em;
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 5px 9px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.wide-card a {
  display: grid;
  grid-template-columns: 42% 1fr;
  height: 100%;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.filter-search label,
.filter-selects label {
  display: grid;
  gap: 8px;
  color: #78350f;
  font-size: 0.9rem;
  font-weight: 800;
}

.filter-search input,
.filter-selects select {
  min-height: 46px;
  width: 100%;
  padding: 0 14px;
  color: #1f2937;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 14px;
  outline: none;
}

.filter-search input:focus,
.filter-selects select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 14px;
  font-weight: 800;
  text-align: center;
}

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
}

.slim-hero {
  background: linear-gradient(135deg, #78350f, #b45309 60%, #f59e0b);
}

.page-hero .container {
  position: relative;
  z-index: 2;
  padding: 60px 0;
  color: #fff7ed;
}

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

.category-tile,
.category-card a {
  position: relative;
  display: block;
  min-height: 210px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #451a03;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.45s ease;
}

.category-tile:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(69, 26, 3, 0.1), rgba(69, 26, 3, 0.88));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: block;
  margin-top: 95px;
  color: #fff7ed;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile p {
  margin: 10px 0 0;
  color: #fde68a;
  line-height: 1.6;
}

.category-list-grid {
  padding: 54px 0 80px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-card a {
  min-height: auto;
  padding: 0;
  background: #fff;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  height: 160px;
  background: #78350f;
  overflow: hidden;
}

.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.45s ease;
}

.category-info {
  padding: 20px;
}

.category-info h2 {
  margin: 0;
  color: #78350f;
}

.category-info p {
  min-height: 3.2em;
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.category-info span {
  color: #d97706;
  font-weight: 900;
}

.rank-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.rank-table th,
.rank-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #fde68a;
  text-align: left;
}

.rank-table th {
  color: #78350f;
  background: #fef3c7;
}

.rank-table td:first-child {
  color: #d97706;
  font-weight: 900;
}

.rank-table a {
  color: #92400e;
  font-weight: 800;
}

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

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 48px 0 72px;
  color: #fff7ed;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #fde68a;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-title-block {
  margin-top: 62px;
  max-width: 880px;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(69, 26, 3, 0.28);
}

.player-card video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 16px;
  color: #fff7ed;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #d97706;
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.38);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: #f59e0b;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #fff;
}

.player-layer strong {
  padding: 0 24px;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.story-card,
.fact-card {
  margin-top: 24px;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.story-card h2,
.fact-card h2 {
  margin: 0 0 14px;
  color: #78350f;
  font-size: 1.35rem;
}

.story-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  font-size: 1.03rem;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.fact-card {
  position: sticky;
  top: 92px;
}

.fact-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.fact-card dl div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #fde68a;
}

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

.fact-card dd {
  margin: 0;
  color: #374151;
  line-height: 1.55;
}

.fact-card a {
  color: #d97706;
  font-weight: 800;
}

.related-section {
  margin-top: 34px;
}

.site-footer {
  color: #fef3c7;
  background: linear-gradient(180deg, #78350f, #451a03);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 32px;
}

.footer-brand .brand-text {
  color: #fef3c7;
  background: none;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.footer-columns h2 {
  margin: 0 0 12px;
  color: #fff7ed;
  font-size: 1.02rem;
}

.footer-columns a {
  display: block;
  margin: 8px 0;
  color: #fde68a;
}

.footer-columns a:hover {
  color: #fff;
}

.copyright {
  margin: 32px 0 0;
  padding-top: 22px;
  color: #fcd34d;
  border-top: 1px solid rgba(254, 243, 199, 0.18);
  font-size: 0.92rem;
}

@media (max-width: 1080px) {
  .movie-grid,
  .all-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-aside {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
  }

  .fact-card {
    position: static;
    margin-top: 0;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-section {
    min-height: 590px;
  }

  .hero-content,
  .page-hero .container,
  .detail-hero-inner {
    padding: 42px 0;
  }

  .hero-actions,
  .left-content .hero-actions {
    justify-content: stretch;
  }

  .primary-btn,
  .secondary-btn,
  .section-link {
    width: 100%;
  }

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

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

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

  .movie-grid,
  .all-grid,
  .ranking-grid,
  .related-grid,
  .compact-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

  .movie-strip {
    grid-auto-columns: minmax(220px, 82vw);
  }

  .wide-card a {
    display: block;
  }

  .detail-aside {
    display: block;
  }

  .detail-cover {
    max-width: 260px;
    margin: 0 auto;
  }

  .fact-card {
    margin-top: 20px;
  }

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