@font-face {
  font-family: 'SF-Pro-Display';
  src: url('fonts/SFProDisplay.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #090909;
  --panel: #101010;
  --panel-2: #131313;
  --panel-3: #151515;
  --panel-4: #181818;
  --pill-active: #282828;
  --blue: #007aff;
  --green: #3db82c;
  --star: #ffbd30;
  --crown: #e7b14a;
  --radius: 10px;
  --wrap: 1260px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: #fff;
  font-family: 'SF-Pro-Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  text-rendering: optimizeSpeed;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

/* Most components here set an explicit display, which outranks the UA sheet's
 * [hidden] rule — without this, setting el.hidden silently does nothing. */
[hidden] { display: none !important; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; margin: 0; background: none; border: 0; cursor: pointer; }

.scroll-x {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* ---------- Live drops ---------- */

.drops {
  position: relative;
  z-index: 100;
  margin: 16px 16px 0;
}

.drops__inner {
  display: flex;
  align-items: center;
  padding-top: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 50px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 50px), transparent 100%);
}

.drop-win {
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-right: 4px;
  border-radius: var(--radius);
  background: linear-gradient(rgba(184, 99, 0, .2), var(--panel));
}

.drop-win img { width: 42px; height: 42px; }

.drop-win__text { display: flex; flex-direction: column; }
.drop-win__name { font-size: .875rem; font-weight: 500; white-space: nowrap; }
.drop-win__sub { font-size: .75rem; color: #8a8a8a; white-space: nowrap; }

.drop-win__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgb(184, 99, 0);
  border: 3px solid var(--bg);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.drops__list {
  display: flex;
  gap: 4px;
  min-width: 0;
}

.drop {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  animation: drop-in .45s ease both;
}

.drop img { width: 50px; height: 50px; }

.drop::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background-color: var(--glow, #0d67ba);
  box-shadow: 0 2px 45px 25px var(--glow-soft, rgba(53, 124, 255, .25));
}

@keyframes drop-in {
  from { opacity: 0; transform: translateX(-40px) scale(.9); }
  to { opacity: 1; transform: none; }
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 16px;
  background: var(--bg);
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 0;
}

.header__logo { flex-shrink: 0; position: relative; z-index: 10; }
.header__logo img { height: 32px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: .25em;
  font-size: .75rem;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  opacity: .5;
  transition: opacity .3s, transform .3s, background-color .3s;
}

.nav__item img, .nav__item svg { flex-shrink: 0; }
.nav__item img { height: 19px; width: auto; }
.nav__item:hover { opacity: .8; }
.nav__item:active { transform: scale(.95); }
.nav__item.is-active { opacity: 1; background: var(--panel-3); }

.header__right {
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
}

.balance {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-right: 1em;
  padding: 14px 16px;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  line-height: 22px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  transition: opacity .15s, transform .15s;
}

.balance::after {
  content: '+20%';
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  padding: 0 4px;
  background: #fff;
  color: #000;
  border: 3px solid var(--bg);
  border-radius: 7px;
  font-size: .8rem;
}

.balance:hover { opacity: .5; }
.balance:active { transform: scale(.95); }

.header__avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: opacity .3s, transform .3s;
}
.header__avatar:hover img { opacity: .5; }
.header__avatar:active img { transform: scale(.95); }

/* ---------- Main ---------- */

.main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 16px 40px;
  min-height: 70vh;
}

/* ---------- Telegram login ---------- */

.tg-login {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .2s, transform .2s;
}
.tg-login svg { width: 17px; height: auto; }
.tg-login:hover { opacity: .85; }
.tg-login:active { transform: scale(.95); }

.tg-login--lg {
  width: 100%;
  height: 56px;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  font-size: 1.0625rem;
}
.tg-login--lg svg { width: 20px; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: var(--radius);
  background: #1d1d1d;
  transition: opacity .3s;
}
.icon-btn:hover { opacity: .5; }

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.is-open { display: flex; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 28px 28px;
  border-radius: 20px;
  background: var(--panel-4);
  border: 1px solid rgba(255, 255, 255, .07);
  text-align: center;
  animation: modal-in .25s ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  opacity: .6;
  transition: opacity .2s;
}
.modal__close:hover { opacity: 1; }

.modal__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}
.modal__logo svg { width: 30px; height: 26px; }

.modal__title { margin: 0; font-size: 1.25rem; font-weight: 600; }

.modal__text {
  margin: 0 0 6px;
  font-size: .9375rem;
  color: rgba(255, 255, 255, .5);
}

.modal__note { font-size: .75rem; color: rgba(255, 255, 255, .35); }

#tg-widget { display: flex; justify-content: center; width: 100%; }
#tg-widget:empty { display: none; }

.modal__alt {
  padding: 4px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: .8125rem;
  color: rgba(255, 255, 255, .4);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .2s;
}
.modal__alt:hover { color: rgba(255, 255, 255, .7); }

.modal__fail {
  margin: 0;
  padding: 14px 16px;
  width: 100%;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  font-size: .875rem;
  color: rgba(255, 255, 255, .55);
}

/* ---------- User menu ---------- */

.umenu { position: relative; }

.umenu__pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 240px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 16px;
  background: var(--panel-4);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  animation: modal-in .16s ease both;
}

.umenu__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.umenu__head img { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }

.umenu__who { display: flex; flex-direction: column; min-width: 0; }
.umenu__who b { font-size: .9375rem; font-weight: 600; }
.umenu__who i {
  font-style: normal;
  font-size: .75rem;
  color: rgba(255, 255, 255, .4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.umenu__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #fff;
  font: inherit;
  font-size: .9375rem;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.umenu__item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; }
.umenu__item:hover { background: rgba(255, 255, 255, .07); }

.umenu__item--danger { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .07); border-radius: 0 0 10px 10px; color: #ff5a4e; }
.umenu__item--danger svg { opacity: .9; }
.umenu__item--danger:hover { background: rgba(255, 90, 78, .12); }

/* ---------- Top-up ---------- */

.modal__card--wide { max-width: 440px; }
.modal__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.pay-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
}
.pay-amount:focus-within { border-color: rgba(255, 255, 255, .25); }

.pay-amount__input {
  width: 100%;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 1.75rem;
  font-weight: 700;
  text-align: right;
  outline: none;
  -moz-appearance: textfield;
}
.pay-amount__input::-webkit-outer-spin-button,
.pay-amount__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pay-amount__unit { font-size: 1.5rem; color: var(--star); }

.pay-presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; }
.pay-preset {
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 9px;
  background: none;
  color: rgba(255, 255, 255, .65);
  font: inherit;
  font-size: .8125rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pay-preset:hover { background: rgba(255, 255, 255, .06); }
.pay-preset.is-active { background: #fff; border-color: #fff; color: #000; font-weight: 600; }

.pay-bonus { margin: 0; font-size: .9375rem; color: rgba(255, 255, 255, .55); }
.pay-bonus b { color: #fff; }
.pay-bonus span { color: var(--green); }
.pay-err { color: #ff5a4e; }

.pay-tabs { display: flex; gap: 8px; width: 100%; }
.pay-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pay-tab span { font-size: .875rem; font-weight: 600; }
.pay-tab i { font-style: normal; font-size: .6875rem; color: rgba(255, 255, 255, .4); }
.pay-tab:hover { background: rgba(255, 255, 255, .05); }
.pay-tab.is-active { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .07); }

.pay-assets { display: flex; gap: 6px; width: 100%; }
.pay-asset {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 9px 6px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pay-asset b { font-size: .875rem; }
.pay-asset span { font-size: .625rem; color: rgba(255, 255, 255, .4); }
.pay-asset.is-active { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .07); }

.pay-req {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  text-align: left;
}
.pay-req__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-width: 0;
}
.pay-req__row + .pay-req__row { border-top: 1px solid rgba(255, 255, 255, .07); }
.pay-req__label { flex-shrink: 0; font-size: .8125rem; color: rgba(255, 255, 255, .4); }
.pay-req__value {
  margin-left: auto;
  min-width: 0;
  font-size: .9375rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}
.pay-req__value.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; font-weight: 400; }

.pay-copy {
  flex-shrink: 0;
  display: flex;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pay-copy:hover { background: rgba(255, 255, 255, .16); }
.pay-copy.is-copied { background: var(--green); }

.pay-warn {
  margin: 0;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 189, 48, .1);
  font-size: .75rem;
  color: #ffd27a;
  text-align: left;
}

.pay-done { display: flex; }

.pay-submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.pay-submit:hover { opacity: .85; }
.pay-submit:active { transform: scale(.98); }
.pay-submit:disabled { opacity: .5; cursor: default; transform: none; }

/* ---------- Category nav ---------- */

.catnav {
  display: flex;
  gap: 6px;
  align-self: center;
  max-width: min(100%, var(--wrap));
  margin: 1em auto 0;
  padding: 4px;
  border-radius: 50px;
  background: var(--panel-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
}
.catnav::-webkit-scrollbar { display: none; }

.catnav button {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--panel-2);
  opacity: .7;
  transition: opacity .2s, background-color .2s;
}

@media (hover: hover) {
  .catnav button:hover { opacity: 1; }
}

.catnav button.is-active { background: var(--pill-active); opacity: 1; }

/* ---------- Case sections ---------- */

.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 0;
}


.section__head {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section__title {
  margin: 0 0 10px;
  font-size: 1.125rem;
  line-height: 26px;
  font-weight: 600;
  text-align: center;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 24px;
  row-gap: 28px;
}

.case {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: opacity .3s, transform .3s;
}
.case:hover { opacity: .5; }
.case:active { transform: scale(.95); }

.case__img {
  width: 165px;
  height: 127px;
  object-fit: contain;
}

.case__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.case__price {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 28px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- Mobile tabbar ---------- */

.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 50;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(19, 19, 19, .92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .5);
  transition: color .25s, background-color .25s, transform .2s;
}

.tabbar__item img { opacity: .5; }
.tabbar__item:active { transform: scale(.94); }
.tabbar__item.is-active { color: #fff; background: var(--pill-active); }
.tabbar__item.is-active img { opacity: 1; }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 49;
  padding: 32px 16px 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer__socials { display: flex; gap: 16px; }

.footer__social {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--panel-4);
  transition: opacity .2s, transform .2s;
}
.footer__social:hover { opacity: .7; }
.footer__social:active { transform: scale(.92); }

.footer__links {
  display: flex;
  gap: 100px;
  align-items: center;
}

.footer__links button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 1.125rem;
  font-weight: 500;
  transition: opacity .2s;
}
.footer__links button:hover { opacity: .7; }

/* ---------- Profile ---------- */

.title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 26px;
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  padding: 20px;
  border-radius: 20px;
  background: var(--panel-4);
}

.profile__user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile__user img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.profile__name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile__name b {
  font-size: 1.25rem;
  font-weight: 600;
}

.profile__name span {
  font-size: .9375rem;
  color: rgba(255, 255, 255, .5);
}

.profile__id {
  margin-top: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-size: .75rem;
  color: rgba(255, 255, 255, .5);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-content: center;
  height: 100%;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--panel-2);
}

.stat__label {
  font-size: .8125rem;
  color: rgba(255, 255, 255, .5);
}

.stat__value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.125rem;
  font-weight: 600;
}

.profile__actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  transition: opacity .2s, transform .2s;
}
.btn:hover { opacity: .85; }
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--blue); color: #fff; }
.btn--ghost { background: #1f1f1f; color: #fff; }
.btn--block { width: 100%; }

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

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 150px;
  padding: 20px;
  border-radius: 20px;
  background: var(--panel-4);
  overflow: hidden;
  transition: transform .2s;
}
.tile:active { transform: scale(.98); }

.tile img {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
  object-fit: contain;
  pointer-events: none;
}

.tile b { font-size: 1.125rem; font-weight: 600; }
.tile span { font-size: .875rem; color: rgba(255, 255, 255, .5); max-width: 55%; }

.inventory__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--panel-2);
}

.tabs button {
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  opacity: .3;
  transition: opacity .25s, background-color .25s;
}

.tabs button.is-active { background: #1f1f1f; opacity: 1; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 20px;
  border-radius: 20px;
  background: var(--panel-4);
}

.empty img { width: 120px; height: 120px; object-fit: contain; }
.empty h3 { margin: 0; font-size: 1.25rem; font-weight: 600; }

.empty p {
  margin: -8px 0 0;
  max-width: 320px;
  font-size: 1rem;
  color: rgba(255, 255, 255, .5);
  text-align: center;
}

.empty .btn { max-width: 340px; width: 100%; padding: 16px; font-size: 1.125rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1279px) {
  .footer__links { gap: 48px; }
  .footer__links button { font-size: 1rem; }
}

@media (min-width: 1024px) {
  .nav { font-size: .875rem; }
  .nav__item { padding: 14px clamp(12px, 1.8vw, 24px); gap: 10px; }
}

/* The nav centres itself in the space the logo and the account block leave
   over. It used to be absolutely centred, which overlapped the right-hand
   block as soon as a signed-in user added a balance pill to it. */
@media (min-width: 1100px) {
  .nav {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    margin: 0;
  }
}

@media (min-width: 1280px) {
  .nav { font-size: 1rem; }
  .nav__item { padding: 14px clamp(16px, 2.2vw, 36px); }
}

@media (max-width: 1099px) {
  .nav { margin: 0 auto; }
}

@media (max-width: 1023px) {
  .header__right { margin-left: 0; }
}

@media (max-width: 767px) {
  .drops { margin: 8px 12px 0; }
  .drops__inner { padding-top: 10px; }
  .drop-win { padding: 8px 12px; }
  .drop { padding: 8px 12px; }
  .drop img { width: 42px; height: 42px; }

  .header { padding: 0 12px; }
  .header__inner { padding: 12px 0; gap: 10px; }
  .header__logo img { height: 32px; }
  .nav { display: none; }
  .header__right { margin-left: auto; gap: 10px; }
  .tg-login { height: 44px; padding: 0 14px; font-size: .875rem; }
  .balance { margin-right: .75em; padding: 9px 11px; font-size: .9375rem; }
  .balance svg { width: 20px; height: 20px; }
  .header__avatar img { width: 40px; height: 40px; }

  .main { padding: 12px 12px 24px; }

  .catnav { margin-top: 14px; }
  .catnav button { padding: 9px 13px; font-size: .8125rem; }

  .section { gap: 18px; padding: 20px 0; }
  .grid { column-gap: 8px; row-gap: 22px; }
  .case { gap: 10px; }
  .case__img { width: 150px; height: 116px; }
  .case__name { font-size: .9375rem; }
  .case__price { padding: 7px 22px; font-size: .9375rem; }

  .profile { gap: 18px; }
  .profile__top { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .profile__user img { width: 60px; height: 60px; }
  .profile__name b { font-size: 1.0625rem; }
  .stats { grid-template-columns: 1fr; }
  .stat { flex-direction: row; align-items: center; justify-content: space-between; }
  .profile__actions { flex-direction: column; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 120px; padding: 16px; }
  .tile img { width: 96px; height: 96px; }
  .inventory__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .tabs button { flex: 1; padding: 8px 12px; font-size: .875rem; }
  .empty { padding: 28px 16px; gap: 16px; }
  .empty h3 { font-size: 1.125rem; }
  .empty p { font-size: .9375rem; }

  .tabbar { display: flex; }

  .footer { padding: 16px 12px 0; }
  .footer__inner { flex-direction: column; gap: 20px; padding: 24px 0; }
  .footer__links {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 18px 28px;
    justify-items: center;
  }
  .footer__links button { font-size: .875rem; text-align: center; }
}

@media (max-width: 400px) {
  .case__img { width: 44vw; height: auto; aspect-ratio: 165 / 127; }
  .tabbar__item { padding: 8px 11px; }
}

/* ---------- Case page ---------- */

.main--case { max-width: 1267px; }
.main--case .title { margin: 28px 0 0; text-align: center; }

.roulette {
  position: relative;
  width: 100%;
  max-width: 1133px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 50px, #000 calc(100% - 50px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 50px, #000 calc(100% - 50px), transparent);
}

.roulette__pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 166px;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
}
.roulette__arrow { position: absolute; left: 0; }
.roulette__arrow--top { top: 0; }
.roulette__arrow--bottom { bottom: 0; transform: rotate(180deg); }

.roulette__strip {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  will-change: transform;
}

@keyframes roulette-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--cycle))); }
}

.prize {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  border-radius: 8px;
}

.prize--strip {
  flex-shrink: 0;
  width: 127px;
  height: 164px;
  padding-top: 16px;
}

.prize--cell {
  justify-content: center;
  padding: 12px;
}

.prize__price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 22px;
  margin-bottom: 8px;
  font-size: .9375rem;
}

.prize--strip .prize__img { width: 80px; height: 80px; }
.prize--cell .prize__img { width: 90px; height: 90px; margin-bottom: 12px; }

.prize__name {
  max-width: 100%;
  overflow: hidden;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prize__model { font-size: .75rem; line-height: 1.1; color: rgba(255, 255, 255, .5); }

.prize__glow {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: var(--glow);
  box-shadow: 0 2px 50px 30px var(--glow-soft);
}

.opener {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 363px;
  margin: 16px auto 24px;
}

.opener__warn {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: #2c0d0d;
  color: #f00;
  font-size: .9375rem;
  text-align: center;
}

.btn svg { vertical-align: -3px; }

.shine-button { position: relative; overflow: hidden; }
.shine-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: translateX(-100%);
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine {
  to { transform: translateX(100%); }
}

.prizes__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}
.prizes__head h2 { font-size: 1rem; font-weight: 500; color: rgba(255, 255, 255, .8); }

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 480px) { .prizes-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 640px) { .prizes-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 768px) { .prizes-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .prizes-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.result {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
}
.result__img { width: 140px; height: 140px; }
.result__glow {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 90px;
  height: 6px;
  border-radius: 999px;
  background: var(--glow);
  box-shadow: 0 2px 50px 30px var(--glow-soft);
}
.result__actions { display: flex; gap: 8px; width: 100%; margin-top: 20px; }
.result__actions .btn { flex: 1 1 auto; padding-inline: 12px; white-space: nowrap; }
.result__demo {
  display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 184, 0, .14); color: #ffb800;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.result__note { margin-top: 12px; color: var(--muted); font-size: .8rem; text-align: center; }
.nowrap { white-space: nowrap; }

@media (max-width: 767px) {
  .roulette { border-radius: 0; }
  .prize--strip { width: 104px; height: 150px; }
  .prize--strip .prize__img { width: 68px; height: 68px; }
  .result__img { width: 110px; height: 110px; }
}
.deposit__cover { display: block; width: min(330px, 70vw); height: auto; margin: 16px auto 0; }

/* ---------- Upgrade page ----------
   Ported 1:1 from the original CSS modules (TopPrizes, ItemSlot, UpgradeActions,
   UpgradeGiftCard, InventoryShopPicker, WantedPicker). */

.main--upgrade { padding-bottom: 60px; }

.up { display: flex; flex-direction: column; gap: 14px; width: 100%; padding-bottom: 40px; }
.up__heading { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 800px; width: 100%; margin: 0 auto; }
.up__heading img { width: 14px; height: 14px; object-fit: contain; opacity: .7; }

/* Top prizes ticker */

.tps {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  padding-top: 16px;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 50px), transparent);
}
.tps::-webkit-scrollbar { display: none; }
.tps__pinned { position: sticky; left: 0; z-index: 10; flex-shrink: 0; background: var(--bg); padding-right: 6px; }

.tp {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  min-width: 158px;
  min-height: 72px;
  padding: 8px 10px;
  border-radius: 12px;
  background: radial-gradient(circle at left center, color-mix(in srgb, var(--c) 25%, transparent) 0%, rgba(16, 16, 16, 0) 60%), #101010;
}
.tp__accent {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 32px;
  border-radius: 9999px;
  background: var(--c);
  box-shadow: 0 0 24px 6px color-mix(in srgb, var(--c) 25%, transparent);
}
.tp__badge, .tp__day {
  position: absolute;
  z-index: 3;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #e30004;
}
.tp__badge { top: 10px; right: 12px; border-radius: 9999px; padding: 0 8px; }
.tp__day {
  top: 0;
  left: 50%;
  transform: translate(-50%, -65%);
  border: 3px solid var(--bg);
  border-radius: 9999px;
  padding: 0 10px;
}
.tp__top { display: flex; align-items: center; gap: 8px; padding-right: 24px; }
.tp__img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.tp__info { display: flex; flex-direction: column; min-width: 0; }
.tp__name {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8ch;
  margin-right: 1em;
}
.tp__sub { color: #8a8a8a; font-size: 10px; white-space: nowrap; }
.tp__range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  background: #ffffff0f;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tp__from { opacity: .7; }
.tp__arrow { width: 8px; height: 7px; opacity: .6; }

/* Board */

.up__board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 900px;
  margin: 6px auto 0;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(0deg, #101010 0, transparent 60%);
}
.up__slot { flex: 1; min-width: 0; max-width: 240px; }
.up__wheelbox { flex-shrink: 0; }

.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 130px;
  padding: 12px 12px 14px;
  background: #101010;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .15s ease;
}
.slot:active { transform: scale(.98); }
.slot.is-active { box-shadow: inset 0 0 0 2000px rgba(255, 255, 255, .035); }
.slot__label {
  width: 100%;
  text-align: center;
  padding: 2px 0;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 500;
}
.slot__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}
.slot__ph { width: 20px; height: 25px; object-fit: contain; }
.slot__row { display: flex; align-items: center; gap: 10px; max-width: 100%; }
.slot__img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.slot__info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.slot__name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.slot__price { display: flex; align-items: center; gap: 4px; color: #fff; font-size: 13px; font-weight: 600; }
.slot__accent {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  border-radius: 9999px;
  background: var(--c);
}

/* Wheel */

.wheel { position: relative; width: 303px; height: 303px; margin: 0 auto; }
.wheel > * { position: absolute; inset: 0; margin: auto; }

.wheel__halo {
  z-index: 1;
  width: 303px;
  height: 303px;
  border-radius: 50%;
  opacity: .3;
  background: color-mix(in srgb, var(--wc) 30%, transparent);
  transition: background .5s ease;
}
.wheel__arc { z-index: 2; width: 303px; height: 303px; pointer-events: none; overflow: visible; }
/* The unfilled remainder of the dial. Without it the win sector floats on an
 * invisible circle and reads as decoration rather than as a scale. */
.wheel__track { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 5.5; }
.wheel__win {
  fill: none;
  stroke: var(--wc);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 454.7455;
  stroke-dashoffset: calc(454.7455 * (1 - var(--p, 0)));
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--wc) 70%, transparent));
  transition: stroke-dashoffset .6s ease-in-out, stroke .5s ease;
}
.wheel__mask { z-index: 5; width: 275px; height: 275px; border-radius: 50%; background: var(--bg); }
.wheel__inner {
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  border: 6px solid color-mix(in srgb, var(--wc) 30%, transparent);
  background-image: radial-gradient(circle at center, color-mix(in srgb, var(--wc) 30%, transparent) 0%, #0277f700 100%);
  transition: border-color .5s ease, background-image .5s ease;
}
.wheel__needle { z-index: 40; width: 250px; height: 270px; transform-origin: center center; }
.wheel__needle svg { display: block; }

.wheel__center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-inline: 24px; text-align: center; }
.wheel__hint { color: #fff; font-size: 18px; font-weight: 500; }
.wheel__img { width: 90px; height: 90px; object-fit: contain; }
.wheel__pct { color: #fff; font-size: 22px; font-weight: 500; margin: 0; }
.wheel__cap { color: rgba(255, 255, 255, .3); font-size: 14px; font-weight: 500; }
.wheel__tag {
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  font-weight: 500;
}

/* Actions */

.up__bottom {
  /* One rail for every control below the dial: the toggles, the main button and
   * both picker panels share this width and this gap. */
  --up-gap: 10px;
  --up-h: 56px;
  --up-r: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--up-gap);
  width: 100%;
  max-width: 900px;
  margin: 12px auto 0;
}
.upa { display: flex; align-items: stretch; gap: var(--up-gap); width: 100%; }
.upa__toggle, .upa__plus {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--up-h);
  height: var(--up-h);
  border-radius: var(--up-r);
  color: #fff;
  background: linear-gradient(45deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .006));
  transition: background .2s ease, transform .15s ease;
}
.upa__toggle:active, .upa__plus:active, .upa__play:active { transform: scale(.96); }
.upa__toggle.is-on { background: linear-gradient(45deg, #ff4000, #ff8800); }
.upa__plus.is-on { background: linear-gradient(45deg, #238915, #36d81f); }
.upa__plus:disabled, .upa__toggle:disabled { opacity: .4; }
.upa__icon { width: 20px; height: 20px; object-fit: contain; }
.upa__amount {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #282828;
  font-size: 12px;
  white-space: nowrap;
}
.upa__play {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  min-height: var(--up-h);
  padding: 8px 0;
  border-radius: var(--up-r);
  color: #fff;
  background: linear-gradient(90deg, #007aff, #00a6ff);
  transition: opacity .2s ease, transform .15s ease;
}
.upa__play:disabled { opacity: .5; }
.upa__main { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 600; line-height: 1.15; }
.upa__main img { width: 12px; height: 12px; object-fit: contain; }
.upa__chance { font-size: 11px; font-weight: 500; line-height: 1.15; color: rgba(255, 255, 255, .8); }

.upa__slot { display: flex; gap: var(--up-gap); flex: 1; min-width: 0; }
.upa__btn {
  flex: 1;
  min-width: 0;
  min-height: var(--up-h);
  border-radius: var(--up-r);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  transition: transform .15s ease, opacity .2s ease;
}
.upa__btn:active { transform: scale(.97); }
.upa__btn--view { background: linear-gradient(45deg, #238915, #36d81f); }
.upa__btn--replay { background: linear-gradient(90deg, #007aff, #00a6ff); }

/* Picker */

.picker { display: flex; flex-direction: column; gap: var(--up-gap, 10px); width: 100%; }
.picker__head { display: flex; flex-direction: column; gap: var(--up-gap, 10px); width: 100%; padding: 12px; border-radius: 22px; background: #101010; }
.picker__tabs { display: flex; align-items: center; gap: 4px; width: 100%; padding: 4px; border-radius: 999px; background: var(--bg); }
#picker-head-extra:empty { display: none; }
.picker__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 14px 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .5);
  background: transparent;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.picker__tab:active { transform: scale(.96); }
.picker__tab img { width: 16px; height: 16px; object-fit: contain; opacity: .7; }
.picker__tab.is-active { background: linear-gradient(90deg, #007aff, #00a6ff); color: #fff; font-weight: 600; }
.picker__tab.is-active img { opacity: 1; }

.picker__presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: 100%; }
.picker__preset {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 44px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .5);
  background: linear-gradient(45deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .006));
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.picker__preset:active { transform: scale(.94); }
.picker__preset:disabled { opacity: .4; }
.picker__preset.is-active { background: linear-gradient(88.26deg, #007aff, #00a6ff); color: #fff; }

.picker__filters { display: flex; align-items: center; gap: 8px; width: 100%; }
.picker__sort {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #1a1a1a;
  transition: transform .15s ease;
}
.picker__sort:active { transform: scale(.92); }
.picker__sort span { display: flex; flex-direction: column; gap: 3px; }
.picker__sort img { width: 11px; height: 6px; object-fit: contain; opacity: .7; }
.picker__sort[data-dir="asc"] img:first-child, .picker__sort[data-dir="desc"] img:last-child { opacity: 1; }
.picker__sort img:last-child { transform: rotate(180deg); }
.picker__input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: #151515;
  color: #fff;
  font-size: 14px;
  border: 1px solid #ffffff1a;
  transition: border-color .2s ease;
}
.picker__input:focus { outline: none; border-color: #007aff; }
.picker__input::placeholder { color: rgba(255, 255, 255, .4); }

.picker__list { width: 100%; padding: 12px; border-radius: 22px; background: #101010; }
.picker__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.picker__empty { width: 100%; text-align: center; color: rgba(255, 255, 255, .5); font-size: 14px; }
.picker__empty a { color: #4da3ff; }
.picker__cell { width: 100%; border-radius: 12px; background: #0c0c0c; transition: transform .15s ease; }
.picker__cell:active { transform: scale(.95); }

.ugc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 14px 8px 10px;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--c) 25%, transparent) 0%, rgba(20, 20, 20, 0) 65%), #141414;
  transition: opacity .2s ease;
}
.ugc.is-dim { opacity: .5; }
.ugc__line { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 54px; height: 3px; border-radius: 9999px; background: var(--c); }
.ugc__img { width: 60px; height: 60px; object-fit: contain; margin-bottom: 4px; }
.ugc__name, .ugc__model { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ugc__name { color: #fff; font-size: 13px; font-weight: 600; }
.ugc__model { color: rgba(255, 255, 255, .4); font-size: 11px; }
.ugc__price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 2px;
  padding: 3px 8px;
  background: #ffffff0f;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

@media (min-width: 768px) { .picker__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .picker__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

@media (max-width: 860px) {
  .up__board { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .up__wheelbox { order: -1; width: 100%; }
  .up__slot { max-width: none; }
}
@media (max-width: 360px) {
  .wheel { transform: scale(.88); transform-origin: top center; height: 267px; }
}

/* ---------- Header balance ---------- */

.header__bal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 14px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
  background: var(--panel-3);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
}

/* Six controls (logo, balance, top-up, admin, settings, avatar) do not fit a
 * 390px row, so the top-up button drops to its icon below 767px. */
@media (max-width: 767px) {
  .header__inner { gap: 8px; }
  .header__right { gap: 8px; }
  .header__bal { padding: 8px 10px; gap: 5px; font-size: .875rem; }
  .header__bal svg { width: 18px; height: 18px; }
  .balance { margin-right: 10px; padding: 11px; }
  .balance span { display: none; }
  .balance::after { font-size: .625rem; border-width: 2px; padding: 0 3px; }
  .icon-btn { padding: 11px; }
  .icon-btn svg { width: 20px; height: 20px; }
}

/* ---------- Games: Мины и Ракета ---------- */

/* The game pages have no footer, so the floating tab bar would otherwise sit on
 * top of the last control in the panel. */
.main--game { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 40px; }
@media (max-width: 767px) { .main--game { padding-bottom: 104px; } }
.game__heading { margin: 20px 0 16px; }

.game__layout { display: grid; gap: 16px; }
.game__stage { min-width: 0; }

.game__panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, .06);
}

.game__status {
  margin-top: 12px;
  min-height: 22px;
  text-align: center;
  font-size: .875rem;
  color: rgba(255, 255, 255, .55);
}
.game__status svg { vertical-align: -2px; }
.game__status--good { color: var(--green); font-weight: 600; }
.game__status--bad { color: #ff5a4e; font-weight: 600; }

/* Bet controls */

.gbet, .gfield { display: flex; flex-direction: column; gap: 8px; }
.gbet__label { font-size: .75rem; color: rgba(255, 255, 255, .45); }
.gbet__row { display: flex; gap: 6px; }

.gbet__field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--panel-4);
  border: 1px solid rgba(255, 255, 255, .07);
}

.gbet__input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 600;
  outline: none;
  -moz-appearance: textfield;
}
.gbet__input::-webkit-outer-spin-button,
.gbet__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gbet__input:disabled { opacity: .5; }
.gbet__suffix { color: rgba(255, 255, 255, .45); font-weight: 600; }

.gbet__btn {
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--panel-4);
  border: 1px solid rgba(255, 255, 255, .07);
  font-size: .8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .7);
  transition: background-color .2s, color .2s;
}
.gbet__btn:hover { background: var(--pill-active); color: #fff; }

.gpills { display: flex; gap: 6px; }
.gpill {
  flex: 1 1 0;
  padding: 11px 0;
  border-radius: var(--radius);
  background: var(--panel-4);
  border: 1px solid rgba(255, 255, 255, .07);
  font-weight: 600;
  color: rgba(255, 255, 255, .65);
  transition: background-color .2s, color .2s;
}
.gpill.is-active { background: var(--blue); border-color: transparent; color: #fff; }
.gpill:disabled { opacity: .45; cursor: default; }

.gstat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel-4);
  font-size: .8125rem;
}
.gstat__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: rgba(255, 255, 255, .5); }
.gstat__row b { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-weight: 600; }

/* Mines board */

.mines {
  /* Without a cap the board eats the whole column on a wide screen and the
   * cells grow to a size no thumb or cursor needs. */
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, .06);
}

.mine-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14%;
  border-radius: 12px;
  background: var(--panel-4);
  border: 1px solid rgba(255, 255, 255, .06);
  transition: background-color .18s, transform .12s, border-color .18s;
}
.mine-cell:not(:disabled):hover { background: var(--pill-active); }
.mine-cell:not(:disabled):active { transform: scale(.94); }
.mine-cell svg { width: 100%; height: 100%; animation: cell-pop .22s ease-out; }
.mine-cell.is-gem { background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .35); }
.mine-cell.is-mine { background: rgba(255, 75, 69, .1); border-color: rgba(255, 75, 69, .25); opacity: .65; }
.mine-cell.is-blast { background: rgba(255, 75, 69, .18); border-color: rgba(255, 75, 69, .5); }

@keyframes cell-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Rocket stage */

.rk {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 3;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 10% 100%, rgba(0, 122, 255, .18), transparent 60%),
    var(--panel-2);
  border: 1px solid rgba(255, 255, 255, .06);
}

.rk__chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.rk__line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rk__area { fill: url(#rk-fill); stroke: none; }

.rk__ship {
  position: absolute;
  z-index: 3;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  background: url("img/games/rocket.png") center / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .55));
  transition: opacity .35s, transform .35s ease-in;
}
.rk.is-crashed .rk__ship { opacity: 0; transform: translate(70px, -70px) scale(.5); }
.rk.is-flying .rk__ship { animation: ship-shake .22s infinite; }

@keyframes ship-shake { 0%, 100% { transform: translate(0, 0) rotate(-1deg); } 50% { transform: translate(1.5px, -1.5px) rotate(1deg); } }

.rk__mult {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(2rem, 9vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -.02em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .6);
  pointer-events: none;
}
.rk.is-crashed .rk__mult { color: #ff5a4e; }

.rk__history {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  overflow: hidden;
}
.rk__chip {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .4);
  font-size: .6875rem;
  font-weight: 600;
}
.rk__chip.is-low { color: #ff7a71; }
.rk__chip.is-mid { color: #5aa9ff; }
.rk__chip.is-high { color: #4ddc8c; }

@media (min-width: 900px) {
  .game__layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .game__panel { position: sticky; top: 16px; }
}

/* Five tabs no longer fit a 360px screen at the original padding. */
@media (max-width: 420px) {
  .tabbar__item { padding: 8px 9px; font-size: .625rem; }
}
