html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: #131418;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #eee;
  /* УБИРАЕМ все, что блокирует скролл */
  overflow-x: hidden;
  /* Запрещаем только горизонтальный скролл */
  font-family: 'Montserrat', sans-serif;
  overflow-y: scroll;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 0;
}

:root {
  --spacing: 1px;
  --radius-round: 817.36px;

  /* Telegram safe-area insets. JS (applyTelegramInsets) overrides these with the
     real values reported by the client. The env() fallback covers browsers /
     older clients that don't set them. */
  --tg-safe-area-inset-top: env(safe-area-inset-top, 0px);
  --tg-safe-area-inset-right: env(safe-area-inset-right, 0px);
  --tg-safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --tg-safe-area-inset-left: env(safe-area-inset-left, 0px);
  --tg-content-safe-area-inset-top: 0px;
  --tg-content-safe-area-inset-right: 0px;
  --tg-content-safe-area-inset-bottom: 0px;
  --tg-content-safe-area-inset-left: 0px;

  /* Total space to keep clear at the top (system buttons + content chrome) and
     bottom (home indicator). Used by every fixed / scrolling surface. */
  --safe-top: calc(var(--tg-safe-area-inset-top) + var(--tg-content-safe-area-inset-top));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom));

  /* Height of the fixed bottom navigation bar. */
  --bottom-nav-h: 64px;

  /* Высота закреплённой шапки (системная зона + сама шапка).
     Совпадает с верхним отступом фиксированных панелей (рефералка, апгрейд). */
  --header-h: calc(58px + var(--safe-top));
}

@font-face {
  font-family: 'SF Pro Display';
  src: url("https://forcegift.com/SFPRODISPLAYBOLD.OTF") format('opentype');
  font-weight: bold;
  font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  color: #eee;
  overflow-x: hidden;
  /* Запрещаем только случайный горизонтальный скролл */
}

/* === Прелоадер страницы === */
.page-preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #2878d9;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-preloader-brand {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  animation: pagePreloaderLogoFloat 1.8s ease-in-out infinite;
}
.page-preloader-brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(9, 48, 108, .25));
}
.page-preloader-progress {
  width: min(230px, 64vw);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
}
.page-preloader-progress span {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  animation: pagePreloaderProgress 1.35s ease-in-out infinite;
}
@keyframes pagePreloaderLogoFloat {
  50% { transform: translateY(-8px) scale(1.035); }
}
@keyframes pagePreloaderProgress {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(120%); }
  100% { transform: translateX(260%); }
}

.page-preloader-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 500;
  min-height: 20px;
  color: #fff;
  text-align: center;
  transition: opacity .16s ease, transform .16s ease;
}
.page-preloader-text.is-changing { opacity: 0; transform: translateY(4px); }

.app-container {
  width: 100%;
  /* Максимальная ширина всего контента на странице */
  max-width: 1400px;
  margin: 0 auto;
  /* Центрируем */
  padding: 20px;
  /* Контент начинается под закреплённой шапкой (высота шапки уже включает
     системную зону Telegram сверху) */
  padding-top: calc(var(--header-h) + 8px);
  box-sizing: border-box;
  min-height: 100vh;
  padding-bottom: calc(80px + var(--safe-bottom));
  background-color: #131418;
}

/* В полноэкранном режиме отступ такой же — шапка закреплена под системной зоной */
body.tg-fullscreen .app-container {
  padding-top: calc(var(--header-h) + 8px);
}

/* На странице профиля шапка скрыта — убираем лишний отступ сверху */
.app-container:has(#profile-section:not(.hidden)) {
  padding-top: calc(12px + var(--safe-top));
}

body.tg-fullscreen.raketa-active .app-container {
  /* Шапка краша закреплена (fixed) на высоту --header-h, поэтому контент
     должен начинаться под ней — иначе шапка перекрывает поле с гифкой и отсчётом. */
  padding-top: calc(var(--header-h) + 8px) !important;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  width: 100%;
}

h1 {
  margin: 0;
  font-weight: 700;
  font-size: 24px;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.balance {
  background: #333;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
}

.stars-icon {
  margin-right: 6px;
  color: gold;
}

#case-selection {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
}

/* --- Стили для планшетов --- */
@media (min-width: 768px) {
  #case-selection {
    /* 4 красивые, растягивающиеся колонки */
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Стили для ПК (КАК У КОНКУРЕНТА) --- */
@media (min-width: 1200px) {
  #case-selection {
    /*
       * ГЛАВНЫЙ СЕКРЕТ:
       * Мы не просто создаем 5 колонок. Мы создаем 5 колонок,
       * и говорим, что каждая из них не может быть меньше 200px.
       * Это не дает им "схлопнуться" на узких экранах, но и не дает
       * бесконечно растягиваться.
      */
    grid-template-columns: repeat(5, minmax(200px, 1fr));
  }
}

.case-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 8px;
  background: transparent;
  border-radius: 12px;
  max-width: 230px;
  width: 100%;
  margin: 0 auto;
  transition: transform .2s ease;
}

.case-card:hover {
  transform: scale(1.05);
}

.case-card--daily {
  max-width: 230px;
  min-height: 0;
  display: flex;
  gap: 0;
  padding: 8px;
  border: 1px solid rgba(255, 202, 90, 0.22);
  background: linear-gradient(135deg, rgba(255, 202, 90, 0.08), rgba(0, 152, 234, 0.08));
}

.case-card--daily .card_image {
  width: 100%;
}

.case-card--daily .case-info {
  align-items: center;
  text-align: center;
  padding: 0 10px 15px 10px;
}

.case-card--daily .case-name {
  height: 38px;
  font-size: 14px;
  margin-bottom: 4px;
}

.case-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.case-info {
  width: 100%;
  padding: 0 10px 15px 10px;
  /* Уменьшили боковые отступы */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* <-- ГЛАВНОЕ: Центрирует всё содержимое (текст и цену) */
  justify-content: flex-end;
  /* Прижимает контент к низу, если картинка маленькая */
}


.case-name {
  color: #EAECEE;
  font-size: 14px;
  /* Чуть уменьшили шрифт для аккуратности */
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  margin-bottom: 4px;
  /* Уменьшили отступ до цены */
  height: 38px;
  /* Чуть уменьшили высоту блока под текст */

  display: flex;
  /* <-- Для вертикального центрирования текста */
  align-items: center;
  /* <-- Текст будет по центру высоты своего блока */
  justify-content: center;
  /* <-- Текст будет по центру ширины */
  text-align: center;
  /* <-- На всякий случай */

  overflow: hidden;
}

.custom-padding {
  padding: calc(var(--spacing) * 3);
}

#case-opening {
  width: 100%;
  display: none;
  flex-direction: column;
  margin-top: 60px;
  background-color: #131418;
}

#case-opening.active {
  display: flex;
}

button {
  margin-top: 15px;
  background: #1e2eb8;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  color: white;
  transition: background-color 0.3s ease;
  width: 100%;
}

/* ▼▼▼ Обновленные стили слот-машины ▼▼▼ */
.case_opening_process {
  width: 100%;
  overflow: visible;
  position: relative;
  margin: 0;
  background: linear-gradient(180deg, #1a1d26 0%, #101219 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.case_opening_process.vertical-mode {
  overflow: hidden;
}

.case_opening_items_list {
  width: 100%;
  overflow: hidden;
  padding: 12px 0 4px;
}

.case_opening_items_wrapper {
  width: 100%;
  overflow: hidden;
}

.case_opening_items {
  display: flex;
  gap: 8px;
  will-change: transform;
  width: max-content;
}

/* Vertical Mode — во всю ширину, высота под 2 ряда карточек по 100px */
.case_opening_process.vertical-mode {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 230px;
  min-height: 230px;
  padding: 12px 10px;
}

/* Внешняя обёртка трека — фиксированная высота, контент не вылезает */
.case_opening_process.vertical-mode .case_opening_items_list.single {
  width: 100%;
  padding: 0;
  max-width: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* x2 — во всю ширину 2 колонки, x3 — 3, x4 — 4, x5 — 5 (как у конкурентов) */
.case_opening_process.vertical-mode .case_opening_items_list.slot-column {
  flex: 1 1 0;
  min-width: 56px;
  max-width: none;
  height: 100%;
  padding: 0;
  position: relative;
}

.case_opening_process.vertical-mode .case_opening_items_wrapper {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Compact account header and stable crash game surface. */
.logged_user_profile {
  grid-template-columns: minmax(0, auto) max-content;
}

.nav_topup {
  display: flex;
  width: max-content;
  max-width: min(50vw, 180px);
  height: 40px;
  gap: 3px;
}

.nav_topup-balance,
.nav_topup-balance-item {
  width: auto;
  min-width: 60px;
  max-width: min(140px, calc(50vw - 27px));
}

.nav_topup-balance-item {
  height: 38px;
  padding: 0 8px;
  border-radius: 13px;
  justify-content: center;
}

.nav_topup-balance-summ {
  flex: 0 1 auto;
  font-size: 13px;
  overflow: visible;
  text-overflow: clip;
}

.nav_topup-plus {
  width: 23px;
  min-width: 23px;
  height: 23px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 17px;
  line-height: 23px;
  box-shadow: 0 4px 10px rgba(22, 140, 255, 0.24);
}

body.raketa-active {
  min-height: 100svh;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #0f1116 !important;
}

body.raketa-active .app-container {
  width: 100%;
  height: auto !important;
  min-height: 100svh !important;
  padding-top: calc(10px + var(--safe-top)) !important;
  padding-bottom: calc(82px + var(--safe-bottom)) !important;
  overflow: visible !important;
  background: #0f1116 !important;
}

body.raketa-active #crash-section,
.raketa-crash-page {
  width: min(460px, 100%);
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 4px 0 12px !important;
  overflow: visible !important;
  gap: 10px;
  background: transparent;
}

.raketa-crash-page.hidden {
  display: none !important;
}

.raketa-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 4px 2px 2px;
}

.raketa-page-title {
  margin: 0;
  color: #f7f8fa;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.raketa-connection-state {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #8e97a8;
  font-size: 11px;
  font-weight: 600;
}

.raketa-connection-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #2ad477;
  box-shadow: 0 0 8px rgba(42, 212, 119, .65);
}

.raketa-connection-state.is-offline .raketa-connection-dot {
  background: #ffb020;
  box-shadow: 0 0 8px rgba(255, 176, 32, .5);
}

.raketa-players-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 52px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(82, 219, 141, .24);
  border-radius: 8px;
  background: rgba(26, 100, 62, .24);
  color: #5ae59a;
  font-size: 13px;
  font-weight: 800;
}

.raketa-players-count svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.raketa-game-stage {
  width: 100%;
  height: clamp(210px, 34svh, 290px) !important;
  min-height: 210px;
  margin: 0 !important;
  border: 1px solid rgba(103, 135, 190, .18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(31, 126, 255, .24), transparent 42%),
    linear-gradient(145deg, #171b25 0%, #0f131c 62%, #0b0e14 100%) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 14px 34px rgba(0, 0, 0, .26);
}

.raketa-game-stage::before {
  opacity: .65;
}

.raketa-space-particles {
  inset: 18px;
  opacity: .8;
}

.raketa-rocket-area img,
.raketa-rocket-area.counting img {
  width: clamp(150px, 43vw, 210px) !important;
  height: clamp(150px, 43vw, 210px) !important;
  transform: translate3d(0, 0, 0) rotate(-12deg) scale(1) !important;
  transition: opacity .3s ease !important;
}

.raketa-flight-hud {
  position: absolute;
  inset: auto 0 18px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.raketa-flight-multiplier {
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .75), 0 0 24px rgba(37, 134, 255, .55);
}

.raketa-round-label {
  margin-top: 5px;
  color: #9aa8bd;
  font-size: 11px;
  font-weight: 700;
}

.raketa-countdown-num,
.raketa-crash-num {
  font-size: clamp(54px, 18vw, 78px);
}

.raketa-results-row {
  width: 100%;
  min-height: 28px;
  gap: 6px !important;
  margin: 0 !important;
}

.raketa-res-tag {
  height: 28px !important;
  min-width: 54px !important;
  padding: 0 9px !important;
  border-radius: 7px;
  font-size: 12px !important;
}

.raketa-results-empty {
  display: flex;
  align-items: center;
  min-height: 28px;
  color: #697386;
  font-size: 11px;
  font-weight: 600;
}

.raketa-bet-btn {
  height: 48px !important;
  margin: 0 !important;
  border-radius: 8px;
  font-size: 16px !important;
  box-shadow: 0 9px 22px rgba(22, 140, 255, .2);
}

.raketa-players-card {
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 8px;
  background: #171a22;
  overflow: hidden;
}

.raketa-players-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: #f1f3f6;
  font-size: 12px;
  font-weight: 800;
}

.raketa-players-card-title span:last-child {
  color: #747e8f;
  font-size: 10px;
  font-weight: 600;
}

.raketa-players-panel {
  min-height: 92px;
  max-height: min(240px, 30svh) !important;
  padding: 2px 12px 8px !important;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

/* Keep the crash screen anchored to the top edge on mobile. */
body.raketa-active {
  overflow: hidden !important;
}

body.raketa-active #topNav {
  display: none !important;
}

html:has(body.raketa-active) {
  overflow: hidden !important;
}

body.raketa-active .app-container {
  height: 100svh !important;
  min-height: 100svh !important;
  padding-top: var(--safe-top) !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

body.raketa-active #crash-section,
.raketa-crash-page {
  height: calc(100svh - var(--safe-top)) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 0 8px !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.raketa-active #crash-section {
  display: flex !important;
}

body.raketa-active .raketa-page-header {
  min-height: 34px !important;
  padding: 0 2px !important;
}

body.raketa-active .raketa-game-stage {
  margin: 0 !important;
}

body.raketa-active .raketa-results-row,
body.raketa-active .raketa-bet-btn {
  flex: 0 0 auto;
}

.raketa-empty-players {
  min-height: 88px;
  color: #697386;
  font-size: 12px;
}

@media (max-width: 380px) {
  .nav_topup {
    grid-template-columns: none !important;
    width: max-content;
    max-width: min(50vw, 150px) !important;
    gap: 3px !important;
  }

  .nav_topup-balance,
  .nav_topup-balance-item {
    width: auto !important;
    min-width: 56px;
    max-width: calc(50vw - 25px);
  }

  .nav_topup-balance-item {
    height: 36px !important;
    padding: 0 7px;
  }

  .nav_topup-plus {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    font-size: 16px !important;
  }

  .raketa-game-stage {
    height: clamp(188px, 31svh, 235px) !important;
    min-height: 188px;
  }

  .raketa-rocket-area img,
  .raketa-rocket-area.counting img {
    width: 148px !important;
    height: 148px !important;
  }
}

/* Inventory and upgrade surfaces share the restrained Gift Chase cards. */
#profile-section { background: transparent; }
.profile-page { padding: 8px 0 100px; background: transparent; }
.profile-container { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--chase-line); border-radius: 24px; background: var(--chase-surface); }
.profile-info { gap: 2px; }.profile-name { color: #fff; font-size: 23px; font-weight: 700; }.profile-id { color: var(--chase-muted); }
.profile-avatar { width: 72px; height: 72px; border: 0; border-radius: 50%; background: #69d9cb; }
.balance-section,
.free-case-banner,
.profile_content_wrapper.items_content { margin: 0 0 12px; border: 1px solid var(--chase-line); border-radius: 24px; background: var(--chase-surface); box-shadow: none; }
.balance-section { padding: 16px; }.balance-display { color: #fff; }.deposit-button { min-height: 44px; margin: 0; border-radius: 22px; background: var(--chase-blue); }
.free-case-banner { min-height: 74px; padding: 12px; }.profile_content_wrapper.items_content { padding: 14px; }.profile_content-head-label { color: #fff; }.btn_sale_all { border-radius: 18px; background: #3b3b3e; }
.profile_items_list { gap: 10px; }.profile_items_list_item { border: 1px solid #49494b; border-radius: 18px; background: #222224; }.profile_items_list_item > img,
.profile_items_list_item .profile-item-video { width: 100%; height: auto; aspect-ratio: 1; margin: 0 0 8px; border-radius: 13px; background: #363638; }

.upgrade-section {
  display: flex;
  width: min(100%, 480px);
  min-height: 100svh;
  padding: calc(var(--header-h) + 8px) 12px calc(96px + var(--safe-bottom));
  gap: 12px;
  overflow-y: auto !important;
  background: transparent;
}
.upgrade-title { width: 100%; margin: 0; color: #fff; font-size: 28px; text-align: left; }
.upgrade-ring-wrapper { width: min(100%, 320px); height: auto; aspect-ratio: 1; margin: 2px auto 0; border: 1px solid var(--chase-line); border-radius: 50%; background: #2d2d2f; }
.upgrade-ring-svg { inset: 8%; width: 84%; height: 84%; }.upgrade-ring-track { stroke: #181819; stroke-width: 11; }.upgrade-ring-win { stroke: var(--chase-blue); }.upgrade-ring-center { gap: 4px; }.upgrade-chance-pct { color: #fff; font-size: 42px; }.upgrade-chance-label { color: #a7a6ad; font-size: 15px; text-transform: uppercase; }.upgrade-pointer-triangle { border-top-color: #fff; }
.upgrade-multipliers { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; gap: 5px; }.upgrade-multiplier { min-height: 40px; margin: 0; padding: 0; border: 1px solid #3f3f41; border-radius: 22px; background: #1a1a1b; color: #fff; font-size: 15px; }.upgrade-multiplier.active { background: var(--chase-blue); border-color: var(--chase-blue); }
.upgrade-slots { display: none; }.upgrade-btn { width: 100%; min-height: 56px; margin: 0; border-radius: 28px; background: #42649e; color: #aaa9ad; font-size: 18px; }
.upgrade-reference-picker { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; padding: 5px; border: 1px solid var(--chase-line); border-radius: 28px; background: #1b1b1c; }.upgrade-reference-tab { min-height: 46px; margin: 0; padding: 0 7px; border: 0; border-radius: 23px; background: transparent; color: #99999e; font-size: 15px; }.upgrade-reference-tab.active { background: var(--chase-blue); color: #fff; }
.upgrade-empty-reference { display: flex; width: 100%; min-height: 245px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; border: 1px solid var(--chase-line); border-radius: 26px; background: var(--chase-surface); text-align: center; }.upgrade-empty-reference img { width: 105px; height: 105px; object-fit: contain; }.upgrade-empty-reference strong { color: #fff; font-size: 22px; }.upgrade-empty-reference span { color: #aaa9ae; font-size: 14px; }

/* Keep the crash screen anchored to the top edge on mobile. */
body.raketa-active {
  overflow: hidden !important;
}

html:has(body.raketa-active) {
  overflow: hidden !important;
}

body.raketa-active .app-container {
  height: 100svh !important;
  min-height: 100svh !important;
  padding-top: var(--safe-top) !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

body.raketa-active #crash-section,
.raketa-crash-page {
  height: calc(100svh - var(--safe-top)) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 0 8px !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.raketa-active #crash-section {
  display: flex !important;
}

body.raketa-active .raketa-page-header {
  min-height: 34px !important;
  padding: 0 2px !important;
}

body.raketa-active .raketa-game-stage {
  margin: 0 !important;
}

body.raketa-active .raketa-results-row,
body.raketa-active .raketa-bet-btn {
  flex: 0 0 auto;
}

/* Compact crash header: profile and balance replace the game status labels. */
.raketa-connection-state,
.raketa-players-count {
  display: none !important;
}

.raketa-page-header {
  min-height: 40px;
  padding: 0 2px 2px !important;
}

.raketa-user-summary,
.raketa-user-balance {
  display: flex;
  align-items: center;
}

.raketa-user-summary {
  min-width: 0;
  gap: 8px;
}

.raketa-user-avatar {
  width: 34px;
  height: 34px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: linear-gradient(135deg, #5a86ff, #1e5bba);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.raketa-user-avatar img {
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
}

.raketa-user-name {
  max-width: 150px;
  overflow: hidden;
  color: #f7f8fa;
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raketa-user-balance {
  gap: 6px;
  min-width: 0;
  height: 34px;
  padding-left: 10px;
  border-radius: 10px;
  background: #1e2029;
  color: #f7f8fa;
  font-size: 13px;
  font-weight: 800;
}

.raketa-balance-icon {
  color: #ffca5a;
  font-size: 15px;
  line-height: 1;
}

.raketa-balance-value {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raketa-user-balance .raketa-plus-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  margin: 0 4px 0 2px !important;
  padding: 0 !important;
  border-radius: 50%;
  font-size: 21px;
  line-height: 28px;
}

body.raketa-active #mobileCrashBtn p {
  display: none;
}

.case_opening_process.vertical-mode .case_opening_items {
  flex-direction: column;
  width: 100%;
  height: max-content;
}

.case_opening_process.vertical-mode .slot-fade.top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 16px;
  background: linear-gradient(to bottom, #131418, transparent);
  z-index: 5;
  pointer-events: none;
}

.case_opening_process.vertical-mode .slot-fade.bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 16px;
  background: linear-gradient(to top, #131418, transparent);
  z-index: 5;
  pointer-events: none;
}

.case_opening_process.vertical-mode .slot-indicator.left-indicator,
.case_opening_process.vertical-mode .slot-indicator.right-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.case_opening_process.vertical-mode .slot-indicator.left-indicator {
  left: 0;
}

.case_opening_process.vertical-mode .slot-indicator.right-indicator {
  right: 0;
}

.case_opening_process.vertical-mode .slot-center-line-horizontal {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  height: 2.5px;
  background: #0099ff;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0, 153, 255, 0.6), 0 0 20px rgba(0, 153, 255, 0.25);
  transform: translateY(-50%);
}

.case-modifiers-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

.case-modifiers-row,
.case-multipliers-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.case-modifier-btn {
  flex: 1;
  background: #2a2e3a;
  border: 1px solid #3c4253;
  border-radius: 8px;
  padding: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0;
}

.case-modifier-btn.active {
  background: #1e2eb8;
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(30, 46, 184, 0.4);
}

.case-multiplier-btn {
  flex: 1;
  background: #2a2e3a;
  border: none;
  border-radius: 8px;
  padding: 8px 0;
  color: #a0a5b1;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0;
}

.case-multiplier-btn.active {
  background: #3b82f6;
  color: #fff;
}

.slot-card {
  flex: 0 0 115px;
  width: 115px;
  background: linear-gradient(180deg, #1c212b 0%, #14181f 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}

.slot-card-img {
  position: relative;
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 8px 4px;
}

.slot-card-img img {
  max-width: 78px;
  max-height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.slot-card-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #e0e0e0;
  text-align: center;
  padding: 0 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
}

.slot-card-bar {
  width: 100%;
  height: 4px;
  border-radius: 0 0 12px 12px;
  flex-shrink: 0;
}

/* Подсветка выигравшей карточки */
.slot-card.winner {
  --win-color: #3b82f6;
  transform: scale(1.08);
  z-index: 5;
  animation: winnerPulse 1.4s ease-in-out infinite;
  border: 2px solid var(--win-color);
}

@keyframes winnerPulse {

  0%,
  100% {
    box-shadow: 0 0 12px color-mix(in srgb, var(--win-color) 40%, transparent), 0 0 30px color-mix(in srgb, var(--win-color) 15%, transparent);
  }

  50% {
    box-shadow: 0 0 22px color-mix(in srgb, var(--win-color) 60%, transparent), 0 0 50px color-mix(in srgb, var(--win-color) 25%, transparent);
  }
}

/* --- Индикатор выигрыша (V-shape) --- */
.slot-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-indicator {
  top: 0;
}

.bottom-indicator {
  bottom: 0;
}

.slot-indicator svg {
  filter: drop-shadow(0 0 6px rgba(0, 153, 255, 0.6));
}

/* --- Градиенты по краям --- */
.slot-fade {
  position: absolute;
  top: 0;
  width: 60px;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.slot-fade.left {
  left: 0;
  background: linear-gradient(to right, #14171f, transparent);
}

.slot-fade.right {
  right: 0;
  background: linear-gradient(to left, #14171f, transparent);
}

/* Вертикальная линия-указатель по центру */
.slot-center-line {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #33bbff 0%, #0099ff 50%, #33bbff 100%);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0, 153, 255, 0.75), 0 0 26px rgba(0, 153, 255, 0.35);
}


.case-header {
  position: relative;
  width: 100%;
}

.case-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.case-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-case-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background-color: rgba(0, 122, 255, 1);
  width: 100%;
  line-height: 24px;
  border: none;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 18px;
  text-transform: unset;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
  margin: 15px auto 0;
}

.open-case-button:hover {
  background: #1976d2;
}

.open-case-button--opened {
  background: #c62828 !important;
  cursor: default;
  flex-direction: column;
  gap: 4px;
}

.open-case-button--opened:hover {
  background: #b71c1c !important;
}

.open-case-button--opened .free-case-countdown {
  font-size: 14px;
  opacity: 0.95;
}

.open-case-icon {
  width: 18px;
  height: 18px;
}

.not-enough-stars-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.not-enough-stars-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 6px;
  background: linear-gradient(135deg, #3d0808 0%, #5c1010 50%, #7f1d1d 100%);
  color: #fff;
  font-size: 15px;
  min-height: 52px;
  box-sizing: border-box;
}

.not-enough-stars-block .not-enough-star-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.deposit-from-case-btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  min-height: 52px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #0a4d24 0%, #0d5c2e 50%, #15803d 100%);
}

.deposit-from-case-btn:hover {
  background: linear-gradient(135deg, #064320 0%, #0a4d24 50%, #0d5c2e 100%);
}

/* Referral case styles */
.referral-price-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.not-enough-referral-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.not-enough-referrals-label {
  font-size: 15px;
  color: #fff;
}

/* Блок «ОТКРЫТИЕ» — небольшой отступ над кнопкой */
#caseOpenBlock {
  margin-top: 0;
  padding-top: 10px;
}

/* Убираем весь margin у кнопки и блоков ( .open-case-button имеет margin: 15px auto 0 ) */
#caseOpenBlock .open-case-button,
#caseOpenBlock .not-enough-stars-wrapper,
#caseOpenBlock .deposit-from-case-btn {
  margin: 0 !important;
}

.case_opening_process_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

.opening-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 153, 255, 0.12) 0%, rgba(0, 100, 200, 0.06) 100%);
  border: 1px solid rgba(0, 153, 255, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.opening-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #0099ff, #00d4ff, #0099ff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: openingTextShimmer 2s ease-in-out infinite;
}

@keyframes openingTextShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.opening-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(0, 153, 255, 0.2);
  border-top-color: #0099ff;
  border-radius: 50%;
  animation: openingSpin 0.8s linear infinite;
}

@keyframes openingSpin {
  to {
    transform: rotate(360deg);
  }
}

.case-contents {
  margin-top: 30px;
  width: 100%;
  color: #ddd;
  overflow: hidden;
  background-color: #131418;
}

.case-contents-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0 16px;
}

.case-contents-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.case-contents h3 {
  margin-bottom: 0;
  color: #fff;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 22px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1.5px;
  white-space: nowrap;
  opacity: 0.7;
}

.case-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.case-contents li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 70%;
  overflow: hidden;
  flex-shrink: 1;
}

.item-info img {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 6px;
  object-fit: contain;
  background: #222;
  border: 1px solid #444;
}

.item-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.result-message {
  margin-top: 15px;
  font-weight: 700;
  font-size: 18px;
  min-height: 24px;
  text-align: center;
  color: #ffa500;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  padding: 0 10px;
}

#caseVisualContainer {
  contain: layout;
  transform: translateZ(0);
}

.about_item_bg {
  width: 100%;
  height: 238px;
  border-radius: 14px;
  background: #161920;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.about_item_bg img {
  max-width: 80%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* Слот-машина: чёткие границы, не наезжает блок «ОТКРЫТИЕ» */
#caseVisualContainer.slot-mode {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
  background: #131418;
  border-radius: 14px;
}

/* В vertical-mode (x2–x5) высота задаётся процессом; в x1 не резервируем 230px — убираем пустое место над кнопкой */
#caseVisualContainer.slot-mode:has(.case_opening_process.vertical-mode) {
  min-height: 230px;
}

.case-back-btn {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-top: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translateY(-10px) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  transition: all 0.25s ease !important;
  position: relative;
  z-index: 10;
  -webkit-appearance: none !important;
  appearance: none !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.case-back-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-10px) scale(1.05) !important;
}

.case-back-btn:active {
  transform: translateY(-10px) scale(0.92) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.case-back-btn svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  stroke: currentColor;
  margin-left: -1px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a #2d2d2d;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px
}

::-webkit-scrollbar-track {
  background: #2d2d2d;
  border-radius: 4px
}

::-webkit-scrollbar-thumb {
  background: #5a5a5a;
  border: 1px solid #2d2d2d;
  border-radius: 4px
}

::-webkit-scrollbar-thumb:hover {
  background: #6a6a6a
}

::-webkit-scrollbar-corner {
  background: #2d2d2d
}

.back-arrow {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2d2d2d;
  /* ← Новый фон */
  border: 1.5px solid #444;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.back-arrow svg {
  width: 20px;
  height: 20px;
  stroke: #5a5a5a;
  /* ← Новый цвет стрелки */
  stroke-width: 2;
}

.back-arrow:hover {
  background-color: #2a2c34;
}

@media (max-width: 480px) {
  #case-selection {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .case-image {
    height: 90px;
  }

  .case-name {
    font-size: 13px;
  }

  .case-price {
    font-size: 13px;
  }

  .case-contents li {
    flex-wrap: wrap;
    gap: 8px;
  }

  .item-info {
    max-width: 100%;
    width: 100%;
  }

  .item-info span {
    flex-grow: 1;
  }

  .result-message {
    font-size: 16px;
  }
}

@media (min-width: 420px) and (max-width: 767px) {
  .profile-container[data-v-47cb848d] {
    max-width: 424px
  }
}

@media (max-width: 400px) {
  .case_items_content {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

@media (max-width: 360px) {
  #case-selection {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  .case-image {
    height: 120px;
  }

  .app-container {
    padding: 15px;
    /* Сохраняем отступ под закреплённую шапку */
    padding-top: calc(var(--header-h) + 8px);
  }
}

.case_items_content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 auto 100px;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  background-color: #131418;
}

.case_item {
  position: relative;
  aspect-ratio: 0.9 / 1;
  min-height: 140px;
  border-radius: 16px;
  background: #21242c;
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  justify-content: flex-start;
  gap: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.case_item::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.case_item>* {
  position: relative;
  z-index: 1;
}

.case_item:active {
  transform: scale(0.97);
}

/* Rarity styles for case items */

/* Uncommon — серебристо-серый */
.case_item.rarity-uncommon {
  border-color: rgba(180, 190, 210, 0.4);
  background: radial-gradient(ellipse at 50% -10%, rgba(180, 190, 210, 0.22) 0%, rgba(130, 145, 170, 0.08) 45%, #161920 80%);
  box-shadow: inset 0 1px 0 rgba(180, 190, 210, 0.15);
}

.case_item.rarity-uncommon::before {
  background: #b4bed2;
  opacity: 0.55;
}

/* Common — насыщенный синий */
.case_item.rarity-common {
  border-color: rgba(59, 130, 246, 0.45);
  background: radial-gradient(ellipse at 50% -10%, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.1) 45%, #161920 80%);
  box-shadow: inset 0 1px 0 rgba(59, 130, 246, 0.2);
}

.case_item.rarity-common::before {
  background: #3b82f6;
  opacity: 0.65;
}

/* Rare — яркий электрик-голубой */
.case_item.rarity-rare {
  border-color: rgba(34, 211, 238, 0.5);
  background: radial-gradient(ellipse at 50% -10%, rgba(34, 211, 238, 0.28) 0%, rgba(6, 182, 212, 0.1) 45%, #161920 80%);
  box-shadow: inset 0 1px 0 rgba(34, 211, 238, 0.25);
}

.case_item.rarity-rare::before {
  background: #22d3ee;
  opacity: 0.7;
}

/* Epic — яркий фиолетовый */
.case_item.rarity-epic {
  border-color: rgba(168, 85, 247, 0.55);
  background: radial-gradient(ellipse at 50% -10%, rgba(168, 85, 247, 0.3) 0%, rgba(126, 34, 206, 0.12) 45%, #161920 80%);
  box-shadow: inset 0 1px 0 rgba(168, 85, 247, 0.25);
}

.case_item.rarity-epic::before {
  background: #a855f7;
  opacity: 0.75;
}

/* Purple — яркий розовый */
.case_item.rarity-purple {
  border-color: rgba(236, 72, 153, 0.55);
  background: radial-gradient(ellipse at 50% -10%, rgba(236, 72, 153, 0.3) 0%, rgba(219, 39, 119, 0.12) 45%, #161920 80%);
  box-shadow: inset 0 1px 0 rgba(236, 72, 153, 0.25);
}

.case_item.rarity-purple::before {
  background: #ec4899;
  opacity: 0.75;
}

/* Mythic — огненно-красный */
.case_item.rarity-mythic {
  border-color: rgba(239, 68, 68, 0.6);
  background: radial-gradient(ellipse at 50% -10%, rgba(239, 68, 68, 0.35) 0%, rgba(220, 38, 38, 0.14) 45%, #161920 80%);
  box-shadow: inset 0 1px 0 rgba(239, 68, 68, 0.3), 0 0 20px rgba(239, 68, 68, 0.1);
}

.case_item.rarity-mythic::before {
  background: #ef4444;
  opacity: 0.85;
}

/* Legendary — яркое золото */
.case_item.rarity-legendary {
  border-color: rgba(250, 204, 21, 0.6);
  background: radial-gradient(ellipse at 50% -10%, rgba(250, 204, 21, 0.35) 0%, rgba(234, 179, 8, 0.14) 45%, #161920 80%);
  box-shadow: inset 0 1px 0 rgba(250, 204, 21, 0.3), 0 0 20px rgba(250, 204, 21, 0.1);
}

.case_item.rarity-legendary::before {
  background: #facc15;
  opacity: 0.85;
}

.case_item-percent {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  z-index: 2;
}

.chance_tooltip {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.case_item_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 10px 16px;
  box-sizing: border-box;
  margin-top: auto;
}

.case_item-preloader,
.slot-card-preloader {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: case-preloader-spin 0.7s linear infinite;
  pointer-events: none;
}

.slot-card-img .slot-card-preloader {
  width: 28px;
  height: 28px;
}

@keyframes case-preloader-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.case_item-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  min-height: 72px;
  height: 72px;
  padding: 8px 6px 4px;
  position: relative;
  box-sizing: border-box;
  background-color: transparent;
  border-radius: 8px;
}

.case_item-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60%;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.case_item.rarity-uncommon .case_item-img::after {
  background: #b4bed2;
  opacity: 0.3;
}

.case_item.rarity-common .case_item-img::after {
  background: #3b82f6;
  opacity: 0.4;
}

.case_item.rarity-rare .case_item-img::after {
  background: #22d3ee;
  opacity: 0.45;
}

.case_item.rarity-epic .case_item-img::after {
  background: #a855f7;
  opacity: 0.5;
}

.case_item.rarity-purple .case_item-img::after {
  background: #ec4899;
  opacity: 0.5;
}

.case_item.rarity-mythic .case_item-img::after {
  background: #ef4444;
  opacity: 0.55;
}

.case_item.rarity-legendary .case_item-img::after {
  background: #facc15;
  opacity: 0.55;
}

.case_item-img img {
  width: 100%;
  height: 100%;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease, filter 0.3s ease;
  position: relative;
  z-index: 1;
}

.case_item .case_item-img img {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)) drop-shadow(0 0 25px rgba(255, 255, 255, 0.12));
}

.case_item:active .case_item-img img {
  transform: scale(1.05);
}

.case_item p {
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
}

.case_item .case_item_name {
  margin-top: 2px;
  margin-bottom: 6px;
  height: auto;
  max-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 18px;
  text-overflow: ellipsis;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.case_item-price-list {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.case_item-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: none;
}

.case_item-price .case_item-stars-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.case_item-price-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #FFCA5A;
}

.case_item_tgs {
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  position: relative;
  z-index: 1;
}

.nft-image {
  width: 26px !important;
  height: 48px !important;
  object-fit: contain;
}

#live-drop-bar {
  width: 100%;
  overflow: hidden;
  height: 48px;
  background: #121418;
  border-bottom: 1px solid #1e1f26;
  padding: 6px 0;
  display: flex;
  align-items: center;
  position: relative;
}

#live-drop-track {
  display: flex;
  animation: scrollDrops 40s linear infinite;
  gap: 0;
  min-width: 100%;
  width: max-content;
}

.case_winned_items_grid.single {
  display: flex;
  justify-content: center;
}

.case_winned_item {
  text-align: center;
}

@keyframes winItemFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

#winModal.show {
  background: rgba(0, 0, 0, 0.8) !important;
}

#winModal.show #winModalCard {
  transform: scale(1) !important;
  opacity: 1 !important;
}

.top_nav {
  /* Шапка закреплена всегда и везде: не листается вместе со страницей */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
  /* Высота = системная зона Telegram сверху + сама шапка */
  height: var(--header-h);
  padding: var(--safe-top) 20px 0;
  display: flex;
  align-items: center;
  background: #131418;
  /* Шапку нельзя двигать: жесты перетаскивания по ней игнорируются */
  touch-action: none;
}

.user__profile {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  min-width: 0;
  max-width: 108px;
  padding: 0 8px 0 5px;
  background: #1e2029;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

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

.user_name {
  font-size: 15px;
  color: white;
  font-weight: 600;
}

.logged_user_profile {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.nav_logged_user {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
}

.nav_logged_user img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav_logged_user-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 46px;
  color: #fff;
}

.nav_topup {
  display: grid;
  grid-template-columns: minmax(104px, auto) 32px;
  align-items: center;
  height: 40px;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 4px;
  align-self: center;
  justify-content: end;
  transform: none;
  max-width: min(148px, 50vw);
}

.nav_topup-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  background: #168cff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.16s, background 0.2s;
  appearance: none;
  box-sizing: border-box;
  line-height: 1;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(22, 140, 255, 0.24);
}

.nav_topup-plus:active {
  background: #0f7bdf;
  transform: scale(0.96);
}

.nav_topup-pill-icon {
  flex-shrink: 0;
}

.nav_topup-pill-text {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1;
}

.nav_topup-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.nav_topup-item img {
  width: 16px;
  height: 16px;
}

.nav_topup-balance {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.nav_topup-balance-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 118px;
  max-width: 132px;
  height: 40px;
  background: #1e2029;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 9px;
  border-radius: 20px;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .logged_user_profile {
    gap: 6px;
  }

  .user__profile {
    max-width: 88px;
    height: 38px;
    padding: 0 8px 0 5px;
  }

  .nav_logged_user-name {
    max-width: 34px;
    font-size: 11px;
  }

  .nav_topup {
    grid-template-columns: minmax(88px, auto) 30px;
    gap: 4px;
    max-width: 122px;
  }

  .nav_topup-plus,
  .nav_topup-balance-item {
    height: 38px;
    padding: 0 7px;
    min-width: 0;
  }

  .nav_topup-plus {
    width: 30px;
    min-width: 30px;
    height: 30px;
    font-size: 20px;
    padding: 0;
  }

  .nav_topup-balance-item {
    min-width: 98px;
  }

  .nav_topup-balance-summ {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .app-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.nav_topup-balance-summ {
  color: #fff;
  font-size: clamp(10px, 2.9vw, 13px);
  font-weight: 700;
  line-height: 1;
  margin-left: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Admin button in top nav */
.admin-panel-btn {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #2d2f33;
  background: #1a1b1f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.admin-panel-btn:hover {
  background: #23252b;
}

.category_chips_scroll {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 12px 0 0;
  margin-top: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
}

.category_chips {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  background: #1a1b20;
  border-radius: 28px;
  padding: 4px;
  border: 1px solid #2a2d35;
}

.category_chips_scroll::-webkit-scrollbar {
  display: none;
}

.category_chip {
  padding: 8px 16px;
  background: transparent;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  transition: all .25s ease;
  border: 1.5px solid transparent;
}

.category_chip.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.card_image {
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
}

.case-card .card_image {
  box-shadow: none;
}

.card_image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: none;
  outline: none;
  mix-blend-mode: normal;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.18));
  transition: transform .3s ease;
}

.case_item_video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.nav_topup-stars-icon {
  width: 18px;
  height: 18px;
}

.nav_profile {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  background-color: #131418;
  box-shadow: none;
  z-index: 9;
  margin-bottom: 0;
  gap: 8px;
}

.logged_user_profile {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.user__profile {
  flex: 0 1 auto;
  min-width: 0;
}

.nav_topup {
  flex-shrink: 0;
}

.admin-panel-btn {
  flex-shrink: 0;
}

/* Toast notifications — стиль как у Gift Drop */
.toast-container {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  left: 16px !important;
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: auto;
  max-width: min(400px, calc(100vw - 32px));
  margin-left: auto;
}

.toast {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: #212A3E;
  border: 1px solid #4A608F;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  word-wrap: break-word;
  box-sizing: border-box;
}

.toast-icon-wrap {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon-wrap svg {
  width: 16px;
  height: 16px;
}

.toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.toast-message {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.toast-message-simple {
  flex: 1;
  line-height: 1.4;
  font-size: 14px;
  min-width: 0;
}

/* Success — тёмно-зелёный фон, синий круг с галочкой */
.toast-success {
  background: #1B4332;
  border-color: #2D6A4F;
}

.toast-success .toast-icon-wrap {
  background: #3399FF;
}

.toast-success .toast-icon-wrap svg {
  color: #fff;
}

/* Error — тёмно-серый, красный круг с крестиком */
.toast-error {
  background: #2A2D35;
  border-color: #3D4048;
}

.toast-error .toast-icon-wrap {
  background: #E53935;
}

.toast-error .toast-icon-wrap svg {
  color: #fff;
}

/* Warning — тёмно-серый как error */
.toast-warning {
  background: #2A2D35;
  border-color: #3D4048;
}

.toast-warning .toast-icon-wrap {
  background: #F59E0B;
}

.toast-warning .toast-icon-wrap svg {
  color: #fff;
}

/* Info — тёмно-синеватый */
.toast-info {
  background: #212A3E;
  border-color: #4A608F;
}

.toast-info .toast-icon-wrap {
  background: #3399FF;
}

.toast-info .toast-icon-wrap svg {
  color: #fff;
}

.toast-close {
  background: transparent;
  border: none;
  color: #A0AEC0;
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
  border-radius: 6px;
}

.toast-close:hover {
  color: #fff;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.avatars {
  border-radius: 817.36px;
  padding: 6.55px;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  position: relative;
  aspect-ratio: 1;
}

.profile-avatar {
  border-radius: var(--radius-round);
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1
}

.profile-info {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.profile-name {
  color: var(--color-text);
  font-size: 24px;
  font-weight: var(--font-weight-semibold);
}

.profile-id {
  background: rgba(255, 255, 255, .05);
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--color-text);
  font-size: 12px;
  line-height: 20px;
  font-weight: var(--font-weight-semibold);
  height: 36px;
  display: flex;
  align-items: center;
}

/* Остальной CSS перенесён из тз */
.balance-section {
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  transition: all .3s ease
}

.balance-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.label-small {
  color: var(--color-text);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .01px;
  font-weight: 400;
  opacity: .5;
}

.balance-display {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.balance-amount {
  color: var(--color-text);
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  transition: all .3s ease;
}

.coin-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.balance-actions {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
}

.deposit-button {
  background: #0075FF;
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  width: 104px;
  height: 36px;
  cursor: pointer;
  transition: all .2s ease;
}

.button-label {
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--font-weight-semibold);
}

/* Страница пополнения — одинаково на ПК и телефоне */
#deposit-section.deposit-page-section {
  background-color: #131418;
  padding: 48px 12px 120px;
  min-height: 60vh;
  box-sizing: border-box;
}

#deposit-section.hidden {
  display: none !important;
}

.deposit-page-inner {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.deposit-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.deposit-header {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 32px;
  margin-top: 0;
  gap: 8px;
}

.deposit-back-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.deposit-back-btn svg {
  width: 24px;
  height: 24px;
}

.deposit-page-title {
  flex: 1;
  min-width: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  display: block;
}

.deposit-header-spacer {
  width: 40px;
  flex-shrink: 0;
}

/* Общий контейнер: выбор Stars/TON + форма «Заполните данные» в одном блоке с общим фоном */
.deposit-card {
  background: #1e2128;
  border-radius: 18px;
  padding: 28px 24px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.deposit-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

/* Квадратные кнопки 1:1 как у конкурента */
.deposit-tab {
  flex: 1 1 0;
  min-width: 0;
  max-width: 150px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(28, 31, 40, 0.95);
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}

.deposit-tab .deposit-tab-star,
.deposit-tab .deposit-tab-ton-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.deposit-tab .deposit-tab-star {
  width: 24px;
  height: 24px;
}

.deposit-tab .deposit-tab-ton-icon svg,
.deposit-tab .deposit-tab-ton-icon img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.deposit-tab .deposit-tab-gift-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.deposit-tab .deposit-tab-gift-icon svg,
.deposit-tab .deposit-tab-gift-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Пополнение подарком */
.deposit-gift-steps {
  margin: 0 0 24px;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.7;
}

.deposit-gift-steps li {
  margin-bottom: 6px;
}

.deposit-gift-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

.deposit-gift-link:hover {
  text-decoration: underline;
}

.deposit-gift-btn {
  margin-top: 8px;
}

.deposit-tab.active {
  background: rgba(36, 129, 204, 0.3);
  color: #fff;
  border-color: #2481cc;
}

.deposit-tab.active .deposit-tab-star {
  fill: #FFCA5A;
}

.deposit-tab.active .deposit-tab-ton-icon svg path:first-of-type {
  fill: #0098EA;
}

.deposit-tab[data-tab="ton"] {
  font-weight: 500;
}

.deposit-tab-content {
  display: block;
}

.deposit-tab-content.hidden {
  display: none;
}

.deposit-data-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 24px;
  display: block;
}

.deposit-form-group {
  margin-bottom: 20px;
}

/* Один блок: подпись + поле ввода в одной рамке (компактно) */
.deposit-field-block {
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 17, 24, 0.9);
  padding: 6px 12px 8px;
  box-sizing: border-box;
}

.deposit-field-block-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-bottom: 3px;
}

.deposit-field-block .deposit-input-inblock {
  border: none;
  background: transparent;
  padding: 2px 0 4px;
  margin: 0 -2px 0 0;
  min-height: auto;
  font-size: 15px;
  line-height: 1.35;
}

.deposit-field-block .deposit-input-inblock::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.deposit-field-block .deposit-stars-amount-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.deposit-field-block .deposit-stars-amount-inline .deposit-stars-input-icon {
  flex-shrink: 0;
}

.deposit-field-block .deposit-stars-amount-inline .deposit-input-inblock {
  flex: 1;
  min-width: 0;
}

.deposit-field-block .deposit-stars-amount-inline .ton-stars-preview-inline {
  flex-shrink: 0;
  color: rgba(255, 202, 90, 0.95);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.deposit-field-block .deposit-ton-amount-inline {
  border: none;
  background: transparent;
  padding: 0;
  min-height: 32px;
}

.deposit-field-block .deposit-ton-amount-inline .deposit-input-inline {
  padding: 4px 8px 4px 30px;
  font-size: 15px;
  line-height: 1.35;
}

.deposit-field-block .deposit-ton-amount-inline .deposit-input-with-ton {
  background-position: 4px center;
}

.deposit-field-block .deposit-ton-amount-inline .ton-stars-preview-inline {
  font-size: 13px;
}

.deposit-label {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin-bottom: 8px;
}

.deposit-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 17, 24, 0.9);
  color: #fff;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.deposit-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.deposit-input:focus {
  outline: none;
  border-color: rgba(36, 129, 204, 0.5);
}

.deposit-rate {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  margin: -4px 0 16px;
}

.deposit-rate-stars {
  margin-bottom: 24px;
}

.deposit-submit-btn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.deposit-submit-btn:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
}

.inline-star {
  vertical-align: middle;
  margin: 0 2px;
}

/* Отступ между блоками "не хватает" и "Пополнить баланс" на странице кейса */
.not-enough-stars-wrapper {
  gap: 10px !important;
}

.not-enough-stars-wrapper .deposit-from-case-btn {
  margin-top: 10;
}

.deposit-coming-soon {
  color: #666;
  text-align: center;
  padding: 24px;
}

/* TON пополнение */
.deposit-ton-block .deposit-form-group {
  margin-bottom: 12px;
}

.ton-tma-notice {
  background: rgba(255, 180, 0, 0.12);
  border: 1px solid rgba(255, 180, 0, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.ton-tma-notice.hidden {
  display: none;
}

.ton-tma-notice-title {
  font-weight: 600;
  color: #ffb400;
  margin: 0 0 8px;
  font-size: 14px;
}

.ton-tma-notice-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  margin: 0 0 10px;
  line-height: 1.4;
}

.ton-tma-notice-link {
  display: inline-block;
  padding: 10px 16px;
  background: #ffb400;
  color: #0f0f1a;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 8px;
}

.ton-tma-notice-link:hover {
  background: #ffc233;
  color: #0f0f1a;
}

.ton-tma-notice-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin: 0;
}

.ton-connect-wrap {
  margin-bottom: 20px;
  position: relative;
}

.ton-connect-wrap.hidden {
  display: none;
}

.ton-connect-sdk-wrap {
  margin-bottom: 0;
}

.ton-connect-sdk-wrap.hidden {
  display: none !important;
}

.ton-connect-custom-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: #0098ea;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.ton-connect-custom-btn:hover {
  background: #0080c9;
}

.ton-connect-custom-btn:active {
  opacity: 0.9;
}

.ton-connect-custom-btn.hidden {
  display: none !important;
}

.ton-connect-custom-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.ton-connect-custom-btn-icon svg,
.ton-connect-custom-btn-icon img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.ton-connect-sdk-root {
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ton-connect-sdk-root tonconnect-button,
.ton-connect-sdk-root [data-tc-button] {
  width: 100%;
}

/* TON Connect modal: изоляция от глобальных стилей (h1 max-width, overflow, * min-width) */
#tc-widget-root {
  position: fixed !important;
  inset: 0;
  z-index: 2147483647 !important;
  isolation: isolate;
  pointer-events: none;
  /* клики проходят когда модалка закрыта */
}

#tc-widget-root [data-tc-modal] {
  pointer-events: auto;
  /* модалка получает клики когда открыта */
}

#tc-widget-root [data-tc-h1],
#tc-widget-root h1 {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: unset !important;
  white-space: normal !important;
}

#tc-widget-root [data-tc-wallets-modal-container],
#tc-widget-root [data-tc-modal] {
  min-width: auto !important;
  overflow: visible !important;
}

#tc-widget-root [data-tc-wallet-item] {
  min-width: auto;
}

/* Отмена глобального min-width: 0 в секции кошельков — иначе иконки и текст накладываются */
#tc-widget-root [data-tc-wallets-modal-container] * {
  min-width: auto !important;
}

/* PC: секция Available wallets — View all рядом с остальными */
@media (min-width: 600px) {
  #tc-widget-root [data-tc-wallets-modal-universal-desktop] {
    min-width: 380px !important;
  }

  /* Родитель списка — не растягивать, контент по ширине */
  #tc-widget-root [data-tc-wallets-modal-container]>div {
    width: fit-content !important;
    max-width: 100% !important;
  }

  #tc-widget-root [data-tc-wallets-modal-container] ul {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(140px, auto)) !important;
    gap: 8px 12px !important;
    justify-content: start !important;
    width: fit-content !important;
    max-width: 100%;
  }

  #tc-widget-root [data-tc-wallets-modal-container] ul li,
  #tc-widget-root [data-tc-wallets-modal-container] [data-tc-wallet-item] {
    margin: 0 !important;
  }

  #tc-widget-root [data-tc-wallets-modal-container] [data-tc-wallet-item] {
    min-width: 140px !important;
  }
}

.deposit-ton-block .deposit-input:disabled,
.deposit-ton-block .deposit-form-group.disabled .deposit-input {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Когда кошелёк не подключён — блок «Сумма пополнения» такой же вид, как блок промокода */
.deposit-ton-block .deposit-field-block.deposit-form-group.disabled {
  opacity: 0.6;
}

.deposit-ton-block .deposit-form-group.disabled .deposit-ton-amount-inline .deposit-input-inline {
  opacity: 1;
}

.deposit-ton-block .deposit-form-group.disabled .deposit-ton-amount-inline .ton-stars-preview-inline {
  color: rgba(255, 255, 255, 0.4);
}

.deposit-ton-block .ton-deposit-btn-wrap.hidden {
  display: none !important;
}

.ton-connect-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin: 12px 0 8px;
  text-align: center;
}

.ton-refresh-connection-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #0098EA;
  background: rgba(0, 152, 234, 0.15);
  border: 1px solid rgba(0, 152, 234, 0.4);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.ton-refresh-connection-btn:hover {
  background: rgba(0, 152, 234, 0.25);
}

.ton-refresh-connection-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ton-connect-browser-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 10px 0 0;
  text-align: center;
}

.ton-connect-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: #0098EA;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.ton-connect-btn:hover {
  background: #0080c9;
}

.ton-connect-btn-icon {
  display: flex;
  align-items: center;
}

.ton-connect-btn-icon svg {
  width: 24px;
  height: 24px;
}

.ton-wallet-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgb(39, 45, 62);
  margin-bottom: 20px;
  position: relative;
}

.ton-wallet-info.hidden {
  display: none;
}

.ton-wallet-info-main {
  flex: 1;
  min-width: 0;
}

.ton-wallet-name {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-bottom: 4px;
}

.ton-wallet-address {
  font-size: 15px;
  color: #fff;
  font-family: ui-monospace, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ton-wallet-balance-col {
  flex-shrink: 0;
  text-align: right;
}

.ton-wallet-balance-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-bottom: 2px;
}

.ton-wallet-balance-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.ton-wallet-balance-icon {
  display: inline-flex;
  line-height: 0;
}

.ton-wallet-balance-icon svg,
.ton-wallet-balance-icon img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.ton-wallet-balance {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

.ton-wallet-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.ton-wallet-menu-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
}

.ton-wallet-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ton-wallet-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  padding: 6px 0;
  background: #252330;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ton-wallet-dropdown.hidden {
  display: none !important;
}

.ton-wallet-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  color: #fff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.ton-wallet-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Одно поле: иконка TON + сумма + «≈ X stars» в одной строке внутри одного контейнера */
.deposit-ton-amount-inline {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px 0 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 17, 24, 0.9);
  box-sizing: border-box;
}

.deposit-ton-amount-inline:focus-within {
  border-color: rgba(36, 129, 204, 0.5);
}

.deposit-ton-amount-inline .deposit-input-inline {
  flex: 1;
  min-width: 0;
  border: none;
  background-color: transparent;
  padding: 10px 8px 10px 30px;
  margin: 0;
  box-shadow: none;
  font-size: 15px;
}

.deposit-ton-amount-inline .deposit-input-inline:focus {
  outline: none;
}

.deposit-ton-amount-inline .deposit-input-with-ton {
  background-position: 4px center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
}

.deposit-ton-amount-inline .ton-stars-preview-inline {
  flex-shrink: 0;
  color: rgba(0, 152, 234, 0.95);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.deposit-input-with-ton {
  padding-left: 30px;
  background-image: url("/images/ton.svg");
  background-repeat: no-repeat;
  background-position: 4px center;
  background-size: 22px 22px;
}

.deposit-ton-rate {
  margin: -4px 0 16px;
}

/* При неподключённом кошельке не показывать курс */
#tonAmountFormGroup.disabled+.deposit-ton-rate {
  display: none;
}

.ton-deposit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ton-confirm-block {
  text-align: center;
  padding: 24px 16px;
}

.ton-confirm-block.hidden {
  display: none;
}

.ton-confirm-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #0098EA;
  border-radius: 50%;
  animation: ton-spin 0.8s linear infinite;
}

@keyframes ton-spin {
  to {
    transform: rotate(360deg);
  }
}

.ton-confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
}

.ton-confirm-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 20px;
}

.ton-open-wallet-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: #333;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.wallet-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connect-wallet-button {
  background: #0075FF;
  border-radius: 12px;
  padding: 12px 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.inventory-section {
  padding: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}

.inventory-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
  width: 100%;
}

.section-title {
  color: var(--color-text);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .01px;
  font-weight: 400;
  opacity: .5;
}

.buttons-profile-container {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  position: relative;
}

.button {
  border-radius: 10px;
  border: 1px solid #ffffff24;
  padding: 8px 16px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  max-height: 36px;
  cursor: pointer;
  transition: background-color .2s ease;
}

.label {
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.empty-state {
  width: 100%;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.empty-state-message {
  color: var(--color-text);
  opacity: .7;
  font-size: 14px;
}

/* Пустой инвентарь — как в примере с plushpepe */
.empty-state-inventory {
  padding: 32px 24px 40px;
  max-width: 320px;
  margin: 0 auto;
  /* Растягиваем на всю ширину сетки инвентаря (2 колонки), чтобы не съезжало */
  grid-column: 1 / -1;
}

.empty-state-inventory-img {
  width: 47px;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.empty-state-inventory-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0px;
  line-height: 1.3;
}

.empty-state-inventory-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 0px;
  line-height: 1.4;
}

.empty-state-go-cases {
  width: 100%;
  max-width: 320px;
  padding: 18px 32px;
  border: none;
  border-radius: 14px;
  background: #0075FF;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.05s;
}

.empty-state-go-cases:hover {
  background: #0066dd;
}

.empty-state-go-cases:active {
  transform: scale(0.98);
}

.open-cases-button {
  background: #0075FF;
  border-radius: 12px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}

.profile-page {
  padding: 0 0 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background-color: #131418;
}

/* Фон для всего сектора профиля */
#profile-section {
  background-color: #131418;
}


.profile-container {
  padding: 12px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 361px;
  box-sizing: border-box
}

.lightning-icon {
  width: 120px;
  height: 120px;
  position: absolute;
  left: calc(50% - 66.5px);
  top: calc(69% - 73px);
  transform: rotate(26deg) scale(1);
}

.lightning-svg {
  height: auto;
  position: absolute;
  left: -139px;
  transform: scale(.35) rotate(344deg);
  top: -48px;
  overflow: visible;
}

.banner-content {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  flex-shrink: 0;
  min-width: 145px;
  align-self: center;
}

.coin-wrapper {
  width: 36px;
  height: 36px;
  position: relative;
  aspect-ratio: 1;
}

.banner-text {
  color: #fff;
  text-align: left;
  font-family: Inter-SemiBold, sans-serif;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
}

.coin-svg {
  width: 36px;
  height: 36px;
  position: absolute;
  overflow: visible;
}

.free-case-banner {
  background: linear-gradient(115.39deg, #0098EA 0%, #3FBCFF 100%);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  box-shadow: 0 0 20px #3fbcff59;
  overflow: hidden;
  width: 100%;
  min-height: 56px;
}

.telegram-button {
  background: #ffffff;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 72px;
  margin: 0;
  align-self: center;
  flex-shrink: 1;
  position: relative;
  box-shadow: 0 0 50px #ffffff80;
  border: none;
  cursor: pointer;
}

.button-label_ref {
  color: #151515;
  text-align: center;
  font-family: var(--font-family, "Inter-SemiBold", sans-serif);
  font-size: 13px;
  line-height: 1;
  font-weight: var(--font-weight-semibold, 600);
  position: relative;
  display: flex;
  align-items: center;
}

.profile-content-wrapper {
  width: 107%;
  margin-top: 0px;
}

.profile_content_wrapper {
  border-radius: 12px;
  padding: 16px;
}

.profile_content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile_content-head-label {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
}

.btn_sale_all {
  border-radius: 10px;
  gap: 8px;
  padding: 8px 18px;
  background: #007aff;
  width: auto;
  max-width: 160px;
  flex-shrink: 0;
  white-space: nowrap;
}

.profile_items_list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: stretch;
}

.profile_items_list_item {
  padding: 12px 16px;
  border-radius: 12px;
  background: #1a1b1f;
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 0;
}

.profile_items_list_item > img,
.profile_items_list_item .profile-item-video {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.profile_items_list_item_desc {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile_items_name {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  margin: 12px 0;
  text-align: center;
}

.profile_items_price {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  gap: 4px;
}

.ton-icon {
  width: 16px;
  height: 16px;
}

.profile_item_actions_list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.profile_item_action {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 42px;
  min-width: 0;
  width: 100%;
  gap: 4px;
  padding: 8px 12px;
  background: #161920;
  border-radius: 10px;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: #fff;
}

.sell-btn svg,
.sell-btn img {
  width: 16px;
  height: 16px;
  margin-left: 4px
}

.profile_item_action.sell-btn {
  background: #161920;
  border: 1px solid #28292b;
}

.profile_item_action.withdraw-btn {
  background: #007aff;
}

.profile_items_price svg,
.profile_items_price img {
  width: 18px;
  height: 18px;
}

#caseTitle {
  all: unset !important;
  /* Полный сброс всех стилей */
  display: block;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700 !important;
  font-size: 24px !important;
  color: white !important;
  transform: translateY(-10px) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin: 0 !important;
  text-align: center !important;

  /* Явное отключение всех возможных эффектов */
  -webkit-text-stroke: 0 !important;
  text-stroke: 0 !important;
  text-shadow: none !important;
  text-decoration: none !important;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  filter: none !important;

  /* Отключение всех эффектов смешивания */
  mix-blend-mode: normal !important;
  background-blend-mode: normal !important;
  isolation: isolate !important;

  /* Оптимизация рендеринга */
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  font-synthesis: none !important;

  /* Удаление псевдоэлементов */
  &::before,
  &::after {
    content: none !important;
    display: none !important;
  }
}

.text-solid {
  all: inherit !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  color: white !important;
}

.custom-padding .button--navy {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.custom-padding .text-solid {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.wallet-section[data-v-47cb848d] {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-address {
  margin-top: 10px;
  font-size: 14px;
  color: #aaa;
  word-break: break-all;
}

.stars-modal-backdrop {
  display: none;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  z-index: 1000 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.stars-modal-window {
  display: none;
  position: relative !important;
  /* Убедимся, что не absolute/fixed */
  margin: auto !important;
  /* Центрирование внутри flex-контейнера */
  min-width: 300px !important;
  max-width: 90% !important;
  width: auto !important;
  background-color: #23272f !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
  color: #fff !important;
}

.stars-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #2B3540;
  position: relative;
}

.stars-modal-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.stars-modal-close:hover {
  background: #31343c;
}

.stars-modal-close svg {
  pointer-events: none;
  /* Чтобы клик срабатывал только на кнопке */
}

.stars-modal-content {
  padding: 16px;
  padding-bottom: 24px;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.stars-modal-window.closing {
  animation: fadeOutScale 0.3s ease forwards;
}

@keyframes fadeOutScale {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Для анимации закрытия */
.stars-modal-window.closing {
  animation: slideDown 0.3s ease forwards;
}

.stars-modal-close:hover {
  background: #31343c;
}

.stars-modal-placeholder-header {
  color: #aaa;
  margin-bottom: 8px;
  font-size: 14px;
}

.stars-modal-input {
  width: 100%;
  padding: 12px;
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  margin-bottom: 15px;
  outline: none;
  transition: border 0.18s;
}

.stars-modal-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 8px;
  margin-bottom: 15px;
}

.stars-modal-input-wrap:focus-within {
  border-color: #0075FF;
}

.stars-modal-star-icon {
  flex-shrink: 0;
}

.stars-modal-input-wrap .stars-modal-input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  border: none;
  background: transparent;
  padding: 12px 0;
}

.stars-modal-input:focus {
  border-color: #0075FF;
}

.stars-modal-btn {
  background: #0075FF;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.stars-modal-btn:hover {
  background: #0066d9;
}

.hide-number-spin::-webkit-outer-spin-button,
.hide-number-spin::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hide-number-spin {
  -moz-appearance: textfield;
}

.profile-page,
.app-container {
  max-width: 100% !important;
  width: 100% !important;
}

/* Admin panel layout */
.admin-page {
  padding: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #171922;
  border: 1px solid #2a2d35;
  border-radius: 12px;
  padding: 12px;
}

.admin-title {
  font-size: 20px;
  font-weight: 800;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  border: 1px solid #2a2d35;
  border-radius: 10px;
  background: #171922;
  color: #8b95ad;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-tab.active {
  background: #0f6fff;
  border-color: #0f6fff;
  color: #fff;
}

.admin-form-card {
  background: #171922;
  border: 1px solid #2a2d35;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-section-title {
  font-size: 15px;
  font-weight: 800;
}

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

.admin-form-grid label,
.admin-field-full {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #8b95ad;
  font-size: 12px;
  font-weight: 700;
}

.admin-form-grid input,
.admin-form-card textarea,
.admin-field-full textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #2a2d35;
  border-radius: 10px;
  background: #101216;
  color: #fff;
  padding: 10px 11px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.admin-form-card textarea {
  resize: vertical;
  min-height: 132px;
}

.promo-type-fields {
  display: contents;
}

.admin-action-row,
.admin-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-primary-btn,
.admin-secondary-btn,
.admin-btn-small {
  border: 1px solid #2a2d35;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 12px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.admin-primary-btn,
.admin-btn-small.approve {
  background: #0f6fff;
  border-color: #0f6fff;
}

.admin-secondary-btn,
.admin-btn-small {
  background: #222631;
}

.admin-btn-small.reject {
  background: #3a1820;
  border-color: #5b2230;
}

.admin-broadcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 12px;
  align-items: start;
}

.broadcast-buttons-list {
  display: grid;
  gap: 8px;
}

.broadcast-button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 38px;
  gap: 8px;
}

.broadcast-button-row input {
  min-height: 38px;
  border: 1px solid #2a2d35;
  border-radius: 10px;
  background: #101216;
  color: #fff;
  padding: 8px 10px;
}

.broadcast-remove-btn {
  border: 1px solid #5b2230;
  border-radius: 10px;
  background: #3a1820;
  color: #fff;
  font-size: 20px;
}

.admin-list-full {
  max-height: 360px;
}

@media (max-width: 760px) {
  .admin-page {
    padding: 10px 0 90px;
  }

  .admin-form-grid,
  .admin-broadcast-layout,
  .broadcast-button-row {
    grid-template-columns: 1fr;
  }
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-title {
  font-size: 20px;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #2d2f33;
  background: #131417;
  color: #7f8bad;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.admin-tab:hover {
  background: #1a1d24;
  color: #adb5d0;
}

.admin-tab.active {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
}

.admin-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-menu-grid .admin-tab { display: flex; min-height: 68px; align-items: center; gap: 11px; padding: 12px; border-radius: 10px; color: #fff; text-align: left; }
.admin-menu-grid .admin-tab > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.admin-menu-grid .admin-tab-wide { grid-column: 1 / -1; }
.admin-nav-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: rgba(0,122,255,.16); color: #67adff; }
.admin-nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-section-back { display: inline-flex; margin: 0 0 5px; padding: 0; border: 0; background: transparent; color: #67adff; font-size: 14px; font-weight: 700; }
.admin-section-back::before { content: '←'; margin-right: 7px; }
.admin-relayer-card { min-width: 0; overflow-wrap: anywhere; }
.admin-relayer-status { padding: 11px 12px; border: 1px solid rgba(239, 68, 68, .28); border-radius: 12px; background: rgba(127, 29, 29, .18); color: #fecaca; font-size: 13px; font-weight: 700; }
.admin-relayer-status.is-online { border-color: rgba(52, 211, 153, .3); background: rgba(6, 78, 59, .32); color: #a7f3d0; }
@media (max-width: 380px) { .admin-menu-grid { grid-template-columns: 1fr; }.admin-menu-grid .admin-tab-wide { grid-column: auto; } }
#admin-section .admin-page { min-width: 0; overflow: hidden; }

/* Compact purchase price in the gift market. */
#market-section .market-buy-btn { min-height: 32px; padding: 5px 8px; border-radius: 16px; font-size: 12px; }
#market-section .market-buy-btn .market-btn-star { width: 12px; height: 12px; }

/* Referral balance and withdrawal action share one compact, stable row. */
.ref-income-main { align-items: center; justify-content: space-between; padding: 18px 16px; }
.ref-income-balance { display: grid; grid-template-columns: 18px auto; align-items: center; column-gap: 5px; min-width: 0; }
.ref-income-balance .ref-dash-star { grid-row: 1 / span 2; width: 17px; height: 17px; }
.ref-income-balance b { font-size: 28px; line-height: 1.05; }
.ref-income-balance small { grid-column: 2; color: #a5a5a9; font-size: 12px; line-height: 1.2; }
.ref-withdraw-btn { margin-left: 12px; }

.admin-tab-content {
  margin-top: 12px;
}

.admin-toolbar,
.admin-create-case {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #171922;
  border: 1px solid #2d2f33;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.admin-create-case input,
.admin-details input,
.admin-details textarea,
#adminUserSearch {
  background: #101216;
  border-radius: 8px;
  border: 1px solid #2d2f33;
  padding: 8px 10px;
  color: #fff;
  font-size: 13px;
  min-height: 34px;
}

.admin-create-case input {
  flex: 1 1 130px;
}

.admin-create-case label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
}

/* Referrals tab */
.admin-referrals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-referrals-table thead th {
  padding: 10px 12px;
  text-align: left;
  color: #64748b;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2d2f33;
}

.admin-referrals-table thead th:last-child {
  text-align: right;
}

.admin-referrals-table tbody tr {
  border-bottom: 1px solid #1a1b1f;
  transition: background 0.15s;
}

.admin-referrals-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-referrals-table td {
  padding: 10px 12px;
  color: #cbd5e1;
}

.admin-referrals-table td:first-child {
  color: #475569;
  font-weight: 500;
  width: 40px;
}

.admin-referrals-table td:last-child {
  text-align: right;
  color: #10b981;
  font-weight: 700;
  font-size: 14px;
}

.admin-referrals-table .ref-username {
  color: #fff;
  font-weight: 500;
}

.admin-referrals-table .ref-id {
  color: #64748b;
  font-size: 12px;
}

/* Рассылка */
.broadcast-editor {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.broadcast-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.broadcast-label {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.broadcast-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.broadcast-tool-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #3b82f6;
  background: #1e3a5f;
  color: #93c5fd;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.broadcast-tool-btn:hover {
  background: #2563eb;
  color: #fff;
}

.broadcast-hint {
  font-size: 12px;
  color: #94a3b8;
}

.broadcast-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #2d2f33;
  background: #131417;
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.broadcast-textarea::placeholder {
  color: #64748b;
}

.broadcast-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2d2f33;
  background: #131417;
  color: #e2e8f0;
  font-size: 14px;
  box-sizing: border-box;
}

.broadcast-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.broadcast-button-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.broadcast-button-row .broadcast-btn-text {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #2d2f33;
  background: #131417;
  color: #e2e8f0;
  font-size: 13px;
}

.broadcast-button-row .broadcast-btn-url {
  flex: 2;
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #2d2f33;
  background: #131417;
  color: #e2e8f0;
  font-size: 13px;
}

.broadcast-remove-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.broadcast-remove-btn:hover {
  background: #334155;
  color: #f87171;
}

.broadcast-add-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px dashed #475569;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  align-self: flex-start;
  transition: border-color 0.2s, color 0.2s;
}

.broadcast-add-btn:hover {
  border-color: #64748b;
  color: #e2e8f0;
}

.broadcast-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.broadcast-send-btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.2s;
  align-self: flex-start;
}

.broadcast-send-btn:hover {
  filter: brightness(1.1);
}

.broadcast-result {
  font-size: 13px;
}

.broadcast-result.hidden {
  display: none;
}

.broadcast-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.broadcast-file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  position: absolute;
}

.broadcast-file-label {
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  text-decoration: underline;
}

.broadcast-clear-file {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
}

.broadcast-clear-file:hover {
  color: #f87171;
}

.broadcast-clear-file.hidden {
  display: none;
}

.broadcast-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.broadcast-preview-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 13px;
  cursor: pointer;
  align-self: flex-start;
}

.broadcast-preview-btn:hover {
  background: #334155;
}

.broadcast-preview-box {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
  max-width: 320px;
}

.broadcast-preview-box.hidden {
  display: none;
}

.broadcast-preview-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.broadcast-preview-img {
  border-radius: 8px;
  overflow: hidden;
  max-height: 200px;
}

.broadcast-preview-img img {
  width: 100%;
  height: auto;
  display: block;
}

.broadcast-preview-text {
  font-size: 14px;
  line-height: 1.45;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.broadcast-preview-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.broadcast-preview-link {
  padding: 6px 12px;
  border-radius: 8px;
  background: #1e40af;
  color: #fff;
  font-size: 13px;
  display: inline-block;
}

.broadcast-preview-empty {
  color: #64748b;
  font-size: 13px;
}

.broadcast-preview-photo-fallback {
  display: block;
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 8px;
  border: 1px dashed #475569;
}

.broadcast-stats {
  margin-top: 12px;
}

.broadcast-stats.hidden {
  display: none;
}

.broadcast-success-msg {
  font-size: 16px;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.broadcast-stats-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #22c55e;
  background: rgba(34, 197, 94, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.broadcast-stats-title {
  font-size: 14px;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 4px;
}

.broadcast-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #e2e8f0;
}

.broadcast-stats-row strong {
  color: #22c55e;
  margin-left: 12px;
}

.broadcast-progress-wrap {
  padding: 16px;
  border-radius: 12px;
  background: rgba(123, 142, 255, 0.08);
  border: 1px solid rgba(123, 142, 255, 0.25);
}

.broadcast-progress-text {
  font-size: 14px;
  font-weight: 600;
  color: #7B8EFF;
  margin-bottom: 10px;
}

.broadcast-progress-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.broadcast-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #7B8EFF, #a78bfa);
  transition: width 0.4s ease;
}

.broadcast-progress-count {
  margin-top: 8px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}

/* История рассылок */
.broadcast-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.broadcast-history-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2d2f33;
  background: #1a1b1f;
}

.broadcast-history-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.broadcast-history-date {
  font-size: 12px;
  color: #94a3b8;
}

.broadcast-history-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #334155;
  color: #cbd5e1;
}

.broadcast-history-preview {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 10px;
}

.broadcast-history-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #94a3b8;
}

.broadcast-history-stats strong {
  color: #22c55e;
  margin-left: 4px;
}

.broadcast-history-full {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #2d2f33;
}

.broadcast-history-full.hidden {
  display: none;
}

.broadcast-history-full .broadcast-history-text {
  font-size: 13px;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 8px;
}

.broadcast-history-full .broadcast-history-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.admin-card {
  background: #1a1b1f;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #2d2f33;
}

.admin-card-label {
  font-size: 12px;
  color: #7f8bad;
  margin-bottom: 4px;
}

.admin-card-value {
  font-size: 18px;
  font-weight: 600;
}

.admin-split {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .admin-split {
    flex-direction: row;
    align-items: flex-start;
  }
}

.admin-list {
  flex: 1;
  background: #1a1b1f;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #2d2f33;
  max-height: 400px;
  overflow-y: auto;
}

.admin-details {
  flex: 2;
  background: #1a1b1f;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #2d2f33;
  max-height: 400px;
  overflow-y: auto;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px solid #23252b;
  cursor: pointer;
  font-size: 13px;
}

.admin-user-row:last-child {
  border-bottom: none;
}

.admin-user-row:hover {
  background: #18191d;
}

.admin-user-row.active {
  background: rgba(0, 122, 255, 0.14);
  border-color: rgba(0, 122, 255, 0.35);
}

.admin-muted {
  font-size: 13px;
  color: #7f8bad;
}

.admin-promos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-promos-form {
  background: #1a1b1f;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #2d2f33;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.promo-type-tabs {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-bottom: 2px;
}

.promo-type-tab {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #2d2f33;
  background: #131417;
  color: #7f8bad;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.promo-type-tab.active {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
}

.promo-type-fields {
  display: contents;
}

.promo-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}

.promo-badge.badge-case {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.promo-badge.badge-deposit {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.admin-promos-form input {
  background: #131417;
  border-radius: 8px;
  border: 1px solid #2d2f33;
  padding: 6px 8px;
  color: #fff;
  font-size: 13px;
  flex: 1 1 120px;
}

.admin-promos-form button {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: #007aff;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.admin-promo-row,
.admin-withdraw-row,
.admin-log-row {
  border-bottom: 1px solid #23252b;
  padding: 6px 4px;
  font-size: 13px;
}

.admin-row-actions {
  margin-top: 4px;
  display: flex;
  gap: 4px;
}

.admin-btn-small {
  padding: 4px 8px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 12px;
}

.admin-btn-small.approve {
  background: #16a34a;
  color: #fff;
}

.admin-btn-small.reject {
  background: #dc2626;
  color: #fff;
}

/* Стили для раздела рефералов */
/* Основные стили для секции друзей */
#friends-section {
  position: fixed;
  /* Отступ сверху = высота шапки + системная зона Telegram */
  top: calc(58px + var(--safe-top));
  left: 0;
  right: 0;
  /* Оставляем место для нижнего меню + системную зону снизу */
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  width: 100%;
  max-width: 100vw;
  padding: 15px;
  margin: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #131418;
  z-index: 5;
  margin-top: 0;
  -webkit-overflow-scrolling: touch;
  /* Для плавного скролла на iOS */
}

/* Контейнер содержимого */
.referral-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* Заголовки */
.ref-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: white;
  word-break: break-word;
  padding: 0 10px;
}

.ref-subtitle {
  text-align: center;
  color: #FFCA5A;
  font-size: 16px;
  margin-bottom: 20px;
  padding: 0 10px;
}

/* Кнопки */
.ref-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.invite-btn {
  width: 291px;
  height: 50px;
  border-radius: 10px;
  background-color: #007aff;
  color: #fff;
  padding: 15px 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
}

.copy-btn {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background-color: #007aff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.copy-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Список рефералов — стиль как на скрине */
#invitedFriendsList {
  max-height: 320px;
  overflow-y: auto;
  padding: 0 4px;
}

.ref-card {
  background: #1E2128;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #2D3139;
}

.ref-card-num {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.ref-card-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ref-card-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.ref-card-avatar,
.ref-card-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.ref-card-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.ref-card-avatar-img {
  object-fit: cover;
  display: block;
}

.ref-card-username {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  word-break: break-all;
}

/* Основной оверлей (фон) */
.custom-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Карточка попапа */
.custom-confirm-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  max-width: 280px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

/* Текст в попапе */
.custom-confirm-text {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
}

.custom-confirm-hint {
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

/* Ссылка на бота */
.custom-confirm-link {
  color: #2a7ae9;
  text-decoration: none;
  font-weight: 500;
}

/* Кнопки */
.custom-confirm-buttons {
  display: flex;
  gap: 12px;
}

.custom-confirm-button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.custom-confirm-cancel {
  background: #f0f0f0;
  color: #333;
}

.custom-confirm-cancel:hover {
  background: #e0e0e0;
}

.custom-confirm-ok {
  background: #2a7ae9;
  color: white;
  font-weight: 500;
}

.custom-confirm-ok:hover {
  background: #1a6cb3;
}

/* Анимация появления */
.custom-confirm-show {
  opacity: 1;
}

.custom-confirm-show .custom-confirm-card {
  opacity: 1;
  transform: translateY(0);
}

/* Адаптация для мобильных */
@media (max-width: 767px) {
  #friends-section {
    padding: 10px 15px;
  }

  .ref-title {
    font-size: 18px;
  }

  .ref-subtitle {
    font-size: 14px;
  }
}

/* Фикс для горизонтального скролла */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

.ref-output {
  margin-top: 40px;
}

.ref-output-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.output-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
}

#backToMenuFromFriends {
  background: #1e78ff !important;
  color: #fff !important;
  padding: 10px 20px;
  margin: 16px auto 0;
  border-radius: 12px;
  border: none;
  font-weight: 500;
  font-size: 15px;
  width: auto;
  max-width: 200px;
  display: block;
}

#backToMenuFromFriends:hover {
  background: #2563eb !important;
}

.info-alert {
  width: 100%;
  padding: 4px 10px;
  background-color: #007aff21;
  color: #007aff;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.open_case_block {
  width: 100%;
  margin-top: 15px;
}

.promo-activation-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: #1E1F26;
  border: 1px solid #3C4349;
  color: white;
  font-size: 16px;
  outline: none;
}

.promo-input::placeholder {
  color: #7F8BAD;
}

.open_case_btn {
  width: 100%;
  padding: 12px;
  background: #007AFF;
  color: white;
  font-weight: 500;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.open_case_btn:hover {
  background: #0066D9;
}

.cases_block_title {
  grid-column: 1 / -1;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  /* Bold - для самых главных заголовков */
  font-size: 23px;
  /* Сделаем чуть крупнее */
  text-transform: none;
  /* Убираем ВЕРХНИЙ РЕГИСТР */
  color: #fff;
  text-align: center;
  /* Выравнивание по левому краю */
  justify-content: flex-start;
  /* Для flex-контейнера */
  padding: 10px 0;
  margin: 0px 0 0px 0;
  grid-column: 1 / -1;
}

.mobile-menu-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #131417;
  border-top: 1px solid #2d2d2d;
  z-index: 100;
  padding: 8px 0 calc(8px + var(--safe-bottom));
  /* Навигация доступна на всех устройствах: телефон, планшет, ПК */
  display: block;
}

.mob_menu_list {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  width: 100%;
  /* На планшетах и ПК держим панель по центру и не растягиваем на всю ширину */
  max-width: 720px;
  margin: 0 auto;
}

/* На больших экранах пункты не разъезжаются на всю ширину */
@media (min-width: 768px) {
  .mob_menu_item {
    max-width: 140px;
  }
}

.mob_menu_item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #7f8bad;
  font-size: 12px;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 20%;
  text-align: center;
}

.mob_menu_item img {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.mob_menu_item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.mob_menu_crash_icon {
  width: 24px;
  height: 24px;
  display: block;
  color: #fff !important;
  fill: #fff !important;
  stroke: none;
  margin-bottom: 4px;
}

.mob_menu_item p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mob_menu_item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.crash-section {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 12px 92px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crash-section.hidden {
  display: none !important;
}

.crash-header,
.crash-controls {
  background: linear-gradient(180deg, rgba(24, 27, 35, 0.96), rgba(15, 17, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.crash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crash-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.crash-title-icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #ffca5a;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crash-subtitle {
  color: #8b95ad;
  font-size: 13px;
  margin-top: 2px;
}

.crash-bank {
  color: #ffca5a;
  font-weight: 800;
  font-size: 18px;
}

.crash-stage {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 202, 90, 0.18), transparent 28%),
    linear-gradient(180deg, #111827 0%, #0a0d13 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 18px 34px rgba(0, 0, 0, 0.28);
}

.crash-stage canvas {
  width: 100%;
  height: 260px;
  display: block;
}

.crash-rocket {
  position: absolute;
  left: 8%;
  top: 72%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) rotate(24deg);
  transition: filter 0.18s ease;
  z-index: 2;
  pointer-events: none;
}

.crash-rocket svg {
  width: 100%;
  height: 100%;
  fill: #f8fafc;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.crash-rocket circle {
  fill: #38bdf8;
}

.crash-rocket-flame {
  fill: #ffca5a;
}

.crash-rocket.is-hot .crash-rocket-flame {
  fill: #fb7185;
}

.crash-stage.is-crashed .crash-rocket {
  filter: saturate(1.6) hue-rotate(320deg);
}

.crash-multiplier {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  font-size: 46px;
  font-weight: 900;
  color: #fff;
  z-index: 3;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
}

.crash-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: #cbd5e1;
  font-size: 13px;
  z-index: 3;
}

.crash-controls {
  display: grid;
  gap: 10px;
}

.crash-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #8b95ad;
  font-size: 12px;
}

.crash-field input {
  background: #101216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  padding: 12px;
  font-size: 18px;
  font-weight: 800;
}

.crash-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.crash-quick button,
.crash-main-btn,
.crash-cashout-btn {
  border: none;
  border-radius: 10px;
  min-height: 42px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.crash-quick button {
  background: #252a36;
}

.crash-main-btn {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.crash-cashout-btn {
  background: linear-gradient(135deg, #16a34a, #84cc16);
}

.crash-history {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.crash-history span {
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  background: #171922;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.crash-history .win {
  color: #32d583;
}

.crash-history .loss {
  color: #f97066;
}

.raketa-crash-page {
  width: min(430px, 100%);
  min-height: calc(100svh - 118px);
  height: auto;
  margin: 8px auto 0;
  padding: 0 12px 76px;
  color: #fff;
  background: #131418;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 850;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.raketa-crash-page.hidden {
  display: none !important;
}

.raketa-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.raketa-players-pill,
.raketa-balance-pill {
  height: 40px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 10px 28px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px);
}

.raketa-players-pill {
  min-width: 70px;
  justify-content: center;
  background: rgba(17, 83, 47, .86);
  color: #27df68;
  font-size: 19px;
  font-weight: 950;
}

.raketa-balance-pill {
  min-width: 156px;
  padding: 0 7px;
  justify-content: space-between;
  background: rgba(49, 52, 59, .88);
}

.raketa-balance-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 950;
}

.raketa-star-mini {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.raketa-star-mini svg {
  width: 17px;
  height: 18px;
  fill: #ffca5a;
}

.raketa-plus-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #6e7480;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  margin-left: 8px;
}

.raketa-game-stage {
  height: clamp(170px, 29svh, 240px);
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(30, 102, 255, .24), transparent 42%);
  border-radius: 26px;
  margin: 0 0 12px;
  overflow: hidden;
}

.raketa-game-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .05), transparent);
  animation: raketaSheen 3.8s linear infinite;
}

.raketa-rocket-area {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.raketa-space-particles {
  position: absolute;
  inset: 34px;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, .45) 0 1.4px, transparent 2px),
    radial-gradient(circle at 72% 62%, rgba(80, 170, 255, .35) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 42% 76%, rgba(255, 244, 82, .32) 0 1.2px, transparent 2px);
  animation: raketaSpaceDrift 4.5s ease-in-out infinite alternate;
}

.raketa-rocket-area img {
  position: absolute;
  width: clamp(135px, 40vw, 190px);
  height: clamp(135px, 40vw, 190px);
  object-fit: contain;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .62));
  transform: translate3d(var(--rx, 0), var(--ry, 0), 0) rotate(-17deg) scale(var(--rs, 1));
  transition: transform .9s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
}

.raketa-rocket-area.counting img {
  transform: translate3d(0, 0, 0) rotate(-17deg) scale(1);
}

.raketa-overlay-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.raketa-crash-num {
  font-size: 64px;
  font-weight: 950;
  color: #ff3158;
  text-shadow: none;
  background: transparent;
  box-shadow: none;
  animation: none;
  filter: none;
}

.raketa-countdown-num {
  font-size: 95px;
  font-weight: 950;
  color: #fff;
  text-shadow: none;
  background: transparent;
  box-shadow: none;
  animation: none;
  filter: none;
}

.raketa-countdown-num.tick2 {
  animation: none;
}

.raketa-results-row {
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
  flex: 0 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.raketa-results-row::-webkit-scrollbar {
  display: none;
}

.raketa-res-tag {
  height: 30px;
  min-width: 58px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1.5px solid #4b9dff;
  background: rgba(24, 52, 82, .78);
  color: #64a9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 950;
}

.raketa-res-blue {
  background: #168cff;
  color: #fff;
  border-color: #168cff;
}

.raketa-res-green {
  border-color: #32e33d;
  color: #58f05a;
  background: rgba(16, 72, 25, .72);
}

.raketa-res-yellow {
  border-color: #fff452;
  color: #fff452;
  background: rgba(77, 72, 6, .72);
}

.raketa-bet-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 29px;
  background: #168cff;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  margin-bottom: 10px;
  flex: 0 0 auto;
  box-shadow: 0 15px 34px rgba(22, 140, 255, .25);
  background-image: radial-gradient(circle at 15% 28%, rgba(255, 255, 255, .14) 0 2px, transparent 2.6px);
  background-size: 18px 18px;
}

.raketa-btn-cashout {
  background: #1dc866;
}

.raketa-btn-wait {
  background: #252933;
  color: #858a94;
  box-shadow: none;
}

.raketa-players-panel {
  min-height: 0;
  max-height: clamp(160px, 28svh, 260px);
  flex: 1 1 auto;
  background: linear-gradient(180deg, rgba(31, 38, 55, .92), rgba(12, 15, 24, .96));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 28px;
  padding: 17px 18px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .42);
}

.raketa-player-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.raketa-player-item:last-child {
  border-bottom: 0;
}

.raketa-p-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #48ead8, #3ad2b8);
  display: grid;
  place-items: center;
  color: #071019;
  font-weight: 950;
  flex: 0 0 auto;
}

.raketa-p-name {
  flex: 1;
  font-size: 18px;
  font-weight: 950;
  min-width: 0;
}

.raketa-p-name > div:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raketa-player-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #dfe2e9;
  font-size: 15px;
  margin-top: 2px;
}

.raketa-mult-badge {
  color: #5da0ff;
}

.raketa-p-bet {
  min-width: 76px;
  height: 46px;
  border-radius: 23px;
  background: linear-gradient(90deg, rgba(14, 16, 20, 0), rgba(36, 40, 48, .94));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #27df68;
  font-size: 17px;
  font-weight: 950;
}

.raketa-player-item.lost .raketa-player-meta span,
.raketa-player-item.lost .raketa-p-bet {
  color: #e53946;
}

.raketa-player-item.won .raketa-mult-badge {
  color: #27df68;
}

.raketa-empty-players {
  height: 100%;
  min-height: 120px;
  display: grid;
  place-items: center;
  color: #5c6270;
  font-size: 16px;
}

body.raketa-active {
  overflow: auto;
}

body.raketa-active .app-container {
  min-height: 100svh;
  padding-bottom: 0;
  overflow: visible;
}

body.raketa-active .top_nav {
  position: relative;
  top: 0;
  z-index: 1;
  margin-bottom: 0;
}

body.raketa-active {
  background: #131418 !important;
}

body.raketa-active .app-container {
  background: #131418 !important;
}

body.raketa-active .mobile-menu-container {
  transform: translateY(0);
  pointer-events: auto;
}

.raketa-modal-overlay {
  position: fixed;
  inset: 0;
  width: min(430px, 100%);
  margin: 0 auto;
  background: rgba(0, 0, 0, .62);
  z-index: 220;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(9px);
}

.raketa-modal-overlay.active {
  display: flex;
}

.raketa-modal-sheet {
  width: 100%;
  background: #1e2127;
  border: 1px solid #383d45;
  border-radius: 34px 34px 0 0;
  padding: 32px 17px 24px;
  max-height: 86vh;
  overflow: auto;
}

.raketa-modal-grabber {
  width: 50px;
  height: 6px;
  border-radius: 6px;
  background: #3a4050;
  margin: 0 auto 24px;
}

.raketa-modal-heading {
  width: max-content;
  margin: 0 auto 20px;
  padding: 11px 28px;
  border-radius: 24px;
  background: #292d34;
  border: 1px solid #3a3f47;
  font-size: 18px;
  font-weight: 950;
}

.raketa-bet-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 8px 6px;
}

.raketa-bet-tab {
  height: 42px;
  border: 1px solid #383d45;
  border-radius: 22px;
  background: #292d34;
  color: #8f96a3;
  font-size: 16px;
  font-weight: 900;
}

.raketa-bet-tab.active {
  background: #168cff;
  border-color: #168cff;
  color: #fff;
}

.raketa-form-label {
  margin: 24px 17px 9px;
  color: #777b84;
  font-size: 17px;
}

.raketa-balance-line {
  float: right;
  color: #4b96ff;
}

.raketa-modal-field {
  width: 100%;
  height: 49px;
  border: 1px solid #383d45;
  border-radius: 25px;
  background: #292d34;
  color: #fff;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 850;
  outline: 0;
}

.raketa-modal-field.hidden {
  display: none;
}

.raketa-gift-picker.hidden {
  display: none;
}

.raketa-gift-picker {
  margin-top: 14px;
}

.raketa-gift-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 8px 8px;
  color: #777b84;
  font-size: 13px;
}

.raketa-gift-picker-head b {
  color: #ffca5a;
  white-space: nowrap;
}

.raketa-gift-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  padding: 2px;
}

.raketa-gift-option {
  width: 100%;
  min-height: 112px;
  position: relative;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  text-align: center;
}

.raketa-gift-option.active {
  border-color: #168cff;
  box-shadow: 0 0 0 1px rgba(22, 140, 255, .35);
}

.raketa-gift-option img {
  width: 100%;
  height: 104px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .32));
}

.raketa-gift-option span {
  display: none;
}

.raketa-gift-option b {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  max-width: calc(100% - 14px);
  min-width: 42px;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, .78);
  color: #171a22;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.raketa-gift-empty {
  grid-column: 1 / -1;
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #383d45;
  border-radius: 18px;
  background: #292d34;
  color: #777b84;
  font-size: 14px;
}

#raketaAmountLabel.hidden {
  display: none;
}

/* Keep gift selection visual: only the transparent gift image and its price remain visible. */
.raketa-gift-picker + .raketa-auto-row {
  margin-top: 14px;
}

.raketa-auto-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  margin-top: 17px;
}

.raketa-auto-box,
.raketa-mult-box {
  height: 47px;
  border-radius: 24px;
  background: #292d34;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 18px;
}

.raketa-switch {
  width: 70px;
  height: 36px;
  border-radius: 18px;
  background: #252932;
  border: 1px solid #383d45;
  padding: 3px;
  cursor: pointer;
}

.raketa-switch::after {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  transition: .18s;
}

.raketa-switch.on {
  background: #168cff;
}

.raketa-switch.on::after {
  transform: translateX(34px);
}

.raketa-mult-box button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #363b44;
  color: #fff;
  font-size: 22px;
}

.raketa-modal-cta {
  width: calc(100% - 16px);
  height: 55px;
  margin: 24px 8px 0;
  border: 0;
  border-radius: 29px;
  background: #168cff;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

.raketa-gift-win-sheet {
  padding-top: 28px;
  position: relative;
  overflow: hidden;
}

.raketa-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.raketa-gift-win-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 8px;
  padding: 18px 14px 8px;
}

.raketa-gift-win-img {
  width: 142px;
  height: 142px;
  object-fit: contain;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 35%, rgba(22, 140, 255, 0.18), rgba(14, 16, 22, 0.82));
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42));
}

.raketa-gift-win-name {
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  text-align: center;
}

.raketa-gift-win-meta {
  min-height: 18px;
  color: #ffca5a;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

@keyframes raketaSpaceDrift {
  from { transform: translate3d(-5px, 4px, 0); opacity: .42; }
  to { transform: translate3d(8px, -7px, 0); opacity: .82; }
}

@keyframes raketaSheen {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}

@keyframes raketaCrashPop {
  0% { transform: scale(.62) translateY(18px); opacity: 0; filter: blur(12px); }
  28% { transform: scale(1.18) translateY(-5px); opacity: 1; filter: blur(0); }
  72% { transform: scale(1); opacity: 1; }
  100% { transform: scale(.92) translateY(-12px); opacity: 0; }
}

@keyframes raketaCountPulse {
  0% { transform: translateY(28px) scale(.62); opacity: 0; filter: blur(12px); }
  45% { transform: translateY(-6px) scale(1.12); opacity: 1; filter: blur(0); }
  100% { transform: translateY(0) scale(1); opacity: .86; filter: blur(0); }
}

@keyframes raketaCountPulseAlt {
  0% { transform: translateY(24px) scale(.6); opacity: 0; filter: blur(12px); }
  45% { transform: translateY(-8px) scale(1.1); opacity: 1; filter: blur(0); }
  100% { transform: translateY(0) scale(1); opacity: .86; filter: blur(0); }
}

@media (max-width: 380px) {
  .raketa-game-stage {
    height: 178px;
  }

  .raketa-rocket-area img {
    width: 150px;
    height: 150px;
  }

  .raketa-crash-num {
    font-size: 48px;
  }

  .raketa-countdown-num {
    font-size: 72px;
  }
}

@media (max-width: 767px) {
  .app-container {
    padding-bottom: calc(70px + var(--safe-bottom)) !important;
  }

  .profile-page {
    padding-bottom: calc(160px + var(--safe-bottom)) !important;
  }
}

@keyframes scrollDrops {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* FIX: Принудительное включение прокрутки */
body,
html {
  overflow: auto !important;
  /* Разрешаем прокрутку для всей страницы */
  height: auto !important;
  /* Убираем принудительную высоту */
}

.app-container {
  height: auto !important;
  /* Убираем принудительную высоту у контейнера */
  min-height: 100vh;
  /* Гарантируем, что он не меньше высоты экрана */
}

body.raketa-active {
  overflow: auto !important;
  height: auto !important;
}

body.raketa-active .app-container {
  height: auto !important;
  min-height: 100svh !important;
  overflow: visible !important;
}

body.raketa-active #crash-section {
  margin-top: 0;
}

/* Crash is a fixed mobile game surface; only its player list may scroll. */
body.raketa-active,
html:has(body.raketa-active) {
  height: 100svh !important;
  overflow: hidden !important;
}

body.raketa-active .app-container {
  height: 100svh !important;
  min-height: 100svh !important;
  padding-top: 8px !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

body.raketa-active #crash-section,
.raketa-crash-page {
  margin-top: 0 !important;
  height: calc(100svh - 78px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.raketa-rocket-area img,
.raketa-rocket-area.counting img {
  transform: translate3d(0, 0, 0) rotate(-17deg) scale(1) !important;
  transition: opacity .35s ease !important;
}

.card_prices {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 8px;
  /* Добавим небольшой отступ снизу */
  padding: 0;
}

/* Стилизуем сам "шильдик" с ценой */
.case-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #1a1b1f;
  border: 1px solid #2d2f33;
  border-radius: 10px;
  padding: 0 14px;
  min-width: 104px;
  height: 36px;
  box-sizing: border-box;
  margin: 0;
  max-width: 100%;
}

/* Заменяем иконку на правильную SVG-звезду */
.case-price .nav_topup-stars-icon {
  width: 20px;
  /* Чуть крупнее */
  height: 20px;
  /* Этот трюк заменяет содержимое тега img на нашу звезду */
  content: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 15' fill='%23FFCA5A' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.63869 12.1902L3.50621 14.1092C3.18049 14.3087 2.75468 14.2064 2.55515 13.8807C2.45769 13.7216 2.42864 13.5299 2.47457 13.3491L2.95948 11.4405C3.13452 10.7515 3.60599 10.1756 4.24682 9.86791L7.6642 8.22716C7.82352 8.15067 7.89067 7.95951 7.81418 7.80019C7.75223 7.67116 7.61214 7.59896 7.47111 7.62338L3.66713 8.28194C2.89387 8.41581 2.1009 8.20228 1.49941 7.69823L0.297703 6.69116C0.00493565 6.44581 -0.0335059 6.00958 0.211842 5.71682C0.33117 5.57442 0.502766 5.48602 0.687982 5.47153L4.35956 5.18419C4.61895 5.16389 4.845 4.99974 4.94458 4.75937L6.36101 1.3402C6.5072 0.987302 6.91179 0.819734 7.26469 0.965925C7.43413 1.03612 7.56876 1.17075 7.63896 1.3402L9.05539 4.75937C9.15496 4.99974 9.38101 5.16389 9.6404 5.18419L13.3322 5.47311C13.713 5.50291 13.9975 5.83578 13.9677 6.2166C13.9534 6.39979 13.8667 6.56975 13.7269 6.68896L10.9114 9.08928C10.7131 9.25826 10.6267 9.52425 10.6876 9.77748L11.5532 13.3733C11.6426 13.7447 11.414 14.1182 11.0427 14.2076C10.8642 14.2506 10.676 14.2208 10.5195 14.1249L7.36128 12.1902C7.13956 12.0544 6.8604 12.0544 6.63869 12.1902Z'/%3E%3C/svg%3E");
}

/* Текст цены */
.item_real_price {
  font-size: clamp(12px, 3.4vw, 15px);
  font-weight: 600;
  color: #EAECEE;
  margin: 0;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Бесплатный кейс — зелёный блок как на скрине */
.case-price--free {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%) !important;
  border-color: rgba(34, 197, 94, 0.5) !important;
  color: #fff;
}

.case-price--free .item_real_price {
  color: #fff !important;
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  background-color: #2693E7;
  border-radius: 20px;
  color: white;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.login-button:hover {
  background-color: #2a9ff0;
}

.login-button svg {
  width: 20px;
  height: 20px;
}

/* ==================== LIVE DROP FEED ==================== */
.live-drop-feed {
  width: 100%;
  max-width: 1200px;
  margin: 35px auto 0;
  background: #131418;
  padding: 6px 0 0;
  position: relative;
  z-index: 8;
}

.live-drop-body {
  display: flex;
  align-items: stretch;
}

.live-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  flex-shrink: 0;
  min-width: 32px;
}

.live-drop-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
  animation: livePulse 2.5s ease-in-out infinite;
}

.live-drop-label-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #4caf50;
  text-transform: uppercase;
  animation: liveTextPulse 2.5s ease-in-out infinite;
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.9);
  }
}

@keyframes liveTextPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

.live-drop-track-wrapper {
  position: relative;
  overflow: hidden;
}

.live-drop-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 2;
  pointer-events: none;
}

.live-drop-fade.left {
  left: 0;
  background: linear-gradient(to right, #131418, transparent);
}

.live-drop-fade.right {
  right: 0;
  background: linear-gradient(to left, #131418, transparent);
}

.live-drop-track {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.live-drop-track::-webkit-scrollbar {
  display: none;
}

.live-drop-item {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1.5px solid #2a2d38;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: dropSlideIn 0.4s ease-out;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(60, 65, 80, 0.5) 0%, #1a1c24 70%);
}

.live-drop-item::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  filter: blur(25px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.live-drop-item>* {
  position: relative;
  z-index: 1;
}

.live-drop-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Uncommon — серый */
.live-drop-item.rarity-uncommon {
  border-color: rgba(180, 190, 210, 0.4);
  background: radial-gradient(ellipse at 50% 20%, rgba(180, 190, 210, 0.2) 0%, #1a1c24 70%);
}

.live-drop-item.rarity-uncommon::before {
  background: #b4bed2;
  opacity: 0.5;
}

/* Common — желтый */
.live-drop-item.rarity-common {
  border-color: rgba(255, 202, 90, 0.55);
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 202, 90, 0.24) 0%, #1a1c24 70%);
}

.live-drop-item.rarity-common::before {
  background: #ffca5a;
  opacity: 0.6;
}

/* Rare — электрик-голубой */
.live-drop-item.rarity-rare {
  border-color: rgba(34, 211, 238, 0.5);
  background: radial-gradient(ellipse at 50% 20%, rgba(34, 211, 238, 0.25) 0%, #1a1c24 70%);
}

.live-drop-item.rarity-rare::before {
  background: #22d3ee;
  opacity: 0.65;
}

/* Epic — фиолетовый */
.live-drop-item.rarity-epic {
  border-color: rgba(168, 85, 247, 0.55);
  background: radial-gradient(ellipse at 50% 20%, rgba(168, 85, 247, 0.28) 0%, #1a1c24 70%);
}

.live-drop-item.rarity-epic::before {
  background: #a855f7;
  opacity: 0.7;
}

/* Purple — розовый */
.live-drop-item.rarity-purple {
  border-color: rgba(236, 72, 153, 0.55);
  background: radial-gradient(ellipse at 50% 20%, rgba(236, 72, 153, 0.28) 0%, #1a1c24 70%);
}

.live-drop-item.rarity-purple::before {
  background: #ec4899;
  opacity: 0.7;
}

/* Mythic — красный */
.live-drop-item.rarity-mythic {
  border-color: rgba(239, 68, 68, 0.6);
  background: radial-gradient(ellipse at 50% 20%, rgba(239, 68, 68, 0.32) 0%, #1a1c24 70%);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.12);
}

.live-drop-item.rarity-mythic::before {
  background: #ef4444;
  opacity: 0.8;
}

/* Legendary — золотой */
.live-drop-item.rarity-legendary {
  border-color: rgba(250, 204, 21, 0.6);
  background: radial-gradient(ellipse at 50% 20%, rgba(250, 204, 21, 0.32) 0%, #1a1c24 70%);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.12);
}

.live-drop-item.rarity-legendary::before {
  background: #facc15;
  opacity: 0.8;
}

@keyframes dropSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px) scale(0.85);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.live-drop-item-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* ===== Daily Case Modal ===== */

.daily-case-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.35s ease;
}

.daily-case-backdrop.visible {
  background: rgba(0, 0, 0, 0.7);
}

.daily-case-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #1e2230 0%, #161923 100%);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.daily-case-backdrop.visible .daily-case-sheet {
  transform: translateY(0);
}

.daily-case-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.daily-case-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.daily-case-image {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.daily-case-image img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(0, 153, 255, 0.25));
  animation: dailyCaseFloat 3s ease-in-out infinite;
}

@keyframes dailyCaseFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.daily-case-title {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}

.daily-case-desc {
  text-align: center;
  font-size: 13px;
  color: #7a8194;
  margin: 0 0 24px;
  line-height: 1.4;
}

.daily-case-tasks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.daily-case-task {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.daily-case-task:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

.daily-case-task.done {
  border-color: rgba(76, 217, 100, 0.3);
  background: rgba(76, 217, 100, 0.06);
}

.daily-case-task-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(123, 142, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.daily-case-task.done .daily-case-task-icon {
  background: rgba(76, 217, 100, 0.15);
}

.daily-case-task.done .daily-case-task-icon svg path,
.daily-case-task.done .daily-case-task-icon svg circle {
  stroke: #4CD964;
  fill: none;
}

.daily-case-task.done .daily-case-task-icon svg path[fill="#7B8EFF"] {
  fill: #4CD964;
  stroke: none;
}

.daily-case-task-icon.channel-logo {
  background: none;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.daily-case-task-icon.channel-logo img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.daily-case-task-info {
  flex: 1;
  min-width: 0;
}

.daily-case-task-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.daily-case-task.done .daily-case-task-title {
  color: #4CD964;
}

.daily-case-task-subtitle {
  font-size: 12px;
  color: #7a8194;
  line-height: 1.3;
}

.daily-case-task.done .daily-case-task-subtitle {
  color: rgba(76, 217, 100, 0.7);
}

.daily-case-task-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 8px;
  min-width: 20px;
}

.daily-case-task.done .daily-case-task-arrow svg path {
  stroke: #4CD964;
}

.daily-case-verify-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #0066ff, #0088ff);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.daily-case-verify-btn:hover {
  opacity: 0.9;
}

.daily-case-verify-btn:active {
  transform: scale(0.98);
}

.daily-case-verify-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   НОВЫЙ РАЗДЕЛ «ДРУЗЬЯ» (Рефералка)
   ============================================ */

#friends-section {
  padding: 12px 16px 100px;
}

/* --- Баннер-карусель --- */
.ref-banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #1a1e28 0%, #12141a 100%);
}

.ref-banner-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(.4, 0, .2, 1);
  touch-action: pan-y;
}

.ref-banner-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
  min-height: 140px;
  position: relative;
}

.ref-banner-content {
  flex: 1;
  z-index: 1;
}

.ref-banner-tag {
  display: inline-block;
  background: #1e293b;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.ref-banner-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  font-family: 'Montserrat', sans-serif;
}

.ref-banner-sub {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.ref-banner-btn {
  display: inline-block;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  margin-top: 8px;
}

.ref-banner-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
  margin-left: 10px;
}

.ref-banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
}

.ref-banner-dot {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: #444;
  transition: background 0.3s;
  cursor: pointer;
}

.ref-banner-dot.active {
  background: #fff;
}

/* --- Табы --- */
.ref-tabs {
  display: flex;
  gap: 0;
  background: #1a1e28;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 8px;
}

.ref-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Montserrat', sans-serif;
}

.ref-tab.active {
  background: #2a2e3a;
  color: #fff;
}

/* --- Карточки-блоки --- */
.ref-card-block {
  background: #1a1e28;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
}


.ref-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  font-family: 'Montserrat', sans-serif;
}

.ref-card-desc {
  font-size: 13px;
  color: #888;
  margin: 0 0 14px;
}

/* --- Кнопка Мои Рефералы --- */
.ref-my-referrals-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: #2a2e3a;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: background 0.2s;
  margin-bottom: 8px;
}

.ref-my-referrals-btn:active {
  background: #353a48;
}

.ref-my-referrals-btn img {
  filter: brightness(0) invert(1);
}

/* --- Invite Card --- */
.ref-invite-actions {
  display: flex;
  gap: 8px;
}

.ref-invite-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0066ff, #0088ff);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: opacity 0.2s;
}

.ref-invite-btn:active {
  opacity: 0.85;
}

.ref-copy-btn {
  width: 60px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2e3a;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.ref-copy-btn svg {
  width: 32px;
  height: 32px;
}

.ref-copy-btn:active {
  background: #353a48;
}

/* --- Promo Code --- */
.ref-promo-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.ref-promo-code {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  line-height: normal;
}

.ref-promo-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 12px;
  height: 48px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
}

.ref-promo-edit-btn,
.ref-promo-copy-btn {
  display: block;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 18px 18px;
  transition: opacity 0.2s, background-color 0.2s;
}

.ref-promo-edit-btn {
  width: 36px;
  height: 36px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
  opacity: 0.7;
}

.ref-promo-copy-btn {
  width: 48px;
  height: 48px;
  background-color: #3a3f4f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z'/%3E%3C/svg%3E");
  border-radius: 12px;
}

.ref-promo-edit-btn:active {
  opacity: 1;
}

.ref-promo-copy-btn:active {
  background-color: #4a4f5f;
}

/* Earnings row in referrals panel */
.ref-promo-earnings {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  color: #aaa;
  font-family: 'Montserrat', sans-serif;
}

.ref-promo-earnings .stars-amount {
  color: #fff;
  font-weight: 700;
}

.ref-promo-earnings .stars-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  display: inline-block;
}

.ref-promo-label {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
}

.ref-promo-create-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: opacity 0.2s;
}

.ref-promo-create-btn:active {
  opacity: 0.85;
}

.ref-cases-grid {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
}

.ref-cases-grid::-webkit-scrollbar {
  display: none;
}

.ref-case-item {
  flex: 1 1 calc(50% - 4px);
  border-radius: 12px;
  overflow: hidden;
  background: #2a2e3a;
  position: relative;
}

.ref-case-item img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  background: #1a1e28;
}

.ref-case-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
}

.ref-case-lock svg {
  flex-shrink: 0;
}

.ref-case-unlocked {
  color: #22c55e;
}

/* --- FAQ --- */
.ref-faq-block {
  padding: 12px !important;
}

.ref-faq-item {
  background: #2a2e3a;
  border-radius: 12px;
  margin-bottom: 4px;
  overflow: hidden;
}

.ref-faq-item:last-child {
  margin-bottom: 0;
}

.ref-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  gap: 10px;
}

.ref-faq-question svg {
  flex-shrink: 0;
  transition: transform 0.3s;
}

.ref-faq-item.open .ref-faq-question svg {
  transform: rotate(180deg);
}

.ref-faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  font-size: 13px;
  color: #999;
  transition: max-height 0.3s, padding 0.3s;
  line-height: 1.5;
}

.ref-faq-item.open .ref-faq-answer {
  max-height: 200px;
  padding: 0 16px 16px;
}

/* --- Бонусы (заглушка) --- */
.ref-bonuses-empty {
  text-align: center;
  padding: 30px 0;
}

.ref-bonuses-empty-icon {
  margin-bottom: 12px;
}

.ref-bonuses-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  font-family: 'Montserrat', sans-serif;
}

.ref-bonuses-empty-sub {
  font-size: 13px;
  color: #666;
}

/* --- Панель «Мои рефералы» --- */
.ref-my-referrals-panel {
  padding-bottom: 30px;
}

.ref-back-btn {
  width: 100%;
  padding: 14px;
  background: #2a2e3a;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  font-family: 'Montserrat', sans-serif;
}

.ref-my-referrals-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.ref-my-referrals-header .ref-card-title {
  margin: 0;
}

.ref-total-badge {
  background: #2a2e3a;
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.ref-period-btn {
  margin-left: auto;
  background: #2a2e3a;
  border: 1px solid #3a3f4f;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
}

.ref-table-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: #777;
  font-style: italic;
}

.ref-referral-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #222;
}

.ref-referral-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-right: 10px;
  overflow: hidden;
}

.ref-referral-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-referral-name {
  flex: 1;
  font-size: 14px;
  color: #fff;
  font-weight: 500;
}

.ref-referral-deposit {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ref-empty-list {
  text-align: center;
  padding: 30px 0;
  color: #666;
  font-size: 14px;
}

/* --- Модалки --- */
.ref-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ref-modal {
  width: 100%;
  max-width: 480px;
  background: #1a1e28;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  animation: refModalSlideUp 0.3s ease;
}

@keyframes refModalSlideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.ref-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ref-modal-header span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
}

.ref-modal-close {
  background: #2a2e3a;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ref-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-period-option {
  padding: 14px;
  background: #2a2e3a;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: background 0.2s;
}

.ref-period-option.active {
  background: #2563eb;
}

.ref-modal-label {
  font-size: 14px;
  color: #ccc;
  font-weight: 600;
  margin-bottom: 4px;
}

.ref-modal-input {
  width: 100%;
  padding: 14px 16px;
  background: #2a2e3a;
  border: 1px solid #3a3f4f;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  box-sizing: border-box;
}

.ref-modal-input::placeholder {
  color: #666;
}

.ref-modal-input:focus {
  border-color: #2563eb;
}

.ref-modal-hint {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.ref-modal-submit {
  width: 100%;
  padding: 14px;
  background: #2563eb;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  margin-top: 8px;
}

.ref-modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Profile Ref Promo Activate Button --- */
.ref-promo-activate-btn {
  width: 100%;
  padding: 14px;
  background: #2563eb;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  margin: 12px 0;
  transition: opacity 0.2s;
}

.ref-promo-activate-btn:active {
  opacity: 0.85;
}

.ref-my-referrals-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ref-my-referrals-title-row .ref-card-title,
.ref-total-badge,
.ref-my-referrals-header .ref-period-btn {
  white-space: nowrap;
}

.ref-my-referrals-header .ref-promo-earnings {
  margin-top: 8px;
  font-size: 15px;
}

/* ==================== UPGRADE SECTION ==================== */
.upgrade-section {
  position: fixed;
  /* Отступ сверху = высота шапки + системная зона Telegram */
  top: calc(58px + var(--safe-top));
  left: 0;
  right: 0;
  /* Оставляем место для нижнего меню + системную зону снизу */
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 40px;
  background: #131418;
  z-index: 5;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.upgrade-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
  text-align: center;
}

.upgrade-ring-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin-bottom: 28px;
}

.upgrade-ring-svg {
  width: 280px;
  height: 280px;
  transform: rotate(-90deg);
}

.upgrade-ring-track {
  stroke: #1e2130;
}

.upgrade-ring-win {
  stroke: #2563eb;
  transition: stroke-dasharray 0.5s ease;
  filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.7));
}

/* Pointer: absolutely-positioned wrapper that rotates around center */
.upgrade-pointer-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  transform-origin: 50% 50%;
  transform: rotate(0deg);
  pointer-events: none;
}

.upgrade-pointer-triangle {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 22px solid #fff;
  filter: drop-shadow(0 0 3px rgba(37, 99, 235, 0.8));
}

/* Locked target slot (before user picks their item) */
.upgrade-slot-locked {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
}

.upgrade-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.upgrade-chance-pct {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #4a9dff 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.upgrade-chance-label {
  font-size: 13px;
  color: #7f8bad;
}

.upgrade-slots {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 20px;
}

.upgrade-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #171922;
  border: 1.5px solid #2a2d3a;
  border-radius: 16px;
  padding: 18px 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 110px;
}

.upgrade-slot:hover {
  border-color: #2563eb;
  background: #1a1f2e;
}

.upgrade-slot.has-item {
  border-color: #2563eb55;
}

.upgrade-slot-plus {
  font-size: 28px;
  color: #3a3e55;
  line-height: 1;
}

.upgrade-slot-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.upgrade-slot-name {
  font-size: 11px;
  color: #7f8bad;
  text-align: center;
  font-weight: 500;
}

.upgrade-slot-val {
  font-size: 13px;
  color: #f4c430;
  font-weight: 700;
}

.upgrade-slots-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.upgrade-btn {
  width: 100%;
  max-width: 340px;
  padding: 15px;
  background: #2563eb;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: opacity 0.2s, transform 0.15s;
}

.upgrade-btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.upgrade-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.upgrade-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.upgrade-result-box {
  background: #171922;
  border-radius: 24px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 2px solid #2a2d3a;
  min-width: 260px;
  text-align: center;
}

.upgrade-result-title {
  font-size: 36px;
  font-weight: 800;
  color: #4ade80;
}

.upgrade-result-title.loss {
  color: #f87171;
}

.upgrade-result-sub {
  font-size: 14px;
  color: #7f8bad;
}

.upgrade-result-close {
  margin-top: 8px;
  padding: 12px 32px;
  background: #2563eb;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: opacity 0.2s;
}

.upgrade-result-close:active {
  opacity: 0.8;
}

.upgrade-picker-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 600;
  display: flex;
  align-items: flex-end;
}

.upgrade-picker-sheet {
  width: 100%;
  background: #171922;
  border-radius: 20px 20px 0 0;
  padding: 0 0 32px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUpSheet 0.28s ease;
}

@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.upgrade-picker-header {
  position: relative;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #23262f;
  flex-shrink: 0;
  text-align: center;
}

.upgrade-picker-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.upgrade-picker-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #7f8bad;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.upgrade-picker-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  flex-shrink: 0;
}

.upgrade-picker-tab {
  flex: 1;
  padding: 8px 12px;
  background: #1e2130;
  border: 1.5px solid transparent;
  border-radius: 20px;
  color: #7f8bad;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.2s;
}

.upgrade-picker-tab.active {
  background: rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
  color: #fff;
}

.upgrade-picker-search-wrap {
  padding: 0 16px 10px;
  flex-shrink: 0;
}

.upgrade-picker-search {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: #1e2130;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
}

.upgrade-picker-list {
  overflow-y: auto;
  flex: 1;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.upgrade-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #1e2130;
  border: 1.5px solid #2a2d3a;
  border-radius: 14px;
  padding: 14px 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.upgrade-picker-item:hover {
  border-color: #2563eb;
  background: #1a1f2e;
}

.upgrade-picker-item img,
.upgrade-picker-item video {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.upgrade-picker-item-name {
  font-size: 11px;
  color: #cdd0e0;
  font-weight: 500;
  line-height: 1.3;
}

.upgrade-picker-item-val {
  font-size: 13px;
  color: #f4c430;
  font-weight: 700;
}

.upgrade-picker-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 32px 0;
  color: #7f8bad;
  font-size: 14px;
}

/* Final crash/header compact overrides */
.user__profile {
  max-width: 108px;
}

.nav_logged_user-name {
  max-width: 46px;
}

.nav_topup {
  grid-template-columns: 96px 34px;
  gap: 6px;
  max-width: 136px;
}

.nav_topup-balance,
.nav_topup-balance-item {
  width: 96px;
  min-width: 0;
}

.nav_topup-balance-item {
  height: 40px;
  padding: 0 8px;
  border-radius: 14px;
  justify-content: flex-start;
  background: #1e2029;
}

.nav_topup-balance-summ {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav_topup-plus {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 21px;
  box-shadow: 0 6px 14px rgba(22, 140, 255, 0.24);
}

body.raketa-active,
body.raketa-active html {
  height: 100svh !important;
  overflow: hidden !important;
}

body.raketa-active .app-container {
  height: 100svh !important;
  min-height: 100svh !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

body.raketa-active .top_nav {
  margin-bottom: 0 !important;
}

body.raketa-active #crash-section,
.raketa-crash-page {
  height: calc(100svh - 78px) !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  padding: 0 12px 6px !important;
  overflow: hidden !important;
  display: flex;
}

body.raketa-active #crash-section {
  display: flex !important;
}

.raketa-game-stage {
  height: clamp(132px, 23svh, 190px) !important;
  margin-bottom: 7px !important;
  background:
    radial-gradient(circle at 50% 42%, rgba(38, 130, 255, .32), transparent 48%),
    linear-gradient(145deg, #171c2b 0%, #101521 58%, #0b0f18 100%) !important;
  border: 1px solid rgba(101, 166, 255, .16);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 16px 34px rgba(0, 0, 0, .3);
}

.raketa-space-particles {
  animation: none !important;
}

.raketa-rocket-area img,
.raketa-rocket-area.counting img {
  width: clamp(122px, 36vw, 166px) !important;
  height: clamp(122px, 36vw, 166px) !important;
  transform: translate3d(0, 0, 0) rotate(-17deg) scale(1) !important;
  transition: opacity .35s ease !important;
}

.raketa-results-row {
  gap: 8px !important;
  margin-bottom: 7px !important;
}

.raketa-res-tag {
  height: 26px !important;
  min-width: 52px !important;
  padding: 0 10px !important;
  font-size: 14px !important;
}

.raketa-bet-btn {
  height: 46px !important;
  margin-bottom: 7px !important;
  font-size: 18px !important;
}

.raketa-players-panel {
  max-height: none !important;
  border-radius: 22px !important;
  padding: 10px 12px !important;
}

.raketa-player-item {
  gap: 10px !important;
  padding: 8px 0 !important;
}

.raketa-p-avatar {
  width: 42px !important;
  height: 42px !important;
}

.raketa-p-name {
  font-size: 15px !important;
}

.raketa-player-meta {
  font-size: 12px !important;
}

.raketa-p-bet,
.raketa-p-gift {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #27df68;
}

.raketa-p-gift img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .35));
}

.raketa-p-gift.empty svg {
  width: 18px;
  height: 18px;
  opacity: .55;
}

.raketa-gift-win-img {
  border-radius: 0 !important;
  background: transparent !important;
}

.raketa-gift-win-meta {
  display: none !important;
}

@media (max-width: 380px) {
  .user__profile {
    max-width: 88px !important;
  }

  .nav_logged_user-name {
    max-width: 34px !important;
  }

  .nav_topup {
    grid-template-columns: 82px 30px !important;
    gap: 5px !important;
    max-width: 117px !important;
  }

  .nav_topup-balance,
  .nav_topup-balance-item {
    width: 82px !important;
  }

  .nav_topup-balance-item {
    height: 38px !important;
    border-radius: 13px;
  }

  .nav_topup-plus {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
    font-size: 20px !important;
  }

  .raketa-game-stage {
    height: 128px !important;
  }

  .raketa-rocket-area img,
  .raketa-rocket-area.counting img {
    width: 118px !important;
    height: 118px !important;
  }
}

/* ====== VERTICAL MULTI-CASE ANIMATION ====== */
.case_opening_process.vertical-mode {
  height: 230px;
  min-height: 230px;
  position: relative;
}

.case_opening_process.vertical-mode .case_opening_items_wrapper {
  flex-direction: row;
  height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.case_opening_process.vertical-mode .case_opening_items_list.single {
  width: 100% !important;
  max-width: none !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.case_opening_process.vertical-mode .case_opening_items_list.slot-column {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0 !important;
  min-width: 56px !important;
  max-width: none !important;
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
}

.case_opening_process.vertical-mode .slot-fade.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: linear-gradient(to bottom, #101216 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.case_opening_process.vertical-mode .slot-fade.bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: linear-gradient(to top, #101216 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.case_opening_process.vertical-mode .slot-center-line-horizontal {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 153, 255, 0.4);
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0, 153, 255, 0.6);
}

.case_opening_process.vertical-mode .slot-indicator.left-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.case_opening_process.vertical-mode .slot-indicator.right-indicator {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.case_opening_process.vertical-mode .slot-indicator.top-indicator,
.case_opening_process.vertical-mode .slot-indicator.bottom-indicator {
  display: none !important;
}

/* В vertical-mode та же линия .slot-center-line становится горизонтальной по центру */
.case_opening_process.vertical-mode > .slot-center-line {
  top: 50%;
  left: 0;
  right: 0;
  bottom: auto;
  width: auto;
  height: 2.5px;
  transform: translateY(-50%);
  z-index: 25;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0, 153, 255, 0.7), 0 0 20px rgba(0, 153, 255, 0.3);
}
.case_opening_process.vertical-mode > .slot-center-line::before,
.case_opening_process.vertical-mode > .slot-center-line::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-right-color: #0099ff;
  transform: translateY(-50%);
}
.case_opening_process.vertical-mode > .slot-center-line::before {
  margin-left: -1px;
}
.case_opening_process.vertical-mode > .slot-center-line::after {
  left: auto;
  right: 0;
  border-right-color: transparent;
  border-left-color: #0099ff;
  margin-right: -1px;
}
.case_opening_process.vertical-mode .slot-center-line-horizontal {
  display: none !important;
}

.case_opening_process.vertical-mode #slotTrack {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.case_opening_process.vertical-mode .vertical-column-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px;
  width: 100%;
  padding: 0 5px;
  will-change: transform;
}

.case_opening_process.vertical-mode .slot-card,
.case_opening_process.vertical-mode .slot-card-vertical {
  width: 100%;
  height: 100px;
  min-height: 100px;
  margin: 0;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.case_opening_process.vertical-mode .slot-card-vertical .slot-card-img,
.case_opening_process.vertical-mode .slot-card-vertical .slot-card-img img {
  aspect-ratio: 1;
  object-fit: contain;
}
.case_opening_process.vertical-mode .slot-card-vertical .slot-card-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #FFCA5A;
}

/* Final layout overrides must stay after the legacy crash styles above. */
.logged_user_profile {
  grid-template-columns: minmax(0, auto) max-content;
}

.nav_topup {
  display: flex;
  grid-template-columns: none;
  width: max-content;
  max-width: min(50vw, 180px);
  height: 40px;
  gap: 3px;
}

.nav_topup-balance,
.nav_topup-balance-item {
  width: auto;
  min-width: 60px;
  max-width: min(140px, calc(50vw - 27px));
}

.nav_topup-balance-item {
  height: 38px;
  padding: 0 8px;
  border-radius: 13px;
  justify-content: center;
}

.nav_topup-balance-summ {
  flex: 0 1 auto;
  font-size: 13px;
  overflow: visible;
  text-overflow: clip;
}

.nav_topup-plus {
  width: 23px;
  min-width: 23px;
  height: 23px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 17px;
  line-height: 23px;
  box-shadow: 0 4px 10px rgba(22, 140, 255, 0.24);
}

body.raketa-active {
  min-height: 100svh !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #0f1116 !important;
}

html:has(body.raketa-active) {
  min-height: 100svh !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #0f1116 !important;
}

body.raketa-active .app-container {
  width: 100%;
  height: auto !important;
  min-height: 100svh !important;
  padding-top: calc(10px + var(--safe-top)) !important;
  padding-bottom: calc(82px + var(--safe-bottom)) !important;
  overflow: visible !important;
  background: #0f1116 !important;
}

body.raketa-active #crash-section,
.raketa-crash-page {
  width: min(460px, 100%);
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 4px 0 12px !important;
  overflow: visible !important;
  gap: 10px;
  background: transparent;
}

.raketa-crash-page.hidden {
  display: none !important;
}

.raketa-game-stage {
  width: 100%;
  height: clamp(210px, 34svh, 290px) !important;
  min-height: 210px;
  margin: 0 !important;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(31, 126, 255, .24), transparent 42%),
    linear-gradient(145deg, #171b25 0%, #0f131c 62%, #0b0e14 100%) !important;
}

.raketa-space-particles {
  inset: 18px;
  opacity: .8;
}

.raketa-rocket-area img,
.raketa-rocket-area.counting img {
  width: clamp(150px, 43vw, 210px) !important;
  height: clamp(150px, 43vw, 210px) !important;
  transform: translate3d(0, 0, 0) rotate(-12deg) scale(1) !important;
}

.raketa-results-row {
  min-height: 28px;
  gap: 6px !important;
  margin: 0 !important;
}

.raketa-res-tag {
  height: 28px !important;
  min-width: 54px !important;
  padding: 0 9px !important;
  border-radius: 7px;
  font-size: 12px !important;
}

.raketa-bet-btn {
  height: 48px !important;
  margin: 0 !important;
  border-radius: 8px;
  font-size: 16px !important;
}

.raketa-players-panel {
  min-height: 92px;
  max-height: min(240px, 30svh) !important;
  padding: 2px 12px 8px !important;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

/* Final crash viewport placement. */
body.raketa-active,
html:has(body.raketa-active) {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.raketa-active .app-container {
  height: auto !important;
  min-height: 100svh !important;
  /* Контент краша начинается сразу под закреплённой шапкой */
  padding-top: var(--header-h) !important;
  padding-bottom: calc(82px + var(--safe-bottom)) !important;
  overflow: visible !important;
}

body.raketa-active #topNav {
  display: flex !important;
}

body.raketa-active .raketa-page-header {
  display: none !important;
}

body.raketa-active #crash-section,
.raketa-crash-page {
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 4px 0 8px !important;
  gap: 6px !important;
  overflow: visible !important;
}

body.raketa-active #crash-section {
  display: flex !important;
}

body.raketa-active .raketa-page-header {
  min-height: 34px !important;
  padding: 0 2px !important;
}

body.raketa-active .raketa-game-stage {
  margin: 0 !important;
}

body.raketa-active .nav_topup-plus {
  background: #168cff !important;
}

@media (max-width: 380px) {
  .nav_topup {
    grid-template-columns: none !important;
    width: max-content;
    max-width: min(50vw, 150px) !important;
    gap: 3px !important;
  }

  .nav_topup-balance,
  .nav_topup-balance-item {
    width: auto !important;
    min-width: 56px;
    max-width: calc(50vw - 25px);
  }

  .nav_topup-plus {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    font-size: 16px !important;
  }

  .raketa-game-stage {
    height: clamp(188px, 31svh, 235px) !important;
    min-height: 188px;
  }

  .raketa-rocket-area img,
  .raketa-rocket-area.counting img {
    width: 148px !important;
    height: 148px !important;
  }
}

/* Final crash layout: keep the navigation readable and anchor the game controls low. */
body.raketa-active #mobileCrashBtn p {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

/* Шапка краша использует ту же вёрстку баланса/профиля, что и остальные
   страницы (см. базовые .user__profile и .nav_topup-balance-item) — никаких
   отдельных размеров, чтобы дизайн был точь-в-точь как на всём сайте. */

body.raketa-active .raketa-crash-page {
  min-height: calc(100svh - 112px) !important;
  justify-content: flex-end !important;
  padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
}

body.raketa-active .raketa-game-stage {
  margin-top: auto !important;
}

body.raketa-active .raketa-players-panel {
  max-height: min(240px, 30svh) !important;
}

/* Crash screen follows the shared account header from the top navigation. */
body.raketa-active .raketa-page-header {
  display: none !important;
}

body.raketa-active .raketa-crash-page {
  min-height: 0 !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding-top: 6px !important;
  padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  gap: 6px !important;
}

body.raketa-active .raketa-game-stage {
  margin-top: 0 !important;
}

/* The live multiplier is shown in the recent-results strip below. */
body.raketa-active .raketa-flight-hud,
body.raketa-active .raketa-round-label {
  display: none !important;
}

body.raketa-active .raketa-results-row {
  order: 2;
}

body.raketa-active #raketaActionBtn {
  order: 3;
}

body.raketa-active .raketa-players-card {
  order: 4;
}

/* The crash screen is the first content after the shared account header. */
body.raketa-active #crash-section {
  display: flex !important;
  position: relative !important;
  order: 0 !important;
  width: min(460px, 100%) !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 6px 0 calc(8px + env(safe-area-inset-bottom)) !important;
  justify-content: flex-start !important;
  overflow: visible !important;
}

body.raketa-active #crash-section .raketa-page-header {
  display: none !important;
}

body.raketa-active #crash-section .raketa-game-stage {
  margin-top: 0 !important;
}

body.raketa-active #crash-section .raketa-flight-hud,
body.raketa-active #crash-section .raketa-round-label {
  display: none !important;
}

/* ==================================================================
   Глобальные запреты: приближение (zoom), копирование и выделение
   текста/картинок во всём боте. Плюс блокировка перетаскивания.
   ================================================================== */
html,
body {
  /* Запрещаем выделение текста */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Запрещаем контекстное меню "сохранить/копировать" на долгом тапе */
  -webkit-touch-callout: none;
  /* Отключаем double-tap zoom */
  touch-action: pan-x pan-y;
}

/* Картинки нельзя перетаскивать/сохранять/копировать (клики сохраняются) */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* Поля ввода — единственное место, где выделение и копирование разрешены */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* ==================================================================
   Апгрейд: общий скролл страницы вместе с навигацией.
   ================================================================== */
.upgrade-section {
  position: relative !important;
  inset: auto !important;
  width: 100%;
  min-height: auto;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px calc(118px + var(--safe-bottom)) !important;
  overflow: visible !important;
  touch-action: pan-y;
}

.upgrade-picker-list {
  max-height: none !important;
  flex: 0 0 auto !important;
  touch-action: pan-y;
  overflow: visible !important;
}

/* ==================================================================
   Уведомления (тосты): опускаем под системную зону Telegram,
   чтобы в полноэкранном режиме не залезали под кнопки клиента.
   ================================================================== */
.toast-container {
  top: calc(16px + var(--safe-top)) !important;
}

/* ==================================================================
   Краш: страницу нельзя листать — фиксированный игровой экран.
   Идёт последним, чтобы перекрыть предыдущие "overflow-y: auto".
   ================================================================== */
body.raketa-active,
html:has(body.raketa-active) {
  height: 100svh !important;
  overflow: hidden !important;
  touch-action: none;
}

body.raketa-active .app-container {
  height: 100svh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* ==================================================================
   Рефералка: фиксируем экран, шапка закреплена и не листается вместе
   со страницей. Прокручивается только внутренняя панель #friends-section.
   ================================================================== */
body.friends-active,
html:has(body.friends-active) {
  height: 100svh !important;
  overflow: hidden !important;
}

body.friends-active .app-container {
  height: 100svh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* ==================================================================
   Краш: шапка как на остальных страницах — закреплена сверху (fixed),
   игровой контент начинается сразу под ней без двойного отступа.
   Раньше topNav в краше был position:relative (в потоке) И .app-container
   имел padding-top:header-h — из-за этого экран был опущен слишком низко.
   Идёт последним, чтобы перекрыть предыдущие правила.
   ================================================================== */
body.raketa-active .top_nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 60 !important;
  height: var(--header-h) !important;
  padding: var(--safe-top) 20px 0 !important;
  margin-bottom: 0 !important;
  background: #131418 !important;
}

body.raketa-active .app-container {
  padding-top: var(--header-h) !important;
}

/* Игровой экран стартует ниже закреплённой шапки, чтобы шапка не
   перекрывала поле ракеты, список иксов, ставки и кнопку. */
body.raketa-active #crash-section,
body.raketa-active .raketa-crash-page {
  margin-top: 0 !important;
  padding-top: 28px !important;
}

.deposit-gift-status {
  margin-bottom: 10px;
  color: #9fb5ff;
}

/* ==================================================================
   New compact navigation and deposit sheet
   ================================================================== */
.top_nav {
  background: transparent !important;
  box-shadow: none !important;
}

.top_nav .nav_profile {
  justify-content: flex-end;
}

.top_nav .logged_user_profile {
  display: flex !important;
  justify-content: flex-end;
  width: 100%;
}

.top_nav .user__profile {
  display: none !important;
}

.top_nav .nav_topup {
  display: inline-flex !important;
  align-items: stretch;
  gap: 0 !important;
  width: auto !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: #272b34;
}

.top_nav .nav_topup-balance,
.top_nav .nav_topup-balance-item {
  width: auto !important;
  min-width: 0 !important;
}

.top_nav .nav_topup-balance-item {
  height: 38px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.top_nav .nav_topup-plus {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: #ffca5a !important;
  color: #fff !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.top_nav .nav_topup-stars-icon {
  width: 17px;
  height: 17px;
}

.mobile-menu-container {
  z-index: 900;
  border: 0;
  background: rgba(17, 19, 24, 0.96);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.2);
  padding: 7px 10px calc(7px + var(--safe-bottom));
}

.mob_menu_list--legacy {
  display: none !important;
}

.mob_menu_list--redesign {
  display: grid;
  grid-template-columns: 42px repeat(3, minmax(0, 1fr)) 42px;
  align-items: center;
  gap: 5px;
  max-width: 520px;
  padding: 0;
}

.nav-game-button,
.nav-avatar-button,
.nav-text-button {
  margin: 0 !important;
  border: 0;
  min-width: 0;
  width: auto;
  height: 42px;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.nav-game-button,
.nav-avatar-button {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
}

.nav-game-button {
  background: #2f80ed;
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 128, 237, 0.3);
}

.nav-game-button svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.nav-text-button {
  background: transparent;
  color: #b7beca;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-text-button:active,
.nav-text-button.active {
  background: #2b303a;
  color: #fff;
}

.nav-avatar-button {
  position: relative;
  overflow: hidden;
  border: 2px solid #747983;
  background: #30343d;
  color: #d6dae1;
  font-size: 14px;
  font-weight: 700;
}

.nav-avatar-button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-avatar-button img[src=""] {
  display: none;
}

.games-popover {
  position: fixed;
  z-index: 910;
  right: max(12px, calc((100vw - 520px) / 2 + 10px));
  bottom: calc(66px + var(--safe-bottom));
  width: min(310px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #20242c;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.games-popover.hidden {
  display: none;
}

.games-popover-title {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 11px;
}

.games-popover-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #aeb5c0;
  font-size: 22px;
}

.games-popover-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.games-popover-action {
  min-height: 62px;
  margin: 0;
  padding: 7px 4px;
  border: 1px solid #383e4a;
  border-radius: 8px;
  background: #292e38;
  color: #f1f4f9;
  font-size: 11px;
  font-weight: 700;
}

#deposit-section.deposit-page-section {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0;
  min-height: 100svh;
  background: rgba(5, 7, 10, 0.62);
}

#deposit-section.deposit-page-section.hidden {
  display: none !important;
}

.deposit-page-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: min(52svh, 490px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: #191d25;
  box-shadow: 0 -20px 52px rgba(0, 0, 0, 0.3);
}

.deposit-header {
  min-height: 48px;
  margin: 0;
  padding: 8px 12px 0;
}

.deposit-back-btn {
  width: 36px;
  height: 36px;
  margin: 0;
  color: #b9c0cc;
}

.deposit-page-title {
  font-size: 14px;
}

.deposit-header-spacer {
  width: 36px;
}

.deposit-card {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 0 20px calc(16px + var(--safe-bottom));
  border: 0;
  border-radius: 0;
  background: transparent;
}

.deposit-tabs {
  flex: 0 0 auto;
  gap: 7px;
  margin: 0 auto 4px;
  padding: 4px;
  border-radius: 12px;
  background: #242934;
}

.deposit-tab {
  width: 49px;
  height: 42px;
  flex: 0 0 49px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
}

.deposit-tab.active {
  border: 0;
  background: #333a48;
}

.deposit-tab .deposit-tab-gift-icon,
.deposit-tab .deposit-tab-gift-icon img {
  width: 25px;
  height: 25px;
}

.deposit-tab .deposit-tab-star,
.deposit-tab .deposit-tab-ton-icon img {
  width: 22px;
  height: 22px;
}

.deposit-tab-content,
.deposit-ton-block {
  flex: 1;
  min-height: 0;
}

#depositStarsContent,
#depositTonContent .deposit-ton-block,
#depositGiftContent .deposit-gift-block {
  display: flex;
  flex-direction: column;
}

#depositStarsContent.hidden,
#depositTonContent.hidden,
#depositGiftContent.hidden {
  display: none;
}

.deposit-data-title,
#depositStarsContent .deposit-field-block:first-of-type,
#depositStarsContent .deposit-rate,
#depositTonContent .deposit-rate,
#tonPromoFormGroup,
#tonWalletInfo,
#ton-connect-sdk-wrap {
  display: none !important;
}

#depositStarsContent .deposit-field-block,
#tonAmountFormGroup {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#depositStarsContent .deposit-field-block-label,
#tonAmountFormGroup .deposit-field-block-label,
.ton-stars-preview-inline {
  display: none;
}

#depositStarsContent .deposit-stars-amount-inline,
#tonAmountFormGroup .deposit-ton-amount-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 280px);
  margin: 0 auto;
  min-height: 78px;
  gap: 8px;
}

#depositStarsContent .deposit-input-inblock,
#tonAmountFormGroup .deposit-input-inline {
  width: 132px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff;
  text-align: center;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

#depositStarsContent .deposit-stars-input-icon,
#tonAmountFormGroup .deposit-input-with-ton {
  background-size: 29px 29px;
}

#depositStarsContent .deposit-stars-input-icon {
  width: 30px;
  height: 32px;
}

#tonAmountFormGroup .deposit-input-inline {
  width: 180px;
  padding-left: 34px !important;
  background-position: 8px center !important;
}

.deposit-submit-btn,
.ton-connect-custom-btn {
  min-height: 50px;
  width: 100%;
  margin: auto 0 0 !important;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #2f80ed;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.deposit-button-ton-icon {
  width: 18px;
  height: 18px;
  margin-left: 4px;
  vertical-align: -4px;
  border-radius: 50%;
  object-fit: cover;
}

#tonConnectWrap,
#tonDepositBtnWrap {
  order: 3;
  margin: auto 0 0;
}

#tonConnectWrap {
  display: block;
}

#tonConnectWrap .ton-connect-custom-btn.hidden,
#tonDepositBtnWrap.hidden {
  display: none !important;
}

#depositGiftContent .deposit-gift-block {
  height: 100%;
  justify-content: center;
}

#depositGiftContent .deposit-gift-steps,
#depositGiftContent .deposit-gift-status {
  display: none;
}

.deposit-gift-btn {
  margin-top: auto !important;
}

@media (max-width: 360px) {
  .mobile-menu-container { padding-left: 7px; padding-right: 7px; }
  .mob_menu_list--redesign { grid-template-columns: 39px repeat(3, minmax(0, 1fr)) 39px; gap: 2px; }
  .nav-game-button, .nav-avatar-button { height: 39px; }
  .nav-text-button { font-size: 10px; }
}

/* Games hub and the reference-style navigation. */
#games-section.hidden {
  display: none !important;
}

.games-page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 4px calc(118px + var(--safe-bottom));
}

.games-page-topup {
  position: relative;
  display: block;
  width: 100%;
  min-height: 122px;
  margin: 0 0 28px;
  padding: 20px 190px 20px 22px;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: #174b73;
  color: #fff;
  text-align: left;
}

.games-page-topup::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(18, 52, 82, 0.98) 0%, rgba(18, 52, 82, 0.72) 52%, rgba(18, 52, 82, 0.05) 100%);
}

.games-page-topup-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.games-page-topup strong {
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: 0;
}

.games-page-topup small {
  color: rgba(255, 255, 255, 0.83);
  font-size: 14px;
  font-weight: 600;
}

.games-page-topup img {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  object-fit: cover;
}

.games-page-title {
  max-width: none;
  margin: 0 0 18px;
  color: #fff;
  font-size: 29px;
  line-height: 1.1;
  white-space: normal;
}

.games-page-list {
  display: grid;
  gap: 14px;
}

.games-page-card {
  position: relative;
  display: flex;
  min-height: 174px;
  width: 100%;
  margin: 0;
  padding: 28px 46% 24px 22px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  color: #fff;
  text-align: left;
}

.games-page-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(7, 11, 19, 0.16), rgba(7, 11, 19, 0.01));
}

.games-page-card span {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 9px;
}

.games-page-card strong {
  font-size: 29px;
  line-height: 1;
}

.games-page-card small {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.games-page-card img {
  position: absolute;
  right: -3%;
  bottom: -8%;
  width: 54%;
  height: 116%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.games-page-card--crash { background: #7625df; }
.games-page-card--cases { background: #2686e8; }
.games-page-card--upgrade { background: #ef8d27; }
.games-page-card--cases img { width: 47%; right: 3%; }
.games-card-float { animation: games-card-float 2.8s ease-in-out infinite; }
.games-upgrade-fire {
  position: absolute;
  z-index: 1;
  right: 7%;
  bottom: 7%;
  font-family: Arial, sans-serif;
  font-size: 104px;
  line-height: 1;
  filter: drop-shadow(0 14px 12px rgba(104, 48, 0, .28));
  animation: games-fire-float 2.1s ease-in-out infinite;
}
@keyframes games-card-float { 50% { transform: translateY(-10px) rotate(-3deg); } }
@keyframes games-fire-float { 50% { transform: translateY(-13px) scale(1.08) rotate(4deg); } }

.market-page { width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 4px calc(118px + var(--safe-bottom)); }
.market-page.hidden { display: none !important; }
.market-page-header { margin: 0 0 14px; padding: 0 5px; }
.market-page-header h1 { max-width: none; font-size: 29px; white-space: normal; }
.market-page-header p { margin: 5px 0 0; color: #a6a9b3; font-size: 14px; font-weight: 600; }
.market-topup-btn { display: grid; width: 42px; height: 42px; min-height: 42px; margin: 0; padding: 0; place-items: center; border: 0; border-radius: 50%; background: #f1b735; color: #fff; font-size: 28px; line-height: 1; }
.market-sort-row { display: flex; justify-content: space-between; margin-bottom: 12px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: #252527; color: #b9bcc5; font-size: 13px; font-weight: 600; }
.market-markup { color: #f6bc42; }
.market-gift-list { display: grid; gap: 9px; }
.market-gift-card { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 86px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: #2d2d30; }
.market-gift-media { display: grid; width: 70px; height: 70px; place-items: center; overflow: hidden; border-radius: 11px; background: #202023; }
.market-gift-video { width: 100%; height: 100%; object-fit: contain; }
.market-gift-copy { display: grid; min-width: 0; gap: 5px; }
.market-gift-copy strong { overflow: hidden; color: #fff; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.market-gift-copy span { display: inline-flex; align-items: center; gap: 4px; color: #a6a9b3; font-size: 11px; }
.market-copy-star { width: 12px; height: 13px; flex: 0 0 auto; }
.market-buy-btn { display: inline-flex; width: auto; min-width: 82px; min-height: 40px; align-items: center; justify-content: center; gap: 5px; margin: 0; padding: 10px 9px; border: 0; border-radius: 10px; background: #ffca3a; color: #000; font-size: 12px; font-weight: 800; }
.market-btn-star { width: 14px; height: 15px; flex: 0 0 auto; }
.market-buy-btn:disabled { opacity: .55; }
.market-loading { padding: 42px 18px; color: #a6a9b3; text-align: center; }

.market-gift-list:has(.market-loading) {
  display: flex !important;
  min-height: calc(100svh - var(--header-h) - 180px);
  align-items: center;
  justify-content: center;
}

.market-modal-overlay {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, .56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.market-modal-overlay.hidden { display: none !important; }

.market-modal-sheet {
  position: relative;
  width: min(100%, 360px);
  overflow: hidden;
  padding: 26px 18px calc(18px + var(--safe-bottom));
  border: 1px solid rgba(255,255,255,.12);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #1f2229;
  text-align: center;
  box-shadow: 0 -22px 60px rgba(0,0,0,.45);
  animation: marketSheetUp .22s ease-out;
}

.market-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.market-modal-spark {
  position: absolute;
  inset: -30% -10% auto;
  height: 150px;
  background: radial-gradient(circle, rgba(255,202,58,.34), transparent 62%);
  transform-origin: center;
  animation: marketSpark 2.4s ease-in-out infinite;
}

.market-modal-img {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 8px auto 12px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.32));
}

.market-modal-title {
  position: relative;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.market-modal-note {
  position: relative;
  margin: 12px 0 14px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #2b303a;
  color: #d8dce6;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.market-modal-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e43232;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.market-modal-error.hidden { display: none !important; }
.market-error-star { width: 14px; height: 15px; }

.market-modal-cta {
  position: relative;
  width: 100%;
  min-height: 50px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: #ffca3a;
  color: #000;
  font-size: 15px;
  font-weight: 800;
}

.market-modal-cta-blue {
  background: #2f80ed;
  color: #fff;
}

.market-modal-success .market-modal-img {
  animation: marketGiftPop .62s cubic-bezier(.18, .89, .32, 1.28);
}

@keyframes marketGiftPop {
  0% { transform: scale(.72) rotate(-8deg); opacity: .4; }
  65% { transform: scale(1.08) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes marketSpark {
  50% { transform: scale(1.08); opacity: .72; }
}

@keyframes marketSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-menu-container {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 14px calc(12px + var(--safe-bottom)) !important;
  pointer-events: none;
}

.mob_menu_list--redesign {
  grid-template-columns: 78px minmax(0, 1fr) 78px;
  max-width: 600px;
  gap: 10px;
  pointer-events: auto;
}

.nav-game-button,
.nav-avatar-button {
  width: 78px;
  height: 78px;
  border: 1px solid #454b55;
  background: #2d3139;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.nav-game-button {
  transform: translateY(-16px);
  color: #a7adb7;
}

.nav-game-button.active,
.nav-game-button:active {
  border-color: #4e83ec;
  background: #4e83ec;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(78, 131, 236, 0.22);
}

.nav-game-button svg {
  width: 39px;
  height: 39px;
}

.nav-avatar-button {
  border: 1px solid #454b55;
  background: #2d3139;
  color: #a7adb7;
  font-size: 27px;
}

.nav-avatar-button.active,
.nav-avatar-button:active {
  border-color: #4e83ec;
  background: #4e83ec;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(78, 131, 236, 0.22);
}

.nav-middle-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 62px;
  padding: 4px 8px;
  border: 1px solid #454b55;
  border-radius: 36px;
  background: #2d3139;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.nav-text-button {
  display: flex;
  width: 100%;
  height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #a7adb7;
  border-radius: 24px;
  font-size: 10px;
  line-height: 1;
}

.nav-text-button svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-text-button.active,
.nav-text-button:active {
  background: #4e83ec;
  color: #fff;
}

/* Full-height deposit sheet based on the supplied screens. */
#deposit-section.deposit-page-section {
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.69);
}

.deposit-page-inner {
  position: relative;
  height: min(80svh, 720px);
  max-width: 830px;
  margin: 0 auto 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 32px;
  background: radial-gradient(ellipse at 50% -10%, #247c14 0%, #0d3b08 35%, #030804 75%);
}

.deposit-header {
  position: absolute;
  z-index: 3;
  top: 15px;
  right: 18px;
  width: 64px;
  min-height: 64px;
  padding: 0;
}

.deposit-back-btn {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: #303030;
  color: transparent;
}

.deposit-back-btn svg { display: none; }
.deposit-back-btn::after { content: "×"; color: #bcbcbc; font-size: 58px; font-weight: 300; line-height: 0.8; }
.deposit-page-title, .deposit-header-spacer { display: none; }

.deposit-card {
  padding: 32px 20px 20px;
}

.deposit-tabs {
  z-index: 2;
  min-height: 70px;
  margin: 0 auto;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 38px;
  background: #2d2d2d;
}

.deposit-tab {
  width: 72px;
  height: 56px;
  flex-basis: 72px;
  border-radius: 29px;
}

.deposit-tab.active { background: #4e83ec; }
.deposit-tab .deposit-tab-star, .deposit-tab .deposit-tab-ton-icon img { width: 31px; height: 31px; }
.deposit-tab .deposit-tab-gift-icon, .deposit-tab .deposit-tab-gift-icon img { width: 30px; height: 30px; }

#depositStarsContent .deposit-field-block,
#tonAmountFormGroup {
  min-height: 0;
  flex: 1;
  align-items: center;
}

#depositStarsContent .deposit-stars-amount-inline,
#tonAmountFormGroup .deposit-ton-amount-inline {
  min-height: 140px;
  gap: 12px;
}

#depositStarsContent .deposit-input-inblock,
#tonAmountFormGroup .deposit-input-inline {
  width: 190px;
  font-size: 68px;
}

#depositStarsContent .deposit-stars-input-icon { width: 52px; height: 52px; }
#tonAmountFormGroup .deposit-input-inline { width: 220px; padding-left: 58px !important; background-size: 48px 48px; }

.deposit-submit-btn,
.ton-connect-custom-btn {
  min-height: 76px;
  border: 8px solid #343434;
  border-radius: 42px;
  background: #4e83ec;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 20px;
}

.deposit-button-ton-icon { width: 28px; height: 28px; vertical-align: -7px; }

.deposit-ton-block { position: relative; }
.deposit-ton-boost { order: 1; margin: auto auto 0; padding: 8px 20px; border-radius: 20px; background: rgba(49, 102, 193, 0.32); color: #5e91f3; font-size: 15px; font-weight: 700; }
.deposit-ton-wallet-hint { order: 2; margin: 12px 0 auto; color: #a9a9ad; text-align: center; font-size: 18px; }
#tonAmountFormGroup { order: 1; flex: 0 0 auto; }
#tonConnectWrap, #tonDepositBtnWrap { z-index: 2; }

#depositGiftContent .deposit-gift-block { justify-content: flex-start; padding-top: 48px; }
#depositGiftContent .deposit-gift-steps { display: grid; gap: 0; margin: auto 0; padding: 0; list-style: none; overflow: hidden; border-radius: 22px; background: #303030; }
#depositGiftContent .deposit-gift-steps li { position: relative; min-height: 80px; margin: 0; padding: 18px 18px 18px 92px; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; font-size: 17px; line-height: 1.35; }
#depositGiftContent .deposit-gift-steps li:last-child { border-bottom: 0; }
#depositGiftContent .deposit-gift-steps li::before { position: absolute; left: 17px; top: 18px; display: grid; width: 55px; height: 55px; place-items: center; border-radius: 50%; background: #1e1e1e; font-size: 27px; }
#depositGiftContent .deposit-gift-steps li:nth-child(1)::before { content: ""; }
#depositGiftContent .deposit-gift-steps li:nth-child(2)::before { content: ""; }
#depositGiftContent .deposit-gift-steps li:nth-child(3)::before { content: ""; }
#depositGiftContent .deposit-gift-link { color: #5990f2; }

@media (max-width: 430px) {
  .games-page { padding-left: 0; padding-right: 0; }
  .games-page-topup { min-height: 108px; padding-right: 48%; }
  .games-page-topup strong { font-size: 19px; }
  .games-page-card { min-height: 156px; }
  .games-page-card strong { font-size: 25px; }
  .games-page-card small { font-size: 13px; }
  .games-upgrade-fire { right: 8%; font-size: 89px; }
  .market-page { padding-left: 0; padding-right: 0; }
  .market-gift-card { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 9px; min-height: 77px; }
  .market-gift-media { width: 62px; height: 62px; }
  .market-buy-btn { min-width: 72px; font-size: 11px; }
  .mobile-menu-container { padding-left: 10px !important; padding-right: 10px !important; }
  .mob_menu_list--redesign { grid-template-columns: 70px minmax(0, 1fr) 70px; gap: 6px; }
  .nav-game-button, .nav-avatar-button { width: 70px; height: 70px; }
  .nav-game-button svg { width: 34px; height: 34px; }
  .nav-middle-controls { min-height: 58px; padding-left: 4px; padding-right: 4px; }
  .nav-text-button { height: 50px; font-size: 9px; }
  .nav-text-button svg { width: 22px; height: 22px; }
  .deposit-page-inner { height: min(79svh, 690px); margin-bottom: 4px; border-radius: 28px; }
  .deposit-header { top: 10px; right: 12px; width: 55px; min-height: 55px; }
  .deposit-back-btn { width: 55px; height: 55px; }
  .deposit-back-btn::after { font-size: 49px; }
  .deposit-tabs { min-height: 62px; }
  .deposit-tab { width: 62px; height: 48px; flex-basis: 62px; }
  #depositStarsContent .deposit-input-inblock, #tonAmountFormGroup .deposit-input-inline { font-size: 57px; }
  .deposit-submit-btn, .ton-connect-custom-btn { min-height: 68px; font-size: 18px; }
}

.admin-page {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 30%),
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.08), transparent 24%),
    linear-gradient(180deg, #0f131b 0%, #121821 100%);
  border: 1px solid rgba(91, 114, 154, 0.18);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-monitor-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(18, 26, 40, 0.96), rgba(12, 17, 28, 0.98));
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 18px;
  padding: 16px;
}

.admin-monitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-monitor-value {
  font-size: 20px;
  font-weight: 700;
  color: #f8fbff;
}

.admin-monitor-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-monitor-badge.live {
  color: #022c22;
  background: #86efac;
}

.admin-monitor-badge.off {
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.22);
}

.admin-monitor-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.admin-monitor-stats div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 10px 12px;
}

.admin-monitor-stats b {
  display: block;
  color: #fff;
  font-size: 16px;
  margin-bottom: 4px;
}

.admin-monitor-stats span {
  color: #90a3bf;
  font-size: 12px;
}

.admin-card,
.admin-toolbar,
.admin-user-details,
.admin-form-card {
  background: rgba(14, 18, 27, 0.92);
  border: 1px solid rgba(77, 91, 124, 0.18);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.admin-user-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-user-hero-title {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 700;
  color: #f8fbff;
}

.admin-user-hero-sub {
  margin-top: 4px;
  color: #90a3bf;
  font-size: 13px;
}

.admin-user-hero-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-state-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.admin-state-badge.good {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.admin-state-badge.bad {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.admin-state-badge.info {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.admin-user-kpis,
.admin-user-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-meta-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(77, 91, 124, 0.16);
  border-radius: 16px;
  padding: 12px;
}

.admin-meta-value {
  color: #fff;
  margin-top: 6px;
  font-size: 14px;
}

.admin-user-actions {
  margin-bottom: 12px;
}

.admin-balance-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(77, 91, 124, 0.16);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.admin-balance-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.admin-balance-row input {
  flex: 1;
  min-width: 0;
  background: #0d121a;
  border: 1px solid rgba(91, 114, 154, 0.18);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}

.admin-user-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-detail-panel {
  max-height: 320px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(77, 91, 124, 0.14);
  border-radius: 16px;
  padding: 12px;
}

.admin-inventory-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-inventory-card + .admin-inventory-card,
.admin-history-row + .admin-history-row {
  margin-top: 10px;
}

.admin-inventory-card img,
.admin-gift-history-main img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px;
}

.admin-inventory-card-body {
  min-width: 0;
}

.admin-inventory-card-title {
  color: #fff;
  font-weight: 600;
}

.admin-inventory-card-meta,
.admin-inventory-card-sub {
  color: #90a3bf;
  font-size: 12px;
}

.admin-inventory-card-sub {
  margin-top: 4px;
}

.admin-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(77, 91, 124, 0.14);
}

.admin-history-row:last-child {
  border-bottom: 0;
}

.admin-gift-history-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 720px) {
  .admin-dashboard-grid,
  .admin-user-kpis,
  .admin-user-meta-grid {
    grid-template-columns: 1fr;
  }

  .admin-monitor-stats {
    grid-template-columns: 1fr;
  }

  .admin-user-hero,
  .admin-history-row,
  .admin-balance-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Final Gift Chase overrides: this block remains after legacy page styles. */
#profile-section { background: transparent !important; }
.profile-page { padding: 8px 0 100px !important; background: transparent !important; }
.profile-container { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--chase-line); border-radius: 24px; background: var(--chase-surface); }
.profile-info { gap: 2px; }.profile-name { color: #fff; font-size: 23px; font-weight: 700; }.profile-id { color: var(--chase-muted); }
.profile-avatar { width: 72px; height: 72px; border: 0; border-radius: 50%; background: #69d9cb; }
.balance-section, .free-case-banner, .profile_content_wrapper.items_content { margin: 0 0 12px; border: 1px solid var(--chase-line); border-radius: 24px; background: var(--chase-surface); box-shadow: none; }
.balance-section { padding: 16px; }.balance-display { color: #fff; }.deposit-button { min-height: 44px; margin: 0; border-radius: 22px; background: var(--chase-blue); }
.free-case-banner { min-height: 74px; padding: 12px; }.profile_content_wrapper.items_content { padding: 14px; }.profile_content-head-label { color: #fff; }.btn_sale_all { border-radius: 18px; background: #3b3b3e; }
.profile_items_list { gap: 10px; }.profile_items_list_item { border: 1px solid #49494b; border-radius: 18px; background: #222224; }.profile_items_list_item > img, .profile_items_list_item .profile-item-video { width: 100%; height: auto; aspect-ratio: 1; margin: 0 0 8px; border-radius: 13px; background: #363638; }

.upgrade-section { display: flex; width: min(100%, 480px); min-height: 100svh; padding: calc(var(--header-h) + 8px) 12px calc(96px + var(--safe-bottom)); gap: 12px; overflow-y: auto !important; background: transparent; }
.upgrade-title { width: 100%; margin: 0; color: #fff; font-size: 28px; text-align: left; }.upgrade-ring-wrapper { width: min(100%, 320px); height: auto; aspect-ratio: 1; margin: 2px auto 0; border: 1px solid var(--chase-line); border-radius: 50%; background: #2d2d2f; }.upgrade-ring-svg { inset: 8%; width: 84%; height: 84%; }.upgrade-ring-track { stroke: #181819; stroke-width: 11; }.upgrade-ring-win { stroke: var(--chase-blue); }.upgrade-ring-center { gap: 4px; }.upgrade-chance-pct { color: #fff; font-size: 42px; }.upgrade-chance-label { color: #a7a6ad; font-size: 15px; text-transform: uppercase; }.upgrade-pointer-triangle { border-top-color: #fff; }
.upgrade-multipliers { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; gap: 5px; }.upgrade-multiplier { min-height: 40px; margin: 0; padding: 0; border: 1px solid #3f3f41; border-radius: 22px; background: #1a1a1b; color: #fff; font-size: 15px; }.upgrade-multiplier.active { background: var(--chase-blue); border-color: var(--chase-blue); }.upgrade-slots { display: none; }.upgrade-btn { width: 100%; min-height: 56px; margin: 0; border-radius: 28px; background: #42649e; color: #aaa9ad; font-size: 18px; }.upgrade-reference-picker { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; padding: 5px; border: 1px solid var(--chase-line); border-radius: 28px; background: #1b1b1c; }.upgrade-reference-tab { min-height: 46px; margin: 0; padding: 0 7px; border: 0; border-radius: 23px; background: transparent; color: #99999e; font-size: 15px; }.upgrade-reference-tab.active { background: var(--chase-blue); color: #fff; }.upgrade-empty-reference { display: flex; width: 100%; min-height: 245px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; border: 1px solid var(--chase-line); border-radius: 26px; background: var(--chase-surface); text-align: center; }.upgrade-empty-reference img { width: 105px; height: 105px; object-fit: contain; }.upgrade-empty-reference strong { color: #fff; font-size: 22px; }.upgrade-empty-reference span { color: #aaa9ae; font-size: 14px; }

/* Gift Chase visual system, based on the supplied mobile references. */
:root {
  --chase-blue: #4e83ed;
  --chase-surface: #2d2d2f;
  --chase-line: #49494b;
  --chase-muted: #a6a5ac;
}

body {
  background-color: #19191a;
  background-image:
    radial-gradient(circle at 12% 17%, rgba(255,255,255,.07) 0 2px, transparent 2.5px),
    radial-gradient(circle at 88% 42%, rgba(255,255,255,.05) 0 2px, transparent 2.5px),
    linear-gradient(125deg, transparent 49.5%, rgba(255,255,255,.035) 50%, transparent 50.5%);
  background-size: 78px 78px, 104px 104px, 126px 126px;
}

.app-container {
  max-width: 480px;
  min-height: 100svh;
  padding: calc(var(--header-h) + 12px) 12px calc(104px + var(--safe-bottom));
  background: transparent;
}

.top_nav {
  max-width: 480px;
  left: 50%;
  right: auto;
  width: 100%;
  transform: translateX(-50%);
  padding: calc(7px + var(--safe-top)) 12px 7px;
}

/* Bottom navigation: inactive icons are grey, only the active destination is blue. */
.mobile-menu-container {
  max-width: 480px;
  left: 50%;
  right: auto;
  width: 100%;
  transform: translateX(-50%);
  padding: 0 12px calc(12px + var(--safe-bottom)) !important;
  background: linear-gradient(transparent, rgba(19,19,20,.94) 30%) !important;
}

.mob_menu_list--redesign {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 66px;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: 72px;
  gap: 0;
  padding: 7px 0 7px 7px;
}

.mob_menu_list--redesign::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 74px;
  bottom: 0;
  left: 0;
  content: '';
  border: 1px solid #414143;
  border-radius: 38px;
  background: rgba(29,29,30,.98);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.nav-text-button,
.nav-game-button,
.nav-avatar-button {
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--chase-muted) !important;
  transform: none !important;
}

/* Compact bet controls and a horizontal gift rail in the Rocket sheet. */
.raketa-bet-tabs {
  width: min(100% - 76px, 320px) !important;
  min-height: 44px !important;
  margin: 0 auto 16px !important;
  padding: 3px !important;
  border-radius: 23px !important;
}
.raketa-bet-tab { height: 36px !important; border-radius: 19px !important; font-size: 14px !important; }
.raketa-auto-row { grid-template-columns: 1fr auto auto !important; column-gap: 8px !important; }
.raketa-auto-toggle { margin: 0 !important; }
.raketa-gift-list {
  display: flex !important;
  gap: 8px !important;
  max-height: none !important;
  padding: 2px 1px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.raketa-gift-option {
  width: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
  height: 68px !important;
  margin: 0 !important;
  padding: 3px !important;
  scroll-snap-align: start;
}
.raketa-gift-option img { width: 100% !important; height: 100% !important; }
.raketa-gift-option b { display: none !important; }

.nav-text-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.nav-text-button svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.35;
}

.nav-text-button.active,
.nav-text-button:active {
  color: var(--chase-blue) !important;
}

.nav-avatar-button {
  display: grid !important;
  width: 64px !important;
  height: 64px !important;
  margin-left: 3px !important;
  place-items: center;
  overflow: visible !important;
  border: 2px solid #454548 !important;
  border-radius: 50% !important;
  background: #69d9cb !important;
  color: #fff !important;
  font-size: 23px;
}

.nav-avatar-button.active,
.nav-avatar-button:active {
  border-color: var(--chase-blue) !important;
  box-shadow: 0 0 0 3px #171719, 0 0 0 5px var(--chase-blue) !important;
}

.nav-avatar-button img { border-radius: 50%; }
.nav-avatar-button small {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  display: none;
  transform: translateX(-50%);
  color: inherit;
  font-size: 9px;
}

.games-page,
.chase-tasks-page {
  width: 100%;
  max-width: none;
  padding: 4px 0 94px;
}

.games-page-topup {
  min-height: 78px;
  margin: 0 0 18px;
  padding: 14px 45% 14px 16px;
  border-radius: 17px;
  background: linear-gradient(100deg, #31597b, #2c76a9) !important;
}
.games-page-topup strong { font-size: 17px; }
.games-page-topup small { font-size: 12px; }
.games-page-topup img { width: 47%; right: -2%; }
.games-page-title,
.chase-tasks-page h1 { margin: 0 0 15px; color: #fff; font-size: 24px; font-weight: 700; }
.games-page-list { gap: 11px; }
.games-page-card {
  min-height: 104px;
  padding: 15px 46% 15px 16px;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}
.games-page-card strong { font-size: 25px; }
.games-page-card small { margin-top: 5px; font-size: 13px; line-height: 1.32; }
.games-page-card img { width: 50%; max-height: 110px; object-fit: contain; }
.games-page-card--crash { background: linear-gradient(105deg, #6522d4, #9639e9) !important; }
.games-page-card--cases { background: linear-gradient(105deg, #298ce8, #4ba7ee) !important; }
.games-page-card--mines { background: linear-gradient(105deg, #f5b326, #f6dc63) !important; }
.games-page-card--slots { background: linear-gradient(105deg, #596270, #8695a9) !important; }
.games-page-card--upgrade { background: linear-gradient(105deg, #ec5f25, #f5a525) !important; }

.chase-tasks-page h2 { margin: 18px 0 10px 20px; color: #aaa9b0; font-size: 17px; font-weight: 700; }
.chase-task-card {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--chase-line);
  border-radius: 24px;
  background: var(--chase-surface);
}
.chase-task-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 62px; }
.chase-task-row strong { display: block; color: #fff; font-size: 15px; font-weight: 600; }
.chase-task-row small { display: block; margin-top: 4px; color: #ffad42; font-size: 13px; }
.chase-task-row b { min-width: 60px; padding: 8px 10px; border-radius: 19px; background: #3a3530; color: #ffa743; font-size: 14px; font-weight: 500; text-align: center; }
.chase-task-row button { width: auto; min-width: 96px; margin: 0; padding: 9px 12px; border: 0; border-radius: 18px; background: #303847; color: #6396eb; font-size: 13px; }
.chase-task-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; color: #fff; font-size: 18px; font-weight: 800; }
.chase-task-icon--mines { background: #f7bc39; }.chase-task-icon--slots { background: #e832c2; font-size: 13px; }.chase-task-icon--upgrade { background: #f33368; }.chase-task-icon--channel { background: #4aa2f5; }.chase-task-icon--star { background: #63572b; color: #ffd64f; }
.chase-section-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }.chase-section-heading h2 { margin: 0 0 8px 20px; }.chase-section-heading time { margin: 0 14px 8px 0; color: #a9a8af; font-size: 16px; font-weight: 700; }

/* TopGift market treatment from the marketplace references. */
.app-container:has(#market-section:not(.hidden)) { max-width: 480px; background: #000; }
.market-page { max-width: none; padding: 10px 2px 96px; }
.market-page-header { align-items: flex-start; margin-bottom: 18px; padding: 0 2px; }
.market-page-header h1 { color: #fff; font-size: 29px; font-weight: 400; }.market-page-header h1 span { color: #96969a; }.market-page-header p { display: none; }
.market-topup-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--chase-blue); }
.market-sort-row { margin-bottom: 14px; padding: 0; border: 0; background: transparent; color: #a2a2a7; }.market-markup { display: none; }
.market-gift-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.market-gift-card { display: block; min-height: 0; padding: 9px; border: 1px solid #373737; border-radius: 18px; background: #1b1b1b; }
.market-gift-media { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; background: #343434; }.market-gift-copy { gap: 2px; padding: 10px 1px 8px; }.market-gift-copy strong { font-size: 14px; }.market-gift-copy span { font-size: 11px; color: #959599; }.market-buy-btn { width: 100%; min-width: 0; padding: 10px 5px; border-radius: 20px; background: #258af1; font-size: 13px; }

@media (max-width: 380px) {
  .mob_menu_list--redesign { grid-template-columns: repeat(4, minmax(0, 1fr)) 58px; min-height: 65px; }.mob_menu_list--redesign::before { right: 65px; }.nav-avatar-button { width: 56px !important; height: 56px !important; font-size: 19px; }.nav-text-button { font-size: 9px; }.nav-text-button svg { width: 22px; height: 22px; }.games-page-card { min-height: 96px; }.games-page-card strong { font-size: 22px; }
}

.top_nav .nav_profile,
.top_nav .logged_user_profile {
  justify-content: space-between !important;
}

.top_nav .user__profile {
  display: inline-flex !important;
  max-width: 58%;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 3px 11px 3px 4px;
  overflow: hidden;
  border: 1px solid #4a4a4c;
  border-radius: 20px;
  background: #303033;
}

.top_nav .nav_logged_user {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: #69d9cb;
}

.top_nav .nav_logged_user-name {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top_nav .nav_topup {
  border-color: #4a4a4c;
  background: #303033;
}

body.topgift-nav .mobile-menu-container {
  background: #000 !important;
}

body.topgift-nav .mob_menu_list--redesign {
  min-height: 62px;
  padding: 0;
}

body.topgift-nav .mob_menu_list--redesign::before {
  display: none;
}

body.topgift-nav .nav-text-button {
  height: 58px !important;
  color: #a8a8ad !important;
  font-size: 10px;
}

body.topgift-nav .nav-text-button.active {
  color: #fff !important;
}

body.topgift-nav .nav-avatar-button {
  width: 40px !important;
  height: 40px !important;
  margin-left: 13px !important;
  border-width: 1px !important;
  box-shadow: none !important;
  font-size: 14px;
}

/* Final corrections for the games hub, deposits, and mobile upgrade screen. */
.games-page-card .games-card-emoji {
  position: absolute;
  z-index: 1;
  right: 8%;
  bottom: 8%;
  display: block;
  font-family: Arial, sans-serif;
  font-size: clamp(72px, 22vw, 108px);
  line-height: 1;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .2));
  animation: games-card-emoji-float 2.1s ease-in-out infinite;
}

.games-page-card .games-card-rocket { animation-delay: -.45s; }
.games-page-card .games-card-clover { animation-delay: -.9s; }
.games-page-card--upgrade .games-upgrade-fire { right: 8%; left: auto; bottom: 8%; }

@keyframes games-card-emoji-float {
  50% { transform: translateY(-13px) scale(1.08) rotate(4deg); }
}

/* Render the entered amount first and its currency SVG after it. */
#depositStarsContent .deposit-stars-amount-inline,
#tonAmountFormGroup .deposit-ton-amount-inline {
  flex-wrap: nowrap;
}

#depositStarsContent .deposit-stars-input-icon { order: 2; }
#depositStarsContent .deposit-input-inblock { order: 1; text-align: right; }
#tonAmountFormGroup .deposit-input-inline {
  padding-left: 0 !important;
  background-image: none !important;
  text-align: right;
}

.deposit-ton-input-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  fill: #41a6f5;
}

#depositGiftContent .deposit-gift-steps li:nth-child(1)::before,
#depositGiftContent .deposit-gift-steps li:nth-child(2)::before,
#depositGiftContent .deposit-gift-steps li:nth-child(3)::before { content: ""; }

/* A legacy override hid these controls, leaving upgrades unusable on phones. */
.upgrade-section {
  position: fixed;
  inset: var(--header-h) 0 calc(82px + var(--safe-bottom));
  width: min(100%, 480px);
  min-height: 0;
  margin: 0 auto;
  padding: 16px 12px 22px;
  gap: 12px;
  overflow-y: auto !important;
}

.upgrade-section .upgrade-title { margin: 0; font-size: 26px; text-align: left; }
.upgrade-section .upgrade-ring-wrapper { width: min(76vw, 290px); height: auto; margin: 0 auto; }
.upgrade-section .upgrade-pointer-wrap { width: 100%; height: 100%; }
.upgrade-section .upgrade-slots {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  gap: 8px;
}
.upgrade-section .upgrade-slot { min-height: 120px; padding: 12px 8px; border-radius: 16px; }
.upgrade-section .upgrade-slots-arrow { justify-content: center; }
.upgrade-section .upgrade-btn { max-width: 380px; min-height: 54px; }

@media (max-width: 380px) {
  .upgrade-section .upgrade-ring-wrapper { width: min(72vw, 250px); }
  .upgrade-section .upgrade-slot { min-height: 104px; }
  .deposit-ton-input-icon { width: 38px; height: 38px; flex-basis: 38px; }
}

/* Current navigation, upgrade and crash layout. */
.top_nav,
.top_nav .nav_profile { background: transparent !important; box-shadow: none !important; }
.top_nav .nav_topup { overflow: visible; align-items: center; padding-right: 5px; background: #303033; }
.top_nav .nav_topup-plus { width: 28px !important; min-width: 28px !important; height: 28px !important; margin: 0 0 0 5px !important; border-radius: 50% !important; background: #ffca5a !important; color: #202125 !important; font-size: 22px !important; line-height: 28px !important; }

.mobile-menu-container { padding: 0 12px calc(12px + var(--safe-bottom)) !important; background: transparent !important; }
.mob_menu_list--redesign { display: grid; grid-template-columns: 70px minmax(0, 1fr) 64px; gap: 10px; max-width: 480px; min-height: 70px; padding: 0; }
.mob_menu_list--redesign::before { display: none; }
.nav-game-button { display: grid; width: 70px !important; height: 70px !important; place-items: center; align-content: center; gap: 2px; padding: 0; border: 1px solid #5a8ff1 !important; border-radius: 50% !important; background: #4e83ed !important; color: #fff !important; box-shadow: 0 9px 22px rgba(42, 100, 206, .35) !important; transform: none !important; }
.nav-game-button svg { width: 28px; height: 28px; fill: currentColor; }
.nav-game-button span { font-size: 10px; font-weight: 700; }
.nav-middle-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 58px; padding: 4px; border: 1px solid #454548; border-radius: 30px; background: #2d2d30; box-shadow: 0 10px 25px rgba(0, 0, 0, .22); }
.nav-middle-controls .nav-text-button { height: 48px !important; border-radius: 24px !important; color: #c1c1c5 !important; font-size: 12px; font-weight: 700; white-space: nowrap; }
.nav-middle-controls .nav-text-button.active { background: #424247 !important; color: #fff !important; }
.nav-avatar-button { display: grid !important; width: 64px !important; height: 64px !important; margin: 3px 0 0 !important; place-items: center; border: 1px solid #454548 !important; border-radius: 50% !important; background: #303033 !important; color: #fff !important; box-shadow: 0 9px 22px rgba(0,0,0,.22) !important; }
.nav-avatar-button img { border-radius: 50%; }

.upgrade-section .upgrade-ring-wrapper { position: relative; overflow: visible; background: #252527; }
.upgrade-section .upgrade-ring-svg { position: absolute; inset: 7%; width: 86%; height: 86%; }
.upgrade-section .upgrade-pointer-wrap { position: absolute; inset: 0; z-index: 3; transform-origin: 50% 50%; }
.upgrade-section .upgrade-pointer-triangle { top: 4%; border: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 15px solid #ffca5a; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.upgrade-section .upgrade-ring-center { z-index: 2; pointer-events: none; }
.upgrade-section .upgrade-chance-pct { background: none; -webkit-text-fill-color: #fff; color: #fff; }
.upgrade-section .upgrade-chance-label { max-width: 150px; text-align: center; line-height: 1.2; }
.upgrade-section .upgrade-slots { display: none !important; }
.upgrade-reference-tab.selected::after { content: none; }

body.raketa-active,
html:has(body.raketa-active) { height: auto !important; min-height: 100svh; overflow-x: hidden !important; overflow-y: auto !important; touch-action: auto !important; }
body.raketa-active .app-container { height: auto !important; min-height: 100svh !important; padding-top: calc(var(--header-h) + 8px) !important; padding-bottom: calc(100px + var(--safe-bottom)) !important; overflow: visible !important; background: #131418 !important; }
body.raketa-active .top_nav { background: transparent !important; }
body.raketa-active .mobile-menu-container { display: block !important; transform: none !important; pointer-events: auto !important; }
body.raketa-active #crash-section { min-height: calc(100svh - var(--header-h)); height: auto !important; padding-top: 10px !important; padding-bottom: 18px; overflow: visible !important; }

.raketa-modal-overlay { align-items: flex-end; background: rgba(0,0,0,.72); }
.raketa-modal-sheet { position: relative; max-width: 480px; padding: 28px 20px 28px; border: 1px solid #4c4c50; border-radius: 32px 32px 0 0; background: #202022; }
.raketa-modal-close { position: absolute; top: 14px; right: 17px; width: 50px; height: 50px; border: 1px solid #48484c; border-radius: 50%; background: #303033; color: #aaaab0; font-size: 40px; font-weight: 300; line-height: .9; }
.raketa-bet-tabs { width: min(100% - 82px, 390px); min-height: 64px; margin: 0 auto 64px; padding: 5px; border: 1px solid #454549; border-radius: 34px; background: #303033; }
.raketa-bet-tab { height: 52px; border: 0; border-radius: 27px; background: transparent; color: #8c8c92; font-size: 18px; }
.raketa-bet-tab.active { background: #4e83ed; color: #fff; }
.raketa-form-label { margin: 0 0 14px; color: #fff; font-size: 23px; font-weight: 700; }
.raketa-amount-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 104px; align-items: center; height: 96px; padding: 0 10px 0 20px; border: 1px solid #4b4b4f; border-radius: 48px; background: #222224; }
.raketa-amount-row > span { font-size: 34px; }
.raketa-amount-row .raketa-modal-field { width: 100%; height: 72px; padding: 0 8px; border: 0; background: transparent; color: #fff; font-size: 35px; text-align: left; }
.raketa-amount-row button { height: 68px; border: 0; border-radius: 35px; background: #4e83ed; color: #fff; font-size: 20px; }
.raketa-quick-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 44px; }
.raketa-quick-amounts button { height: 54px; border: 1px solid #454549; border-radius: 28px; background: #252527; color: #5d93f1; font-size: 15px; font-weight: 700; }
.raketa-auto-row { grid-template-columns: 1fr auto 56px; align-items: center; min-height: 96px; margin: 0; padding: 0 20px; border: 1px solid #4b4b4f; border-radius: 30px 30px 0 0; background: #303033; color: #fff; font-size: 20px; font-weight: 700; }
.raketa-mult-box { gap: 8px; height: 54px; padding: 0 8px; border-radius: 28px; background: #29292b; color: #9e9ea4; }
.raketa-auto-toggle { width: 50px; height: 50px; border: 0; border-radius: 50%; background: #4e83ed; color: #fff; font-size: 32px; }.raketa-auto-toggle:not(.active) { background: #48484c; color: #98989e; }
.raketa-modal-cta { width: 100%; height: 76px; margin: 0; border-radius: 0 0 36px 36px; background: #426aa5; color: #a9b1be; }
@media (max-width: 380px) { .mob_menu_list--redesign { grid-template-columns: 60px minmax(0, 1fr) 56px; gap: 7px; }.nav-game-button { width: 60px !important; height: 60px !important; }.nav-avatar-button { width: 56px !important; height: 56px !important; }.nav-middle-controls .nav-text-button { font-size: 10px; }.raketa-bet-tabs { margin-bottom: 38px; }.raketa-amount-row { grid-template-columns: 39px minmax(0, 1fr) 84px; }.raketa-amount-row > span { font-size: 27px; }.raketa-amount-row .raketa-modal-field { font-size: 29px; }.raketa-amount-row button { font-size: 17px; } }

/* Navigation and market behavior. */
html, body { height: auto !important; min-height: 100%; overflow-x: hidden !important; overflow-y: auto !important; touch-action: auto !important; }
body.friends-active, html:has(body.friends-active), body.friends-active .app-container { height: auto !important; min-height: 100svh !important; overflow: visible !important; touch-action: auto !important; }
.upgrade-section { touch-action: pan-y !important; }
.app-container:has(#profile-section:not(.hidden)) { padding-top: calc(var(--header-h) + 8px); }
.top_nav .nav_topup-plus { background: #ffca5a !important; color: #000 !important; }
.mobile-menu-container { background: transparent !important; box-shadow: none !important; }
.nav-game-button { border-color: #4c4c51 !important; background: #303033 !important; color: #a7a7ad !important; box-shadow: 0 9px 22px rgba(0,0,0,.22) !important; }
.nav-game-button.active, .nav-game-button:active { border-color: #5a8ff1 !important; background: #4e83ed !important; color: #fff !important; box-shadow: 0 9px 22px rgba(42,100,206,.35) !important; }
.nav-menu-icon { font-size: 27px; line-height: 1; }
.nav-middle-controls .nav-text-button { display: flex; flex-direction: row; gap: 5px; }
.nav-middle-controls .nav-text-button > span { font-size: 16px; line-height: 1; }
.market-sort-row { width: 100%; border: 0; background: transparent; color: #a2a2a7; text-align: left; cursor: pointer; }
.market-gift-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
.market-gift-card { display: block; min-height: 0; padding: 9px; border: 1px solid #373737; border-radius: 18px; background: #1b1b1b; }
.market-gift-media { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; }
.market-gift-copy { padding: 10px 1px 8px; }.market-gift-copy strong { font-size: 14px; }.market-gift-copy span { font-size: 11px; }
.market-buy-btn { width: 100%; min-width: 0; border-radius: 20px; }
#profile-section:not(.hidden) .profile-container, #profile-section:not(.hidden) .balance-section, #profile-section:not(.hidden) .free-case-banner, #profile-section:not(.hidden) .ref-promo-activate-btn { display: none; }
#profile-section:not(.hidden) .profile-page { padding-top: 8px; }

/* Inline upgrade picker, TON deposit actions, and stable crash navigation. */
.upgrade-inline-picker { width: 100%; min-height: 260px; border: 1px solid var(--chase-line); border-radius: 20px; background: var(--chase-surface); overflow: hidden; }
.upgrade-inline-picker .upgrade-picker-header { min-height: 48px; margin: 0; padding: 14px 16px 8px; }
.upgrade-inline-picker .upgrade-picker-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; padding: 0 10px 14px; overflow: visible; }
.upgrade-inline-picker .upgrade-picker-item { min-height: 0; }
.upgrade-inline-picker .upgrade-picker-item video, .upgrade-inline-picker .upgrade-picker-item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.upgrade-inline-picker .upgrade-picker-empty { grid-column: 1 / -1; min-height: 180px; }
.upgrade-reference-tab.active { background: var(--chase-blue); color: #fff; }

#depositTonContent .deposit-ton-block { display: flex; min-height: 100%; flex-direction: column; }
#depositTonContent #tonConnectWrap, #depositTonContent #tonDepositBtnWrap { width: 100%; margin-top: auto; }
#depositTonContent .ton-connect-custom-btn, #depositTonContent .ton-deposit-btn { width: 100%; }
.deposit-ton-input-icon { object-fit: contain; }

#depositGiftContent .deposit-gift-steps li::before,
#depositGiftContent .deposit-gift-steps li:nth-child(1)::before,
#depositGiftContent .deposit-gift-steps li:nth-child(2)::before,
#depositGiftContent .deposit-gift-steps li:nth-child(3)::before { content: ""; background: #f4f4f5 url("/images/gift.svg") center / 29px 29px no-repeat; }

.nav-menu-icon svg, .nav-text-button > span svg { display: block; width: 22px; height: 22px; }
body.raketa-active .top_nav, body.raketa-active .mobile-menu-container { left: 50% !important; right: auto !important; width: 100% !important; max-width: 480px !important; transform: translateX(-50%) !important; }
body.raketa-active .mobile-menu-container { bottom: 0 !important; }

/* Final upgrade, deposit, and marketplace corrections. */
.raketa-modal-overlay { z-index: 2000; }

.upgrade-section {
  height: auto !important;
  min-height: calc(100svh - var(--header-h));
  overflow-y: auto !important;
  overscroll-behavior: contain;
  touch-action: pan-y !important;
}

.upgrade-inline-picker .upgrade-picker-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: min(42svh, 410px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.upgrade-inline-picker .upgrade-picker-item {
  gap: 4px;
  padding: 8px 5px;
  border-radius: 10px;
}

.upgrade-inline-picker .upgrade-picker-item img,
.upgrade-inline-picker .upgrade-picker-item video {
  min-width: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.upgrade-inline-picker .upgrade-picker-item-name {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upgrade-result-overlay {
  z-index: 2100;
  align-items: flex-end;
  background: rgba(0, 0, 0, .78);
}

.upgrade-result-box {
  position: relative;
  width: min(100%, 480px);
  min-height: 50svh;
  box-sizing: border-box;
  justify-content: center;
  gap: 12px;
  padding: 52px 24px 122px;
  border: 1px solid #424247;
  border-radius: 28px 28px 0 0;
  background: #202022;
}

.upgrade-result-image {
  display: block;
  width: min(58vw, 220px);
  height: min(58vw, 220px);
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .32));
}

.upgrade-result-title {
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upgrade-result-sub {
  max-width: 300px;
  color: #99999f;
  font-size: 14px;
  line-height: 1.4;
}

.upgrade-result-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #3a3a3d;
  color: #aaaab0;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.upgrade-result-actions {
  position: absolute;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  left: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.upgrade-result-actions button {
  min-height: 64px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
}

.upgrade-result-take { background: #4e83ed; color: #fff; }
.upgrade-result-sell { display: grid; place-items: center; gap: 2px; background: #343437; color: #5e95f4; }
.upgrade-result-sell span { font-size: 15px; }
.upgrade-result-sell b { color: #92b9ff; font-size: 12px; }
.upgrade-result-sell:disabled { opacity: .55; }

.deposit-tab .deposit-tab-gift-icon img { filter: invert(1); }
.deposit-tab.active .deposit-tab-gift-icon img { filter: invert(1); }

/* Keep the amount and GRAM icon together in the visual centre above the bonus. */
#depositTonContent .deposit-ton-block { justify-content: center; }
#depositTonContent #tonAmountFormGroup {
  flex: 0 0 auto;
  order: 1;
  width: 100%;
  margin: auto 0 0;
}
#depositTonContent .deposit-ton-boost { order: 2; margin: 14px auto auto; }
#depositTonContent .deposit-ton-wallet-hint { order: 3; margin: 12px 0 auto; }
#depositTonContent .deposit-ton-rate { order: 4; }
#depositTonContent #tonPromoFormGroup { order: 5; }
#depositTonContent #tonConnectWrap,
#depositTonContent #tonDepositBtnWrap { order: 6; }

@media (max-width: 360px) {
  .upgrade-inline-picker .upgrade-picker-item-name { font-size: 10px; }
  .upgrade-inline-picker .upgrade-picker-item-val { font-size: 11px; }
  .upgrade-result-actions { gap: 7px; }
  .upgrade-result-actions button { font-size: 14px; }
}

/* Crash bet sheet: SVG icons, full gift picker, and aligned controls. */
.svg-icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.raketa-modal-sheet { max-height: min(88svh, 720px); padding: 18px 16px 0; overflow-y: auto; }
.raketa-modal-close { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; line-height: 1; font-size: 28px; }
.raketa-bet-tabs { width: calc(100% - 76px); min-height: 56px; margin: 0 76px 24px 0; }
.raketa-bet-tab { height: 46px; font-size: 16px; }
.raketa-form-label { margin: 0 0 10px; font-size: 18px; }
.raketa-amount-row { grid-template-columns: 38px minmax(0, 1fr) 90px; height: 76px; padding: 0 7px 0 17px; border-radius: 38px; }
.raketa-amount-icon { width: 26px; height: 26px; color: #ffca5a; }
.raketa-amount-row .raketa-modal-field { height: 58px; padding: 0 5px; font-size: 29px; }
.raketa-amount-row button { display: grid; height: 52px; padding: 0; place-items: center; transform: translateY(-3px); border-radius: 26px; font-size: 16px; }
.raketa-quick-amounts { margin: 14px 0 20px; gap: 7px; }
.raketa-quick-amounts button { display: inline-flex; min-width: 0; height: 46px; align-items: center; justify-content: center; gap: 4px; padding: 0 5px; color: #5d93f1; font-size: 14px; line-height: 1; white-space: nowrap; }
.raketa-quick-amounts button svg { width: 14px; height: 14px; flex: 0 0 14px; color: currentColor; }
.raketa-gift-picker { margin: 0 0 18px; }
.raketa-gift-list { max-height: min(43svh, 310px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.raketa-gift-option { min-height: 108px; }
.raketa-gift-option b { display: inline-flex; align-items: center; gap: 3px; }
.raketa-auto-row { min-height: 78px; padding: 0 14px; border-radius: 24px 24px 0 0; font-size: 16px; }
.raketa-mult-box { height: 50px; gap: 7px; padding: 0 6px; }
.raketa-mult-box button,
.raketa-auto-toggle { display: grid; width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; place-items: center; border-radius: 50%; line-height: 1; }
.raketa-mult-box button { font-size: 23px; }
.raketa-auto-toggle { font-size: 22px; }
.raketa-modal-cta { min-height: 68px; height: 68px; margin: 0; border-radius: 0 0 28px 28px; background: #4e83ed; color: #fff; }
.raketa-user-balance .raketa-plus-btn { display: grid; place-items: center; background: #4e83ed !important; color: #fff; line-height: 1; }
.raketa-balance-icon { width: 16px; height: 16px; color: #ffca5a; }

/* Deposit sheet final alignment override. */
#depositStarsContent .deposit-stars-amount-inline,
#tonAmountFormGroup .deposit-ton-amount-inline {
  width: min(100%, 280px) !important;
  margin: 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

#depositStarsContent .deposit-stars-input-icon {
  order: 1 !important;
  width: 44px !important;
  height: 44px !important;
}

#depositStarsContent .deposit-input-inblock {
  order: 2 !important;
  width: 160px !important;
  text-align: center !important;
}

#tonAmountFormGroup .deposit-input-inline {
  order: 1 !important;
  width: clamp(90px, 24vw, 128px) !important;
  padding-left: 0 !important;
  background-image: none !important;
  text-align: right !important;
}

#tonAmountFormGroup .deposit-ton-input-icon {
  order: 2 !important;
  display: block !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  object-fit: contain;
}

#tonAmountFormGroup .deposit-ton-amount-inline { gap: 8px !important; }

/* The upgrade choices live directly below their two tabs. */
.upgrade-inline-picker { min-height: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.upgrade-inline-picker .upgrade-picker-header { display: none; }
.upgrade-inline-picker .upgrade-picker-list { padding: 0; }

/* A denser marketplace without one broken media URL blocking the catalogue. */
.market-gift-list { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 7px; }
.market-gift-card { padding: 7px; border-radius: 12px; }
.market-gift-media { border-radius: 9px; }
.market-gift-copy { padding: 7px 1px 6px; }
.market-gift-copy strong { font-size: 12px; }
.market-gift-copy span { font-size: 10px; }
.market-buy-btn { min-height: 36px; padding: 7px 3px; border-radius: 18px; font-size: 11px; }

@media (max-width: 360px) {
  .raketa-bet-tabs { margin-bottom: 18px; }
  .raketa-amount-row { grid-template-columns: 32px minmax(0, 1fr) 76px; }
  .raketa-amount-row .raketa-modal-field { font-size: 25px; }
  .raketa-quick-amounts button { gap: 2px; font-size: 12px; }
  .raketa-quick-amounts button svg { width: 12px; height: 12px; flex-basis: 12px; }
}

/* Final fixes requested for market, upgrade, deposit, and header controls. */

.upgrade-section {
  position: relative !important;
  inset: auto !important;
  width: min(100%, 480px) !important;
  height: auto !important;
  min-height: auto !important;
  margin: 0 auto !important;
  padding: 10px 12px calc(110px + var(--safe-bottom)) !important;
  overflow: visible !important;
  background: #131418 !important;
  touch-action: pan-y !important;
}

.upgrade-section .upgrade-ring-wrapper {
  width: min(62vw, 250px) !important;
  flex: 0 0 auto;
}

.upgrade-section .upgrade-multipliers,
.upgrade-section .upgrade-reference-picker,
.upgrade-section .upgrade-btn {
  flex: 0 0 auto;
}

.upgrade-inline-picker {
  display: block;
  min-height: 0 !important;
  flex: 0 0 auto;
  overflow: visible !important;
}

.upgrade-inline-picker .upgrade-picker-list {
  min-height: 0;
  padding: 0 0 8px !important;
  overflow: visible !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.upgrade-picker-item.selected {
  border-color: #4e83ed !important;
  background: rgba(78, 131, 237, 0.22) !important;
  box-shadow: 0 0 0 1px rgba(78, 131, 237, 0.38), 0 8px 22px rgba(42, 100, 206, 0.22);
}

.upgrade-picker-item.selected .upgrade-picker-item-name {
  color: #fff;
}

#depositStarsContent .deposit-field-block,
#tonAmountFormGroup {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

#depositStarsContent .deposit-stars-amount-inline,
#tonAmountFormGroup .deposit-ton-amount-inline {
  min-height: 140px !important;
  align-items: center !important;
  justify-content: center !important;
}

.deposit-ton-boost {
  order: 2 !important;
  margin: 0 auto 10px !important;
}

.deposit-ton-wallet-hint {
  order: 3 !important;
  margin: 0 0 14px !important;
}

#tonConnectWrap,
#tonDepositBtnWrap {
  order: 4 !important;
}

.top_nav .nav_topup-plus,
.raketa-plus-btn,
.market-topup-btn {
  background: #ffca5a !important;
  color: #000 !important;
}

.market-modal-sheet {
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 30px 18px calc(20px + var(--safe-bottom)) !important;
  border-right: 0 !important;
  border-left: 0 !important;
  border-radius: 28px 28px 0 0 !important;
}

.market-modal-close {
  top: 14px !important;
  right: 16px !important;
  display: grid !important;
  width: 42px !important;
  height: 42px !important;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 50% !important;
  background: #303033 !important;
  color: #d8d8dc !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  font-size: 30px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
}

.market-buy-btn,
.market-modal-cta,
.market-modal-cta-blue {
  background: #ffca5a !important;
  color: #000 !important;
}

.top_nav .user__profile.admin-clickable {
  cursor: pointer;
}

body .raketa-user-balance .raketa-plus-btn,
body.raketa-active .raketa-user-balance .raketa-plus-btn,
#raketaPlusBtn {
  background: #ffca5a !important;
  color: #000 !important;
}

.market-modal-close {
  color: transparent !important;
  text-indent: 0 !important;
}

.market-modal-close::before {
  content: "×";
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #d8d8dc;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  text-align: center;
}

body.upgrade-active,
html:has(body.upgrade-active) {
  height: 100svh !important;
  overflow: hidden !important;
  touch-action: none !important;
}

body.upgrade-active .app-container {
  height: 100svh !important;
  min-height: 0 !important;
  padding-top: var(--header-h) !important;
  overflow: hidden !important;
}

body.upgrade-active .top_nav {
  position: fixed !important;
  z-index: 80 !important;
}

body.upgrade-active .upgrade-section {
  position: fixed !important;
  top: var(--header-h) !important;
  right: 0 !important;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom)) !important;
  left: 0 !important;
  display: flex !important;
  width: min(100%, 480px) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 6px 12px 10px !important;
  gap: 8px !important;
  overflow: hidden !important;
  background: #131418 !important;
  touch-action: none !important;
}

body.upgrade-active .upgrade-section .upgrade-title {
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1.1;
}

body.upgrade-active .upgrade-section .upgrade-ring-wrapper {
  width: min(52vw, 210px) !important;
  flex: 0 0 auto !important;
  margin: 0 auto !important;
}

body.upgrade-active .upgrade-section .upgrade-multipliers {
  gap: 5px !important;
}

body.upgrade-active .upgrade-section .upgrade-multiplier {
  min-height: 34px !important;
  font-size: 13px !important;
}

body.upgrade-active .upgrade-section .upgrade-btn {
  min-height: 46px !important;
}

body.upgrade-active .upgrade-inline-picker {
  display: flex !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

body.upgrade-active .upgrade-inline-picker .upgrade-picker-list {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 0 6px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
}

.upgrade-picker-item {
  position: relative;
}

.upgrade-picker-item.disabled {
  cursor: default !important;
  pointer-events: none;
  opacity: 0.38;
  filter: grayscale(1);
}

.upgrade-picker-item.selected {
  pointer-events: auto;
  border-color: #4e83ed !important;
  background: rgba(78, 131, 237, 0.26) !important;
  filter: none;
  opacity: 1;
}

.upgrade-picker-cancel {
  position: absolute;
  z-index: 4;
  top: 7px;
  right: 7px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #4b4b50;
  color: #d7d7dc;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

/* Final mobile game layout overrides. Keep the upgrade game at the top while
   allowing the currently open gift list to handle vertical swipes. */
body.upgrade-active,
html:has(body.upgrade-active) {
  overflow: hidden !important;
  touch-action: auto !important;
}

body.upgrade-active .app-container,
body.upgrade-active .upgrade-section {
  touch-action: auto !important;
}

body.upgrade-active .upgrade-section {
  flex-direction: column !important;
  overscroll-behavior: none;
}

body.upgrade-active .upgrade-inline-picker {
  display: flex !important;
  flex: 1 1 0 !important;
  flex-direction: column !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.upgrade-active .upgrade-inline-picker .upgrade-picker-header {
  flex: 0 0 auto !important;
}

body.upgrade-active .upgrade-inline-picker .upgrade-picker-list {
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  touch-action: pan-y !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* The crash header has its own plus button, so give it an explicit final skin. */
#crash-section .raketa-user-balance .raketa-plus-btn,
#crash-section #raketaPlusBtn {
  display: grid !important;
  place-items: center !important;
  background: #ffca5a !important;
  color: #121212 !important;
  border: 0 !important;
  line-height: 1 !important;
}

/* Compact, readable in-app alerts. */
.toast-container {
  top: calc(12px + var(--safe-top)) !important;
  right: 12px !important;
  left: 12px !important;
  max-width: min(420px, calc(100vw - 24px)) !important;
  gap: 8px !important;
}

.toast {
  min-height: 58px;
  padding: 11px 12px !important;
  gap: 10px !important;
  border: 1px solid #45454b !important;
  border-radius: 14px !important;
  background: #252529 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.toast-icon-wrap {
  width: 30px !important;
  height: 30px !important;
  color: #151515;
  background: #ffca5a !important;
}

.toast-success { border-color: #4f795f !important; }
.toast-success .toast-icon-wrap { background: #67d391 !important; }
.toast-error { border-color: #9c4b53 !important; }
.toast-error .toast-icon-wrap { background: #ff777d !important; }
.toast-warning { border-color: #9e803c !important; }
.toast-warning .toast-icon-wrap { background: #ffca5a !important; }
.toast-info { border-color: #57575d !important; }
.toast-info .toast-icon-wrap { background: #d8d8dc !important; }

.toast-message-simple,
.toast-title {
  color: #fff;
  font-weight: 600;
}

.toast-message { color: #c9c9ce; }

.toast-close {
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  place-items: center;
  border-radius: 50% !important;
  background: #38383d !important;
  color: #d8d8dc !important;
}

/* Upgrade: the game itself is always the first visible surface. */
body.upgrade-active .upgrade-section {
  z-index: 90 !important;
  background: #131418 !important;
}

body.upgrade-active .upgrade-section.upgrade-lost .upgrade-chance-pct,
body.upgrade-active .upgrade-section.upgrade-lost .upgrade-chance-label {
  color: #ff6f75 !important;
  -webkit-text-fill-color: #ff6f75 !important;
}

body.upgrade-active .upgrade-section.upgrade-lost .upgrade-ring-win {
  stroke: #ff6f75 !important;
  filter: drop-shadow(0 0 7px rgba(255, 111, 117, 0.45));
}

/* A won gift must be above the mobile navigation as well as the game. */
#upgradeResultOverlay {
  z-index: 10050 !important;
}

/* Inventory is a page grid, not a grey panel. */
#profile-section:not(.hidden) .profile-page {
  padding: calc(var(--header-h) + 2px) 12px calc(100px + var(--safe-bottom)) !important;
}

#profile-section:not(.hidden) .profile-content-wrapper,
#profile-section:not(.hidden) .profile_content_wrapper.items_content {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-section:not(.hidden) .profile_content-head {
  display: none !important;
}

#profile-section:not(.hidden) .profile_content-head-label {
  color: #fff !important;
  font-size: 22px;
  font-weight: 700;
}

#profile-section:not(.hidden) .btn_sale_all {
  display: none !important;
}

#profile-section:not(.hidden) .profile_items_list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#profile-section:not(.hidden) .profile_items_list_item {
  min-width: 0;
  padding: 4px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
}

#profile-section:not(.hidden) .profile_items_list_item > img,
#profile-section:not(.hidden) .profile_items_list_item .profile-item-video {
  width: 100% !important;
  height: auto !important;
  margin: 0 0 5px !important;
  border-radius: 7px !important;
}

#profile-section:not(.hidden) .profile_items_name {
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profile-section:not(.hidden) .profile_items_price,
#profile-section:not(.hidden) .profile_item_actions_list {
  font-size: 11px;
}

/* Inventory selection and collectible gift flow. */
#profile-section:not(.hidden) .profile_items_list_item { position: relative; cursor: pointer; }
#profile-section:not(.hidden) .profile_items_list_item::before { content: ''; position: absolute; z-index: 3; top: 9px; left: 9px; display: grid; width: 21px; height: 21px; place-items: center; border: 2px solid #73757b; border-radius: 50%; background: #5a5c61; color: #fff; font-size: 15px; font-weight: 800; line-height: 1; }
#profile-section:not(.hidden) .inventory-item-selector { position: absolute; z-index: 5; top: 4px; left: 4px; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; }
#profile-section:not(.hidden) .profile_items_list_item.is-selected::before { content: '✓'; border-color: #3e8cff; background: #3e8cff; }
#profile-section:not(.hidden) .profile_items_list_item.is-upgraded > img, #profile-section:not(.hidden) .profile_items_list_item.is-upgraded .profile-item-video { background: radial-gradient(circle at 50% 25%, #718fd5, #414c75 62%, #292d40); }
.inventory-selection-bar { position: fixed; z-index: 90; right: 12px; bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 10px); left: 12px; max-width: 456px; margin: auto; }.inventory-selection-bar.hidden, .inventory-modal.hidden { display: none; }
.inventory-selection-bar button { min-height: 50px; margin: 0; border-radius: 8px; background: #3386e8; color: #fff; font-size: 16px; }.inventory-selection-bar button svg { vertical-align: -3px; margin-left: 5px; }
.inventory-modal { position: fixed; z-index: 2000; inset: 0; display: flex; align-items: flex-end; justify-content: center; }.inventory-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }.inventory-modal__sheet { position: relative; z-index: 1; width: min(100%, 480px); padding: 24px 16px calc(16px + var(--safe-bottom)); border-radius: 8px 8px 0 0; background: #242529; color: #fff; text-align: center; }.inventory-modal__sheet h2 { padding: 0 28px; font-size: 21px; line-height: 1.2; }.inventory-modal__close { position: absolute; top: 6px; right: 8px; width: 36px; height: 36px; margin: 0; padding: 0; border-radius: 50%; background: transparent; color: #aeb0b5; font-size: 28px; }.inventory-modal__random { margin: 5px 0 14px; color: #a8a9af; font-size: 14px; }.inventory-modal__image { display: grid; width: 152px; height: 152px; margin: 0 auto 16px; place-items: center; border-radius: 8px; background: #404146; overflow: hidden; }.inventory-modal__image img, .inventory-modal__image video { width: 100%; height: 100%; object-fit: contain; }.inventory-modal__note { margin: 0 0 16px; padding: 12px; border-radius: 8px; background: #343539; color: #dedfe3; font-size: 14px; line-height: 1.35; text-align: left; }.inventory-modal__actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.inventory-action { min-height: 48px; margin: 0; padding: 8px; border-radius: 8px; font-size: 14px; }.inventory-action--sell { background: #3386e8; color: #fff; }.inventory-action--upgrade { background: #e7e8ea; color: #202124; }.inventory-action--cancel { background: #55575c; color: #fff; }.inventory-action--confirm { background: #f3f3f3; color: #161719; }.inventory-modal__fee { margin: 8px 0 16px; color: #bdbfc4; font-size: 14px; }

/* A win sheet must escape the clipped game surface and cover the bottom navigation. */
body.upgrade-result-open .app-container,
body.upgrade-result-open #upgrade-section { overflow: visible !important; }
body.upgrade-result-open #upgradeResultOverlay { z-index: 10060 !important; }

/* Keep every upgrade control in the first viewport under the header. */
body.upgrade-active #upgrade-section {
  position: fixed !important;
  top: var(--header-h) !important;
  right: 0 !important;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom)) !important;
  left: 0 !important;
  z-index: 120 !important;
  width: min(100%, 480px) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 4px 12px 8px !important;
  overflow: hidden !important;
}

body.upgrade-active #upgrade-section .upgrade-title {
  display: none !important;
}

body.upgrade-active #upgrade-section .upgrade-ring-wrapper {
  width: min(45vw, 186px) !important;
}

.upgrade-picker-guidance {
  display: grid !important;
  min-height: 150px !important;
  place-items: center;
  padding: 22px !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* The crash plus is set here and in JavaScript to defeat legacy blue themes. */
html body #raketaPlusBtn.raketa-plus-btn,
html body .top_nav .nav_topup-plus {
  display: grid !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  margin: 0 5px 0 2px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background-color: #ffca5a !important;
  color: #111 !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  border-color: transparent !important;
}

/* Rocket controls use the shared Stars icon and do not inherit generic button offsets. */
.raketa-balance-icon,
.raketa-amount-icon,
.raketa-quick-amounts button svg { color: #ffca5a !important; }
.raketa-mult-box { overflow: hidden; }
.raketa-mult-box button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

/* Final Rocket sheet layout overrides. */
body .raketa-bet-tabs {
  width: min(100% - 76px, 320px) !important;
  min-height: 44px !important;
  margin: 0 auto 16px !important;
  padding: 3px !important;
  border-radius: 23px !important;
}
body .raketa-bet-tab { height: 36px !important; border-radius: 19px !important; font-size: 14px !important; }
body .raketa-auto-row { grid-template-columns: 1fr auto auto !important; column-gap: 8px !important; }
body .raketa-auto-toggle { margin: 0 !important; }
body .raketa-gift-list {
  display: flex !important;
  gap: 8px !important;
  max-height: none !important;
  padding: 2px 1px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
body .raketa-gift-option {
  width: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
  height: 68px !important;
  margin: 0 !important;
  padding: 3px !important;
  scroll-snap-align: start;
}
body .raketa-gift-option img { width: 100% !important; height: 100% !important; }
body .raketa-gift-option b { display: none !important; }

/* Each gift remains a separate, touch-friendly tile in the horizontal rail. */
body .raketa-gift-option {
  position: relative !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #3d3d41 !important;
  overflow: hidden !important;
}
body .raketa-gift-option.active { box-shadow: 0 0 0 2px #4e83ed !important; }
body .raketa-gift-option img { border-radius: 0 !important; background: transparent !important; object-fit: contain !important; }
body .raketa-gift-price {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  display: inline-flex;
  min-height: 17px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 5px;
  background: rgba(28, 29, 32, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}
body .raketa-gift-price-icon { width: 11px !important; height: 11px !important; flex: 0 0 11px; }

/* One full-screen, scrollable upgrade surface on phones and desktop. */
body.upgrade-active .app-container { padding: 0 !important; overflow: visible !important; }
body.upgrade-active #upgrade-section {
  position: fixed !important;
  top: var(--safe-top) !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 120 !important;
  display: flex !important;
  width: min(100%, 480px) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 8px 12px calc(96px + var(--safe-bottom)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  background: #131418 !important;
}

/* Stable, first-viewport upgrade controls. Only the item grid scrolls. */
body.upgrade-active #upgrade-section {
  top: 0 !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 0 12px calc(82px + var(--safe-bottom)) !important;
  overflow: hidden !important;
}
body.upgrade-active #upgrade-section .upgrade-ring-wrapper {
  width: min(42vw, 168px) !important;
  margin: 0 auto !important;
}
body.upgrade-active #upgrade-section .upgrade-multipliers {
  flex: 0 0 auto !important;
  min-height: 32px !important;
}
body.upgrade-active #upgrade-section .upgrade-multiplier { min-height: 32px !important; }
body.upgrade-active #upgrade-section .upgrade-btn { min-height: 42px !important; }
body.upgrade-active .upgrade-picker-panel {
  display: flex !important;
  width: 100% !important;
  min-height: 0 !important;
  flex: 1 1 0 !important;
  flex-direction: column !important;
  border-radius: 10px !important;
  background: #303034 !important;
  overflow: hidden !important;
}
body.upgrade-active .upgrade-reference-picker {
  width: auto !important;
  min-height: 44px !important;
  margin: 7px 7px 0 !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: #424247 !important;
}
body.upgrade-active .upgrade-reference-tab {
  min-height: 36px !important;
  border-radius: 5px !important;
  font-size: 13px !important;
}
body.upgrade-active .upgrade-inline-picker {
  display: flex !important;
  min-height: 0 !important;
  flex: 1 1 0 !important;
  flex-direction: column !important;
  padding: 7px !important;
  background: transparent !important;
  overflow: hidden !important;
}
body.upgrade-active .upgrade-inline-picker .upgrade-picker-list {
  display: grid !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
  padding: 0 !important;
  overflow-y: auto !important;
}

/* Catalogue card buttons only; marketplace modals retain their current style. */
#market-section .market-buy-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: #3386e8 !important;
  color: #fff !important;
}
#market-section .market-buy-btn .market-btn-star,
#market-section .market-buy-btn .market-btn-star path { fill: #ffca5a !important; }

/* Keep the modal close control clear and the bet-mode controls in its own corner. */
#raketaBetModal .raketa-modal-sheet { position: relative !important; padding-top: 68px !important; }
#raketaBetModal .raketa-modal-close { position: absolute !important; z-index: 2 !important; top: 12px !important; right: 12px !important; }
#raketaBetModal .raketa-bet-tabs {
  position: absolute !important;
  top: 14px !important;
  left: 16px !important;
  width: 200px !important;
  min-height: 38px !important;
  margin: 0 !important;
}
#raketaBetModal .raketa-bet-tab { height: 32px !important; font-size: 13px !important; }

/* Gift cards reserve a dedicated lower strip for their price. */
body .raketa-gift-option {
  width: 94px !important;
  min-width: 94px !important;
  height: 112px !important;
  min-height: 112px !important;
  padding: 6px !important;
}
body .raketa-gift-option img {
  height: 78px !important;
  object-fit: contain !important;
}
body .raketa-gift-price {
  right: 6px !important;
  bottom: 6px !important;
  left: 6px !important;
  min-height: 20px !important;
  border-radius: 4px !important;
  background: rgba(28, 29, 32, 0.76) !important;
  font-size: 11px !important;
}

/* Single-case opening screen, matching the supplied case reference. */
#case-opening.active {
  min-height: 100svh;
  margin-top: var(--header-h) !important;
  padding: 0 0 calc(136px + var(--safe-bottom));
  background: #131418 !important;
}
#case-opening #caseHeader {
  position: relative;
  z-index: 4;
  height: 108px;
  min-height: 108px;
  padding: 0 16px !important;
  box-sizing: border-box;
  background: transparent;
}
#case-opening #caseHeader > div { height: 100%; }
#case-opening #caseHeader .absolute.inset-0 { align-items: flex-end !important; padding-bottom: 10px; }
#case-opening #caseHeader #caseTitle {
  max-width: 62vw;
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#case-opening .case-back-btn {
  position: absolute !important;
  top: 10px;
  left: 12px;
  width: auto !important;
  min-width: 108px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 24px !important;
  background: #1d1d1f !important;
  color: #fff;
}
#case-opening .case-back-btn::after { content: 'Назад'; margin-left: 5px; font-size: 16px; font-weight: 700; }
#caseVisualContainer.slot-mode {
  display: block !important;
  min-height: 270px !important;
  height: 270px !important;
  margin: 0 !important;
  contain: none;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 16%, #5a2915 0%, #331509 55%, #170a05 100%) !important;
}
#case-opening .case_opening_process {
  width: 100% !important;
  height: 270px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#case-opening .case_opening_items_list {
  height: 270px !important;
  padding: 28px 0 !important;
}
#case-opening .case_opening_items {
  gap: 12px !important;
}
#case-opening .slot-card {
  flex: 0 0 154px !important;
  width: 154px !important;
  height: 204px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: rgba(104, 55, 35, .72) !important;
  box-shadow: none !important;
}
#case-opening .slot-card-img { height: 146px !important; padding: 12px 8px 4px !important; }
#case-opening .slot-card-img img { max-width: 126px !important; max-height: 126px !important; }
#case-opening .slot-card-name { font-size: 12px !important; }
#case-opening .slot-card-bar { height: 4px !important; }
#case-opening .slot-fade.left { width: 26% !important; background: linear-gradient(90deg, rgba(23,10,5,.92), transparent) !important; }
#case-opening .slot-fade.right { width: 26% !important; background: linear-gradient(270deg, rgba(23,10,5,.92), transparent) !important; }
#case-opening .slot-indicator.top-indicator { top: 8px !important; }
#case-opening .slot-indicator.bottom-indicator,
#case-opening .slot-center-line { display: none !important; }
#case-opening .slot-indicator path { stroke: #fff45a !important; }
#case-opening .case-multipliers-row { display: none !important; }
#case-opening #caseDemoMount { display: block !important; flex: 0 0 auto !important; }
#case-opening #caseDemoMount #caseModifiersBlock { display: block !important; width: auto !important; margin: 0; padding: 0; background: transparent; }
#case-opening .case-modifiers-row { width: auto; }
#case-opening .case-modifier-btn {
  position: relative;
  width: 52px;
  min-width: 52px !important;
  min-height: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #4a4a4d;
  color: transparent;
  font-size: 0;
}
#case-opening .case-modifier-btn::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  content: '';
  transition: transform .18s ease;
}
#case-opening .case-modifier-btn.active { background: #4e83ed; color: transparent; }
#case-opening .case-modifier-btn.active::after { transform: translateX(20px); }
#case-opening .case-contents {
  position: relative;
  z-index: 2;
  width: min(100%, 480px);
  margin: -1px auto 0 !important;
  padding: 18px 16px 30px;
  border-radius: 28px 28px 0 0;
  background: #1b1b1d !important;
  color: #fff;
  overflow: hidden;
}
#case-opening .case-sheet-grabber { display: none; }
#case-opening .case-detail-summary { position: relative; min-height: 72px; }
#case-opening .case-detail-label { display: block; margin-bottom: 4px; color: #a7a7ad; font-size: 14px; }
#case-opening .case-detail-summary h3 { margin: 0; color: #fff; font-size: 29px; font-weight: 500; line-height: 1.12; text-align: left; text-transform: none; letter-spacing: 0; opacity: 1; }
#case-opening .case-detail-price { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: #a7a7ad; font-size: 15px; font-weight: 500; }
#case-opening .case-detail-star { width: 16px; height: 16px; flex: 0 0 16px; }
#case-opening .case-demo-row { display: flex; min-height: 48px; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 15px; color: #aaaab0; font-size: 17px; }
#case-opening .case-contents-heading { margin: 26px 0 14px; color: #a7a7ad; font-size: 15px; font-weight: 600; }
#case-opening .case_items_content { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
#case-opening .case_item { min-width: 0; background: transparent !important; }
#case-opening .case_item-img { width: 100%; aspect-ratio: 1; border-radius: 12px; background: #303033; }
#case-opening .case_item-img img,
#case-opening .case_item-img video { width: 100%; height: 100%; object-fit: contain; }
#case-opening .case_item_content { padding: 7px 1px 0; }
#case-opening .case_item_name { display: none; }
#case-opening .case_item-price { justify-content: center; color: #fff; font-size: 15px; font-weight: 700; }
#case-opening #caseOpenBlock {
  position: fixed;
  z-index: 30;
  right: 16px;
  bottom: calc(78px + var(--safe-bottom));
  left: 16px;
  width: auto;
  max-width: 448px;
  margin: 0 auto;
  padding: 0;
}
#case-opening #caseOpenBlock .open-case-button {
  min-height: 52px;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #3386e8 !important;
  color: #fff !important;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
#case-opening #caseOpenBlock .open-case-default { display: inline-flex; align-items: center; gap: 5px; }
#case-opening #caseOpenBlock .open-case-default > span:last-child { color: #dceaff; font-size: 16px; }
#case-opening #caseOpenBlock .open-case-icon { filter: none; }

/* Case opening flow: the action belongs to the sheet, directly below Demo. */
#case-opening.active {
  margin-top: 0 !important;
  min-height: auto;
  padding-bottom: calc(32px + var(--safe-bottom));
}
#case-opening #caseHeader {
  height: 68px;
  min-height: 68px;
}
#case-opening #caseHeader .absolute.inset-0 {
  align-items: center !important;
  padding-bottom: 0;
}
#case-opening .case-back-btn {
  top: 17px;
  left: 4px;
  min-width: 76px !important;
  height: 34px !important;
  padding: 0 9px !important;
  border-radius: 18px !important;
}
#case-opening .case-back-btn::after { font-size: 13px; }
#case-opening #caseTitle {
  max-width: calc(100vw - 96px);
  padding: 0;
  font-size: 32px;
  font-weight: 800;
}
#caseVisualContainer.slot-mode,
#case-opening .case_opening_process,
#case-opening .case_opening_items_list {
  height: 238px !important;
  min-height: 238px !important;
}
#case-opening .case-contents {
  margin-top: 0 !important;
  padding: 18px 16px 28px;
}
#case-opening .case-detail-summary { min-height: 0; }
#case-opening .case-detail-summary h3 { font-size: 25px; }
#case-opening #caseOpenMount { margin-top: 2px; }
#case-opening #caseOpenBlock {
  position: static;
  z-index: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
#case-opening #caseOpenBlock .open-case-button {
  width: 100%;
  min-height: 62px;
  margin: 0 !important;
  padding: 10px 16px;
  border-radius: 12px !important;
  background: #3386e8 !important;
  box-shadow: none;
}
#case-opening #caseOpenBlock .open-case-default {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.15;
}
#case-opening .open-case-title { color: #fff; font-size: 17px; font-weight: 700; }
#case-opening .open-case-subtitle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  gap: 4px;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
  font-weight: 500;
}
#case-opening .open-case-subtitle:empty { display: none; }
#case-opening .open-case-subtitle .case_item-stars-icon { width: 14px; height: 14px; }
#case-opening .case-contents-heading { margin-top: 25px; }

/* A result is a dedicated screen, not a dialog over the game controls. */
.case-win-section {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: none;
  min-height: 100svh;
  box-sizing: border-box;
  padding: calc(28px + var(--safe-top)) 20px calc(22px + var(--safe-bottom));
  overflow: hidden;
  background: linear-gradient(155deg, #187bc1 0%, #0b3c60 43%, #07131d 57%, #000 72%);
  color: #fff;
}
.case-win-section.active { display: flex; flex-direction: column; }
.case-win-meta {
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}
.case-win-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-win-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 58px;
  text-align: center;
}
.case-win-content h1 {
  order: 2;
  margin: 24px 0 10px;
  color: #fff;
  max-width: none;
  overflow: visible;
  color: #fff;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: clip;
  white-space: nowrap;
}
.case-win-image {
  order: 1;
  width: min(38vw, 160px);
  height: min(38vw, 160px);
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .24));
}
.case-win-price {
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
  font-weight: 600;
}
.case-win-star { width: 16px; height: 16px; }
.case-win-demo {
  order: 4;
  min-width: 64px;
  min-height: 30px;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 7px;
  background: #fff;
  color: #111216;
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
}
.case-win-receive-btn {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #121316;
  font-size: 18px;
  font-weight: 600;
}
.case-win-sell-btn {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 16px;
  background: #3386e8;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}
.case-win-sell-btn span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.case-win-sell-star { width: 16px; height: 16px; }
.case-win-sell-btn:disabled { opacity: .65; }
.case-win-receive-btn:disabled { opacity: .65; }

@media (min-width: 700px) {
  .case-win-section { left: 50%; width: min(100%, 520px); transform: translateX(-50%); }
}

/* One compact bottom navigation surface for all primary destinations. */
.mobile-menu-container {
  padding: 0 12px calc(12px + var(--safe-bottom)) !important;
  background: transparent !important;
  pointer-events: none;
}
.mob_menu_list--redesign {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: 100%;
  min-height: 68px;
  padding: 4px !important;
  gap: 0 !important;
  border: 1px solid #444449;
  border-radius: 12px;
  background: #2d2d30;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .22);
  pointer-events: auto;
}
.mob_menu_list--redesign .nav-bottom-item,
.mob_menu_list--redesign .nav-avatar-button {
  display: flex !important;
  width: 100% !important;
  min-width: 0;
  height: 58px !important;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 4px 2px;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #b8b8bd !important;
}
.mob_menu_list--redesign .nav-bottom-item > span,
.mob_menu_list--redesign .nav-bottom-item svg {
  width: 21px;
  height: 21px;
}
.mob_menu_list--redesign .nav-profile-icon,
.mob_menu_list--redesign .nav-profile-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}
.mob_menu_list--redesign .nav-bottom-item small,
.mob_menu_list--redesign .nav-avatar-button small {
  position: static;
  display: block;
  top: auto;
  left: auto;
  overflow: hidden;
  max-width: 100%;
  transform: none;
  color: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mob_menu_list--redesign .nav-bottom-item.active,
.mob_menu_list--redesign .nav-avatar-button.active {
  background: #3c6fca !important;
  color: #fff !important;
}
.mob_menu_list--redesign .nav-avatar-wrap {
  position: relative;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #4e83ed;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.mob_menu_list--redesign #mobileNavAvatar,
.mob_menu_list--redesign #mobileNavAvatarFallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mob_menu_list--redesign #mobileNavAvatar { z-index: 1; object-fit: cover; }
.mob_menu_list--redesign #mobileNavAvatar[src=""] { display: none; }
.mob_menu_list--redesign #mobileNavAvatarFallback { display: grid; place-items: center; }

@media (max-width: 360px) {
  .mobile-menu-container { padding-right: 8px !important; padding-left: 8px !important; }
  .mob_menu_list--redesign .nav-bottom-item small,
  .mob_menu_list--redesign .nav-avatar-button small { font-size: 9px; }
}

/* The games deposit banner is the supplied artwork, with no overlaid copy. */
.games-page-topup {
  display: block;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px;
  background: transparent !important;
  aspect-ratio: 769 / 161;
}
.games-page-topup::after { display: none; }
.games-page-topup img {
  position: static;
  display: block;
  width: 100% !important;
  height: 100%;
  object-fit: cover;
}

/* Supplied Raketka artwork. */
.games-page-card--crash {
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px;
  background: transparent !important;
  aspect-ratio: 1747 / 536;
}
.games-page-card--crash img {
  position: static !important;
  display: block;
  width: 100% !important;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* Supplied cases artwork. */
.games-page-card--cases {
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px;
  background: transparent !important;
  aspect-ratio: 3 / 1;
}
.games-page-card--cases img {
  position: static !important;
  display: block;
  width: 100% !important;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* Supplied upgrades artwork. */
.games-page-card--upgrade {
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px;
  background: transparent !important;
  aspect-ratio: 3 / 1;
}
.games-page-card--upgrade img {
  position: static !important;
  display: block;
  width: 100% !important;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* Final viewport geometry for the fixed bottom navigation. */
:root { --bottom-nav-h: 112px; }

/* The upgrade game starts immediately below the header. The picker alone
   scrolls, so the wheel and controls never require a page scroll to reach. */
body.upgrade-active #upgrade-section:not(.hidden) {
  position: fixed !important;
  top: var(--header-h) !important;
  right: 0 !important;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom)) !important;
  left: 0 !important;
  z-index: 120 !important;
  display: flex !important;
  width: min(100%, 480px) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  background: #131418 !important;
}
body.upgrade-active #upgrade-section .upgrade-title {
  display: block !important;
  flex: 0 0 auto;
  margin: 0 !important;
  color: #fff;
  font-size: 20px !important;
  font-weight: 700;
  line-height: 1.1;
}
body.upgrade-active #upgrade-section .upgrade-ring-wrapper {
  width: min(45vw, 186px) !important;
  flex: 0 0 auto !important;
  margin: 0 auto !important;
}
body.upgrade-active #upgrade-section .upgrade-multipliers,
body.upgrade-active #upgrade-section .upgrade-btn { flex: 0 0 auto !important; }
body.upgrade-active #upgrade-section .upgrade-picker-panel {
  display: flex !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}
body.upgrade-active #upgrade-section .upgrade-inline-picker,
body.upgrade-active #upgrade-section .upgrade-inline-picker .upgrade-picker-list {
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
}
body.upgrade-active #upgrade-section .upgrade-picker-list {
  padding-bottom: 12px !important;
  scroll-padding-bottom: 12px;
}
body.upgrade-active #upgrade-section .upgrade-inline-picker {
  display: flex !important;
  height: 0 !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
}
body.upgrade-active #upgrade-section .upgrade-picker-list {
  display: grid !important;
  height: 0 !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  grid-auto-rows: 142px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-content: start;
  overflow-y: auto !important;
}
body.upgrade-active #upgrade-section .upgrade-picker-item {
  display: flex !important;
  min-width: 0;
  min-height: 142px !important;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  padding: 6px !important;
  overflow: hidden;
  border-radius: 8px;
  background: #303034;
}
body.upgrade-active #upgrade-section .upgrade-picker-item img,
body.upgrade-active #upgrade-section .upgrade-picker-item video {
  display: block;
  width: 100% !important;
  height: 84px !important;
  min-height: 84px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #3a3a3e;
}

/* The profile grid was receiving the header gap twice. */
.app-container:has(#profile-section:not(.hidden)) { padding-top: 0 !important; }
#profile-section:not(.hidden) .profile-page {
  padding-top: calc(var(--header-h) + 6px) !important;
  padding-bottom: calc(var(--bottom-nav-h) + 18px + var(--safe-bottom)) !important;
}

/* Local game banners: no third-party artwork or fragile text embedded in an image. */
.games-page-card--cases,
.games-page-card--upgrade { position: relative; isolation: isolate; }
.games-page-card .games-local-banner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  font-style: normal;
}
.games-local-banner strong,
.games-local-banner small { position: absolute; z-index: 3; left: 24px; color: #fff; text-align: left; }
.games-local-banner strong { top: 29%; font-size: clamp(22px, 7vw, 32px); font-weight: 800; line-height: 1; }
.games-local-banner small { top: 61%; color: rgba(255,255,255,.76); font-size: 13px; font-weight: 600; }
.games-local-banner--cases { background: linear-gradient(110deg, #1968cf 0%, #2386e4 54%, #1670ca 100%); }
.games-local-banner--upgrade { background: linear-gradient(110deg, #254fbd 0%, #5f54cf 55%, #a151c3 100%); }
.games-banner-glow { position: absolute; right: -8%; top: -90%; width: 62%; height: 220%; border-radius: 50%; background: rgba(255,255,255,.16); filter: blur(20px); }
.games-banner-case { position: absolute; z-index: 2; width: 72px; height: 58px; border-radius: 12px; transform: rotate(-10deg); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 12px 20px rgba(4,23,71,.28); }
.games-banner-case::before { position: absolute; top: 0; bottom: 0; left: 31px; width: 10px; border-radius: 2px; background: #ffce58; content: ''; }
.games-banner-case::after { position: absolute; top: 21px; right: 0; left: 0; height: 10px; background: #ffce58; content: ''; }
.games-banner-case--back { right: 19%; top: 22%; background: #406de1; opacity: .78; transform: rotate(12deg) scale(.85); }
.games-banner-case--front { right: 8%; top: 30%; background: #2456c4; }
.games-banner-star { position: absolute; z-index: 3; color: #ffe273; font-style: normal; text-shadow: 0 2px 10px rgba(255,218,91,.7); }
.games-banner-star--one { top: 20%; right: 34%; font-size: 28px; }.games-banner-star--two { right: 5%; bottom: 13%; font-size: 19px; }
.games-banner-gift { position: absolute; z-index: 2; width: 49px; height: 46px; border-radius: 9px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.24), 0 9px 16px rgba(21,17,77,.3); }
.games-banner-gift::before { position: absolute; top: 0; bottom: 0; left: 20px; width: 8px; background: #ffd85e; content: ''; }.games-banner-gift::after { position: absolute; top: 17px; right: 0; left: 0; height: 8px; background: #ffd85e; content: ''; }
.games-banner-gift--from { right: 35%; top: 34%; background: #3261d4; transform: scale(.82); }.games-banner-gift--to { right: 8%; top: 27%; width: 64px; height: 58px; background: #a947ca; }.games-banner-gift--to::before { left: 28px; }.games-banner-gift--to::after { top: 24px; }
.games-banner-arrow { position: absolute; z-index: 3; right: 25%; top: 34%; color: #fff; font-size: 30px; font-style: normal; font-weight: 700; }.games-local-banner--upgrade .games-banner-star--one { top: 12%; right: 16%; }.games-local-banner--upgrade .games-banner-star--two { right: 43%; bottom: 13%; }

/* Case header is a real row, so long names never sit under the Back control. */
#case-opening #caseHeader { height: 62px !important; min-height: 62px !important; padding: 0 12px !important; }
#case-opening #caseHeader .case-header-row { display: flex !important; height: 100%; align-items: center; gap: 10px; }
#case-opening .case-back-btn { position: static !important; display: inline-flex !important; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 34px !important; width: 34px !important; height: 34px !important; padding: 0 !important; }
#case-opening .case-back-btn::after { margin: 0 !important; font-size: 0 !important; }
#case-opening #caseTitle { display: block !important; min-width: 0 !important; max-width: none !important; flex: 1 1 auto; overflow: hidden; transform: none !important; font-size: clamp(19px, 6vw, 26px) !important; line-height: 1.1; text-align: left !important; text-overflow: ellipsis; white-space: nowrap; }

/* Case actions stay full-width and visually distinct from the blue app CTAs. */
#case-opening #caseOpenBlock .open-case-button {
  background: #f3bf42 !important;
  color: #17130a !important;
}
#case-opening #caseOpenBlock .open-case-title,
#case-opening #caseOpenBlock .open-case-subtitle,
#case-opening #caseOpenBlock .open-case-default > span:last-child {
  color: #17130a !important;
}
#case-opening #caseOpenBlock .accelerate-case-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f3bf42;
  border-radius: 12px;
  background: #24211a;
  color: #f8cd62;
  font-size: 16px;
  font-weight: 700;
}
#case-opening #caseOpenBlock .accelerate-case-button:disabled { opacity: .62; }
#case-opening #caseOpenBlock .accelerate-case-button.is-used {
  background: #5a5a5a;
  border-color: #5a5a5a;
  color: #e9e9e9;
}
#case-opening #caseHeader .case-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start;
}
#case-opening .case-back-btn,
#case-opening #caseTitle { align-self: center; }

/* Marketplace: compact catalogue controls. */
.market-page-header { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 6px; padding: 0 2px; }
.market-page-header h1 { margin: 0; color: #fff; font-size: 32px !important; font-weight: 400; }
.market-sort-row { display: inline-flex; width: auto; min-height: 34px; align-items: center; justify-content: flex-start; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; background: transparent; color: #a2a2a7; font-size: 16px; }
.market-sort-icon { width: 16px; height: 16px; opacity: .72; filter: invert(1); }
.market-gift-card { border-color: #343434; border-radius: 18px; background: #202020; }
.market-gift-media { border-radius: 14px; background: #383637; }
.market-gift-copy { padding-bottom: 9px; }
.market-gift-copy strong { font-size: 17px; }
.market-gift-copy span { font-size: 14px; }
.market-buy-btn { min-height: 45px; border-radius: 24px; background: #fff000; color: #17130a; font-size: 16px; }

/* Referral dashboard. */
#friends-section { min-height: calc(100svh - 78px); padding: 18px 14px calc(98px + var(--safe-bottom)); background: transparent; }
/* Continue the referral background through the fixed header area. */
.app-container:has(#friends-section:not(.hidden)) {
  background: radial-gradient(ellipse at 50% -10%, #247c14 0%, #0d3b08 35%, #030804 75%);
}
.app-container:has(#friends-section:not(.hidden)) .top_nav,
.app-container:has(#friends-section:not(.hidden)) .nav_profile { background: transparent !important; }
.friends-active #friends-section {
  position: static !important;
  z-index: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100svh - var(--header-h)) !important;
  padding: 18px 14px calc(98px + var(--safe-bottom)) !important;
  overflow: visible !important;
  touch-action: pan-y !important;
}
.ref-dashboard { width: min(100%, 560px); margin: 0 auto; }
.ref-dashboard-hero { padding: 88px 14px 28px; color: #73ad68; font-size: 21px; font-weight: 500; text-align: center; }.ref-dashboard-hero strong { display: block; color: #fff; font-size: 28px; font-weight: 600; }
.ref-dashboard-card { overflow: hidden; margin-bottom: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 24px; background: #202020; color: #fff; }.ref-dashboard-row { display: flex; min-height: 56px; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #343434; color: #b6b6ba; font-size: 16px; }.ref-dashboard-row button { border: 0; background: transparent; color: #fff; font-size: 16px; }
.ref-income-main { display: flex; align-items: baseline; gap: 4px; padding: 24px 16px; font-size: 24px; }.ref-income-main b { font-size: 30px; }.ref-income-main small { color: #aaa; }
.ref-withdraw-btn { width: 82px; min-width: 82px; min-height: 36px; margin-left: 8px; padding: 0 8px; flex: 0 0 82px; border: 0; border-radius: 18px; background: #fff; color: #171717; font-size: 14px; font-weight: 700; }.ref-withdraw-btn:disabled { opacity: .5; }
.ref-dashboard-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-top: 1px solid #343434; color: #a5a5a9; font-size: 14px; }.ref-dashboard-footer b { display: inline-flex; align-items: center; gap: 4px; color: #fff; }
.ref-volume-main { display: flex; align-items: baseline; gap: 5px; padding: 24px 16px; }.ref-volume-main b { font-size: 30px; }.ref-volume-main span { color: #a2a2a6; font-size: 23px; }.ref-volume-main em { margin-left: auto; color: #fff; font-size: 17px; font-style: normal; }
.ref-stat-card h2 { margin: 0; padding: 17px 16px; border-bottom: 1px solid #343434; font-size: 18px; }.ref-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 20px 16px; }.ref-stat-grid span { display: block; margin-bottom: 8px; color: #aaa; font-size: 15px; }.ref-stat-grid b { display: flex; align-items: center; gap: 5px; font-size: 21px; }
.ref-dash-star { width: 18px; height: 19px; }.ref-dashboard-link { display: flex; width: 100%; min-height: 47px; align-items: center; justify-content: space-between; margin: 22px 0 14px; padding: 0 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: rgba(31,31,31,.82); color: #c0c0c4; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }.ref-dashboard-link span { color: #fff; font-size: 24px; }.ref-dashboard-invite, .ref-levels-ok { width: 100%; min-height: 62px; border: 0; border-radius: 18px; background: #fff; color: #171717; font-size: 20px; font-weight: 700; }
.ref-levels-modal.hidden { display: none; }.ref-levels-modal { position: fixed; z-index: 1200; inset: 0; display: flex; align-items: flex-end; justify-content: center; }.ref-levels-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); }.ref-levels-sheet { position: relative; z-index: 1; width: min(100%, 580px); padding: 12px 16px calc(24px + var(--safe-bottom)); border-radius: 28px 28px 0 0; background: #202020; color: #fff; }.ref-levels-handle { width: 80px; height: 5px; margin: 0 auto 28px; border-radius: 5px; background: #5a5a5d; }.ref-levels-sheet h2 { margin: 0 0 24px; font-size: 25px; }.ref-levels-close { position: absolute; top: 16px; right: 16px; border: 0; background: transparent; color: #aaa; font-size: 28px; }
.ref-level-card { display: grid; grid-template-columns: 92px 1fr 1fr; gap: 10px; align-items: center; min-height: 118px; margin-bottom: 12px; padding: 12px; border-radius: 22px; background: #292929; }.ref-level-card i { width: 78px; height: 78px; border-radius: 22px; background: radial-gradient(circle at 35% 30%, #fff7, transparent 23%), linear-gradient(135deg, var(--level-a), var(--level-b)); transform: rotate(-12deg); box-shadow: inset 0 0 20px #fff5, 0 8px 24px #0008; }.ref-level-card--lime { --level-a:#b5ff3d; --level-b:#08780c; }.ref-level-card--cyan { --level-a:#a7faff; --level-b:#2374a8; }.ref-level-card--violet { --level-a:#ff77ff; --level-b:#5723b5; }.ref-level-card--pink { --level-a:#ff9ce8; --level-b:#b01875; }.ref-level-card b { display: block; margin-bottom: 6px; font-size: 19px; }.ref-level-card span { color: #aaa; font-size: 15px; line-height: 1.35; }.ref-level-card strong { color: #fff; font-size: 18px; }
.ref-people-icon { width: 23px; height: 23px; fill: none; stroke: #fff; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }.ref-accrual-sheet { max-height: min(75svh, 620px); overflow-y: auto; }.ref-accrual-list { display: grid; gap: 8px; padding-bottom: 8px; }.ref-accrual-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 15px; background: #292929; }.ref-accrual-row b, .ref-accrual-row span { display: block; }.ref-accrual-row span { margin-top: 4px; color: #aaa; font-size: 13px; }.ref-accrual-row strong { display: inline-flex; align-items: center; gap: 4px; color: #fff; white-space: nowrap; }.ref-accrual-empty { display: block; padding: 28px 0; color: #aaa; text-align: center; }

/* Compact Rocket bet controls with deliberate breathing room before the form. */
#raketaBetModal .raketa-modal-sheet { padding-top: 62px !important; }
#raketaBetModal .raketa-bet-tabs { top: 14px !important; left: 14px !important; width: 164px !important; min-height: 32px !important; padding: 2px !important; border-radius: 18px !important; }
#raketaBetModal .raketa-bet-tab { height: 28px !important; border-radius: 15px !important; font-size: 12px !important; font-weight: 700; }
#raketaBetModal .raketa-form-label { margin-top: 16px !important; }
#raketaBetModal .raketa-gift-picker { margin-top: 22px !important; margin-bottom: 22px !important; }
#raketaBetModal .raketa-gift-list { padding: 4px 2px 6px !important; }

/* Compact upgrade wheel: labels never reach past the circle. */
body.upgrade-active #upgrade-section .upgrade-chance-label {
  width: min(66%, 112px) !important;
  max-width: 112px !important;
  overflow: hidden;
  color: #a7a7ad !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  text-align: center;
  text-transform: none !important;
  overflow-wrap: anywhere;
}
body.upgrade-active #upgrade-section .upgrade-chance-pct { font-size: 38px !important; }
.upgrade-result-sell b { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.upgrade-result-star { width: 15px; height: 15px; flex: 0 0 15px; }

/* Rocket tabs are a precise two-column control, independent of the close button. */
#raketaBetModal .raketa-bet-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 2px !important;
  width: 174px !important;
  height: 34px !important;
  min-height: 34px !important;
}
#raketaBetModal .raketa-bet-tab {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
}

/* Prevent either active Rocket tab from escaping the segmented control. */
#raketaBetModal .raketa-bet-tabs {
  box-sizing: border-box !important;
  overflow: hidden !important;
  padding: 3px !important;
}
#raketaBetModal .raketa-bet-tab {
  box-sizing: border-box !important;
  max-width: 100% !important;
  margin: 0 !important;
  transform: none !important;
}

/* Preserve each supplied game banner without cropping its embedded copy. */
.games-page-card--cases { aspect-ratio: 807 / 233 !important; }
.games-page-card--upgrade { aspect-ratio: 3 / 1 !important; }
.games-page-card--cases img,
.games-page-card--upgrade img { object-position: center center !important; }

/* Referral promo codes have been retired from the user-facing product. */
#profileRefPromoCard,
.ref-promo-card,
#refCreatePromoModal,
#refActivatePromoModal { display: none !important; }

/* Deposit currencies are treated as one centred amount group: value first, icon second. */
#depositStarsContent .deposit-stars-amount-inline,
#tonAmountFormGroup .deposit-ton-amount-inline {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

#depositStarsContent .deposit-input-inblock,
#tonAmountFormGroup .deposit-input-inline {
  order: 1 !important;
  box-sizing: content-box !important;
  width: var(--amount-value-width, 80px) !important;
  min-width: 48px !important;
  max-width: 180px !important;
  padding: 0 !important;
  text-align: right !important;
}

#depositStarsContent .deposit-stars-input-icon,
#tonAmountFormGroup .deposit-ton-input-icon {
  order: 2 !important;
  flex: 0 0 44px !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
}

/* Gift-deposit steps use semantic, visible icons instead of pseudo-element artwork. */
#depositGiftContent .deposit-gift-steps li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px !important;
}

#depositGiftContent .deposit-gift-steps li::before { display: none !important; }

#depositGiftContent .deposit-gift-step-icon {
  display: grid;
  width: 55px;
  height: 55px;
  flex: 0 0 55px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #1e1e1e;
  font-size: 27px;
  line-height: 1;
}

#depositGiftContent .deposit-gift-project-avatar { background: #f4f4f5; }
#depositGiftContent .deposit-gift-project-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Final referral-balance layout overrides. */
#friends-section .ref-income-main { align-items: center; justify-content: space-between; padding: 18px 16px; }
#friends-section .ref-income-balance { display: grid; grid-template-columns: 18px auto; align-items: center; column-gap: 5px; min-width: 0; }
#friends-section .ref-income-balance .ref-dash-star { grid-row: 1 / span 2; width: 17px; height: 17px; }
#friends-section .ref-income-balance b { font-size: 28px; line-height: 1.05; }
#friends-section .ref-income-balance small { grid-column: 2; color: #a5a5a9; font-size: 12px; line-height: 1.2; }
#friends-section .ref-withdraw-btn { margin-left: 12px; }

.inventory-media { display: grid; width: 100%; min-width: 0; aspect-ratio: 1; place-items: center; overflow: visible; }
.inventory-media--collectible { position: relative; isolation: isolate; background: #31323a; }
.inventory-media-backdrop { position: absolute; z-index: 0; width: 136%; height: 136%; object-fit: cover; filter: blur(18px) saturate(1.25); opacity: .75; }
.inventory-media--collectible { overflow: hidden; }
.inventory-media > img:not(.inventory-media-backdrop) { position: relative; z-index: 1; width: 100%; height: 100%; padding: 7px; box-sizing: border-box; object-fit: contain !important; }
