:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --bg-card: #292524;
  --line: #44403c;
  --line-soft: rgba(120, 113, 108, 0.35);
  --text: #fafaf9;
  --muted: #a8a29e;
  --weak: #78716c;
  --amber: #d97706;
  --amber-bright: #f59e0b;
  --amber-soft: rgba(217, 119, 6, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(217, 119, 6, 0.18), transparent 34rem), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 10, 9, 0.86);
  border-bottom: 1px solid rgba(68, 64, 60, 0.6);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber-bright), #7c2d12);
  box-shadow: 0 12px 32px rgba(217, 119, 6, 0.32);
  font-weight: 900;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  color: #fffbeb;
  font-size: 20px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-bright);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(41, 37, 36, 0.76);
  border: 1px solid rgba(87, 83, 78, 0.72);
  border-radius: 14px;
  padding: 6px;
}

.header-search input,
.filter-bar input,
.filter-bar select {
  background: transparent;
  color: var(--text);
  border: 0;
  outline: none;
}

.header-search input {
  width: 210px;
  padding: 8px 10px;
}

.header-search button,
.primary-btn,
.secondary-btn,
.play-cover button {
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-btn,
.play-cover button {
  background: linear-gradient(135deg, var(--amber-bright), var(--amber));
  padding: 10px 18px;
  font-weight: 800;
}

.secondary-btn {
  border: 1px solid rgba(245, 158, 11, 0.36);
  background: rgba(41, 37, 36, 0.74);
  padding: 10px 18px;
  font-weight: 750;
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.play-cover button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  background: rgba(41, 37, 36, 0.92);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.92), rgba(12, 10, 9, 1));
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 480px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24), transparent 62%);
  pointer-events: none;
}

.hero-slide {
  display: none;
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 64px;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 54px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.7s ease both;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fde68a;
  background: rgba(217, 119, 6, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin: 22px 0;
  color: #fff7ed;
}

.hero p {
  color: #d6d3d1;
  font-size: 18px;
  line-height: 1.9;
  max-width: 740px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.movie-meta span,
.detail-meta span {
  border: 1px solid rgba(120, 113, 108, 0.4);
  background: rgba(28, 25, 23, 0.68);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-poster {
  position: relative;
  z-index: 2;
  transform: rotate(2deg);
}

.hero-poster::before,
.hero-poster::after {
  content: "";
  position: absolute;
  border-radius: 34px;
  background: rgba(217, 119, 6, 0.2);
  inset: 32px -24px -24px 24px;
  z-index: -1;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  border-radius: 34px;
  border: 1px solid rgba(255, 251, 235, 0.14);
  box-shadow: var(--shadow);
}

.hero-poster-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  background: rgba(12, 10, 9, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 18px;
  padding: 12px 16px;
  backdrop-filter: blur(12px);
}

.hero-controls {
  width: min(1280px, calc(100% - 32px));
  margin: -38px auto 0;
  position: relative;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(214, 211, 209, 0.3);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--amber-bright);
}

.main-wrap,
.page-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-wrap {
  padding: 42px 0 72px;
}

.section {
  padding: 54px 0 10px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #fff7ed;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p,
.page-title p,
.detail-intro,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--amber-bright);
  font-weight: 800;
}

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

.movie-card {
  background: rgba(28, 25, 23, 0.82);
  border: 1px solid rgba(87, 83, 78, 0.45);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(41, 37, 36, 0.92);
}

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  opacity: 0;
  transition: opacity 0.24s ease;
}

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

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 12px;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.8);
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.9);
  color: white;
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.35;
  color: #fffbeb;
}

.movie-card h3 a:hover {
  color: var(--amber-bright);
}

.movie-line {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  color: #fed7aa;
  background: rgba(217, 119, 6, 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(120, 113, 108, 0.36);
  background: linear-gradient(145deg, rgba(41, 37, 36, 0.98), rgba(28, 25, 23, 0.7));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.48);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: #fffbeb;
}

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

.category-card span {
  color: var(--amber-bright);
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 74px 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(87, 83, 78, 0.44);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.78);
}

.rank-num {
  color: var(--amber-bright);
  font-weight: 900;
  font-size: 26px;
  text-align: center;
}

.rank-item img {
  width: 78px;
  aspect-ratio: 2 / 2.82;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item h3 {
  margin: 0 0 8px;
}

.rank-item p {
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.score-pill {
  color: #fde68a;
  background: rgba(217, 119, 6, 0.16);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin: 28px 0;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(87, 83, 78, 0.72);
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.88);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--weak);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: #d6d3d1;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 44px;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 251, 235, 0.12);
  box-shadow: var(--shadow);
}

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

.detail-title h1,
.page-title h1 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
}

.detail-intro {
  font-size: 18px;
  margin: 20px 0;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(120, 113, 108, 0.48);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  margin: 34px 0 44px;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.68));
  cursor: pointer;
}

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

.play-cover button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  padding: 14px 26px;
}

.article-block {
  display: grid;
  gap: 20px;
  margin: 34px 0;
}

.article-card {
  padding: 26px;
  border: 1px solid rgba(87, 83, 78, 0.44);
  border-radius: 24px;
  background: rgba(28, 25, 23, 0.78);
}

.article-card h2 {
  margin: 0 0 12px;
  color: #fffbeb;
}

.article-card p {
  margin: 0;
  color: #d6d3d1;
  line-height: 1.95;
}

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

.mini-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(87, 83, 78, 0.44);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.78);
  overflow: hidden;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 2.82;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.mini-card strong,
.mini-card small {
  display: block;
}

.mini-card small {
  color: var(--muted);
  margin-top: 4px;
}

.site-footer {
  border-top: 1px solid rgba(68, 64, 60, 0.68);
  background: rgba(28, 25, 23, 0.86);
  margin-top: 48px;
}

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

.footer-brand {
  color: #fffbeb;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid h3 {
  color: #fffbeb;
  margin: 0 0 14px;
}

.footer-links {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--amber-bright);
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  color: var(--weak);
  border-top: 1px solid rgba(68, 64, 60, 0.5);
}

.empty-result {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background: rgba(28, 25, 23, 0.78);
  border: 1px solid rgba(87, 83, 78, 0.44);
  border-radius: 20px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 46px 0 62px;
  }

  .hero-poster {
    transform: none;
    max-width: 340px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .detail-cover {
    max-width: 320px;
  }

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

  .score-pill {
    display: none;
  }

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

@media (max-width: 520px) {
  .header-inner {
    height: 66px;
  }

  .brand-copy small {
    display: none;
  }

  .movie-grid,
  .related-grid {
    gap: 12px;
  }

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

  .movie-line {
    min-height: auto;
  }

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

  .primary-btn,
  .secondary-btn {
    text-align: center;
  }
}
