:root {
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --panel: rgba(28, 25, 23, 0.82);
  --panel-strong: #292524;
  --line: rgba(120, 113, 108, 0.28);
  --text: #fafaf9;
  --muted: #d6d3d1;
  --soft: #a8a29e;
  --amber: #f59e0b;
  --amber-bright: #fbbf24;
  --amber-dark: #d97706;
  --radius: 22px;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 30rem),
    linear-gradient(180deg, #1c1917 0%, #0c0a09 42%, #0c0a09 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber-bright), var(--amber));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a,
.mobile-panel a,
.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--amber-bright);
}

.main-nav a:hover {
  background: rgba(245, 158, 11, 0.12);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 32vw);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(41, 37, 36, 0.72);
}

.top-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

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

.top-search button,
.wide-search button {
  border: 0;
  cursor: pointer;
  color: #1c1917;
  font-weight: 800;
  background: var(--amber);
  transition: background 0.2s ease, transform 0.2s ease;
}

.top-search button {
  align-self: stretch;
  padding: 0 18px;
}

.top-search button:hover,
.wide-search button:hover,
.btn.primary:hover {
  background: var(--amber-bright);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(41, 37, 36, 0.9);
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 10px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #1c1917;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.68) 42%, rgba(12, 10, 9, 0.08) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 1) 0%, rgba(12, 10, 9, 0.18) 48%, rgba(12, 10, 9, 0.55) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 72px;
  z-index: 2;
  width: min(720px, calc(100vw - 48px));
}

.hero-kicker,
.compact-hero span,
.detail-kicker a,
.detail-kicker span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #1c1917;
  background: var(--amber);
  font-weight: 900;
  font-size: 14px;
}

.hero h1,
.compact-hero h1,
.detail-content h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: var(--soft);
}

.hero-meta strong,
.detail-meta strong {
  color: var(--amber-bright);
  font-size: 22px;
}

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

.hero-tags {
  margin-top: 16px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: var(--amber-bright);
  background: rgba(245, 158, 11, 0.1);
}

.hero-tags span {
  padding: 5px 10px;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 12px;
}

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

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

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

.btn.primary {
  color: #1c1917;
  background: var(--amber);
}

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

.btn.full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  background: rgba(12, 10, 9, 0.58);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.2s ease;
  font-size: 34px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(245, 158, 11, 0.85);
  color: #1c1917;
}

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

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

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

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

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

.home-search-block,
.content-section,
.page-hero,
.breadcrumb,
.detail-layout,
.player-section {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.home-search-block {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: 34px;
  margin-bottom: 34px;
  padding-top: 30px;
  padding-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.72);
  box-shadow: var(--shadow);
}

.home-search-block h2,
.section-head h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.home-search-block p,
.section-head p,
.compact-hero p,
.category-card-large strong,
.category-tile strong,
.detail-one-line,
.detail-content p,
.site-footer p {
  color: var(--muted);
}

.wide-search {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 16px;
  background: rgba(12, 10, 9, 0.72);
}

.wide-search input {
  padding: 16px 18px;
}

.wide-search button {
  border-radius: 0;
  padding: 0 24px;
  white-space: nowrap;
}

.content-section {
  margin-top: 42px;
  margin-bottom: 52px;
}

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

.section-head p {
  margin: 8px 0 0;
}

.section-more {
  color: var(--amber-bright);
  font-weight: 900;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(28, 25, 23, 0.8);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.54);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #292524;
}

.movie-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(12, 10, 9, 0.82) 100%);
}

.movie-score,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  color: #1c1917;
  background: var(--amber-bright);
  font-weight: 900;
}

.movie-score {
  right: 10px;
  padding: 4px 8px;
  font-size: 13px;
}

.rank-badge {
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.movie-play-icon {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #1c1917;
  background: rgba(251, 191, 36, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-info {
  padding: 14px;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 13px;
}

.movie-meta a {
  color: var(--amber-bright);
  font-weight: 800;
}

.movie-info h3 {
  margin: 8px 0 8px;
  min-height: 48px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

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

.movie-info p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--soft);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

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

.category-tile,
.category-card-large {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(41, 37, 36, 0.82)),
    rgba(28, 25, 23, 0.82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.category-tile {
  min-height: 158px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span,
.category-main-link span {
  color: var(--amber-bright);
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  margin-top: auto;
  color: var(--soft);
  font-style: normal;
  font-size: 13px;
}

.page-main {
  padding-top: 36px;
}

.page-hero {
  margin-top: 20px;
}

.compact-hero {
  display: flex;
  align-items: end;
  min-height: 260px;
  padding-top: 52px;
  padding-bottom: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.28), transparent 28rem),
    linear-gradient(135deg, #292524, #0c0a09 70%);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.74);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--soft);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(120, 113, 108, 0.36);
  border-radius: 12px;
  color: var(--text);
  background: rgba(12, 10, 9, 0.66);
}

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

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

.category-card-large {
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-main-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  padding: 6px 10px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(12, 10, 9, 0.35);
  font-size: 13px;
}

.category-samples a:hover {
  color: var(--amber-bright);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 20px;
  color: var(--soft);
}

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

.player-section {
  margin-bottom: 32px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  cursor: pointer;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.28), transparent 22rem),
    linear-gradient(180deg, rgba(12, 10, 9, 0.15), rgba(12, 10, 9, 0.84));
  text-align: center;
}

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

.player-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #1c1917;
  background: var(--amber-bright);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
  font-size: 30px;
}

.player-overlay strong {
  max-width: 70%;
  font-size: clamp(22px, 4vw, 40px);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 38px;
}

.detail-poster {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #292524;
  box-shadow: var(--shadow);
}

.detail-content {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(28, 25, 23, 0.72);
}

.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-kicker span {
  color: var(--amber-bright);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.26);
}

.detail-content h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.detail-one-line {
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.detail-content h2 {
  margin-top: 30px;
  font-size: 24px;
}

.detail-content p {
  font-size: 16px;
}

.detail-nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.detail-nav-links a {
  min-width: 0;
  padding: 13px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(12, 10, 9, 0.36);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-nav-links a:hover {
  color: var(--amber-bright);
  border-color: rgba(245, 158, 11, 0.48);
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(12, 10, 9, 0.7);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px;
  display: grid;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #1c1917;
  background: var(--amber);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

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

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

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

@media (max-width: 860px) {
  .header-inner {
    gap: 12px;
  }

  .main-nav,
  .top-search {
    display: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-stage {
    height: 560px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(12, 10, 9, 1) 0%, rgba(12, 10, 9, 0.42) 62%, rgba(12, 10, 9, 0.72) 100%);
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-block,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 620px) {
  .header-inner,
  .home-search-block,
  .content-section,
  .page-hero,
  .breadcrumb,
  .detail-layout,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-logo {
    font-size: 19px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-stage {
    height: 520px;
  }

  .hero-content {
    left: 16px;
    width: calc(100vw - 32px);
  }

  .hero h1,
  .compact-hero h1,
  .detail-content h1 {
    letter-spacing: -0.03em;
  }

  .hero-actions,
  .wide-search,
  .section-head,
  .detail-nav-links {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .wide-search button {
    min-height: 48px;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    min-height: 44px;
    font-size: 15px;
  }

  .tag-row span:nth-child(n+3) {
    display: none;
  }

  .compact-hero {
    min-height: 220px;
  }

  .detail-content {
    padding: 18px;
  }

  .player-card {
    border-radius: 18px;
  }
}
