:root {
  color-scheme: dark;
  --bg: #0d0d10;
  --panel: #1a1a1f;
  --panel-soft: rgba(44, 44, 52, 0.72);
  --panel-strong: #22222a;
  --line: rgba(234, 179, 8, 0.18);
  --line-soft: rgba(255, 255, 255, 0.08);
  --gold: #eab308;
  --gold-soft: rgba(234, 179, 8, 0.16);
  --ember: #ef4444;
  --text: #f7f7f8;
  --muted: #b0b0b8;
  --subtle: #888893;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --glow: 0 0 32px rgba(234, 179, 8, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(234, 179, 8, 0.12), transparent 32rem),
    radial-gradient(circle at 88% 0%, rgba(239, 68, 68, 0.13), transparent 28rem),
    linear-gradient(135deg, #0d0d10, #1a1a1f 48%, #0d0d10);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #0d0d10;
  box-shadow: var(--glow);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #fde68a, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.desktop-nav {
  margin-left: auto;
}

.nav-link,
.nav-pill,
.mobile-link {
  border-radius: 12px;
  color: #e7e7ea;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-pill {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.nav-pill:hover,
.mobile-link:hover,
.mobile-link.is-active {
  color: #facc15;
  background: rgba(44, 44, 52, 0.72);
}

.header-search,
.mobile-search,
.quick-search-block form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.quick-search-block input,
.filter-fields input,
.filter-fields select {
  border: 1px solid #4a4a52;
  outline: none;
  border-radius: 12px;
  background: rgba(44, 44, 52, 0.86);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.quick-search-block button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  color: #0d0d10;
  font-weight: 700;
  cursor: pointer;
}

.header-search input:focus,
.mobile-search input:focus,
.quick-search-block input:focus,
.filter-fields input:focus,
.filter-fields select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(44, 44, 52, 0.72);
  color: var(--text);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  padding: 12px 14px;
  background: rgba(26, 26, 31, 0.85);
}

.mobile-link.muted {
  color: var(--muted);
}

.mobile-search input {
  width: 100%;
  padding: 12px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #111114;
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 13, 16, 0.94), rgba(13, 13, 16, 0.58), rgba(13, 13, 16, 0.16)),
    linear-gradient(0deg, #0d0d10 0%, rgba(13, 13, 16, 0.24) 48%, rgba(13, 13, 16, 0.52) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1280px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 720px;
  color: #d1d1d6;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.8;
}

.eyebrow {
  margin: 0;
  color: #facc15;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.12);
  color: #fde68a;
  padding: 7px 11px;
  font-size: 13px;
}

.hero-actions,
.small-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 12px 20px;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  color: #0d0d10;
  box-shadow: var(--glow);
}

.ghost-btn {
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  background: rgba(13, 13, 16, 0.38);
  color: #fde68a;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(13, 13, 16, 0.62);
  backdrop-filter: blur(12px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--text);
  cursor: pointer;
}

.hero-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  line-height: 1;
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: linear-gradient(90deg, var(--gold), var(--ember));
}

.quick-search-block,
.content-section,
.filter-panel,
.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-block {
  margin-top: -46px;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(26, 26, 31, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-block h2,
.section-heading h2,
.category-card h2,
.category-tile strong,
.detail-content h1,
.page-hero h1 {
  margin: 0;
}

.quick-search-block input {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
}

.content-section {
  padding: 54px 0 0;
}

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

.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(26px, 3vw, 38px);
}

.text-link {
  color: #facc15;
  gap: 8px;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 13, 16, 0.92), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.78);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #0d0d10;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #0d0d10;
  font-size: 14px;
  box-shadow: var(--glow);
}

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

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
}

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

.movie-info {
  padding: 12px 2px 0;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--subtle);
  font-size: 12px;
}

.movie-info h2 {
  margin: 8px 0 6px;
  font-size: 17px;
  line-height: 1.4;
}

.movie-info h2 a:hover {
  color: #facc15;
}

.movie-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

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

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

.category-tile,
.category-card {
  display: block;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(44, 44, 52, 0.86), rgba(26, 26, 31, 0.88));
  padding: 22px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 179, 8, 0.44);
}

.category-tile strong,
.category-card h2 {
  display: block;
  font-size: 24px;
}

.category-tile p,
.category-card p {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.75;
}

.category-tile div,
.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tile span,
.category-samples a {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.12);
  color: #fde68a;
  font-size: 12px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(26, 26, 31, 0.74);
  padding: 14px;
}

.wide-cover {
  display: block;
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 2 / 3;
  background: var(--panel-strong);
}

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

.wide-body h2 {
  margin: 8px 0;
  font-size: 20px;
}

.wide-body p:not(.eyebrow) {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.75;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 20px;
}

.compact-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 18px;
}

.filter-panel {
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 18px;
  background: rgba(26, 26, 31, 0.76);
}

.filter-fields {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
}

.filter-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-fields input,
.filter-fields select {
  width: 100%;
  padding: 12px;
}

.detail-layout {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin: 10px 0 18px;
}

.breadcrumb a:hover {
  color: #facc15;
}

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

.movie-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

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

.player-gradient {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 16, 0.44);
}

.player-button {
  position: absolute;
  width: clamp(72px, 10vw, 108px);
  height: clamp(72px, 10vw, 108px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #0d0d10;
  font-size: clamp(30px, 4vw, 48px);
  box-shadow: var(--glow);
  transition: transform 0.2s ease;
}

.player-cover:hover .player-button {
  transform: scale(1.08);
}

.player-card.is-playing .player-cover {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  margin-top: 30px;
}

.detail-poster {
  display: grid;
  align-self: start;
  gap: 16px;
}

.detail-poster img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.full-btn {
  width: 100%;
}

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

.detail-content h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-one-line {
  margin: 18px 0;
  color: #d1d1d6;
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-tags {
  margin: 14px 0 24px;
}

.detail-content section {
  margin-top: 24px;
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: 16px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line-soft);
  background: rgba(13, 13, 16, 0.72);
}

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

.footer-about p,
.footer-group a {
  color: var(--muted);
}

.footer-about p {
  margin: 16px 0 0;
  line-height: 1.8;
}

.footer-group h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.footer-group a:hover {
  color: #facc15;
}

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

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

  .desktop-nav {
    margin-left: auto;
  }

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

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

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

  .hero {
    min-height: 590px;
  }

  .hero-content h1 {
    font-size: clamp(38px, 12vw, 62px);
  }

  .quick-search-block {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

@media (max-width: 640px) {
  .header-inner,
  .mobile-panel,
  .quick-search-block,
  .content-section,
  .filter-panel,
  .detail-layout,
  .page-hero,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-content {
    width: min(100% - 22px, 1280px);
    justify-content: flex-end;
    padding-bottom: 110px;
  }

  .hero-layer {
    background:
      linear-gradient(0deg, rgba(13, 13, 16, 0.98) 0%, rgba(13, 13, 16, 0.68) 58%, rgba(13, 13, 16, 0.28) 100%);
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-actions,
  .quick-search-block form {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .primary-btn,
  .ghost-btn,
  .quick-search-block button {
    width: 100%;
  }

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

  .movie-info h2 {
    font-size: 15px;
  }

  .movie-info p,
  .tag-row {
    display: none;
  }

  .category-grid,
  .large-category-grid,
  .wide-grid,
  .filter-fields {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-template-columns: 92px 1fr;
  }

  .wide-body p:not(.eyebrow) {
    display: none;
  }

  .detail-content {
    padding: 20px;
  }

  .detail-meta span,
  .detail-tags a {
    font-size: 12px;
  }
}
