:root {
  --bg: #faf8f5;
  --paper: #ffffff;
  --ink: #1c1917;
  --muted: #6b625c;
  --soft: #ede7df;
  --line: #e7ded4;
  --primary: #a67c4a;
  --primary-dark: #8a6640;
  --primary-light: #c9aa78;
  --accent: #fff7ed;
  --shadow: 0 24px 70px rgba(52, 43, 34, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(201, 170, 120, 0.22), transparent 32rem),
    linear-gradient(180deg, #fffaf3 0%, var(--bg) 42%, #ffffff 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(231, 222, 212, 0.78);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.05);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-logo-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 28px rgba(166, 124, 74, 0.32);
}

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

.site-nav a,
.mobile-nav a {
  color: #4b433d;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary-dark);
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: white;
}

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

.header-search button,
.primary-button,
.filter-button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-weight: 750;
  cursor: pointer;
}

.header-search button {
  align-self: stretch;
  padding: 0 16px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

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

.hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  border-radius: 30px;
  overflow: hidden;
  min-height: 640px;
  background: #1c1917;
  box-shadow: var(--shadow);
}

.hero-viewport,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: scale(1.015);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 25, 23, 0.95) 0%, rgba(28, 25, 23, 0.74) 44%, rgba(28, 25, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(28, 25, 23, 0.68), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 48px));
  min-height: 640px;
  padding: 76px 0 76px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f5ddbb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.hero-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

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

.primary-button,
.ghost-button,
.filter-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button:hover,
.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(138, 102, 64, 0.25);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-tags span {
  color: #ffe8c7;
  background: rgba(255, 255, 255, 0.14);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 64px;
  bottom: 42px;
  display: flex;
  gap: 10px;
}

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

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

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

.content-section,
.page-hero,
.player-panel,
.detail-card,
.search-panel,
.category-panel {
  margin-top: 34px;
}

.page-hero,
.search-panel,
.category-panel {
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.78)),
    var(--paper);
  box-shadow: 0 18px 50px rgba(52, 43, 34, 0.08);
}

.page-hero h1,
.search-panel h1,
.category-panel h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p,
.search-panel p,
.category-panel p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.035em;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(52, 43, 34, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(166, 124, 74, 0.45);
  box-shadow: 0 24px 56px rgba(52, 43, 34, 0.12);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1c1917;
}

.movie-card.large .movie-poster {
  aspect-ratio: 21 / 9;
}

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

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

.movie-play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(28, 25, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2,
.movie-card h3,
.movie-card h4 {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a,
.movie-card h3 a,
.movie-card h4 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.movie-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #f6efe6;
  font-size: 12px;
  font-weight: 750;
}

.movie-category-link {
  width: fit-content;
  margin-top: auto;
  padding-top: 14px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

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

.category-card {
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 170, 120, 0.24), transparent 18rem),
    white;
  box-shadow: 0 14px 36px rgba(52, 43, 34, 0.07);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(166, 124, 74, 0.46);
}

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

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  margin-top: 20px;
  color: var(--primary-dark);
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  outline: 0;
}

.filter-bar input {
  min-width: min(360px, 100%);
  flex: 1;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 30px rgba(52, 43, 34, 0.06);
}

.rank-number {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #1c1917;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-copy h2,
.rank-copy h3 {
  margin: 0;
  font-size: 20px;
}

.rank-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 26px;
  align-items: start;
  margin-top: 34px;
}

.player-panel,
.detail-card,
.side-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 18px 50px rgba(52, 43, 34, 0.08);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.1));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 84px;
  height: 84px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.player-button::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 24px solid white;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f6efe6;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.detail-card h2,
.side-card h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-card p {
  color: #4b433d;
  font-size: 16px;
  line-height: 1.9;
}

.side-card {
  padding: 20px;
}

.side-card .movie-card {
  box-shadow: none;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 14px;
}

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

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.site-footer {
  margin-top: 58px;
  background: #1c1917;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: white;
  font-size: 20px;
}

.site-footer p {
  max-width: 480px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 16px;
}

.site-footer a {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.68);
}

.site-footer a:hover {
  color: #f5ddbb;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.empty-state {
  display: none;
  margin-top: 22px;
  padding: 22px;
  border-radius: 18px;
  background: white;
  color: var(--muted);
}

.empty-state.is-visible {
  display: block;
}

@media (max-width: 1080px) {
  .site-nav,
  .header-search {
    display: none;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .search-results {
    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: 760px) {
  .site-header-inner {
    min-height: 64px;
  }

  .hero {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    width: calc(100% - 34px);
    min-height: 560px;
    padding: 44px 0 76px 24px;
  }

  .hero-dots {
    left: 24px;
    bottom: 30px;
  }

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

  .rank-item {
    grid-template-columns: 46px 92px minmax(0, 1fr);
  }

  .rank-item .primary-button {
    grid-column: 1 / -1;
  }

  .rank-number {
    width: 42px;
    height: 42px;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.compact,
  .search-results,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .search-panel,
  .category-panel,
  .detail-card {
    padding: 22px;
    border-radius: 22px;
  }
}
