/* bird.gg — дизайн «полёт»: глубокая бирюза, желток для хитов и скидок, переходы между страницами.
   Подключается последним и переопределяет styles.css / extra.css / mobile.css. */
:root {
  --bg: #061A1C;        /* Глубина */
  --bg-2: #08201F;
  --card: #0D2629;      /* Плита */
  --card-2: #12302F;
  --line: #1A3A3C;
  --text: #E8F6F3;      /* Перо */
  --muted: #7FA6A1;     /* Туман */
  --accent: #2EE6D0;    /* Бирюза */
  --accent-ink: #032321;
  --yolk: #FFC93C;      /* Желток: только хиты и скидки */
  --yolk-ink: #2A1E00;
  --body: "Onest", "Segoe UI", system-ui, sans-serif;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --ease-fly: cubic-bezier(.2, .8, .2, 1);
}
html, body { background: var(--bg); }
body { font-family: var(--body); }
.top { background: rgba(6, 26, 28, .86); border-bottom: 1px solid rgba(46, 230, 208, .08); }

/* ---------- каталог: обложка главная, карточка-коробка уходит ---------- */
.grid { gap: 18px 14px; }
.tile { padding: 0; gap: 8px; background: none; border-radius: 0; transition: transform .25s var(--ease-fly); }
.tile:hover { background: none; transform: translateY(-3px); }
.tile .tile-art { border-radius: 22px; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 14px 30px -18px rgba(0, 0, 0, .9); transition: box-shadow .25s; }
.tile:hover .tile-art { box-shadow: 0 0 0 2px var(--accent), 0 18px 34px -16px rgba(46, 230, 208, .35); }
.tile b { padding-inline: 2px; font-size: 15px; }
.tile .from { justify-self: start; margin-left: 2px; padding: 2px 9px; border-radius: 8px; background: var(--card); color: var(--text); font-weight: 600; font-size: 13px; }
.badge { top: 10px; left: 10px; z-index: 1; background: var(--yolk); color: var(--yolk-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
/* «Хит» горит: тёплый градиент, мягкое мерцание свечения и огонёк */
.tile .badge { display: inline-flex; align-items: center; gap: 3px; background: linear-gradient(135deg, #FFD54A, #FF9A2E); animation: hit-glow 2.4s ease-in-out infinite; }
.tile .badge::before { content: "🔥"; font-size: 12px; line-height: 1; display: inline-block; transform-origin: 50% 90%; animation: hit-flame 1.3s ease-in-out infinite; }
@keyframes hit-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, .35), 0 0 8px rgba(255, 150, 40, .45); }
  50% { box-shadow: 0 4px 12px rgba(0, 0, 0, .35), 0 0 16px rgba(255, 120, 30, .8); }
}
@keyframes hit-flame {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  50% { transform: scale(1.18) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) { .tile .badge, .tile .badge::before { animation: none; } }
.lines .disc { color: var(--yolk); }
.cat-tabs .chip { border-radius: 12px; }

/* ---------- страница игры: обложка — большая шапка ---------- */
.game-head { gap: 18px; }
.game-head .tile-art { width: 112px; border-radius: 26px; box-shadow: 0 18px 40px -20px rgba(46, 230, 208, .45); }
@media (max-width: 760px) {
  .game-head { flex-direction: column; align-items: flex-start; }
  .game-head .tile-art { width: 100%; max-height: 220px; aspect-ratio: 16 / 9; font-size: 72px; }
}

/* ---------- отклик на нажатие ---------- */
.btn, .chip, .tile, .tabbar a, .wallet-chip, .wl-presets button { -webkit-tap-highlight-color: transparent; }
.btn:active, .chip:active, .wl-presets button:active, .wallet-chip:active { transform: scale(.96); }
.tile:active { transform: scale(.97); }
.tabbar a.on svg { animation: tabpop .35s var(--ease-fly); }
@keyframes tabpop { 40% { transform: translateY(-3px) scale(1.12); } }

/* ---------- окна: на телефоне выезжают снизу ---------- */
dialog[open] { animation: sheet-in .32s var(--ease-fly); }
dialog[open]::backdrop { animation: fade-in .25s ease; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 760px) {
  dialog#loginDlg, dialog#ordersDlg { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  @keyframes sheet-in { from { transform: translateY(100%); } }
}

/* ---------- переходы между страницами (View Transitions) ----------
   шапка и нижняя панель стоят на месте, содержимое плавно сменяется,
   обложку нажатой игры «переносит» в шапку страницы игры */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
.tabbar { view-transition-name: tabbar; }
::view-transition-group(cover) { animation-duration: .45s; animation-timing-function: var(--ease-fly); }
::view-transition-old(root) { animation: .22s ease both vt-out; }
::view-transition-new(root) { animation: .32s var(--ease-fly) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* ---------- кто отключил анимации — без движения ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}

/* ---------- заголовки: один h1 на главной («Каталог…»), заголовки баннеров — h2 с прежним видом ---------- */
.page-h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.slide .slide-title { font-size: clamp(26px, 4.4vw, 46px); line-height: 1.08; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }

/* ---------- баннеры: только картинка, весь баннер — ссылка на игру ---------- */
.hero { min-height: 0; aspect-ratio: 1600 / 1068; }
.slide.banner { display: block; padding: 0; background: var(--card) var(--img) center / cover no-repeat; cursor: pointer; }
.slide.banner::after { content: none; }
a.slide { color: inherit; text-decoration: none; }
.hero .dots { z-index: 2; }
/* компьютер: широкий баннер 2780 × 800, если загружена картинка для ПК */
@media (min-width: 761px) { .hero.hero-pc { aspect-ratio: 2780 / 800; } }

/* ---------- обложки: ровный квадрат; у игр без картинки — аккуратная плашка с инициалами ---------- */
.tile-art { aspect-ratio: 1; background-size: cover; background-position: center; }
.tile-art:not(.has-img) { background: linear-gradient(140deg, var(--c1, #12302F), var(--c2, #0D2629)); color: rgba(255, 255, 255, .92);
  font: 800 clamp(26px, 6vw, 40px)/1 var(--display); letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }

/* ---------- уведомление о cookies ---------- */
.cookie-bar { position: fixed; z-index: 60; left: 50%; translate: -50% 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: min(92vw, 360px);
  padding: 16px 18px; border-radius: 20px; background: rgba(13, 38, 41, .97); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px); animation: sheet-in .35s var(--ease-fly); transition: opacity .25s, transform .25s; }
.cookie-bar.gone { opacity: 0; transform: translateY(12px); }
.cookie-bar .cb-top { display: flex; align-items: center; gap: 10px; }
.cookie-bar svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.2; }
.cookie-bar svg circle { fill: var(--accent); stroke: none; }
.cookie-bar .cb-title { font: 700 17px/1.2 var(--display); }
.cookie-bar .cb-sub { margin-top: 6px; color: var(--muted); font-size: 14px; }
.cookie-bar .cb-btns { display: flex; gap: 8px; margin-top: 12px; }
.cookie-bar .cb-more, .cookie-bar .cb-ok { flex: 1; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 14px; text-decoration: none; }
.cookie-bar .cb-more { border: 1px solid var(--line); color: var(--text); }
.cookie-bar .cb-ok { border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
@media (max-width: 760px) { body:has(.tabbar) .cookie-bar { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- без выделения и «зажать — скопировать» (поля ввода работают) ---------- */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; }
/* искры по ПКМ */
.spark { position: fixed; z-index: 9999; border-radius: 50%; pointer-events: none; will-change: transform, opacity; }

/* ---------- «Хит» везде одинаковый: как на главной (жёлто-оранжевый, огонёк, свечение) ---------- */
.item .tag.hit { display: inline-flex; align-items: center; gap: 3px; background: linear-gradient(135deg, #FFD54A, #FF9A2E); color: var(--yolk-ink); animation: hit-glow 2.4s ease-in-out infinite; }
.item .tag.hit::before { content: "🔥"; font-size: 12px; line-height: 1; display: inline-block; transform-origin: 50% 90%; animation: hit-flame 1.3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .item .tag.hit, .item .tag.hit::before { animation: none; } }
