:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --panel-line: #44403c;
  --text: #fafaf9;
  --muted: #a8a29e;
  --muted-deep: #78716c;
  --brand: #d97706;
  --brand-strong: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --radius: 18px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(217, 119, 6, .16), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, .94);
  border-bottom: 1px solid rgba(68, 64, 60, .9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 22px;
  align-items: center;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-strong), #b45309);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(217, 119, 6, .28);
}

.brand-main {
  color: #fffbeb;
  font-size: 20px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand-sub {
  color: var(--muted-deep);
  font-size: 12px;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.nav-link {
  color: #d6d3d1;
  font-weight: 650;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-strong);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
}

.header-search input,
.mobile-panel input,
.big-search input,
.filter-panel input,
.search-page-form input {
  width: 100%;
  color: #f5f5f4;
  background: #292524;
  border: 1px solid #44403c;
  border-radius: 12px;
  outline: none;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.big-search input:focus,
.filter-panel input:focus,
.search-page-form input:focus {
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}

.header-search button,
.big-search button,
.search-page-form button,
.mobile-panel button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  cursor: pointer;
  background: var(--brand);
  transition: transform .2s ease, background .2s ease;
}

.header-search button:hover,
.big-search button:hover,
.search-page-form button:hover,
.mobile-panel button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  color: #f5f5f4;
  background: #292524;
  border: 1px solid #44403c;
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #44403c;
  padding: 16px;
  background: #1c1917;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav,
.mobile-panel form {
  display: grid;
  gap: 10px;
  width: min(100%, 720px);
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: clamp(680px, 86vh, 900px);
  overflow: hidden;
  background: #0c0a09;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .72s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .42;
  filter: saturate(1.08) contrast(1.05);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, .96) 0%, rgba(12, 10, 9, .74) 44%, rgba(12, 10, 9, .42) 100%), linear-gradient(0deg, #0c0a09 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 360px;
  align-items: center;
  gap: 56px;
  height: 100%;
  padding-top: 80px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero h2 {
  margin: 22px 0 14px;
  color: #fffbeb;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
}

.hero p,
.page-hero p,
.detail-line {
  max-width: 760px;
  color: #d6d3d1;
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  color: #fffbeb;
  background: rgba(217, 119, 6, .18);
  border: 1px solid rgba(245, 158, 11, .36);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  box-shadow: 0 16px 36px rgba(217, 119, 6, .28);
}

.btn.ghost {
  color: #f5f5f4;
  border: 1px solid rgba(168, 162, 158, .34);
  background: rgba(28, 25, 23, .72);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, .26);
  border-radius: 28px;
  background: #1c1917;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: #fff;
  background: rgba(217, 119, 6, .86);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--brand-strong);
}

.intro-band,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #1c1917, #0c0a09);
}

.intro-band {
  padding: 44px 0;
  border-top: 1px solid rgba(68, 64, 60, .7);
  border-bottom: 1px solid rgba(68, 64, 60, .7);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 28px;
  align-items: center;
}

.intro-grid h2,
.section-head h2,
.detail-text h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.intro-grid p,
.section-head p,
.detail-text p,
.category-card-large p {
  color: var(--muted);
}

.big-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.section {
  padding: 70px 0 0;
}

.section-head {
  margin-bottom: 24px;
  text-align: center;
}

.section-head.left {
  text-align: left;
}

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

.category-tile,
.category-card-large {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(68, 64, 60, .76);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(41, 37, 36, .96), rgba(28, 25, 23, .96));
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.category-tile:hover,
.category-card-large:hover {
  border-color: rgba(245, 158, 11, .5);
  background: linear-gradient(180deg, rgba(120, 53, 15, .92), rgba(41, 37, 36, .96));
  transform: translateY(-3px);
}

.category-tile strong,
.category-card-large h2 {
  color: #fff;
  font-size: 20px;
}

.category-tile span,
.category-card-large p {
  color: var(--muted);
  font-size: 14px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, .68);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, .96);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .22);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, .48);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .34);
  transform: translateY(-5px);
}

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #000;
}

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

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

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

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: rgba(217, 119, 6, .88);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(.84);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.movie-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, .66);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  padding: 5px 8px;
  text-align: center;
  background: rgba(217, 119, 6, .92);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--brand-strong);
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted-deep);
  font-size: 12px;
}

.tag-row span {
  padding: 3px 8px;
  font-size: 11px;
}

.page-hero.compact {
  padding: 76px 0 50px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.crumb a:hover {
  color: var(--brand-strong);
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons button {
  color: #f5f5f4;
  border: 1px solid #44403c;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  background: #292524;
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
  border-color: var(--brand-strong);
  background: var(--brand);
}

.category-card-large {
  min-height: 230px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mini-links a {
  color: #fffbeb;
  background: rgba(0, 0, 0, .22);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.detail-hero {
  min-height: 560px;
  padding: 84px 0 60px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: .22;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.08);
  transform: scale(1.04);
}

.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #0c0a09 0%, rgba(12, 10, 9, .82) 54%, rgba(12, 10, 9, .66));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, .26);
  border-radius: 26px;
  background: #1c1917;
  box-shadow: var(--shadow);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  color: #e7e5e4;
}

.detail-meta span {
  background: rgba(41, 37, 36, .84);
  border: 1px solid rgba(68, 64, 60, .9);
  border-radius: 999px;
  padding: 7px 12px;
}

.detail-tags {
  margin-bottom: 26px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, .86);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .76));
  transition: opacity .2s ease, visibility .2s ease;
}

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

.player-play {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 4px;
  color: #fff;
  background: rgba(217, 119, 6, .92);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(217, 119, 6, .28);
  font-size: 34px;
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 42px);
}

.player-cover em {
  color: #fffbeb;
  font-style: normal;
}

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

.detail-columns article {
  padding: 26px;
  border: 1px solid rgba(68, 64, 60, .74);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, .92);
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid rgba(68, 64, 60, .86);
  background: #1c1917;
}

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

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

.footer-grid p,
.footer-bottom {
  color: var(--muted);
}

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

.footer-links a:hover {
  color: var(--brand-strong);
}

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(68, 64, 60, .7);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: none;
  width: 46px;
  height: 46px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: var(--brand);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

.back-top.is-visible {
  display: block;
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 90px;
  }

  .hero-poster {
    display: none;
  }

  .movie-grid,
  .movie-grid.wide,
  .movie-grid.related,
  .ranking-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .brand-sub {
    display: none;
  }

  .hero {
    min-height: 720px;
  }

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

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

  .movie-grid,
  .movie-grid.wide,
  .movie-grid.related,
  .ranking-strip,
  .category-grid,
  .category-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, var(--max));
  }

  .brand-main {
    font-size: 17px;
  }

  .hero {
    min-height: 680px;
  }

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

  .hero p,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

  .big-search,
  .search-page-form {
    display: grid;
  }

  .section {
    padding-top: 52px;
  }

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

  .movie-card h3 {
    font-size: 14px;
  }
}
