:root {
  --brown-950: #2d2118;
  --brown-900: #3d2b1f;
  --brown-800: #5a442c;
  --brown-700: #6d5336;
  --brown-600: #8a653f;
  --beige-50: #fdfbf7;
  --beige-100: #f9f5ed;
  --beige-200: #efe4d2;
  --beige-300: #dec69c;
  --beige-500: #d0b784;
  --green-600: #5d8a49;
  --ink: #1f2933;
  --muted: #697386;
  --line: rgba(90, 68, 44, 0.15);
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(61, 43, 31, 0.16);
  --shadow-soft: 0 10px 25px rgba(61, 43, 31, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--beige-100);
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--brown-800), var(--brown-950));
  box-shadow: 0 12px 35px rgba(45, 33, 24, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-logo {
  font-size: 24px;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--brown-900);
  background: linear-gradient(135deg, var(--beige-200), var(--beige-500));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: #fff;
  background: var(--brown-950);
}

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

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

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.08);
  filter: blur(2px) saturate(0.9);
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 24%, rgba(208, 183, 132, 0.38), transparent 32%),
    linear-gradient(90deg, rgba(45, 33, 24, 0.96), rgba(61, 43, 31, 0.78) 46%, rgba(45, 33, 24, 0.42)),
    linear-gradient(0deg, rgba(45, 33, 24, 0.68), rgba(45, 33, 24, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
  align-items: center;
  min-height: 640px;
  padding: 84px 0 140px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.84);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--beige-500);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-meta span,
.detail-meta span,
.tag-cloud span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 13px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--brown-950);
  background: linear-gradient(135deg, var(--beige-200), var(--beige-500));
  box-shadow: 0 12px 26px rgba(208, 183, 132, 0.24);
}

.btn.ghost,
.btn.light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.11);
}

.btn.ghost-dark {
  color: var(--brown-800);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.btn.text {
  min-height: 46px;
  padding: 0 4px;
  color: #fff;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brown-800), var(--beige-300));
}

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

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--beige-500);
}

.hero-search {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-search input,
.hero-search button {
  border: 0;
  border-radius: 16px;
}

.hero-search input {
  min-width: 0;
  padding: 14px 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
  outline: none;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.hero-search button {
  padding: 0 22px;
  color: var(--brown-950);
  font-weight: 900;
  background: var(--beige-500);
  cursor: pointer;
}

.section {
  padding: 86px 0;
  background: var(--beige-100);
}

.section-light {
  background: linear-gradient(180deg, #fff, var(--beige-100));
}

.section-brown {
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(208, 183, 132, 0.22), transparent 30%),
    linear-gradient(135deg, var(--brown-900), var(--brown-950));
}

.section-head {
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0;
  color: var(--brown-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--muted);
}

.light-head h2,
.light-head p {
  color: #fff;
}

.split-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(90, 68, 44, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card-link:hover {
  border-color: rgba(138, 101, 63, 0.36);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.movie-poster {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brown-700), var(--beige-300));
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

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

.movie-title {
  color: var(--brown-900);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta,
.movie-desc {
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.movie-tags span {
  padding: 4px 8px;
  color: var(--brown-700);
  font-size: 12px;
  background: var(--beige-100);
}

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

.category-tile,
.category-panel {
  border: 1px solid rgba(90, 68, 44, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.category-tile {
  display: flex;
  min-height: 218px;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.category-tile span {
  color: var(--green-600);
  font-size: 13px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--brown-900);
  font-size: 22px;
}

.category-tile em,
.category-tile small {
  color: var(--muted);
  font-style: normal;
}

.category-tile small {
  margin-top: auto;
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  color: #fff;
  background:
    radial-gradient(circle at 15% 18%, rgba(208, 183, 132, 0.32), transparent 28%),
    linear-gradient(135deg, var(--brown-800), var(--brown-950));
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.category-panels {
  display: grid;
  gap: 28px;
}

.category-panel {
  padding: 26px;
}

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

.category-panel h2 {
  margin: 0;
  color: var(--brown-900);
  font-size: 30px;
}

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

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

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 18px;
  border: 1px solid rgba(90, 68, 44, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.filter-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 14px;
}

.filter-main label {
  display: grid;
  gap: 6px;
  color: var(--brown-800);
  font-size: 13px;
  font-weight: 900;
}

.filter-main input,
.filter-main select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(90, 68, 44, 0.18);
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.filter-main input:focus,
.filter-main select:focus {
  border-color: var(--brown-600);
  box-shadow: 0 0 0 4px rgba(208, 183, 132, 0.28);
}

.empty-state {
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 48px 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(90, 68, 44, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.section-brown .rank-row a {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--brown-950);
  font-weight: 900;
  background: var(--beige-500);
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brown-700), var(--beige-300));
}

.rank-cover img {
  width: 58px;
  height: 72px;
  object-fit: cover;
}

.rank-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  color: var(--brown-900);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-brown .rank-info strong {
  color: #fff;
}

.rank-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-brown .rank-info em {
  color: rgba(255, 255, 255, 0.7);
}

.rank-score {
  color: var(--green-600);
  font-weight: 900;
  white-space: nowrap;
}

.section-brown .rank-score {
  color: var(--beige-500);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--brown-950);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  min-height: 560px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brown-700), var(--beige-300));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-cloud span {
  padding: 7px 11px;
  color: var(--brown-950);
  background: var(--beige-500);
}

.player-section {
  display: grid;
  gap: 18px;
}

.compact-head {
  margin-bottom: 0;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12));
}

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

.play-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  color: var(--brown-950);
  font-size: 30px;
  background: var(--beige-500);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.detail-body {
  display: grid;
  gap: 24px;
}

.story-card {
  padding: 34px;
  border: 1px solid rgba(90, 68, 44, 0.13);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.story-card h2 {
  margin: 0 0 18px;
  color: var(--brown-900);
  font-size: 34px;
  line-height: 1.18;
}

.story-card p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 17px;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.site-footer {
  color: rgba(255, 255, 255, 0.76);
  background: var(--brown-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo {
  color: #fff;
  font-size: 24px;
}

.site-footer p {
  max-width: 460px;
  margin: 12px 0 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.center-actions {
  justify-content: center;
}

[hidden] {
  display: none !important;
}

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 68px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(45, 33, 24, 0.98);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

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

  .hero {
    min-height: 820px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: 720px;
    padding-top: 54px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    transform: rotate(0);
  }

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

  .split-head,
  .category-panel-head {
    align-items: start;
    flex-direction: column;
  }

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

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

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

  .detail-poster {
    width: min(280px, 76vw);
  }

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

@media (max-width: 640px) {
  .container,
  .filter-panel {
    width: min(100% - 22px, 1180px);
  }

  .site-logo {
    font-size: 19px;
  }

  .section {
    padding: 56px 0;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

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

  .movie-card-content {
    padding: 13px;
  }

  .rank-row a {
    grid-template-columns: 42px 52px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }

  .story-card,
  .category-panel {
    padding: 22px;
  }

  .player-shell {
    border-radius: 18px;
  }
}

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

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
