:root {
  --ancient-950: #05070b;
  --ancient-930: #080c13;
  --ancient-900: #0d121c;
  --ancient-850: #111827;
  --ancient-800: #1f2937;
  --ancient-700: #374151;
  --ancient-600: #4b5563;
  --ancient-500: #6b7280;
  --ancient-400: #9ca3af;
  --ancient-300: #d1d5db;
  --ancient-200: #e5e7eb;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;
  --bronze-900: #3b2411;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-xl: 0 24px 80px rgba(0, 0, 0, .38);
  --shadow-card: 0 18px 40px rgba(0, 0, 0, .25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, .18), transparent 28rem),
    linear-gradient(180deg, #05070b 0%, #080c13 46%, #05070b 100%);
  color: var(--ancient-200);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 11, .92);
  border-bottom: 1px solid rgba(55, 65, 81, .5);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 800;
  color: var(--amber-400);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #161006;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 12px 32px rgba(245, 158, 11, .28);
  font-size: 22px;
  font-family: Georgia, "Times New Roman", serif;
}

.brand-text {
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 24px;
  letter-spacing: .02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ancient-200);
  font-weight: 600;
  white-space: nowrap;
}

.nav-link {
  color: var(--ancient-200);
  transition: color .2s ease, transform .2s ease;
}

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

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
}

.site-search input,
.filter-panel input,
.filter-panel select,
.search-hero input {
  width: 100%;
  color: var(--ancient-100);
  border: 1px solid rgba(75, 85, 99, .9);
  border-radius: 12px;
  background: rgba(13, 18, 28, .76);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.site-search input {
  padding: 11px 14px;
}

.site-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-hero input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}

.site-search button,
.search-hero button,
.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.site-search button,
.search-hero button,
.btn-primary {
  color: #140d05;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 12px 28px rgba(245, 158, 11, .25);
}

.site-search button {
  padding: 11px 16px;
}

.site-search button:hover,
.search-hero button:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--amber-300);
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .35);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(75, 85, 99, .8);
  border-radius: 12px;
  color: var(--ancient-200);
  background: rgba(13, 18, 28, .8);
  font-size: 24px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(55, 65, 81, .45);
}

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

.mobile-search {
  min-width: 0;
}

.hero {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  background: var(--ancient-950);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 11, .94) 0%, rgba(5, 7, 11, .74) 42%, rgba(5, 7, 11, .25) 100%),
    linear-gradient(0deg, var(--ancient-950) 0%, rgba(5, 7, 11, .48) 35%, rgba(5, 7, 11, .12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 68vh;
  padding: 80px 0 70px;
}

.hero-panel {
  max-width: 720px;
  animation: fadeUp .6s ease both;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-300);
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 78px);
}

.hero p {
  max-width: 660px;
  margin: 0 0 22px;
  color: var(--ancient-200);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--ancient-300);
}

.hero-meta span,
.detail-meta span,
.card-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(31, 41, 55, .72);
  border: 1px solid rgba(75, 85, 99, .55);
}

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

.hero-actions a,
.detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(156, 163, 175, .72);
  transition: width .2s ease, background .2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--amber-500);
}

.main-space {
  padding: 58px 0 0;
}

.section-block {
  margin-bottom: 72px;
}

.section-title {
  margin-bottom: 28px;
}

.section-title h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 8px;
  color: var(--amber-400);
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(26px, 3.5vw, 38px);
}

.section-title h2:before {
  content: "";
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: var(--amber-500);
  box-shadow: 0 0 18px rgba(245, 158, 11, .5);
}

.section-title p {
  margin: 0;
  color: var(--ancient-400);
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(55, 65, 81, .75);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 24, 39, .86), rgba(13, 18, 28, .92));
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #030712);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .32s ease, filter .32s ease;
}

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

.poster-link:after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(5, 7, 11, .86), transparent);
}

.score-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  color: #160f05;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
}

.card-body {
  padding: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 8px;
}

.card-tags span {
  color: var(--amber-300);
  font-size: 12px;
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--ancient-300);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
  color: var(--ancient-400);
  font-size: 13px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 155px;
  border: 1px solid rgba(55, 65, 81, .75);
  border-radius: var(--radius-lg);
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, .2), transparent 9rem),
    linear-gradient(135deg, rgba(17, 24, 39, .84), rgba(13, 18, 28, .92));
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, border-color .2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  color: var(--amber-400);
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--ancient-300);
  line-height: 1.65;
}

.page-hero {
  border-bottom: 1px solid rgba(55, 65, 81, .5);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, .18), transparent 22rem),
    linear-gradient(135deg, rgba(13, 18, 28, .96), rgba(5, 7, 11, .98));
}

.page-hero-inner {
  padding: 62px 0 56px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

.page-hero p {
  max-width: 850px;
  margin: 0;
  color: var(--ancient-300);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel,
.search-hero {
  display: grid;
  gap: 16px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid rgba(55, 65, 81, .7);
  border-radius: var(--radius-lg);
  background: rgba(13, 18, 28, .76);
  box-shadow: var(--shadow-card);
}

.filter-panel {
  grid-template-columns: 1fr 210px;
}

.filter-panel input,
.filter-panel select,
.search-hero input {
  min-height: 48px;
  padding: 0 14px;
}

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

.search-hero button {
  min-width: 120px;
  min-height: 48px;
  padding: 0 20px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 78px 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(55, 65, 81, .75);
  border-radius: 18px;
  padding: 12px 16px;
  background: rgba(13, 18, 28, .82);
  transition: border-color .2s ease, transform .2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, .58);
}

.rank-index {
  color: var(--amber-400);
  font-size: 26px;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
}

.rank-poster {
  width: 68px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--ancient-300);
  line-height: 1.6;
}

.rank-meta {
  font-size: 13px;
  color: var(--ancient-400);
}

.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 40px;
  color: #170f05;
  border-radius: 12px;
  background: var(--amber-500);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  color: var(--ancient-400);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-400);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 32px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-xl);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(5, 7, 11, .74), rgba(5, 7, 11, .2)),
    rgba(0, 0, 0, .1);
  transition: opacity .2s ease, visibility .2s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 178px;
  min-height: 62px;
  border-radius: 999px;
  color: #160f05;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  box-shadow: 0 22px 60px rgba(245, 158, 11, .34);
  font-size: 18px;
  font-weight: 900;
}

.detail-title {
  margin-bottom: 24px;
}

.detail-title h1 {
  font-size: clamp(34px, 4.8vw, 58px);
}

.detail-meta {
  margin-top: 14px;
}

.detail-side {
  position: sticky;
  top: 98px;
  border: 1px solid rgba(55, 65, 81, .75);
  border-radius: 24px;
  padding: 18px;
  background: rgba(13, 18, 28, .78);
  box-shadow: var(--shadow-card);
}

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

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.detail-side div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  color: var(--ancient-300);
}

.detail-side dt {
  color: var(--ancient-500);
}

.content-card {
  border: 1px solid rgba(55, 65, 81, .72);
  border-radius: 24px;
  padding: 28px;
  background: rgba(13, 18, 28, .8);
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--amber-400);
  font-size: 26px;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--ancient-200);
  font-size: 17px;
  line-height: 1.9;
}

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

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(55, 65, 81, .55);
  background: rgba(5, 7, 11, .94);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 42px 0;
}

.footer-about p,
.site-footer a,
.site-footer li,
.footer-bottom {
  color: var(--ancient-400);
}

.site-footer h3 {
  margin: 0 0 16px;
  color: var(--amber-400);
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  border-top: 1px solid rgba(55, 65, 81, .45);
  padding: 18px 16px;
  text-align: center;
  font-size: 14px;
}

.empty-state {
  border: 1px solid rgba(55, 65, 81, .72);
  border-radius: 20px;
  padding: 26px;
  color: var(--ancient-300);
  background: rgba(13, 18, 28, .78);
}

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

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

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .site-search {
    min-width: 220px;
  }

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

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

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

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

  .detail-side {
    position: static;
    max-width: 380px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-text {
    font-size: 20px;
  }

  .header-inner > .site-search {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    align-items: center;
    padding: 80px 0 60px;
  }

  .hero-dots {
    right: auto;
    left: 16px;
    bottom: 22px;
  }

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

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

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

  .rank-row {
    grid-template-columns: 44px 60px 1fr;
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }

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

  .content-card {
    padding: 20px;
  }
}

@media (max-width: 450px) {
  .movie-grid,
  .movie-grid.compact,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-info p {
    display: none;
  }
}
