/* Лидерборд Chery UGC.
   Токены сняты с cheryauto.uz (main.css, 15 окт 2026): чёрный #0C0C0B, белый,
   единственный акцент #A82034, серые для вторичного текста и линий.
   Прямые углы, без теней, заголовки широким капслоком. Tactic Sans Extended
   у бренда коммерческий — вместо него Unbounded (OFL), текст на Inter. */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/Unbounded.woff2') format('woff2');
  font-weight: 300 600;
  font-display: swap;
}
@font-face { font-family: 'Inter'; src: url('fonts/Inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ink: #0c0c0b;
  --white: #ffffff;
  --red: #a82034;
  --red-deep: #8a1a2b;
  --gray-700: #5b5c5d;
  --gray-500: #8a8d8f;
  --line: #e2e4e6;
  --paper: #f5f5f5;
  --up: #1f8a4c;

  --on-ink: rgba(255, 255, 255, 0.92);
  --on-ink-2: rgba(255, 255, 255, 0.64);
  --on-ink-line: rgba(255, 255, 255, 0.16);

  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gutter: 20px;
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--toolbar-h, 64px) + 16px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); flex: none; }

/* ---------- демо-плашка ---------- */

.demo-note {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--gray-700);
  font-size: 13px;
  text-align: center;
  padding: 8px var(--gutter);
}

/* ---------- шапка и hero ---------- */

.topbar { background: var(--ink); color: var(--white); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.topbar__logo { width: 132px; height: auto; }
.topbar__label,
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.topbar__label { color: var(--on-ink-2); }

.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 12, 11, 0.94) 0%, rgba(12, 12, 11, 0.78) 36%, rgba(12, 12, 11, 0.12) 72%),
    linear-gradient(0deg, rgba(12, 12, 11, 0.96) 0%, rgba(12, 12, 11, 0) 46%);
}
.hero__inner { padding: clamp(64px, 9vw, 120px) 0 40px; }
.hero__status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-ink); margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-width: 11ch;
}
.hero__sub {
  margin-top: 24px;
  max-width: 34rem;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--on-ink);
}
.hero__sub b { font-weight: 600; color: var(--white); white-space: nowrap; }
.button.hero__cta { margin-top: 32px; background: var(--white); border-color: var(--white); color: var(--ink); }
.button.hero__cta:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.board__cta { align-self: flex-start; margin-top: 16px; }

.stats {
  margin-top: clamp(48px, 7vw, 96px);
  display: grid;
  grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--on-ink-line);
}
.stat { padding: 20px 20px 4px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--on-ink-line); }
.stat__label { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink-2); }
.stat__value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.1;
  white-space: nowrap;
}
.stat__value--accent { color: #ff5a70; }
.stat__delta { margin-top: 6px; font-size: 13px; color: var(--on-ink-2); }

/* ---------- секции ---------- */

main { padding-bottom: 40px; }
.section { padding-top: clamp(56px, 7vw, 96px); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.1;
  text-transform: uppercase;
}
.section__hint { color: var(--gray-700); max-width: 36rem; }

.button,
.celebrate {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.button:hover, .celebrate:hover { background: var(--red); border-color: var(--red); }
.celebrate:disabled { opacity: 0.5; cursor: default; }

/* ---------- призовые места ---------- */

.podium { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; }
.place {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding: 24px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--on-ink-line);
}
.place--1 { border-top-color: var(--red); }
.place__top { display: flex; justify-content: space-between; align-items: baseline; }
.place__rank { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-2); }
.place__num { font-family: var(--font-display); font-weight: 300; font-size: 40px; line-height: 1; color: var(--red); }
.place__amount {
  margin-top: 24px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.place--1 .place__amount { font-size: clamp(52px, 6vw, 84px); }
.place__holder { margin-top: auto; padding-top: 28px; display: flex; align-items: center; gap: 14px; min-width: 0; }
.place__holder > div { min-width: 0; }
.place__holder .avatar { width: 48px; height: 48px; }
.place__handle { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place__views { font-size: 14px; color: var(--on-ink-2); }
.place__views span { color: var(--on-ink-2); }
.place__empty { margin-top: auto; padding-top: 28px; font-family: var(--font-display); font-weight: 300; font-size: 18px; text-transform: uppercase; color: var(--on-ink-2); }
.place__status {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--on-ink-line);
  font-size: 13px; color: var(--on-ink-2);
}
.place__status b { color: var(--white); font-weight: 600; }
.place--open { background: #1a1a19; }

/* ---------- панель рейтинга ---------- */

.toolbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--white);
  display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 2px solid var(--ink);
}
.toolbar__title { display: flex; align-items: baseline; gap: 10px; }
.toolbar__count { font-size: 13px; font-weight: 600; color: var(--gray-500); }

.search {
  flex: 1 1 280px;
  max-width: 420px;
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--line);
  padding: 0 14px;
  height: 48px;
  transition: border-color 0.3s ease;
}
.search:focus-within { border-color: var(--ink); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--gray-500); stroke-width: 2; flex: none; }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: none; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}
.search input::placeholder { color: var(--gray-500); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search__count { font-size: 13px; color: var(--gray-500); white-space: nowrap; }

.updated { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-700); }

.movers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 8px; }
.mover { background: var(--paper); padding: 16px 18px; min-width: 0; }
.mover__label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-700); }
.mover__handle { margin-top: 6px; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover__meta { margin-top: 2px; font-size: 13px; color: var(--gray-700); }
.mover__meta b { color: var(--up); font-weight: 600; }
.mover--empty .mover__handle { color: var(--gray-500); }

/* ---------- таблица ---------- */

.board__head,
.row__main {
  display: grid;
  grid-template-columns: 64px 52px minmax(0, 1fr) 250px 150px 20px;
  gap: 18px;
  align-items: center;
}
.board__head {
  position: sticky; top: var(--toolbar-h, 82px); z-index: 20;
  background: var(--white);
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500);
}
.board__head span:nth-child(5) { text-align: right; }

.row {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: row-in 0.6s var(--ease) forwards;
  animation-delay: calc(var(--i) * 24ms);
}
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.row__main {
  width: 100%;
  padding: 16px 12px;
  background: none; border: 0; text-align: left; cursor: pointer;
  transition: background 0.2s ease;
}
.row__main:hover { background: var(--paper); }
.row__main:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.row--prize .row__main { box-shadow: inset 3px 0 0 var(--red); background: linear-gradient(90deg, rgba(168, 32, 52, 0.06), transparent 55%); }
.row--prize .row__main:hover { background: var(--paper); }
.row.is-open .row__main { background: var(--paper); }

.rank { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rank__num { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1; }
.row--prize-1 .rank__num { color: var(--red); font-size: 30px; }
.row--prize .rank__num { color: var(--red); }

.move { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.move--up { color: var(--up); }
.move--down { color: var(--gray-500); }
.move--same { color: var(--line); }
.move--new { color: var(--red); text-transform: uppercase; letter-spacing: 0.1em; }

.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
}
.avatar--empty {
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 18px; color: var(--gray-700);
}
.place .avatar--empty { background: #2a2a28; color: var(--on-ink-2); }

.who { display: flex; flex-direction: column; min-width: 0; }
.who__handle { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 13px; color: var(--gray-700); }
.metric { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.metric svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.tag--stale { color: var(--red); }

.progress { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.progress__bar { display: block; height: 4px; background: var(--line); overflow: hidden; }
.progress__fill {
  display: block; height: 100%;
  width: var(--p);
  background: var(--ink);
  transform-origin: left;
  animation: fill 1.1s var(--ease) both;
}
.progress__fill--done { background: var(--red); }
@keyframes fill { from { transform: scaleX(0); } }
.progress__label { display: flex; gap: 8px; font-size: 13px; color: var(--gray-700); }
.progress__label b { font-weight: 600; color: var(--ink); }
.progress__label .is-done { color: var(--red); font-weight: 600; }

.prize-badge {
  align-self: flex-start;
  padding: 4px 8px;
  background: var(--ink);
  color: var(--white);
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
}
.prize-badge--1 { background: var(--red); }

.views { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.views__num { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.2; white-space: nowrap; }
.views__delta { font-size: 13px; color: var(--up); font-weight: 500; white-space: nowrap; }
.views__delta--zero { color: var(--gray-500); font-weight: 400; }

.row__chevron {
  width: 10px; height: 10px; justify-self: end;
  border-right: 2px solid var(--gray-500); border-bottom: 2px solid var(--gray-500);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.row.is-open .row__chevron { transform: translateY(2px) rotate(225deg); }

/* ролики креатора */
.reels { background: var(--paper); padding: 4px 12px 20px calc(12px + 64px + 18px); }
.reels__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; font-size: 13px; color: var(--gray-700); }
.reels__profile { font-weight: 600; color: var(--ink); text-decoration: none; }
.reels__profile:hover { color: var(--red); }
.reels__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.reel {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px; gap: 16px; align-items: center;
  padding: 8px; background: var(--white); text-decoration: none;
}
a.reel:hover { outline: 1px solid var(--ink); }
.reel__thumb { width: 40px; height: 56px; object-fit: cover; background: var(--line); }
.reel__thumb--empty { display: grid; place-items: center; font-size: 12px; color: var(--gray-500); }
.reel__meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.reel__date { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 13px; color: var(--gray-700); }
.reel__bar { display: block; height: 3px; background: var(--line); }
.reel__bar span { display: block; height: 100%; width: var(--p); background: var(--ink); }
.reel__views { text-align: right; font-weight: 600; font-size: 15px; display: flex; flex-direction: column; }
.reel__views small { font-size: 12px; font-weight: 500; color: var(--up); }

.board__empty { padding: 48px 12px; display: flex; flex-direction: column; gap: 6px; color: var(--gray-700); }
.board__empty b { color: var(--ink); font-size: 16px; }
.board__hint { margin-top: 14px; font-size: 13px; color: var(--gray-500); }

/* ---------- условия и вопросы ---------- */

.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rule { border-top: 2px solid var(--ink); padding-top: 20px; }
.rule__num { font-family: var(--font-display); font-weight: 300; font-size: 28px; color: var(--red); }
.rule__title { margin-top: 12px; font-size: 17px; font-weight: 600; }
.rule__text { margin-top: 8px; color: var(--gray-700); }

.faq { border-top: 2px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0;
  font-size: 16px; font-weight: 500;
  cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--red); }
.faq__sign { position: relative; width: 16px; height: 16px; flex: none; }
.faq__sign::before, .faq__sign::after { content: ''; position: absolute; background: currentColor; transition: transform 0.3s var(--ease); }
.faq__sign::before { left: 0; right: 0; top: 7px; height: 2px; }
.faq__sign::after { top: 0; bottom: 0; left: 7px; width: 2px; }
.faq__item[open] .faq__sign::after { transform: scaleY(0); }
.faq__a { padding: 0 48px 22px 0; color: var(--gray-700); max-width: 52rem; }

/* ---------- подвал ---------- */

.footer { margin-top: 64px; background: var(--paper); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 32px 0; font-size: 13px; color: var(--gray-700); }
.footer__inner img { width: 104px; height: auto; }

/* конфетти поверх страницы на финале */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }

/* ---------- адаптив ---------- */

@media (max-width: 1080px) {
  .board__head, .row__main { grid-template-columns: 52px 48px minmax(0, 1fr) 200px 128px 16px; gap: 14px; }
  .reels { padding-left: calc(12px + 52px + 14px); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(4) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 4) { border-top: 1px solid var(--on-ink-line); }
  .stat__value { font-size: clamp(20px, 3vw, 30px); }
}

@media (max-width: 860px) {
  .podium { grid-template-columns: 1fr 1fr; }
  .place--1 { grid-column: 1 / -1; min-height: 240px; }
  .rules { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .topbar__inner { height: 56px; }
  .topbar__logo { width: 112px; }
  .hero__media img { object-position: 64% 50%; }
  .hero__media::after {
    background:
      linear-gradient(0deg, rgba(12, 12, 11, 1) 0%, rgba(12, 12, 11, 0.92) 48%, rgba(12, 12, 11, 0.35) 100%);
  }
  .hero__inner { padding-top: 96px; padding-bottom: 28px; }
  .stats { margin-top: 40px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat, .stat + .stat { padding: 16px 0 4px; border-left: 0; }
  .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--on-ink-line); }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--on-ink-line); }


  .podium { grid-template-columns: 1fr 1fr; gap: 10px; }
  .place { min-height: 0; padding: 16px; }
  .place--1 { grid-column: 1 / -1; min-height: 0; }
  .place__num { font-size: 28px; }
  .place__amount { margin-top: 14px; font-size: 32px; }
  .place--1 .place__amount { font-size: 48px; }
  .place__holder { padding-top: 18px; gap: 10px; }
  .place__holder .avatar { width: 36px; height: 36px; }
  .place--1 .place__holder .avatar { width: 44px; height: 44px; }
  .place__handle { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .place:not(.place--1) .place__holder { flex-direction: column; align-items: flex-start; gap: 8px; }
  .place__views { font-size: 12px; }
  .place__empty { padding-top: 18px; font-size: 14px; }
  .place__status { margin-top: 10px; padding-top: 10px; font-size: 12px; }

  /* на телефоне липкая панель с поиском съедала бы пятую часть экрана */
  .toolbar { position: static; padding: 12px 0; gap: 10px 16px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .updated { margin-left: auto; font-size: 12px; }

  /* «за сутки» — лентой вбок, чтобы не отодвигать рейтинг на экран вниз */
  .movers {
    display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .movers::-webkit-scrollbar { display: none; }
  .mover { flex: 0 0 72%; scroll-snap-align: start; padding: 12px 14px; }

  .board__head { display: none; }
  .row__main {
    grid-template-columns: 28px 38px minmax(0, 1fr) auto;
    grid-template-areas:
      'rank avatar who views'
      'rank avatar progress progress';
    gap: 10px 12px;
    align-items: start;
    padding: 14px 4px 14px 10px;
  }
  .rank { grid-area: rank; padding-top: 2px; }
  .row__main > .avatar { grid-area: avatar; width: 38px; height: 38px; }
  .who { grid-area: who; }
  .who__handle { font-size: 15px; }
  .who__tags { font-size: 12px; }
  .who__followers { display: none; }
  .views { grid-area: views; }
  .views__num { font-size: 15px; }
  .views__delta { font-size: 12px; }
  .progress { grid-area: progress; }
  .row__chevron { display: none; }
  .rank__num { font-size: 20px; }
  .row--prize-1 .rank__num { font-size: 24px; }

  .reels { padding: 4px 4px 16px; }
  .reel { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; }
  .reel__thumb { width: 36px; height: 50px; }

  .faq__a { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .row, .progress__fill { animation: none; opacity: 1; }
  * { transition: none !important; }
}
