/*
  AniUz discover — fsociety ekotizimi uslubida:
  Unbounded 900 (KATTA HARF sarlavhalar), Onest (matn), JetBrains Mono (yorliqlar va raqamlar),
  #FF3B5C aksent, #D7FF3E lime, #0A0A0A ink, #F5F2EA paper, #ECEBE7 stage,
  16-28px shisha kartalar, o'q doirachali pill tugmalar, 44x44 mavzu tugmasi,
  data-theme='light|dark' (localStorage + prefers-color-scheme).
*/
:root {
  --bg: #F5F2EA;
  --paper: #F5F2EA;
  --stage: #ECEBE7;
  --surface: #FFFFFF;
  --surface-2: #ECEBE7;
  --card: rgba(255, 255, 255, 0.75);
  --card-border: rgba(10, 10, 10, 0.08);
  --raised: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #4A4A4A;
  --tx: #0A0A0A;
  --tx-2: #4A4A4A;
  --tx-3: #75726D;
  --line: rgba(10, 10, 10, 0.08);
  --line-2: rgba(10, 10, 10, 0.16);
  --accent: #FF3B5C;
  --accent-glow: rgba(255, 59, 92, 0.35);
  --accent-ink: #FFFFFF;
  --lime: #D7FF3E;
  --lime-glow: rgba(215, 255, 62, 0.35);
  --deep: #0A0A0A;
  --light: #F5F2EA;
  --r: clamp(16px, 2vw, 24px);
  --r-s: 14px;
  --shadow: 0 18px 40px -18px rgba(10, 10, 10, 0.15);
  --shadow-glass: 0 20px 48px rgba(10, 10, 10, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --font-display: 'Unbounded', system-ui, -apple-system, sans-serif;
  --font-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --top-h: 68px;
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 36px);
  color-scheme: light;
}

:root[data-theme='dark'], html[data-theme='dark'] {
  --bg: #0A0A0A;
  --paper: #0A0A0A;
  --stage: #141416;
  --surface: #141416;
  --surface-2: #1F1F24;
  --card: rgba(18, 18, 24, 0.75);
  --card-border: rgba(255, 255, 255, 0.14);
  --raised: #15151A;
  --ink: #F5F2EA;
  --ink-2: #A5A29D;
  --tx: #F5F2EA;
  --tx-2: #A5A29D;
  --tx-3: #75726D;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #FF3B5C;
  --accent-glow: rgba(255, 59, 92, 0.45);
  --accent-ink: #FFFFFF;
  --lime: #D7FF3E;
  --lime-glow: rgba(215, 255, 62, 0.4);
  --deep: #050507;
  --light: #F5F2EA;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --shadow-glass: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top-h) + 16px);
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-s);
  font-family: var(--mono);
  font-size: 13px;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; flex: none; fill: currentColor; }

/* ---------- Sarlavhalar va JetBrains Mono yorliqlar ---------- */
h1, h2, h3, .h1, .h2, .h3, .hero__title, .d-title, .pick__h {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

/* JetBrains Mono '01 — DISCOVER' yorliqlari */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Ulkan xira fon so'zi */
.fs-watermark {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(64px, 18vw, 220px);
  color: var(--ink);
  opacity: 0.035;
  user-select: none;
  pointer-events: none;
  z-index: 0;
  line-height: 0.85;
  white-space: nowrap;
}
[data-theme='dark'] .fs-watermark {
  opacity: 0.055;
}

/* ---------- O'q doirachali pill tugmalar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-sizing: border-box;
  text-decoration: none;
  transition: transform .16s var(--ease),
              background-color .15s var(--ease),
              border-color .15s var(--ease),
              box-shadow .2s var(--ease),
              color .15s var(--ease);
}
.btn:active {
  transform: translateY(1px) scale(.96);
}
@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
  }
  .btn:hover .fs-arrow-circle {
    transform: translateX(3px);
  }
}
.btn--primary, .btn--accent {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn--primary:hover, .btn--accent:hover {
  filter: brightness(1.06);
}
.btn--ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass);
}
.btn--ghost:hover {
  border-color: var(--line-2);
  background: var(--surface);
}
.btn--line {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--line-2);
  color: var(--ink);
}
.btn--line:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--wide { width: 100%; }

/* O'q doirachasi (circular arrow) */
.fs-arrow-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform .2s var(--ease);
  background: rgba(255, 255, 255, 0.22);
  color: currentColor;
}
.btn--accent .fs-arrow-circle, .btn--primary .fs-arrow-circle {
  background: #FFFFFF;
  color: var(--accent);
}
.btn--ghost .fs-arrow-circle {
  background: var(--ink);
  color: var(--bg);
}
.btn--line .fs-arrow-circle {
  background: var(--line-2);
  color: var(--ink);
}
.fs-arrow-circle svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

/* 44x44 Mavzu tugmasi (Yorug'/Qorong'i) */
.theme-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1.5px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink);
  cursor: pointer;
  flex: none;
  box-sizing: border-box;
  padding: 0;
  box-shadow: var(--shadow-glass);
  transition: transform .16s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease);
}
.theme-btn:active { transform: scale(.96); }
.theme-btn:hover { border-color: var(--line-2); background: var(--surface); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s var(--ease); }
.theme-btn:hover svg { transform: rotate(15deg); }
.theme-btn .moon { display: block; }
.theme-btn .sun { display: none; }
[data-theme='dark'] .theme-btn .moon { display: none; }
[data-theme='dark'] .theme-btn .sun { display: block; }

/* ---------- Tepa panel (Header) ---------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) var(--gutter) 0;
  background: rgba(245, 242, 234, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
[data-theme='dark'] .top {
  background: rgba(10, 10, 10, 0.85);
}
.top.is-solid {
  background: rgba(245, 242, 234, 0.92);
  border-bottom-color: var(--line-2);
}
[data-theme='dark'] .top.is-solid {
  background: rgba(10, 10, 10, 0.92);
}
.top__wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo {
  font: 900 22px/1 var(--font-display);
  letter-spacing: -.03em;
  text-transform: uppercase;
  flex: none;
  color: var(--ink);
}
.logo span, .logo b {
  color: var(--accent);
}
.search {
  flex: 1;
  min-width: 0;
  max-width: 520px;
  margin: 0 auto 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass);
  transition: border-color .15s var(--ease);
}
.search:focus-within {
  border-color: var(--accent);
}
.search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  outline: 0;
  font-size: 15px;
  color: var(--ink);
}
.search__input::placeholder {
  color: var(--ink-2);
  opacity: .75;
}
.search__input::-webkit-search-cancel-button { display: none; }
.search__clear {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink-2);
}
.search__clear:hover {
  color: var(--ink);
}
.top__bot {
  min-height: 44px;
  padding: 0 18px;
  flex: none;
}
.sentinel-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 80px;
  pointer-events: none;
}
@media (max-width: 720px) {
  .top__wrap { gap: 10px; }
  .top__bot span { display: none; }
  .top__bot { width: 44px; min-width: 44px; padding: 0; border-radius: 50%; }
  .top__bot .fs-arrow-circle { display: none; }
  .search { margin-left: 0; max-width: none; }
}

/* ---------- Asosiy bo'limlar ---------- */
.main {
  min-height: 70dvh;
  outline: 0;
  position: relative;
  z-index: 1;
  padding-top: calc(var(--top-h) + var(--safe-t));
}
.sec {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 0 8px;
  position: relative;
  z-index: 1;
}
.sec--list {
  padding-top: 24px;
}
.sec-head {
  padding: 0 var(--gutter);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.h2 {
  margin: 0;
  font-size: clamp(20px, 2.8vw, 28px);
}
.state {
  margin: 96px var(--gutter) 64px;
  text-align: center;
  color: var(--ink-2);
}
.state p { margin: 0 0 20px; font-size: 16px; }

/* ---------- 16-28px Shisha kartalar va Poster ---------- */
.card {
  display: block;
  border-radius: var(--r);
  transition: transform .2s var(--ease);
}
.card:active { transform: scale(.97); }
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); }
  .card:hover .card__t { color: var(--accent); }
}
.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--p1, #141416);
  isolation: isolate;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-glass);
  transition: transform .25s ease-out, box-shadow .25s ease-out;
}
.poster::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  pointer-events: none;
}
.poster__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster__fb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  color: #FFFFFF;
  background: linear-gradient(155deg, var(--p1) 0%, var(--p2) 100%);
  font: 900 clamp(26px, 8vw, 40px)/1 var(--font-display);
  letter-spacing: -.04em;
}
.poster::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .32), transparent 58%);
}
.poster.is-tilt {
  transform: perspective(800px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) scale(1.04);
  box-shadow: 0 26px 44px -22px rgba(0, 0, 0, .6);
}
.poster.is-tilt::before { opacity: 1; }

.card__t {
  margin: 12px 2px 0;
  font-weight: 700;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s ease;
}
.card__m {
  margin: 4px 2px 0;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--ink-2);
}

/* Shisha panel sinfi */
.fs-glass-card {
  border-radius: clamp(16px, 2vw, 24px);
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-glass);
}

/* ---------- Rail qatorlari ---------- */
.rail {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 4px var(--gutter) 16px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: none; scroll-snap-align: start; }
.rail .card { width: clamp(134px, 36vw, 178px); }

.rail--rank { gap: 10px; }
.rank {
  position: relative;
  width: clamp(184px, 50vw, 230px);
  padding-left: 54px;
}
.rail--rank .card { width: 100%; }
.rank__n {
  position: absolute;
  left: 0;
  bottom: 64px;
  font: 900 68px/.8 var(--font-display);
  letter-spacing: -.09em;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
  pointer-events: none;
}
.rank:first-child .rank__n {
  color: var(--accent);
  -webkit-text-stroke-color: var(--accent);
}

/* ---------- Janr plitalari ---------- */
.tiles {
  display: flex;
  gap: 14px;
  padding: 4px var(--gutter) 16px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
}
.tiles::-webkit-scrollbar { display: none; }
.tile {
  position: relative;
  overflow: hidden;
  flex: none;
  scroll-snap-align: start;
  width: 190px;
  height: 128px;
  padding: 16px;
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  color: #FFFFFF;
  background: linear-gradient(150deg, var(--t1), var(--t2));
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-glass);
  transition: transform .18s var(--ease);
}
.tile:active { transform: scale(.97); }
@media (hover: hover) { .tile:hover { transform: translateY(-4px); } }
.tile__fan {
  position: absolute;
  right: 6px;
  bottom: -26px;
  width: 92px;
  height: 100px;
  pointer-events: none;
}
.tile__fan img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--r-s);
  box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .55);
  transform-origin: 50% 100%;
  transform: translateX(-50%) translateX(calc((var(--k) - 1) * 24px)) rotate(calc((var(--k) - 1) * 12deg));
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.tile__fan img:nth-child(2) { z-index: 2; }
@media (hover: hover) {
  .tile:hover .tile__fan img {
    transform: translateX(-50%) translateX(calc((var(--k) - 1) * 32px)) translateY(-8px) rotate(calc((var(--k) - 1) * 17deg));
  }
}
.tile__n, .tile__c { position: relative; z-index: 3; }
.tile__n {
  font: 900 16px/1.2 var(--font-display);
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.tile__c {
  font-family: var(--mono);
  font-size: 12px;
  opacity: .85;
}

/* ---------- Tasodifiy tanlov (Pick card) ---------- */
.pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin: 48px auto 0;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-glass);
  border-radius: clamp(20px, 3vw, 28px);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.pick::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.pick__in {
  flex: 1 1 280px;
  position: relative;
  z-index: 1;
}
.pick__h {
  margin: 0;
  font-size: clamp(20px, 3.2vw, 30px);
}
.pick__p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}
.pick__btn {
  flex: none;
  position: relative;
  z-index: 1;
}

/* ---------- Ro'yxat va Saralash ---------- */
.list__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 var(--gutter);
  margin-bottom: 24px;
}
.seg {
  display: flex;
  padding: 4px;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 999px;
}
.seg__btn {
  height: 36px;
  padding: 0 18px;
  background: none;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.seg__btn[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
  padding: 0 var(--gutter);
}
.grid .card:nth-child(even) { margin-top: 20px; }
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid .card:nth-child(even) { margin-top: 0; }
}
@media (min-width: 820px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}
.sentinel { height: 60px; }

/* Skeletlar */
.sk {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%);
  background-size: 300% 100%;
  animation: sheen 1.4s linear infinite;
  border-radius: var(--r);
}
.sk--p { aspect-ratio: 2 / 3; width: 100%; }
.sk--l { height: 14px; margin-top: 12px; width: 70%; border-radius: 6px; }
@keyframes sheen { to { background-position: -100% 0; } }

/* ---------- Hero (Tavsiya karuseli) ---------- */
.hero {
  position: relative;
  min-height: clamp(540px, 86dvh, 800px);
  color: #FFFFFF;
  background: #0A0A0A;
  overflow: hidden;
  isolation: isolate;
  margin-top: calc(var(--top-h) * -1);
}
.hero__media {
  position: absolute;
  inset: -4% -2% 0;
  z-index: -3;
  will-change: transform;
}
.hero__imgs {
  position: absolute;
  inset: 0;
  transform: translate3d(calc(var(--mx, 0) * -18px), calc(var(--my, 0) * -12px), 0) scale(1.06);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero__img.is-on { opacity: 1; }
.hero__img--blur { filter: blur(28px) saturate(1.2); transform: scale(1.25); }
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, .88) 0%, rgba(10, 10, 10, .55) 46%, rgba(10, 10, 10, .18) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 34%),
    linear-gradient(180deg, rgba(10, 10, 10, .6) 0%, transparent 24%);
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translate3d(calc(var(--mx, 0) * -40px), calc(var(--my, 0) * -26px), 0);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
  background: radial-gradient(60% 70% at 78% 55%, color-mix(in srgb, var(--hc, #FF3B5C) 45%, transparent), transparent 70%);
  mix-blend-mode: screen;
  opacity: .8;
}
.hero__wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: inherit;
  padding: calc(var(--top-h) + var(--safe-t) + 40px) var(--gutter) 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}
.hero__text {
  max-width: 620px;
  transform: translate3d(calc(var(--mx, 0) * 12px), calc(var(--my, 0) * 7px), 0);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.hero__title {
  margin: 0;
  font-size: clamp(32px, 5.4vw, 64px);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hero__meta {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  opacity: .95;
}
.hero__meta .ico, .d-facts .ico {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  vertical-align: -2px;
  color: #FFC94A;
}
.hero__desc {
  margin: 18px 0 0;
  max-width: 52ch;
  font-size: clamp(15px, 1.6vw, 17px);
  opacity: .92;
  line-height: 1.6;
}
.hero__cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__poster {
  justify-self: end;
  width: clamp(210px, 24vw, 330px);
  will-change: transform;
}
.hero__poster .poster {
  box-shadow: 0 40px 70px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .12);
  transform: perspective(1100px) translate3d(calc(var(--mx, 0) * 26px), calc(var(--my, 0) * 16px), 40px) rotateY(calc(var(--mx, 0) * 12deg)) rotateX(calc(var(--mx, 0) * -9deg));
  transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}
.hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 8px;
}
.hero__dot {
  flex: 0 1 64px;
  height: 28px;
  background: none;
  border: 0;
  padding: 0;
  position: relative;
}
.hero__dot::before, .hero__dot i {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .3);
}
.hero__dot i { right: auto; width: 0; background: #FFFFFF; }
.hero__dot.is-on i { animation: fill var(--hero-ms, 7000ms) linear forwards; }
.hero__dot.is-done i { width: 100%; }
.hero.is-paused .hero__dot.is-on i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }

.hero__text > *, .hero__head > * { animation: rise .6s cubic-bezier(.16, 1, .3, 1) both; }
.hero__text > :nth-child(2) { animation-delay: .06s; }
.hero__text > :nth-child(3) { animation-delay: .12s; }
.hero__text > :nth-child(4) { animation-delay: .18s; }
.hero__poster .poster.enter { animation: drop .8s cubic-bezier(.16, 1, .3, 1) both, bob 9s ease-in-out .9s infinite; }
@keyframes bob { 50% { translate: 0 -10px; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(.96); } }

@media (max-width: 720px) {
  .hero { min-height: clamp(560px, 84dvh, 720px); }
  .hero__wrap {
    grid-template-columns: 34vw minmax(0, 1fr);
    align-items: end;
    align-content: end;
    gap: 18px 16px;
    padding-bottom: 76px;
  }
  .hero__poster { order: -1; width: 100%; justify-self: stretch; }
  .hero__text { display: contents; }
  .hero__head { grid-column: 2; align-self: end; }
  .hero__desc, .hero__cta { grid-column: 1 / -1; margin-top: 0; }
  .hero__shade {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(10, 10, 10, .75) 40%, rgba(10, 10, 10, .35) 100%),
      linear-gradient(180deg, rgba(10, 10, 10, .6) 0%, transparent 28%);
  }
  .hero__cta .btn { flex: 1 1 140px; }
}

@supports (animation-timeline: scroll()) {
  .hero__media { animation: par linear both; animation-timeline: scroll(root); animation-range: 0 100dvh; }
  .hero__poster { animation: par2 linear both; animation-timeline: scroll(root); animation-range: 0 90dvh; }
  @keyframes par { to { transform: translateY(14dvh) scale(1.06); } }
  @keyframes par2 { to { transform: translateY(-5dvh); } }
}

/* Sakura barglari */
.hero__fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(calc(var(--mx, 0) * 30px), calc(var(--my, 0) * 18px), 0);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.hero__fx--front {
  z-index: 3;
  transform: translate3d(calc(var(--mx, 0) * 62px), calc(var(--my, 0) * 36px), 0);
}
.petal {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * .72);
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #FFD3E3, #FF3B5C);
  opacity: .8;
  filter: blur(var(--bl, 0));
  animation: petal var(--d) linear var(--dl) infinite;
  will-change: transform;
}
.hero.is-off .petal { animation-play-state: paused; }
@keyframes petal {
  0% { transform: translate3d(0, 0, 0) rotate(var(--rot)); }
  50% { transform: translate3d(calc(var(--dx) * .5), 60dvh, 0) rotate(calc(var(--rot) + 180deg)); }
  100% { transform: translate3d(var(--dx), 120dvh, 0) rotate(calc(var(--rot) + 400deg)); }
}

/* ---------- Batafsil sahifa (Detail View) ---------- */
.detail { padding-bottom: 24px; }
.d-hero {
  position: relative;
  color: #FFFFFF;
  background: #0A0A0A;
  overflow: hidden;
  isolation: isolate;
  margin-top: calc(var(--top-h) * -1);
}
.d-hero__bg {
  position: absolute;
  inset: -6% -3% 0;
  z-index: -3;
}
.d-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.d-hero__bg--blur img { filter: blur(30px) saturate(1.25); transform: scale(1.3); }
.d-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(0deg, var(--bg) 0%, transparent 30%),
    linear-gradient(90deg, rgba(10, 10, 10, .84) 0%, rgba(10, 10, 10, .45) 70%),
    linear-gradient(180deg, rgba(10, 10, 10, .6) 0%, transparent 30%);
}
.d-hero__tint {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, color-mix(in srgb, var(--p1) 55%, transparent), transparent 70%);
  mix-blend-mode: multiply;
  opacity: .7;
}
.d-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--top-h) + var(--safe-t) + 36px) var(--gutter) 84px;
  display: grid;
  grid-template-columns: minmax(150px, 260px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: end;
  min-height: clamp(400px, 56dvh, 560px);
}
.d-poster .poster {
  box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .7);
  animation: drop .7s cubic-bezier(.16, 1, .3, 1) both;
}
.d-info > * { animation: rise .55s cubic-bezier(.16, 1, .3, 1) both; }
.d-info > :nth-child(2) { animation-delay: .05s; }
.d-info > :nth-child(3) { animation-delay: .1s; }
.d-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  opacity: .9;
  min-height: 40px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  transition: opacity .15s ease, transform .15s ease;
}
.d-back:hover { opacity: 1; transform: translateX(-2px); }
.d-title {
  margin: 0;
  font-size: clamp(26px, 4.6vw, 50px);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.d-sub {
  margin: 8px 0 0;
  opacity: .85;
  font-family: var(--mono);
  font-size: 14px;
}
.d-facts {
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 12px rgba(10, 10, 10, .75);
}
.d-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px var(--gutter) 0;
}
.btn--fav[aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 59, 92, 0.1);
}
.btn--fav .ico { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.btn--fav[aria-pressed='true'] .ico { transform: scale(1.18); }
.ep--last {
  border-color: var(--accent) !important;
  box-shadow: inset 0 0 0 1px var(--accent) !important;
}
.card__cont {
  margin: 4px 2px 0;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 700;
}
.d-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 24px;
}
.d-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.d-genres a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink-2);
  transition: color .15s ease, border-color .15s ease;
}
@media (hover: hover) {
  .d-genres a:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
}
.d-desc {
  margin: 0;
  max-width: 68ch;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.d-desc.is-open { display: block; }
.link {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 13px;
}
.d-sec {
  margin-top: 44px;
}
.d-sec .h2 { margin-inline: 0; }
.d-sec .rail { margin-inline: calc(var(--gutter) * -1); }
.dubs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.dub {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--mono);
  transition: background-color .12s ease, border-color .12s ease;
}
.dub[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.eps__s {
  margin: 24px 0 12px;
  font: 900 15px/1 var(--font-display);
  text-transform: uppercase;
}
.eps__note {
  margin: -4px 0 12px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--ink-2);
}
.eps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 10px;
}
.ep {
  position: relative;
  min-height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-s);
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--card-border);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  transition: transform .1s ease, background-color .1s ease, border-color .1s ease;
}
@media (hover: hover) {
  .ep:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}
.ep:active {
  transform: scale(.94);
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.ep[data-pr='1']::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 720px) {
  .d-wrap {
    grid-template-columns: 34vw minmax(0, 1fr);
    min-height: 0;
    padding-bottom: 64px;
    align-items: end;
  }
  .d-cta {
    position: sticky;
    bottom: calc(var(--safe-b) + 12px);
    z-index: 10;
    margin-top: 20px;
  }
  .d-cta .btn--primary, .d-cta .btn--accent {
    flex: 1 1 auto;
    box-shadow: var(--shadow);
  }
}

/* ---------- Pastki qism (Footer) ---------- */
.foot {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding: 44px var(--gutter) calc(var(--safe-b) + 48px);
  position: relative;
  overflow: hidden;
}
.foot__in {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.foot__mark {
  margin: 40px 0 -.1em;
  text-align: center;
  font: 900 clamp(96px, 26vw, 360px)/.8 var(--font-display);
  letter-spacing: -.07em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px var(--line);
  user-select: none;
  overflow: hidden;
}
.foot__p {
  margin: 0;
  font: 900 clamp(18px, 2.4vw, 24px)/1.3 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -.02em;
  max-width: 26ch;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 24px);
  z-index: 60;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-2);
}

/* Kirish animatsiyalari */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
}
.rv.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .rv { opacity: 1; transform: none; }
}
