:root {
  color-scheme: dark;
  --dark-950: #030507;
  --dark-900: #07090c;
  --dark-850: #0c1016;
  --dark-800: #12171e;
  --dark-700: #1d2530;
  --dark-600: #2a3443;
  --primary-400: #1a75ff;
  --primary-600: #0043ad;
  --accent-400: #ffc61a;
  --accent-500: #e6a800;
  --text: #ffffff;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(26, 117, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(255, 198, 26, 0.14), transparent 28rem),
    linear-gradient(180deg, var(--dark-900), var(--dark-800) 42%, var(--dark-900));
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

.narrow {
  width: min(920px, calc(100% - 32px));
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(7, 9, 12, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111;
  background: linear-gradient(135deg, var(--accent-400), var(--primary-400));
  box-shadow: 0 12px 32px rgba(255, 198, 26, 0.18);
}

.brand-text {
  font-size: 1.24rem;
}

.brand-text span,
.footer-brand,
.text-accent {
  color: var(--accent-400);
}

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-search {
  display: flex;
  align-items: center;
  width: 280px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 23, 30, 0.74);
}

.nav-search input,
.large-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  padding: 0 10px;
}

.nav-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  color: #111;
  font-weight: 700;
  background: var(--accent-400);
  white-space: nowrap;
}

.nav-search button {
  padding: 7px 13px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 12, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 15px 24px;
  color: var(--soft);
  border-bottom: 1px solid var(--line);
}

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

.hero-section {
  position: relative;
  min-height: 760px;
  padding-top: 68px;
  overflow: hidden;
}

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

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

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

.hero-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05) brightness(0.64);
}

.hero-shade,
.detail-shade {
  background:
    linear-gradient(90deg, rgba(7, 9, 12, 0.94) 0%, rgba(7, 9, 12, 0.64) 42%, rgba(7, 9, 12, 0.42) 100%),
    linear-gradient(0deg, var(--dark-900) 0%, rgba(7, 9, 12, 0.18) 48%, rgba(7, 9, 12, 0.78) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 58px;
  min-height: 610px;
}

.hero-copy {
  animation: slideUp 0.65s ease both;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent-400);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-tags,
.detail-tags,
.tag-row,
.filter-chips,
.quick-links,
.detail-meta,
.detail-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags,
.detail-meta,
.detail-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags a,
.tag-row span,
.detail-meta span,
.filter-chips button,
.quick-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.07);
}

.hero-tags span,
.detail-tags a,
.detail-meta span,
.quick-links a {
  padding: 8px 12px;
}

.hero-actions,
.detail-actions {
  margin-top: 34px;
}

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

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

.btn.primary {
  color: #101010;
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  box-shadow: 0 18px 40px rgba(255, 198, 26, 0.25);
}

.btn.glass {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.hero-card {
  position: relative;
  display: block;
  width: min(100%, 380px);
  margin-left: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(18, 23, 30, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--dark-700), var(--dark-900));
}

.hero-card span,
.hero-card strong {
  position: relative;
  display: block;
}

.hero-card span {
  margin-top: 16px;
  color: var(--accent-400);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-card strong {
  margin-top: 6px;
  font-size: 1.35rem;
}

.hero-arrow {
  position: absolute;
  z-index: 6;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dot {
  width: 32px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
  background: var(--accent-400);
}

.hero-search-panel {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
}

.large-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(18, 23, 30, 0.78);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(16px);
}

.large-search input {
  min-height: 48px;
  padding: 0 14px;
}

.large-search button {
  padding: 0 22px;
}

.quick-links {
  justify-content: center;
  margin-top: 14px;
}

.section-block {
  padding: 72px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-more {
  color: var(--accent-400);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(18, 23, 30, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 198, 26, 0.36);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 30% 10%, rgba(255, 198, 26, 0.24), transparent 38%),
    linear-gradient(135deg, var(--dark-700), var(--dark-900));
}

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

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

.quality,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

.quality {
  right: 10px;
  color: #0c0c0c;
  background: var(--accent-400);
}

.rank-badge {
  left: 10px;
  color: #fff;
  background: rgba(0, 67, 173, 0.82);
}

.play-dot {
  position: absolute;
  inset: auto 12px 12px auto;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: var(--accent-400);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  font-size: 1.02rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-line {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.card-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: auto;
  gap: 6px;
}

.tag-row span {
  padding: 4px 7px;
  font-size: 0.72rem;
}

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

.category-tile,
.category-cover {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(26, 117, 255, 0.2), rgba(255, 198, 26, 0.12)), rgba(18, 23, 30, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}

.category-tile:hover,
.category-cover:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 198, 26, 0.36);
}

.category-tile strong,
.category-cover strong {
  font-size: 1.18rem;
}

.category-tile span,
.category-cover span {
  margin-top: 10px;
  color: var(--soft);
  line-height: 1.6;
}

.category-cover {
  min-height: 240px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(7, 9, 12, 0.92), rgba(7, 9, 12, 0.12));
}

.category-cover strong,
.category-cover span {
  position: relative;
  z-index: 2;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 23, 30, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(255, 198, 26, 0.32);
}

.rank-number {
  color: var(--accent-400);
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  overflow: hidden;
  width: 76px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--dark-700), var(--dark-900));
}

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

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info span,
.rank-info em {
  display: block;
}

.rank-info strong {
  font-size: 1.05rem;
}

.rank-info span,
.rank-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--soft);
  font-style: normal;
}

.rank-action {
  padding: 9px 14px;
  border-radius: 999px;
  color: #101010;
  font-weight: 800;
  background: var(--accent-400);
}

.inner-main,
.detail-main {
  padding-top: 68px;
}

.page-hero {
  position: relative;
  padding: 88px 0 46px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 198, 26, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(26, 117, 255, 0.12), rgba(18, 23, 30, 0));
  border-bottom: 1px solid var(--line);
}

.compact-hero h1 {
  max-width: 820px;
}

.page-search {
  max-width: 740px;
  margin-top: 28px;
}

.filter-chips {
  margin-top: 18px;
}

.filter-chips button {
  padding: 8px 12px;
  cursor: pointer;
}

.filter-chips button.is-active {
  color: #101010;
  background: var(--accent-400);
}

.empty-state {
  display: none;
  margin: 36px 0 0;
  color: var(--soft);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  min-height: 560px;
  padding: 70px 0;
}

.detail-poster {
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 880px;
}

.detail-meta span {
  color: var(--accent-400);
}

.player-section {
  padding: 56px 0 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background:
    radial-gradient(circle, rgba(255, 198, 26, 0.22), transparent 24%),
    rgba(0, 0, 0, 0.48);
  cursor: pointer;
}

.video-shell.is-active .player-cover {
  opacity: 0;
  pointer-events: none;
}

.player-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  font-size: 2rem;
  background: var(--accent-400);
  box-shadow: 0 18px 50px rgba(255, 198, 26, 0.24);
}

.player-cover strong {
  font-size: clamp(1.3rem, 3vw, 2.2rem);
}

.player-cover em {
  color: var(--soft);
  font-style: normal;
}

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

.story-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(18, 23, 30, 0.72);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.22);
}

.story-card {
  padding: 30px;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 18px;
}

.story-card p {
  margin: 0 0 28px;
  color: var(--soft);
  font-size: 1.02rem;
  line-height: 1.9;
}

.side-card {
  align-self: start;
  padding: 24px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px 10px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  min-width: 0;
  margin: 0;
  color: var(--soft);
}

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

.movie-card.compact .card-line,
.movie-card.compact .tag-row {
  display: none;
}

.site-footer {
  margin-top: 40px;
  padding: 44px 0 22px;
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 12, 0.78);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
}

.footer-bottom {
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.image-missing img,
img.image-hidden {
  display: none;
}

[data-card].is-hidden {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

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

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

  .nav-search {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-section {
    min-height: 820px;
  }

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

  .hero-inner {
    align-content: center;
    gap: 24px;
    min-height: 640px;
  }

  .hero-card {
    width: min(100%, 280px);
    margin: 0;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }

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

  .footer-grid {
    flex-direction: column;
  }
}

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

  .hero-section {
    min-height: 790px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(2.3rem, 14vw, 4.2rem);
  }

  .large-search {
    flex-direction: column;
    border-radius: 18px;
  }

  .large-search button {
    min-height: 46px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    bottom: 145px;
  }

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

  .card-body {
    padding: 11px;
  }

  .card-body strong {
    font-size: 0.92rem;
  }

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

  .section-block {
    padding: 48px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-action {
    display: none;
  }

  .rank-thumb {
    width: 58px;
  }

  .detail-hero-inner {
    padding: 48px 0;
  }

  .story-card,
  .side-card {
    padding: 20px;
  }
}
