/* Lucksy V2 — Responsive */

/* Compact sidebar on small height */
@media (max-height: 900px) {
  .top-bar, .logo { display: none !important; }
  .divider-1 { display: none !important; }
  .nav-item { top: 46px !important; height: 42px !important; width: 175px !important; }
  .nav-item-2 { top: 90px !important; }
  .nav-item-3 { top: 134px !important; }
  .divider-2 { top: 180px !important; }
  .nav-item-4 { top: 192px !important; }
  .nav-item-5 { top: 236px !important; }
  .nav-item-6 { top: 280px !important; }
  .nav-item-7 { top: 324px !important; }
  .divider-3 { top: 370px !important; }
  .nav-item-8 { top: 382px !important; }
  .nav-item-9 { top: 426px !important; }
  .divider-4 { display: none !important; }
  .nav-item-10 { display: none !important; }
  .bottom-bar { bottom: 30px !important; }
  .content-area, .game-area, .chat-area { top: 175px !important; }
}

/* Wide monitors (2560+) — limit max width, center */
@media (min-width: 2200px) {
  body {
    padding: 25px calc((100vw - 1700px) / 2) !important;
  }
}

/* Standard 1920 — default, no changes needed */

/* 1600-1920 — reduce side padding */
@media (max-width: 1920px) {
  body {
    padding: 25px 140px !important;
  }
}

/* 1440 screens */
@media (max-width: 1600px) {
  body {
    padding: 25px 80px !important;
  }
}


/* 1440 — tighter sidebar */
@media (max-width: 1440px) {
  body { padding: 20px 40px !important; }
  .main-container { border-radius: 30px !important; }
  .top-bar, .divider, .nav-item { width: 155px !important; }
  .top-bar { left: 70px !important; }
  .divider { left: 70px !important; }
  .nav-item { left: 70px !important; }
  .logo { left: 86px !important; }
  .divider-vertical { left: 265px !important; }
  .bottom-bar { left: 70px !important; width: 155px !important; }
  /* Shift content */
  .content-area, .game-area, .chat-area { left: 306px !important; }
  .chat-channels { left: 306px !important; width: 170px !important; }
  .chat-area { left: 486px !important; }
  .ticker-wrap, .search-bar { left: 306px !important; right: 46px !important; }
  .wallet-btn { left: 306px !important; }
  /* Toolbar: right-anchored elements stay right, search fills gap */
  .toggle-sound { right: 46px !important; }
  .toggle-theme { right: 98px !important; }
  .toolbar-lang { right: 154px !important; }
  .toolbar-search { left: 470px !important; right: 290px !important; }
}

/* 1280 — icon-only sidebar */
@media (max-width: 1280px) {
  body { padding: 15px 20px !important; }
  .main-container { border-radius: 24px !important; }
  .top-bar span, .nav-item span, .logo span,
  .bottom-name, .bottom-role,
  .divider, .divider-vertical { display: none !important; }
  .top-bar, .nav-item { width: 48px !important; left: 24px !important; }
  .top-bar { padding: 0 !important; justify-content: center !important; display: flex !important; align-items: center !important; }
  .online-dot { position: static !important; transform: none !important; }
  .logo { left: 30px !important; }
  .nav-item img { left: 50% !important; transform: translate(-50%, -50%) !important; }
  .bottom-bar { left: 16px !important; width: 56px !important; padding: 4px !important; }
  .bottom-bar-inner { justify-content: center !important; padding: 0 !important; }
  .bottom-info { display: none !important; }
  .divider-vertical { left: 88px !important; display: block !important; }
  .content-area, .game-area, .chat-area { left: 104px !important; top: 175px !important; right: 26px !important; bottom: 26px !important; }
  .chat-channels { left: 104px !important; top: 175px !important; bottom: 26px !important; width: 160px !important; }
  .chat-area { left: 274px !important; }
  .ticker-wrap, .search-bar { left: 104px !important; right: 26px !important; }
  .wallet-btn { left: 104px !important; }
  .toggle-sound { right: 26px !important; }
  .toggle-theme { right: 78px !important; }
  .toolbar-lang { right: 134px !important; }
  .toolbar-search { left: 268px !important; right: 270px !important; }
  .game-side { width: 220px !important; }
}

/* 1024 — no sidebar */
@media (max-width: 1024px) {
  body { padding: 10px !important; }
  .top-bar, .nav-item, .logo, .bottom-bar,
  .divider, .divider-vertical { display: none !important; }
  .main-container { border-radius: 20px !important; }
  .content-area, .game-area, .chat-area { left: 20px !important; right: 20px !important; top: 175px !important; bottom: 20px !important; }
  .chat-channels { left: 20px !important; top: 175px !important; bottom: 20px !important; width: 140px !important; }
  .chat-area { left: 170px !important; }
  .ticker-wrap, .search-bar { left: 20px !important; right: 20px !important; }
  .wallet-btn { left: 20px !important; }
  .toggle-sound { right: 20px !important; }
  .toggle-theme { right: 72px !important; }
  .toolbar-lang { right: 128px !important; }
  .toolbar-search { left: 186px !important; right: 264px !important; }
  .game-side { width: 200px !important; }
}

/* 768 — mobile-like */
@media (max-width: 768px) {
  .game-area { flex-direction: column !important; }
  .game-side { width: 100% !important; max-height: 200px !important; }
  .toolbar-search { display: none !important; }
  .toolbar-lang { right: 128px !important; }
  .toggle-theme { right: 72px !important; }
  .toggle-sound { right: 20px !important; }
  .wallet-btn { left: 20px !important; }
  .ticker-wrap { right: 20px !important; }
}

/* ─── Унифицированная сетка истории игр ─── */
.hist-row {
  display: grid !important;
  grid-template-columns: minmax(50px, 1fr) auto auto auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 4px !important;
  font-size: 12px !important;
  font-variant-numeric: tabular-nums;
}
.hist-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #84858D; }
.hist-bet, .hist-mult, .hist-profit { text-align: right; white-space: nowrap; }
.hist-mult { color: #616068 !important; font-size: 11px; min-width: 46px; }
.hist-bet { min-width: 58px; }
.hist-profit { min-width: 70px; font-weight: 600; }

/* ─── PC: динамический баланс (кошелёк под длинные числа) ─── */
@media (min-width: 769px) {
  .wallet-btn {
    width: auto !important;
    min-width: 152px !important;
    max-width: 280px !important;
  }
  .wallet-btn-inner { white-space: nowrap; }
  #balanceText { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ─── Карамелька вместо ₽ (CSS-фон, чтобы не мигало при innerHTML) ─── */
.cand { display: inline-block; width: 13px; height: 13px; max-width: 13px; max-height: 13px; vertical-align: -2px; margin-left: 2px; flex-shrink: 0; background: url('/v2/img/confetti.png') center/contain no-repeat; filter: none !important; opacity: 1 !important; }
img.cand { object-fit: contain; }
.ticker-item .cand, .ticker .cand { width: 11px !important; height: 11px !important; max-width: 11px !important; max-height: 11px !important; vertical-align: -1px !important; }
.chat-msg__text .cand, .balance .cand, .wallet-btn .cand, .partner-stat__val .cand { width: 14px; height: 14px; }
/* В больших hero-цифрах карамелька пропорциональная */
.dice-hero__roll .cand, .dice-hero__payout .cand,
.chart-result .cand, .game-hero .cand,
.win-display__val .cand, .play-btn .cand,
.result-msg .cand, .partner-stat__val .cand,
.wager-val .cand, .partner-val .cand,
.payou-amount-val .cand {
  width: 0.75em !important; height: 0.75em !important;
  max-width: 0.75em !important; max-height: 0.75em !important;
  vertical-align: -0.1em !important;
  margin-left: 0.18em !important;
}
