:root {
  color-scheme: dark;
  --bg: #080705;
  --bg-soft: #11100d;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #fff8eb;
  --muted: #b9b0a2;
  --muted-strong: #e9dcc7;
  --line: rgba(255, 255, 255, 0.12);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-dark: #b45309;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(245, 158, 11, 0.2), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(239, 68, 68, 0.15), transparent 30%),
    linear-gradient(180deg, #0a0907 0%, #12100d 48%, #070604 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(8, 7, 5, 0.72);
  backdrop-filter: blur(24px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(8, 7, 5, 0.92);
}

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

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

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #171109;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.brand-text small {
  margin-top: -3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #1b1205;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 18px 20px;
  background: rgba(8, 7, 5, 0.96);
}

.mobile-nav-link {
  display: block;
  padding: 12px 16px;
}

.hero-section {
  position: relative;
  min-height: 720px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(245, 158, 11, 0.18), transparent 45%),
    radial-gradient(circle at 70% 18%, rgba(251, 191, 36, 0.22), transparent 26%),
    linear-gradient(180deg, rgba(8, 7, 5, 0.1), rgba(8, 7, 5, 0.94));
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.55;
}

.hero-bg::before {
  width: 330px;
  height: 330px;
  top: 110px;
  right: 10%;
  background: rgba(245, 158, 11, 0.18);
}

.hero-bg::after {
  width: 240px;
  height: 240px;
  bottom: 70px;
  left: 8%;
  background: rgba(239, 68, 68, 0.16);
}

.hero-container {
  position: relative;
  padding: 82px 0 42px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 60px;
  min-height: 500px;
}

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

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-line,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-list,
.detail-meta,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.tag-list span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  margin-top: 32px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #1d1304;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.76));
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #19150f;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  color: #1d1304;
  background: var(--amber-light);
  font-weight: 900;
}

.hero-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.hero-search {
  display: flex;
  flex: 1;
  max-width: 640px;
  gap: 12px;
}

.hero-search input,
.search-field input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
}

.hero-search input {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
}

.hero-search button {
  min-width: 126px;
  border: 0;
  border-radius: 999px;
  color: #1d1304;
  background: var(--amber-light);
  font-weight: 900;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--amber-light);
  font-weight: 900;
}

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

.category-card,
.overview-card,
.movie-card,
.library-group {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius-md);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  background: #19150f;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 7, 5, 0.18), rgba(8, 7, 5, 0.92));
}

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

.category-card span {
  display: block;
  margin-top: 72px;
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  display: inline-flex;
  margin-top: 8px;
  color: var(--amber-light);
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted-strong);
  font-size: 14px;
}

.category-card:hover img {
  opacity: 0.42;
  transform: scale(1.06);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(251, 191, 36, 0.38);
  background: var(--panel-strong);
  transform: translateY(-4px);
}

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

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

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

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.poster-type {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: #1d1304;
  background: var(--amber-light);
  font-size: 12px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--amber));
  font-size: 12px;
}

.card-content {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: var(--amber-light);
}

.card-meta,
.card-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.tag-list {
  margin-top: 12px;
}

.tag-list span {
  min-height: 25px;
  padding: 3px 8px;
  font-size: 12px;
}

.category-chip {
  display: inline-flex;
  margin-top: 12px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
}

.subpage-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 72px;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  border-bottom: 1px solid var(--line);
}

.compact-hero h1,
.page-hero h1 {
  max-width: 920px;
}

.slim-actions {
  margin-top: 26px;
}

.overview-grid {
  display: grid;
  gap: 18px;
  padding: 64px 0;
}

.overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
  border-radius: var(--radius-md);
}

.overview-cover {
  overflow: hidden;
  border-radius: 18px;
  background: #19150f;
}

.overview-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.overview-card h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.overview-card p {
  max-width: 760px;
  margin: 12px 0 18px;
  color: var(--muted-strong);
}

.text-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.text-link,
.library-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

.text-link span,
.library-links span {
  flex: 0 0 auto;
  color: var(--amber-light);
  font-size: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 170px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.full-filter {
  grid-template-columns: minmax(260px, 1fr) 180px 170px 170px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-field span {
  color: var(--amber-light);
  font-weight: 900;
}

.search-field input,
.filter-bar select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
}

.filter-bar select option {
  color: #111827;
}

.filter-empty {
  display: none;
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted-strong);
  background: var(--panel);
  font-weight: 800;
}

.filter-empty.visible {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.breadcrumbs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--amber-light);
  font-weight: 800;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: #19150f;
}

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

.detail-meta span {
  font-size: 14px;
}

.detail-content {
  padding: 54px 0 80px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.play-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 999px;
  color: #1d1304;
  background: var(--amber-light);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
  font-size: 28px;
}

.play-overlay strong {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  font-size: 18px;
}

.detail-article {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin: 42px auto 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.detail-article h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.detail-article p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.related-block {
  padding-bottom: 0;
}

.library-container {
  display: grid;
  gap: 18px;
  padding: 64px 0 84px;
}

.library-group {
  padding: 22px;
  border-radius: var(--radius-md);
}

.library-group h2 {
  margin: 0 0 16px;
  color: var(--amber-light);
  font-size: 22px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 42px 0;
  color: var(--muted-strong);
  background: rgba(0, 0, 0, 0.32);
}

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

.footer-brand {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 24px;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 18px;
}

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

.footer-links a {
  color: var(--muted);
}

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

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

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

@media (max-width: 1100px) {
  .category-grid,
  .movie-grid-large,
  .library-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .menu-button {
    display: block;
  }

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

  .hero-section {
    min-height: auto;
  }

  .hero-container {
    padding-top: 50px;
  }

  .hero-slide,
  .hero-slide.active,
  .detail-layout,
  .overview-card,
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
    transform: none;
  }

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

  .hero-bottom {
    display: grid;
  }

  .hero-search {
    display: grid;
  }

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

  .hero-dots {
    justify-content: center;
  }

  .category-grid,
  .movie-grid,
  .movie-grid-large,
  .library-links,
  .text-link-list,
  .filter-bar,
  .full-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .brand-text strong {
    font-size: 18px;
  }

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

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

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

  .category-grid,
  .movie-grid,
  .movie-grid-large,
  .library-links,
  .text-link-list {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .movie-card.compact .poster-link img {
    height: 100%;
    min-height: 178px;
  }

  .card-title {
    min-height: auto;
  }

  .detail-article {
    padding: 20px;
  }
}
