:root {
  --primary-50: #fff7ed;
  --primary-100: #faeee0;
  --primary-500: #d9864a;
  --primary-600: #cb6f3f;
  --primary-700: #a95636;
  --secondary-50: #fafaf9;
  --secondary-100: #e7e5e4;
  --secondary-200: #d1ccc9;
  --secondary-500: #78716c;
  --secondary-700: #57534e;
  --secondary-800: #4d4845;
  --secondary-900: #292524;
  --text: #1c1917;
  --muted: #78716c;
  --surface: #ffffff;
  --shadow: 0 18px 40px rgba(41, 37, 36, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--secondary-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(209, 204, 201, 0.7);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-900));
  box-shadow: 0 10px 24px rgba(203, 111, 63, 0.35);
}

.brand-name {
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--secondary-700);
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--primary-600);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  padding: 6px;
  border-radius: 999px;
  background: var(--secondary-100);
}

.header-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
}

.header-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-600);
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(203, 111, 63, 0.26);
}

.header-search button:hover,
.primary-btn:hover {
  background: var(--primary-700);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--secondary-100);
  padding: 9px 12px;
  cursor: pointer;
}

main {
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  background: var(--secondary-900);
  color: #fff;
}

.hero-track {
  position: relative;
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.52fr);
  align-items: center;
  gap: 40px;
  width: 100%;
  padding: 96px max(24px, calc((100vw - 1180px) / 2)) 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
  background: radial-gradient(circle at 18% 22%, rgba(217, 134, 74, 0.34), transparent 28%), linear-gradient(120deg, #1c1917, #4d4845 58%, #292524);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.17;
  filter: blur(2px) saturate(1.05);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.64), rgba(28, 25, 23, 0.18));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-500);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 16px 0;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 10px 18px;
  color: #fff;
  font-weight: 700;
}

.ghost-btn.dark {
  color: var(--secondary-900);
  border-color: var(--secondary-200);
}

.hero-poster {
  justify-self: end;
  width: min(340px, 100%);
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
  background: linear-gradient(135deg, var(--secondary-800), var(--primary-600));
}

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

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

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

.hero-dots button.active {
  background: var(--primary-500);
}

.quick-panel,
.content-section,
.split-section,
.table-section,
.category-overview,
.detail-content,
.player-section,
.filter-panel,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.quick-panel a {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quick-panel span {
  color: var(--primary-600);
  font-weight: 800;
}

.quick-panel strong {
  display: block;
  margin-top: 8px;
  color: var(--secondary-900);
}

.content-section,
.split-section,
.table-section,
.category-overview {
  padding: 62px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--secondary-900);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(41, 37, 36, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 42px rgba(41, 37, 36, 0.16);
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--secondary-200), var(--primary-100));
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 18px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent 64%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.poster-mask span {
  border-radius: 999px;
  background: var(--primary-600);
  padding: 8px 14px;
  font-weight: 800;
}

.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(41, 37, 36, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body {
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 14px;
}

.card-body strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: var(--secondary-900);
  font-size: 1rem;
}

.card-body em {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 48px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--secondary-500);
  font-size: 0.82rem;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  padding: 3px 7px;
  font-size: 0.72rem;
}

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

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

.category-card,
.category-overview-head {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-600));
  box-shadow: var(--shadow);
}

.category-card::before,
.category-overview-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--cat-image);
  background-size: cover;
  background-position: center;
  opacity: 0.16;
}

.category-card span,
.category-card strong,
.category-overview-head > * {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  font-size: 1.4rem;
  font-weight: 900;
}

.category-card strong {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.ranking-box {
  align-self: start;
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ranking-box ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-box li + li {
  border-top: 1px solid var(--secondary-100);
}

.ranking-box a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
}

.ranking-box span {
  color: var(--primary-600);
  font-weight: 900;
}

.ranking-box strong,
.ranking-box em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-box em {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: normal;
}

.page-hero {
  padding: 72px max(24px, calc((100vw - 1180px) / 2));
  color: #fff;
  background: radial-gradient(circle at 20% 12%, rgba(217, 134, 74, 0.38), transparent 32%), linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.1rem;
}

.compact-hero {
  padding-top: 54px;
  padding-bottom: 54px;
}

.category-overview-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.filter-panel {
  margin-top: 32px;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.filter-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--secondary-100);
}

.filter-row label.wide-input {
  flex: 1;
}

.filter-row label span {
  color: var(--secondary-700);
  font-weight: 800;
}

.filter-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px;
}

.year-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-buttons button {
  border: 0;
  border-radius: 999px;
  background: var(--secondary-100);
  color: var(--secondary-700);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.year-buttons button.active,
.year-buttons button:hover {
  color: #fff;
  background: var(--primary-600);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 24px 0;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--primary-600);
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  border-radius: 28px;
  padding: 28px;
  color: #fff;
  background: radial-gradient(circle at 16% 10%, rgba(217, 134, 74, 0.42), transparent 30%), linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--secondary-200), var(--primary-100));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

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

.detail-info h1 {
  margin: 14px 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

.detail-info .lead {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.12rem;
}

.player-section {
  padding-top: 36px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(203, 111, 63, 0.3), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.play-cover span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-600);
  box-shadow: 0 20px 50px rgba(203, 111, 63, 0.42);
  font-size: 2rem;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding-top: 42px;
}

.detail-content article,
.detail-content aside {
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-content article + article {
  margin-top: 24px;
}

.detail-content h2 {
  margin: 0 0 12px;
  color: var(--secondary-900);
}

.detail-content p {
  margin: 0;
  color: var(--secondary-700);
}

.detail-content dl {
  margin: 0;
}

.detail-content dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--secondary-100);
}

.detail-content dt {
  color: var(--muted);
}

.detail-content dd {
  margin: 0;
  color: var(--secondary-900);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--secondary-100);
  text-align: left;
}

.ranking-table th {
  color: var(--secondary-900);
  background: var(--primary-100);
}

.ranking-table td:first-child {
  color: var(--primary-600);
  font-weight: 900;
}

.ranking-table a {
  font-weight: 800;
}

.ranking-table a:hover {
  color: var(--primary-600);
}

.site-footer {
  margin-top: 72px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--secondary-900);
}

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

.footer-inner strong {
  color: #fff;
}

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

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

.footer-links a:hover {
  color: var(--primary-500);
}

.is-filter-hidden {
  display: none;
}

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

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

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

  .hero-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 14px 0;
  }

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

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

  .nav-links.is-open {
    flex-direction: column;
    align-items: flex-start;
    order: 3;
  }

  .header-search.is-open {
    order: 4;
  }

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

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

  .hero-slide {
    min-height: 620px;
    padding: 76px 20px 80px;
  }

  .quick-panel {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

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

  .card-body {
    min-height: 168px;
    padding: 12px;
  }

  .filter-row label {
    width: 100%;
    min-width: 0;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .detail-poster {
    max-width: 260px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }
}
