/* ============================================================
   Goody Stars — реконструкция дизайна из присланного видео.
   Палитра и компоненты сняты покадрово с видео: тёмный (не чисто
   чёрный) фон, золотисто-янтарный акцент на кнопках/цене/иконках,
   карточки-строки с закруглением, нижняя выезжающая панель
   подтверждения выбора. Баннер — настоящее изображение (frontend/assets/hero-banner.jpg).
   ============================================================ */

/* ⚠️ 30.09 — Montserrat 900 курсив лежит на нашем сайте (frontend/fonts,
   лицензия OFL — fonts/OFL.txt). Раньше грузился с Google Fonts, и их файл
   стилей задерживал первый показ страницы. Браузер скачивает только те
   части шрифта (кириллица, латиница…), буквы из которых есть на экране. */
/* cyrillic-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/montserrat-900i-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/montserrat-900i-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/montserrat-900i-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/montserrat-900i-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/montserrat-900i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:           #121212;
  --bg-header:    #1a1a1a;
  --card:         #1e1e1e;
  --card-hi:      #262626;
  --border:       rgba(255, 255, 255, 0.06);
  --text:         #f2f2f2;
  --text-dim:     #8e8e93;
  --accent:       #e0a030;   /* золотисто-янтарный акцент */
  --accent-hi:    #f0b04a;
  --accent-text:  #1a1200;   /* тёмный текст поверх золотой кнопки */
  --danger:       #ff453a;
  --sale-red:     #ff453a;   /* цена со скидкой и линия зачёркивания старой цены */
  --success:      #34c759;
  --radius:       14px;
  --radius-sm:    10px;
  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif; /* жирный курсив для заголовков/акцентного текста, не для всего сайта — иначе тяжело читать */
  /* ⚠️ 30.09 — сайт всегда тёмный: говорим браузеру рисовать свои части
     (списки выбора, поля ввода, полосы прокрутки) тоже тёмными. Без этого
     на ПК в мини-приложении списки валюты/языка были белыми. */
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: transparent; /* частицы на body должны просвечивать сквозь пустые места */
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1; /* выше canvas частиц, который на fixed-позиции позади всего */
  padding-bottom: 112px; /* место под плавающую нижнюю навигацию (иконки увеличены вдвое) */
  padding-top: 118px; /* место под двухрядную шапку (верхний ряд + бегущая строка внутри стекла) */
}

#particles-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none; /* клики всегда проходят сквозь частицы к интерфейсу */
}

/* ---------- ШАПКА — "жидкое стекло" (Liquid Glass), по референсу из Figma ----------
   Честно: это CSS-имитация (blur + полупрозрачность + блик), не настоящее
   физическое преломление, как в реальном Apple Liquid Glass — то требует
   шейдеров. Но по духу (матовость, блик по краю, лёгкое свечение) — близко. */

.site-header {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 456px;
  z-index: 15;
  display: flex;
  flex-direction: column; /* верхний ряд (лого/профиль) + бегущая строка под ним, оба поверх одного и того же стекла */
  border-radius: 26px;
  overflow: hidden; /* обрезает canvas WebGL и бегущую строку точно по скруглению панели */
  /* Прозрачный по умолчанию — стекло рисует САМ шейдер (canvas внутри).
     Раньше тут был тёмный полупрозрачный фон "на случай сбоя WebGL",
     но он был виден ВСЕГДА, даже когда WebGL работал (canvas ведь тоже
     не 100%-непрозрачный) — из-за этого 15%-тонировка выглядела грязно-
     тёмной вместо чисто-оранжевой. Настоящий запасной фон — ниже,
     через .no-webgl (добавляется классом из liquid-glass.js только
     если WebGL правда недоступен). */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.site-header-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
}

.site-header.no-webgl, .bottom-nav.no-webgl { background: rgba(28, 26, 23, 0.75); }

/* блик по верхнему краю — имитация того, как свет ловится кромкой стекла */
/* Блик и искажение теперь считает сам WebGL-шейдер (liquid-glass.js),
   а не CSS ::before — иначе получилось бы два блика поверх друг друга. */

.site-logo { width: 64px; height: 51px; object-fit: contain; position: relative; z-index: 1; }

.site-name { font-family: var(--font-display); font-style: italic; font-size: 19px; font-weight: 800; color: var(--text); position: relative; z-index: 1; }

/* Кнопка профиля в шапке (как в видео — иконка справа, не в нижней
   панели). margin-left:auto прижимает её вправо, оставляя лого+название
   слева, без лишней обёртки в разметке. */
.header-profile-btn {
  position: relative;
  z-index: 1;
  margin-left: auto;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.header-profile-btn svg { width: 26px; height: 26px; }

.header-profile-btn.active { background: rgba(224, 160, 48, 0.25); color: var(--accent-hi); }

/* Canvas WebGL-стекла — заполняет всю панель, обрезается по скруглению
   через overflow:hidden родителя (.site-header/.bottom-nav), лежит ПОД
   реальным содержимым (лого/название, иконки навигации). */
.glass-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- БЕГУЩАЯ СТРОКА (наша, не из видео — так и оставляем) ---------- */

.marquee-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 0 9px;
  /* Раньше был свой фон/рамка — отдельная полоска ПОД стеклом шапки.
     Теперь бегущая строка сама ВНУТРИ стеклянной панели (см. index.html),
     фон не нужен — само стекло (canvas) уже отрисовано позади через
     z-index:0, буквы должны просвечиваться прямо через него. */
}

.marquee {
  display: inline-block;
  padding-left: 100%;
  font-size: 12px;
  color: var(--accent-hi);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); /* чтобы текст читался на любом фоне под стеклом */
  animation: marquee-scroll 20s linear infinite;
}

.marquee .promo-code {
  font-weight: 800;
  color: #fff;
  background: rgba(224, 160, 48, 0.35);
  padding: 1px 6px;
  border-radius: 5px;
  margin-left: 4px;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ---------- КОНТЕНТ ---------- */

.content { padding: 16px; }

/* Баннер — теперь настоящее изображение (то самое, из видео) */
.promo-banner {
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
  line-height: 0; /* убирает случайный зазор под inline-картинкой */
}

.promo-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.title-icon { width: 20px; height: 20px; object-fit: contain; }

[id^="flash-sale-banner-"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(224, 160, 48, 0.25), rgba(240, 176, 74, 0.15));
  border: 1px solid rgba(224, 160, 48, 0.4);
  border-radius: var(--radius-sm);
  color: var(--accent-hi);
  font-weight: 700;
  font-size: 13.5px;
  animation: flash-sale-pulse 2s ease-in-out infinite;
}

[id^="flash-sale-countdown-"] { font-variant-numeric: tabular-nums; } /* цифры не "прыгают" по ширине каждую секунду */

@keyframes flash-sale-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

h3, h4 { font-weight: 700; color: var(--text); }

/* ---------- СПИСОК-СТРОКИ (звёзды/premium) ---------- */

.stars-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.stars-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.stars-row:active { background: var(--card-hi); }
.stars-row.selected { border-color: var(--accent); background: var(--card-hi); }

/* кружок-радио слева, как в видео */
.stars-row::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #4a4a4a;
  flex-shrink: 0;
}

.stars-row.selected::before {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 40%, transparent 44%);
}

.star-icon { width: 20px; height: 20px; object-fit: contain; }

.qty { flex: 1; font-size: 16px; font-weight: 600; color: var(--text); }

.price { color: var(--accent-hi); font-weight: 700; font-size: 16px; white-space: nowrap; }

/* ---------- СВОЁ КОЛИЧЕСТВО ---------- */

.custom-amount {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 6px;
}

.custom-amount::before { content: "✏️"; font-size: 15px; }
.custom-amount input { flex: 1; }
.custom-amount button { flex-shrink: 0; }

/* ---------- ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ ПОДТВЕРЖДЕНИЯ (как в видео) ---------- */

.selection-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 106px; /* нижняя навигация с увеличенными иконками занимает больше места снизу */
  width: 100%;
  max-width: 480px;
  background: #1c1c1c;
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  display: none;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
  z-index: 20;
}

.selection-sheet.visible { display: block; }

.selection-sheet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.selection-sheet-row b { color: var(--text); font-size: 15px; font-weight: 700; }
.selection-sheet-row .price { font-size: 15px; }

/* ---------- ПОЛЯ ВВОДА ---------- */

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 12px 14px;
  background: var(--card);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}

/* ⚠️ 30.09 — на айфоне (Telegram, iOS 16) набранный текст был чёрным на
   тёмном поле: iOS красит текст полей своим цветом поверх color.
   -webkit-text-fill-color перебивает это; appearance:none убирает
   системное оформление поля. */
input[type="text"], input[type="number"] {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--accent);
  -webkit-appearance: none;
  appearance: none;
}

/* выпадающий список (валюта, язык) — пункты в цветах сайта, а не белые */
select option, select optgroup {
  background-color: var(--card-hi);
  color: var(--text);
}

/* стрелки «больше/меньше» у числовых полей (видны на ПК) — лишние, число вводят с клавиатуры */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

input:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: #6b6b6b; -webkit-text-fill-color: #6b6b6b; }

/* ---------- КНОПКИ ---------- */

.primary-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: var(--accent-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.12s, transform 0.08s;
}

.primary-btn:active:not(:disabled) { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.secondary-btn {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.secondary-btn:active { background: var(--card-hi); }

.danger-btn {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  border: 1.5px solid rgba(255, 69, 58, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 69, 58, 0.08);
  color: var(--danger);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- ВЫБОР ПОЛУЧАТЕЛЯ / СПОСОБА ОПЛАТЫ (карточки-опции) ---------- */

/* ---------- РАСКРЫТИЕ НАГРАДЫ — "вам выпало X" ---------- */

.reward-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 75; /* выше остальных модалок сайта — награда всегда поверх всего */
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reward-reveal-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-hi);
  border: 1.5px solid var(--accent);
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.reward-reveal-icon { width: 84px; height: 84px; object-fit: contain; margin-bottom: 14px; }
.reward-reveal-text { font-family: var(--font-display); font-style: italic; font-size: 17px; font-weight: 800; margin-bottom: 18px; line-height: 1.4; }

.reward-code-box {
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-hi);
}

/* ---------- ВЫБОР ПОЛУЧАТЕЛЯ ДЛЯ ЗВЁЗД/NFT-НАГРАДЫ ---------- */
/* переиспользует тот же нижний-лист паттерн, что и .milestone-claim-overlay */

.reward-recipient-overlay {
  position: fixed;
  inset: 0;
  z-index: 74;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ---------- ПОДБОРКА NFT В ПРЕДЕЛАХ БЮДЖЕТА НАГРАДЫ ---------- */

.reward-nft-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 74;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.reward-nft-picker-sheet {
  width: 100%;
  max-width: 456px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--card-hi);
  border-radius: 26px 26px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
}

.reward-nft-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.option-card.selected { border-color: var(--accent); }
/* ⚠️ 29.09 — способы оплаты: надбавка справа в карточке; способ, которым
   сейчас заплатить нельзя (не хватает баланса), — приглушён и не выбирается */
.pay-method-fee {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-hi);
  margin-right: 8px;
  white-space: nowrap;
}
.pay-method-fee-free { color: var(--text-dim); font-weight: 600; }
.option-card.disabled { opacity: 0.45; cursor: not-allowed; }

.option-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.option-card-text { flex: 1; }
.option-card-title { font-weight: 700; font-size: 15px; color: var(--text); }
.option-card-subtitle { font-size: 12.5px; color: var(--text-dim); margin-top: 1px; }
.option-card-check { color: var(--accent-hi); font-weight: 900; font-size: 16px; display: none; }
.option-card.selected .option-card-check { display: block; }

/* ---------- ПРОМОКОД ---------- */

.promo-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
  padding: 10px 2px;
  cursor: pointer;
}

.promo-row { display: none; gap: 8px; margin-bottom: 14px; }
.promo-row.visible { display: flex; }
.promo-row input { flex: 1; }
.promo-row button {
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--card-hi);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- ИТОГОВАЯ КАРТОЧКА ЗАКАЗА ---------- */

.confirm-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.confirm-row:last-child { border-bottom: none; }
.confirm-row span:first-child {
  color: var(--text-dim);
  /* ⚠️ 20.09 — нашёл системным сканом всего сайта: на экране оплаты
     иконка товара (#checkout-icon) стояла в ОБЫЧНОМ <span>, не во
     flex-контейнере. У картинки внутри обычного текстового потока
     браузер по умолчанию ставит vertical-align:baseline — иконка
     подвисала над текстом, а не была с ним на одном уровне.
     Тот же надёжный приём, что и везде на сайте (flex + align-items),
     а не точечный хак с vertical-align. */
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.confirm-row span:last-child { color: var(--text); font-weight: 600; }
.confirm-row.total span:last-child { color: var(--accent-hi); font-size: 17px; font-weight: 800; }

/* ---------- ЭКРАН СТАТУСА ЗАКАЗА (ожидание/готово/отменён) ---------- */

.status-screen { text-align: center; padding-top: 8px; }
.status-icon { font-size: 52px; margin-bottom: 12px; }
.status-icon.processing {
  /* ⚠️ Добавлено 04.09 — раньше во время обработки покупки (может занимать
     несколько секунд — несколько запросов к Fragment + сама блокчейн-
     транзакция) экран просто ничего не показывал, выглядело как зависание. */
  animation: status-icon-pulse 1.4s ease-in-out infinite;
}
@keyframes status-icon-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.94); }
  50%      { opacity: 1;    transform: scale(1); }
}

/* ⚠️ Добавлено 04.09 — тот же принцип для самой кнопки "Оплатить": пока
   заказ создаётся и обрабатывается (может занимать несколько секунд —
   Fragment API + блокчейн), кнопка должна явно показывать, что что-то
   происходит, а не просто ничего не делать до появления следующего
   экрана. Крутящийся ободок в цвет акцента сайта, не сторонняя иконка. */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid var(--accent-text);
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spinner-spin 0.7s linear infinite;
}
@keyframes btn-spinner-spin {
  to { transform: rotate(360deg); }
}
.status-title { font-size: 21px; font-weight: 800; margin: 0 0 6px; }
.status-subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }
.status-note { color: var(--text-dim); font-size: 12px; text-align: center; margin-top: 14px; }

/* ---------- НИЖНЯЯ НАВИГАЦИЯ — "жидкое стекло", тот же приём, что и в шапке ---------- */

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  width: calc(100% - 24px);
  max-width: 456px;
  display: flex;
  justify-content: space-around;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  border-radius: 26px;
  overflow: hidden; /* обрезает canvas WebGL точно по скруглению панели */
  background: transparent; /* стекло рисует сам шейдер; запасной фон — через .no-webgl, см. .site-header */
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  z-index: 15;
}

/* Блик и искажение теперь считает сам WebGL-шейдер (liquid-glass.js) */

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  text-decoration: none;
  color: #a8a4a0;
  padding: 4px 10px;
}

.nav-item span.nav-icon { font-size: 21px; line-height: 1; }

.nav-item .nav-icon-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.nav-item.active { color: var(--accent-hi); }

.nav-item .soon {
  font-size: 8px;
  background: var(--card-hi);
  color: var(--text-dim);
  padding: 1px 5px;
  border-radius: 6px;
  margin-top: -2px;
}

/* ---------- ПРОФИЛЬ ---------- */

.profile-avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 16px;
  margin-bottom: 12px;
  text-align: center;
}

.profile-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5ec26a, #3aa856);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}

.profile-avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#profile-username { font-size: 17px; font-weight: 700; color: var(--text-dim); margin: 0; }

.balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.balance-row-label { font-size: 12.5px; color: var(--text-dim); }
#profile-balance { font-size: 22px; font-weight: 800; color: var(--accent-hi); display: block; margin-top: 2px; }

/* ---------- СТИЛИЗОВАННОЕ УВЕДОМЛЕНИЕ/ОШИБКА (взамен системного alert()) ---------- */

.app-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 80; /* поверх остальных модалок сайта */
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app-alert-card {
  width: 100%;
  max-width: 340px;
  background: var(--card-hi);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
}

.app-alert-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.app-alert-message { font-size: 14px; color: var(--text-dim); margin: 0 0 18px; line-height: 1.4;
  /* 28.09 — переносы строк в тексте сообщения должны быть видны: длинные
     подсказки (например, как задать юзернейм) без этого слипались в одну
     кашу. pre-line уважает \n, но лишние пробелы по-прежнему схлопывает. */
  white-space: pre-line; }

/* ⚠️ 29.09 — окно подтверждения (отмена заказа и т.п.) в стиле сайта:
   раньше выскакивало системное белое окно браузера с синей кнопкой.
   Две кнопки рядом: «нет» — прозрачная с рамкой, «да» — фирменная. */
.app-confirm-actions { display: flex; gap: 10px; }
.app-confirm-actions > button { flex: 1; width: auto; }
.app-confirm-no-btn {
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.app-alert-ok-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-text);
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ---------- ДЕТАЛЬНЫЙ ВИД ОДНОГО ЛОТА NFT ---------- */

.nft-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.nft-detail-sheet {
  position: relative;
  width: 100%;
  max-width: 456px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card-hi);
  border-radius: 26px 26px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
}

.nft-detail-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  z-index: 1;
}

.nft-detail-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  margin-bottom: 14px;
}
.nft-detail-image { width: 100%; height: 100%; object-fit: cover; }
/* 30.09 — анимация лота поверх картинки: появляется плавно, когда нарисован
   первый кадр (класс playing ставит script.js) */
.nft-detail-anim {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.nft-detail-anim.playing { opacity: 1; }
.nft-detail-anim svg { display: block; width: 100% !important; height: 100% !important; }
/* место под модель/фон/символ/тираж занято заранее — окно не прыгает, когда они приходят */
.nft-detail-attrs { min-height: 164px; }

.nft-detail-title { font-size: 17px; font-weight: 800; margin-bottom: 12px; }

.nft-detail-loading { color: var(--text-dim); font-size: 13.5px; padding: 8px 0; }

.nft-detail-attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.nft-detail-attr-row:last-child { border-bottom: none; }
.nft-detail-attr-label { color: var(--text-dim); }
.nft-detail-attr-value { display: flex; align-items: center; gap: 8px; font-weight: 600; }

.nft-detail-rarity {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-text);
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  padding: 2px 8px;
  border-radius: 999px;
}

.nft-detail-buy-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--accent-text);
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ---------- ПОЛОСА ПРОГРЕССА ДО ПОДАРКА ЗА НАКОПЛЕННЫЕ ЗВЁЗДЫ ---------- */

.milestone-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.milestone-bar-track {
  position: relative;
  width: 100%;
  height: 34px; /* достаточно высоты, чтобы числа читались прямо на самой полосе */
  background: rgba(255, 255, 255, 0.08); /* серая полоса в цвет сайта */
  border-radius: 999px;
  overflow: hidden;
}

.milestone-bar-fill {
  position: relative;
  height: 100%;
  width: 0%; /* заполняется через JS в зависимости от прогресса */
  min-width: 34px; /* даже при малом % — заливка не превращается в нечитаемую тонкую полоску */
  /* ⚠️ 30.09 — и не уже самого числа: при малом прогрессе «1030» обрезалось до «10» */
  min-width: max-content;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border-radius: 999px;
  transition: width 0.4s ease; /* плавно "подтекает" при обновлении, а не дёргается */
  /* небольшой скошенный "рельеф" на конце заливки вместо ровного края —
     тонкая грань, как на референсе, а не просто прямая линия среза */
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
}

.milestone-bar-fill-label {
  padding-left: 14px;
  padding-right: 12px; /* место под скошенный край заливки — число не заезжает на него */
  font-size: 15px;
  font-weight: 800;
  color: #1a1200; /* тёмный текст поверх оранжевой заливки — так читается лучше, чем светлый */
  white-space: nowrap;
}

.milestone-bar-target-label {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.milestone-bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.milestone-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); /* та же тёмная "таблетка", что и дорожка полосы — в цвет сайта */
}

.milestone-level-pill {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

/* ⚠️ Переделано 06.09 — раньше кнопка подарка была display:none, когда
   награды нет, и таблетка уровня растягивалась на всю ширину экрана.
   Теперь обе всегда на своих местах: уровень слева на половину ширины,
   подарок справа. Без награды кнопка серая и неактивная (видно, что она
   есть и что там будет), с наградой — оранжевая и с пульсацией. */
.milestone-claim-btn {
  font-size: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid transparent;
  cursor: default;
  color: var(--text-dim);
  filter: grayscale(1);
  opacity: 0.5;
  transition: opacity 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.milestone-claim-btn.has-reward {
  color: inherit;
  border-color: var(--accent);
  cursor: pointer;
  filter: none;
  opacity: 1;
  animation: milestone-claim-pulse 1.8s ease-in-out infinite; /* подсвечивается, чтобы заметили, что есть что забрать */
}

@keyframes milestone-claim-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 160, 48, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(224, 160, 48, 0); }
}

/* ---------- МОДАЛКА ПОЛУЧЕНИЯ ПОДАРКА ---------- */

.milestone-claim-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.milestone-claim-sheet {
  width: 100%;
  max-width: 456px;
  background: var(--card-hi);
  border-radius: 26px 26px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
}

.milestone-claim-title { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.milestone-claim-subtitle { font-size: 13px; color: var(--text-dim); margin: 0 0 14px; }

.stat-cards { display: flex; gap: 10px; margin-bottom: 12px; }
.stat-card {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 10px;
  text-align: center;
}
.stat-card .stat-value { font-size: 22px; font-weight: 800; color: var(--text); display: block; }
.stat-card .stat-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.stat-icon-img { width: 12px; height: 12px; object-fit: contain; vertical-align: -1px; }

/* строки-переходы в профиле (Реферальная программа →, История заказов →, и т.д.) */
.profile-nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
}

.profile-nav-row .row-icon { font-size: 22px; }
.profile-nav-row .row-text { flex: 1; }
.profile-nav-row .row-title { font-weight: 700; font-size: 14.5px; }
.profile-nav-row .row-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.profile-nav-row .row-arrow { color: var(--text-dim); font-size: 18px; }

.profile-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 10px;
}
.profile-select-row label { font-size: 14px; color: var(--text-dim); }
.profile-select-row select { width: auto; padding: 6px 10px; background: var(--card-hi); }

/* ---------- ПОДЭКРАН С НАЗАД (рефералка / история заказов) ---------- */

.subscreen-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- Условия использования — аккордеон на 4 документа ---------- */

.legal-accordion { display: flex; flex-direction: column; gap: 10px; }

.legal-item {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

.legal-item-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.legal-item-arrow {
  flex-shrink: 0;
  color: var(--accent-hi);
  font-size: 12px;
  transform: rotate(180deg); /* по умолчанию — вверх, как просил Слава */
  transition: transform 0.2s ease;
}

/* открытый пункт — стрелка смотрит вниз */
.legal-item.open .legal-item-arrow { transform: rotate(0deg); }

.legal-item-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.legal-item.open .legal-item-body {
  max-height: 900px; /* с запасом — тексты компактные, не обрежет */
}

.legal-item-body p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 16px 12px;
}
.legal-item-body p:first-child { margin-top: 2px; }
.legal-item-body p.legal-contact {
  color: var(--accent-hi);
  font-weight: 600;
  margin-bottom: 16px;
}
.legal-item-body ul.legal-list {
  margin: 0 16px 12px;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}
.legal-item-body ul.legal-list li { margin-bottom: 2px; }

.referral-hero { text-align: center; margin-bottom: 18px; }
.referral-hero .emoji { font-size: 42px; }
.referral-hero h3 { font-size: 20px; margin: 8px 0 4px; }
.referral-hero p { color: var(--text-dim); font-size: 13.5px; margin: 0; }
.referral-hero .pct { color: var(--accent-hi); font-weight: 800; }

.link-row {
  display: flex;
  align-items: center;   /* 20.09 — было пропущено, поле ссылки и кнопка копирования не были на одном уровне */
  gap: 8px;
  margin-bottom: 14px;
}
.link-row input { flex: 1; }
.link-row button {
  width: 46px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  color: var(--accent-text);
  font-size: 16px;
  cursor: pointer;
}

.share-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }  /* 20.09 */
.share-row button {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

#orders-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
#orders-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.repeat-order-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.empty-note { text-align: center; color: var(--text-dim); font-size: 13.5px; padding: 30px 10px; }

.ref-tier-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
  white-space: pre-line;
}

/* ---------- КОНКУРС РЕФЕРАЛОВ (29.09) ----------
   contest-idle — нет конкурса / запланирован (серое окно),
   contest-live — идёт (акцентная рамка, места в реальном времени). */

.contest-card {
  margin-top: 22px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.contest-card.contest-idle { filter: grayscale(0.9); opacity: 0.85; }
.contest-card.contest-live {
  border-color: rgba(224, 160, 48, 0.55);
  box-shadow: 0 0 0 1px rgba(224, 160, 48, 0.15), 0 8px 24px rgba(224, 160, 48, 0.08);
}

.contest-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.contest-icon { font-size: 20px; }

.contest-timer {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.contest-timer b {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 0.5px;
}
.contest-live .contest-timer b { color: var(--accent-hi); }

.contest-prize {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(224, 160, 48, 0.12);
  color: var(--accent-hi);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  white-space: pre-line;
}
.contest-rule { margin-top: 8px; font-size: 12px; color: var(--text-dim); text-align: center; }

.contest-places { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.contest-place {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--card-hi);
  font-size: 13.5px;
}
.contest-place.prize { border: 1px solid rgba(224, 160, 48, 0.35); }
.contest-place.empty { color: var(--text-dim); }
.contest-place.me { outline: 1px solid var(--accent); }
.contest-place-rank { min-width: 26px; font-size: 15px; }
.contest-place-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contest-place-count { font-weight: 800; color: var(--accent-hi); font-variant-numeric: tabular-nums; }

.contest-me { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--text-dim); }

/* ---------- NFT СЕТКА ---------- */

.nft-search-wrap { margin-bottom: 10px; }
.nft-search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.nft-search-input::placeholder { color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); }

.nft-filters-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.nft-filter-pill {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nft-filter-pill.active {
  border-color: var(--accent);
  color: var(--accent-hi);
  background: rgba(224, 160, 48, 0.1); /* лёгкая подсветка акцентом, когда в этом фильтре что-то выбрано */
}

.nft-filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.nft-filter-sheet {
  width: 100%;
  max-width: 456px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--card-hi);
  border-radius: 22px 22px 0 0;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px));
}

.nft-filter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nft-filter-sheet-title { font-size: 17px; font-weight: 800; }
.nft-filter-sheet-actions { display: flex; gap: 14px; align-items: center; }
.nft-filter-clear-btn, .nft-filter-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  color: var(--text-dim);
  padding: 4px;
}
.nft-filter-clear-btn { color: var(--accent-hi); }

.nft-filter-sheet-list { overflow-y: auto; }

.nft-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.nft-filter-row:last-child { border-bottom: none; }

.nft-filter-checkbox {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent-text);
}
.nft-filter-checkbox.checked {
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border-color: transparent;
}

.nft-filter-row-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--card); /* видно, пока картинка ещё грузится */
}

.nft-filter-row-label { flex: 1; font-size: 14.5px; font-weight: 600; min-width: 0; }
.nft-filter-row-count { font-size: 12px; color: var(--text-dim); font-weight: 400; margin-left: 6px; }

.nft-grid-more { height: 1px; }

.nft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.nft-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.nft-card:active { border-color: var(--accent); }

.nft-card-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--card-hi); /* видно, пока настоящая картинка лота грузится */
  display: flex;
  align-items: center;
  justify-content: center;
}
.nft-card-image { width: 100%; height: 100%; object-fit: cover; }
.nft-card-image-fallback { width: 40%; height: 40%; object-fit: contain; opacity: 0.5; } /* если своей картинки лота ещё нет */

.nft-card-body { padding: 10px 12px 12px; }
.nft-card-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nft-card-number { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }

.nft-card-price {
  display: inline-block;
  color: var(--accent-text);
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  font-weight: 800;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
}
.nft-card-status { display: none; } /* статус не показываем отдельно — и так "В продаже" по умолчанию */

/* ---------- СЛУЖЕБНЫЕ ЭКРАНЫ ---------- */

.login-screen {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 24px;
  text-align: center;
}

.login-card {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ⚠️ 29.09 — логотип Telegram на экране входа = кнопка входа через бота.
   Мягкая «пульсация», чтобы было видно, что на него нажимают; пока
   ссылка на бота ещё готовится (доли секунды) — чуть прозрачнее. */
.login-logo-btn {
  display: inline-block;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, opacity 0.2s ease;
  animation: login-logo-pulse 2.4s ease-in-out infinite;
}
.login-logo-btn:active { transform: scale(0.93); }
.login-logo-btn.is-waiting { opacity: 0.55; cursor: progress; animation: none; }
@keyframes login-logo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 171, 238, 0.45); }
  50%      { box-shadow: 0 0 0 12px rgba(42, 171, 238, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .login-logo-btn { animation: none; }
}

.login-card-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-top: 4px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35)); /* логотип Telegram сам по себе синий — свой цветной оттенок сюда не добавляем */
}

.login-card-text {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  font-style: italic;
  text-align: center;
  margin: 0;
  line-height: 1.35;
}

.login-card p {
  color: var(--text);
  font-size: 14px;
  margin: 0;
}

.login-fallback-text {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0 0;
}

.bot-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto 0;
  padding: 11px 20px;
  background: #2AABEE; /* фирменный синий Telegram — узнаваемо, не наш акцентный цвет темы */
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  width: fit-content;
  transition: filter 0.15s ease;
}
.bot-login-btn:active { filter: brightness(0.9); }
.bot-login-btn img { width: 20px; height: 20px; border-radius: 50%; }

.unavailable-msg {
  text-align: center;
  padding: 16px;
  background: rgba(224, 160, 48, 0.1);
  border-radius: var(--radius);
  color: var(--accent-hi);
  font-weight: 700;
  font-size: 14px;
}

/* ---------- АДАПТИВ ---------- */

@media (max-width: 340px) {
  .content { padding: 12px; }
  .stars-row { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; padding-left: 0; }
  [id^="flash-sale-banner-"] { animation: none; }
}

button:focus-visible, input:focus-visible, select:focus-visible, .nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ⚠️ Добавлено 07.09 — фирменная иконка звезды прямо в тексте награды
   вместо системного эмодзи ⭐️. Размер по строке, чтобы вписывалась
   в текст, а не выпирала. */
.reward-inline-icon {
  height: 1.05em;
  width: auto;
  vertical-align: -0.15em;
  margin: 0 0.12em;
}

/* ---------- ЦЕНЫ ПРИ РАСПРОДАЖЕ (обновлено 20.09) ---------- */
/* По просьбе Славы:
   - старая цена: СЕРЫЕ цифры, зачёркнутые ОРАНЖЕВОЙ линией (цвет сайта);
   - цена со скидкой: БЕЛАЯ на ЗОЛОТИСТОЙ подложке — как промокод в
     бегущей строке, но подложка плотнее (0.85 вместо 0.35), чтобы её
     было хорошо видно везде, включая яркую оранжевую кнопку «Оплатить».
   Вид одинаковый во всех местах: список, карточка, шторка, оплата,
   кнопка, история заказов. */

.price-original {
  color: var(--text-dim) !important;
  text-decoration: line-through;
  text-decoration-color: var(--accent);   /* оранжевый цвет сайта */
  text-decoration-thickness: 1.5px;
  font-size: 0.85em;
  font-weight: 500;
  margin-right: 6px;
  white-space: nowrap;
}

.price-sale {
  /* !important — цена вставляется внутрь блоков со своим цветом текста
     (например, .confirm-row span:last-child), иначе наследовала бы его */
  color: #fff !important;
  background: rgba(224, 160, 48, 0.35);   /* точь-в-точь как промокод в бегущей строке (20.09) */
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ---------- ТАЙМЕР РАСПРОДАЖИ ПОВЕРХ БЕГУЩЕЙ СТРОКИ ---------- */
/* ⚠️ 20.09 — раньше строка и таймер стояли РЯДОМ (flex), и из-за этого
   бегущий текст ломался: появлялся и исчезал, не доходя до таймера.
   Теперь строка едет по всей ширине как раньше, а таймер ЛЕЖИТ ПОВЕРХ
   неё слева — текст проезжает под ним, будто ничего не изменилось. */

.marquee-wrap {
  position: relative;   /* чтобы таймер позиционировался внутри строки */
}

.sale-timer {
  position: absolute;
  left: 8px;
  /* ⚠️ Выравнивание по ТЕКСТУ строки, а не по всей полосе (20.09).
     У .marquee-wrap отступ только СНИЗУ (padding: 0 0 9px), поэтому
     сам текст прижат кверху. Раньше таймер центровался по всей полосе
     ВМЕСТЕ с этим пустым отступом и оказывался на 3px ниже текста —
     бегущий текст заходил в его ВЕРХНЮЮ часть. Центрируем по области
     без нижнего отступа: сдвигаем вверх на половину отступа (9px / 2). */
  top: calc(50% - 4.5px);
  transform: translateY(-50%);
  z-index: 3;           /* над бегущим текстом */
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: rgba(224, 160, 48, 0.35);   /* точь-в-точь как промокод в бегущей строке */
  padding: 1px 6px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;     /* цифры не «прыгают» при смене секунд */
  pointer-events: none;
}

/* ---------- СПРАВА НАЛЕВО (иврит, 30.09) ----------
   Страница зеркалится сама (dir="rtl" ставит i18n.js). Здесь — только
   места, где зеркалить не надо или стрелка должна смотреть в другую
   сторону. */
[dir="rtl"] .row-arrow,
[dir="rtl"] .back-arrow { display: inline-block; transform: scaleX(-1); }
/* шапка (логотип, название, кнопка профиля, бегущая строка) и нижняя
   панель — бренд, на всех языках одинаковые: не зеркалим (просьба Славы).
   Бегущая строка от этого едет справа налево, как на остальных языках. */
[dir="rtl"] .site-header,
[dir="rtl"] .bottom-nav { direction: ltr; }
/* каталог NFT: названия, номера и цены — латиницей, как на остальных
   языках (в зеркальном виде карточки выглядели криво) */
[dir="rtl"] .nft-grid { direction: ltr; }
/* условия использования написаны по-английски — читаются слева направо
   (иначе на иврите точки переезжали в начало строк) */
[dir="rtl"] .legal-item { direction: ltr; text-align: left; }
/* полоса прогресса наград — как на остальных языках (слева направо),
   иначе число заливки наезжало на число «сколько осталось» */
[dir="rtl"] .milestone-bar-track { direction: ltr; }
