:root {
  --bg: #fffbeb;
  --surface: #ffffff;
  --surface-warm: #fef3c7;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fde68a;
  --gold: #ca8a04;
  --gold-dark: #92400e;
  --amber: #78350f;
  --shadow: 0 24px 70px rgba(120, 53, 15, 0.18);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 38%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #78350f 0%, #a16207 46%, #78350f 100%);
  box-shadow: 0 14px 30px rgba(68, 32, 4, 0.25);
}

.site-nav-shell {
  width: min(100%, var(--max));
  min-height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fffbeb;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

.site-logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #facc15);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 18px rgba(0, 0, 0, .18);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(254, 243, 199, .35);
  color: #fffbeb;
  background: rgba(255, 255, 255, .08);
  border-radius: 12px;
  cursor: pointer;
}

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

.nav-link {
  color: rgba(255, 251, 235, .86);
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: color .22s ease, background .22s ease, transform .22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(250, 204, 21, .22);
  transform: translateY(-1px);
}

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

.nav-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(202, 138, 4, .28);
  outline: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  color: var(--text);
  transition: box-shadow .22s ease, border-color .22s ease;
}

.nav-search input {
  width: 190px;
  padding: 10px 13px;
}

.nav-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, .22);
}

.nav-search button,
.search-page-form button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: #ca8a04;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  transition: transform .22s ease, background .22s ease;
}

.nav-search button:hover,
.search-page-form button:hover {
  background: #eab308;
  transform: translateY(-1px);
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #451a03;
}

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

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

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-overlay {
  background:
    radial-gradient(circle at 15% 15%, rgba(250, 204, 21, .38), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .58) 46%, rgba(0, 0, 0, .16) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .78), transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  min-height: 620px;
  margin: 0 auto;
  padding: 120px 20px 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.section-head p,
.rank-panel-head p,
.page-hero p {
  color: #facc15;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 12px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  text-shadow: 0 18px 45px rgba(0, 0, 0, .45);
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 19px;
}

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

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  color: #fff7ed;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-meta,
.detail-meta,
.movie-meta-line,
.movie-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta {
  margin-top: 18px;
  color: rgba(255, 255, 255, .88);
  font-weight: 800;
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #ca8a04, #eab308);
  box-shadow: 0 18px 36px rgba(202, 138, 4, .32);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(14px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #facc15;
}

.category-strip {
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(202, 138, 4, .12);
  backdrop-filter: blur(14px);
}

.category-strip-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.category-strip a {
  flex: 0 0 auto;
  color: var(--gold-dark);
  background: #fff7ed;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(202, 138, 4, .12);
}

.content-section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 58px 20px;
}

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

.section-head p,
.rank-panel-head p {
  margin: 0 0 4px;
  font-size: 13px;
}

.section-head h2,
.rank-panel-head h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 950;
}

.section-head a,
.compact-head a {
  color: var(--gold-dark);
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(251, 191, 36, .2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(120, 53, 15, .12);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(234, 179, 8, .42);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #facc15);
}

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

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

.cover-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(0, 0, 0, .72), transparent);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #78350f;
  background: #facc15;
  border-radius: 999px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, .28);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #78350f;
  background: #facc15;
  border-radius: 12px;
  font-weight: 950;
}

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

.movie-meta-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 8px 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card h2 a:hover {
  color: var(--gold-dark);
}

.movie-card p {
  min-height: 46px;
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.movie-card-foot {
  justify-content: space-between;
  margin-top: 14px;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 900;
}

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

.rank-panel {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(251, 191, 36, .22);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.sticky-panel {
  position: sticky;
  top: 92px;
}

.rank-panel-head {
  margin-bottom: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(251, 191, 36, .24);
}

.rank-row:first-of-type {
  border-top: 0;
}

.rank-row img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-number {
  color: var(--gold-dark);
  font-weight: 950;
}

.rank-row-main {
  min-width: 0;
}

.rank-row-main strong,
.rank-row-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row-main strong {
  color: #111827;
  font-size: 15px;
}

.rank-row-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-score {
  color: #ca8a04;
  font-weight: 950;
}

.category-preview-wrap {
  display: grid;
  gap: 30px;
}

.category-preview {
  padding: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(254, 243, 199, .72));
  border: 1px solid rgba(251, 191, 36, .24);
  border-radius: 30px;
  box-shadow: 0 18px 48px rgba(120, 53, 15, .1);
}

.compact-head {
  margin-bottom: 20px;
}

.page-hero {
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  margin-bottom: 10px;
}

.slim-hero {
  background: linear-gradient(120deg, #78350f, #a16207, #ca8a04);
}

.page-hero > div {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 96px 20px 54px;
}

.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.1;
  font-weight: 950;
}

.page-hero span {
  display: block;
  max-width: 760px;
  color: rgba(255, 255, 255, .9);
  font-size: 18px;
}

.hero-inline-btn {
  margin-top: 24px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(251, 191, 36, .24);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 42px rgba(120, 53, 15, .12);
}

.category-tile-main span {
  color: #ca8a04;
  font-weight: 950;
}

.category-tile-main h2 {
  margin: 8px 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.category-tile-main p {
  margin: 0;
  color: var(--muted);
}

.category-tile-links {
  display: grid;
  gap: 8px;
  align-content: center;
}

.category-tile-links a {
  color: var(--gold-dark);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.filter-panel,
.search-page-form {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-panel {
  grid-template-columns: minmax(0, 1fr) 160px 160px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  width: 100%;
  padding: 13px 15px;
}

.search-page-form {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.detail-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 28px 20px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--gold-dark);
}

.player-section {
  border-radius: 30px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(120, 53, 15, .94), rgba(202, 138, 4, .72));
  box-shadow: 0 30px 80px rgba(120, 53, 15, .24);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000000;
}

.player-poster {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
}

.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .74;
}

.player-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(250, 204, 21, .26), rgba(0, 0, 0, .48));
}

.player-pulse {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #78350f;
  background: #facc15;
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 0 0 16px rgba(250, 204, 21, .18), 0 20px 50px rgba(0, 0, 0, .38);
}

.player-wrap.is-playing .player-poster {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: start;
  padding: 42px 0 12px;
}

.detail-main,
.detail-side {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(251, 191, 36, .22);
  border-radius: 30px;
  box-shadow: 0 18px 42px rgba(120, 53, 15, .1);
}

.detail-main {
  padding: 34px;
}

.detail-main h1 {
  margin: 8px 0 14px;
  color: #111827;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  font-weight: 950;
}

.detail-lead {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 19px;
}

.detail-meta {
  color: var(--gold-dark);
  font-weight: 900;
  margin: 0 0 20px;
}

.detail-tags span {
  color: #78350f;
  background: #fffbeb;
  border-color: #fde68a;
}

.detail-article {
  margin-top: 28px;
}

.detail-article h2 {
  margin: 28px 0 12px;
  color: #111827;
  font-size: 26px;
  line-height: 1.25;
}

.detail-article p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 92px;
  padding: 16px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
}

.full-btn {
  width: 100%;
  margin-top: 16px;
}

.related-section {
  padding-top: 26px;
}

.site-footer {
  margin-top: 42px;
  color: #fffbeb;
  background: linear-gradient(135deg, #451a03, #78350f 54%, #92400e);
}

.footer-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  font-size: 22px;
}

.footer-brand p {
  max-width: 520px;
  color: rgba(255, 251, 235, .76);
}

.footer-links {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: #facc15;
  font-size: 16px;
}

.footer-links a {
  color: rgba(255, 251, 235, .78);
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(254, 243, 199, .14);
  padding: 18px 20px;
  text-align: center;
  color: rgba(255, 251, 235, .72);
}

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

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

  .rank-panel,
  .detail-side,
  .sticky-panel {
    position: static;
  }

  .category-tile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-nav-shell {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding-top: 12px;
  }

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

  .nav-link {
    width: 100%;
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 120px 18px 86px;
  }

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

  .filter-panel,
  .search-page-form {
    grid-template-columns: 1fr;
  }

  .category-tile {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .site-logo {
    font-size: 18px;
  }

  .hero-tags,
  .hero-meta,
  .detail-tags,
  .detail-meta {
    gap: 8px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .content-section {
    padding: 42px 14px;
  }

  .movie-grid,
  .catalog-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .detail-shell {
    padding: 20px 14px 0;
  }

  .detail-main {
    padding: 24px;
  }

  .player-section {
    border-radius: 22px;
    padding: 6px;
  }

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