:root {
  --bg: #041022;
  --bg-2: #071a35;
  --panel: rgba(7, 24, 48, 0.84);
  --panel-2: rgba(9, 31, 63, 0.88);
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(19,223,255,.2);
  --text: #f5f8ff;
  --muted: #89a4cf;
  --cyan: #13dfff;
  --cyan-2: #6dfff4;
  --violet: #d545ff;
  --green: #27ff98;
  --red: #ff6a7f;
  --yellow: #ffd76a;
  --shadow: 0 18px 40px rgba(0,0,0,.32);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 78px;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  height: 100%;
  overflow: hidden;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(13,63,123,.55), transparent 35%),
    linear-gradient(180deg, #06152d 0%, var(--bg) 42%, #020912 100%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select,
a {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

button {
  border: 0;
  cursor: pointer;
}

input {
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.glass {
  background: linear-gradient(180deg, rgba(10,38,82,.95), rgba(5,18,36,.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-soft {
  background: linear-gradient(180deg, rgba(10,33,66,.68), rgba(5,18,36,.82));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-shell {
  width: min(100%, 900px);
  height: 100dvh;
  margin: 0 auto;
  padding: calc(8px + var(--safe-top)) 10px calc(var(--nav-h) + 10px + var(--safe-bottom));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 22px;
  padding: 10px 12px;
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.topbar-compact {
  justify-content: space-between;
}

.topbar-side {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 0;
}

.topbar-left {
  justify-content: flex-start;
}

.topbar-center {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.topbar-right {
  justify-content: flex-end;
}

.brand-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.brand-row-center {
  justify-content: center;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #01131d;
  background: linear-gradient(135deg, var(--yellow), var(--cyan-2));
  box-shadow: 0 8px 24px rgba(19,223,255,.25);
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  word-break: break-word;
}

.subbrand,
.eyebrow,
.rate-label,
.small-note,
.history-meta,
.list-meta {
  color: var(--muted);
}

.subbrand,
.eyebrow,
.rate-label,
.small-note {
  font-size: 12px;
}

.subbrand {
  word-break: break-word;
}

.balance-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  min-width: 92px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--cyan-2);
  font-weight: 800;
  font-size: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}

.balance-card-top {
  justify-content: center;
}

.balance-card-split {
  gap: 8px;
  padding: 6px;
  min-height: 44px;
  min-width: 0;
  border-radius: 16px;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  color: #f5f8ff;
}

.balance-pill-icon {
  font-size: 14px;
  line-height: 1;
}

.stars-pill {
  color: #ffe17b;
  border-color: rgba(255,215,106,.18);
  background: rgba(255,215,106,.08);
}

.ton-pill {
  color: var(--cyan-2);
  border-color: rgba(19,223,255,.18);
  background: rgba(19,223,255,.08);
}

.icon-btn {
  min-height: 42px;
  min-width: 42px;
  width: 42px;
  padding: 0;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.04);
  color: var(--cyan-2);
  border: 1px solid var(--line-strong);
  font-size: 18px;
}

.wallet-top-btn {
  box-shadow: 0 8px 20px rgba(19,223,255,.12);
}

.main-layout {
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.screen {
  display: none;
  min-height: 0;
}

.screen.active {
  display: block;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.screen.active::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.hero-card,
.panel-card,
.wallet-hero {
  border-radius: 26px;
  padding: 14px;
}

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

.panel-head > * {
  min-width: 0;
}

.panel-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  margin-top: 4px;
}

.hero-title.small {
  font-size: 24px;
}

.hero-subtitle {
  margin-top: 6px;
  color: #bfd3f5;
  max-width: 520px;
}

.status-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
  background: rgba(39,255,152,.08);
  border: 1px solid rgba(39,255,152,.16);
}

.game-layout-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.game-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.chip-btn {
  min-height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.05);
  font-size: 12px;
  padding: 0 12px;
  font-weight: 700;
}

.chip-btn-left {
  flex: 0 0 auto;
}

.max-bet-btn {
  min-width: 78px;
  background: linear-gradient(135deg, rgba(255,215,106,.22), rgba(255,215,106,.08));
  border: 1px solid rgba(255,215,106,.2);
  color: #ffe17b;
}

.board-card {
  background: linear-gradient(180deg, rgba(4,24,52,.84), rgba(3,13,28,.92));
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 24px;
  padding: 10px 8px 8px;
  overflow: hidden;
}

.board-card-full {
  flex: 1 1 auto;
  min-height: 0;
}













.control-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 22px;
}

.control-card-simple {
  flex: 0 0 auto;
}



.control-grid-with-max {
  grid-template-columns: 1fr 86px 132px 140px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: 12px;
  color: var(--muted);
}

input {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.97);
  color: #07111f;
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: rgba(19,223,255,.55);
  box-shadow: 0 0 0 3px rgba(19,223,255,.12);
}

.wallet-field input {
  font-size: 13px;
}

.primary-btn,
.secondary-btn,
.buy-btn,
.ton-btn,
.danger-btn,
.small-btn,
.payment-open-link {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 14px;
  font-weight: 800;
  transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}

.primary-btn:active,
.secondary-btn:active,
.buy-btn:active,
.ton-btn:active,
.danger-btn:active,
.small-btn:active,
.tab:active,
.icon-btn:active,
.chip-btn:active,
.quick-bet-btn:active,
.payment-open-link:active {
  transform: scale(.985);
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), #34cfff);
  color: #03111f;
}

.secondary-btn {
  background: linear-gradient(135deg, #6438ff, var(--violet));
  color: #fff;
}

.buy-btn,
.ton-btn,
.payment-open-link {
  background: linear-gradient(135deg, #21daff, #27ffaf);
  color: #02111f;
}

.danger-btn {
  background: linear-gradient(135deg, #ff8b77, var(--red));
  color: #fff;
}



.full-width {
  width: 100%;
}

button:disabled {
  opacity: .65;
  cursor: default;
  transform: none;
}

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

.quick-bet-btn {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}

.quick-bet-btn:hover {
  border-color: rgba(19,223,255,.22);
  box-shadow: 0 8px 20px rgba(19,223,255,.08);
}

.info-grid,
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.stats-grid.single-col {
  grid-template-columns: 1fr;
}

.wallet-layout {
  display: grid;
  gap: 14px;
}

.wallet-rate-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-top: 12px;
  border-radius: 18px;
  background: rgba(4,13,28,.5);
  border: 1px solid rgba(255,255,255,.05);
}

.wallet-rate {
  font-size: 24px;
  font-weight: 800;
}

.rate-sub {
  color: var(--cyan-2);
  font-weight: 700;
}

.wallet-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.summary-chip {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  font-size: 14px;
  max-width: 100%;
  word-break: break-word;
}

.action-stack,
.history-list,
.list-box {
  display: grid;
  gap: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
  align-items: end;
}

.field-row-wide {
  grid-template-columns: 140px 1fr;
}

.ref-link-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
  margin-top: 12px;
}

.history-item,
.list-item,
.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(4,13,28,.56);
  border: 1px solid rgba(255,255,255,.05);
  min-width: 0;
}

.history-item > *,
.list-item > *,
.admin-item > * {
  min-width: 0;
}

.history-item div,
.list-item div,
.admin-item div {
  word-break: break-word;
}

.compact-list .list-item {
  padding: 11px 12px;
}

.live-feed-card {
  margin-top: 12px;
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.small-btn {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
}

.payment-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(19,223,255,.14);
  color: var(--cyan-2);
  font-size: 13px;
  font-weight: 700;
}

.payment-status.is-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: var(--cyan-2);
  animation: payment-spinner .75s linear infinite;
}

@keyframes payment-spinner {
  to { transform: rotate(360deg); }
}

.payment-qr-wrap {
  border-radius: 18px;
  padding: 12px;
  background: rgba(4,13,28,.44);
  border: 1px solid rgba(255,255,255,.05);
}

.payment-qr-box {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.payment-qr-image {
  width: 180px;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: #fff;
  padding: 10px;
}

.payment-qr-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

.payment-open-link {
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pvp-placeholder {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(8px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 16px), 900px);
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  z-index: 40;
}

.bottom-nav-compact {
  grid-template-columns: repeat(3, 1fr);
}

.bottom-nav-3 {
  grid-template-columns: repeat(3, 1fr);
}

.tab {
  min-height: 54px;
  min-width: 0;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  color: #d4e1fb;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
}

.tab span:first-child {
  font-size: 18px;
}

.tab.active {
  background: linear-gradient(135deg, var(--cyan), #7ef9ff);
  color: #02111f;
  box-shadow: 0 10px 26px rgba(19,223,255,.18);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 8px + var(--safe-bottom));
  transform: translateX(-50%) translateY(18px);
  background: rgba(5,18,36,.96);
  border: 1px solid var(--line-strong);
  color: #fff;
  padding: 12px 16px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  box-shadow: var(--shadow);
  z-index: 60;
  max-width: calc(100% - 24px);
  text-align: center;
  word-break: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.win-fx {
  position: fixed;
  left: 50%;
  top: 22%;
  transform: translate(-50%, -50%) scale(.88);
  z-index: 70;
  min-width: 180px;
  max-width: calc(100% - 32px);
  text-align: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(39,255,152,.18), rgba(19,223,255,.2));
  border: 1px solid rgba(39,255,152,.28);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  box-shadow: 0 18px 42px rgba(0,0,0,.34), 0 0 32px rgba(39,255,152,.16);
  opacity: 0;
  pointer-events: none;
}

.win-fx.animate {
  animation: win-pop 1.6s ease forwards;
}

@keyframes win-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.7);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(.96);
  }
}

/* ============================= */
/* BET MODE SWITCH (Stars / TON) */
/* ============================= */











@media (max-width: 780px){
  .brand {
    font-size: 18px;
  }

  .subbrand {
    font-size: 11px;
  }

  

  

  .control-grid-with-max {
    grid-template-columns: 1fr 78px 120px 132px;
  }

  

  
}

@media (max-width: 640px){
  .app-shell {
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: calc(var(--nav-h) + 10px + var(--safe-bottom));
  }

  .topbar {
    padding: 10px;
    border-radius: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 18px;
  }

  .brand {
    font-size: 17px;
  }

  .subbrand {
    display: none;
  }

  .balance-card {
    min-height: 38px;
    min-width: 82px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 12px;
  }

  .balance-card-split {
    min-width: 0;
    padding: 4px;
    gap: 6px;
  }

  .balance-pill {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .icon-btn {
    min-height: 38px;
    min-width: 38px;
    width: 38px;
    border-radius: 12px;
    font-size: 17px;
  }

  .hero-card,
  .panel-card,
  .wallet-hero {
    padding: 12px;
    border-radius: 22px;
  }

  .panel-grid,
  .field-row,
  .field-row-wide,
  .ref-link-row {
    grid-template-columns: 1fr;
  }

  

  .wallet-rate-card,
  .history-item,
  .list-item,
  .admin-item,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-actions .small-btn {
    flex: 1 1 0;
  }

  

  

  .primary-btn,
  .secondary-btn,
  .buy-btn,
  .ton-btn,
  .danger-btn,
  .payment-open-link,
  .max-bet-btn {
    width: 100%;
  }

  .quick-bets {
    grid-template-columns: repeat(2, 1fr);
  }

  

  

  .payment-qr-image {
    width: 160px;
  }

  .win-fx {
    top: 18%;
    font-size: 18px;
    min-width: 150px;
    padding: 12px 14px;
  }
}

@media (max-width: 430px){
  .app-shell {
    padding-bottom: calc(var(--nav-h) + 8px + var(--safe-bottom));
  }

  .topbar {
    gap: 8px;
  }

  .topbar-center {
    flex: 1 1 auto;
  }

  .brand-row-center {
    gap: 8px;
  }

  .brand {
    font-size: 15px;
  }

  .balance-card {
    min-width: 74px;
    font-size: 13px;
  }

  .balance-card-split {
    gap: 4px;
    padding: 4px;
  }

  .balance-pill {
    font-size: 11px;
    min-height: 26px;
    padding: 0 7px;
  }

  .status-pill {
    min-height: 34px;
    font-size: 11px;
    padding: 0 10px;
  }

  .chip-btn {
    min-height: 32px;
    font-size: 11px;
    padding: 0 10px;
  }

  

  .wallet-rate {
    font-size: 20px;
  }

  .board-card {
    padding: 8px 6px 6px;
  }

  

  

  .bottom-nav {
    gap: 6px;
    padding: 6px;
    width: min(calc(100% - 10px), 900px);
  }

  .tab {
    min-height: 50px;
    font-size: 11px;
  }

  .tab span:first-child {
    font-size: 16px;
  }

  .quick-bets {
    gap: 6px;
  }

  .quick-bet-btn {
    min-height: 34px;
    font-size: 12px;
  }

  .payment-qr-image {
    width: 144px;
    padding: 8px;
  }

  .win-fx {
    top: 16%;
    font-size: 16px;
  }
}

/* compact stable game screen overrides */
.balance-card,
.balance-card-split {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: auto !important;
}

.balance-pill {
  background: transparent !important;
  border: 0 !important;
  padding: 0 6px 0 0 !important;
  min-height: 26px !important;
}

.app-shell {
  padding: calc(6px + var(--safe-top)) 8px calc(var(--nav-h) + 8px + var(--safe-bottom));
}

.topbar {
  margin-bottom: 8px;
  padding: 8px 10px;
}

.main-layout {
  overflow: hidden !important;
}

.screen.active {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 10px !important;
}

.hero-card,
.panel-card,
.wallet-hero {
  padding: 10px;
}

.game-layout-card {
  justify-content: flex-start;
}

.compact-head,
.game-mini-head {
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 6px;
}

.board-card {
  padding: 8px 6px 6px;
  border-radius: 20px;
}







.control-card {
  margin-top: 8px;
  padding: 10px;
}

.control-grid-with-max {
  grid-template-columns: 1fr 80px 1fr 108px;
}

.wallet-connect-note {
  margin-top: 6px;
}

.quick-bets {
  margin-top: 8px;
}

.live-feed-card {
  display: none !important;
}

.bottom-nav {
  padding-top: 8px;
}



@media (max-width: 560px){
  .brand {
    font-size: 18px;
  }

  .subbrand {
    font-size: 11px;
  }

  

  

  
}


/* === CUSTOM REAL CHANGES === */
.history-top-btn {
  margin-right: 8px;
  flex: 0 0 auto;
}

.balance-card-split {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-left: 6px;
}

.live-feed-card {
  overflow: hidden;
  border-radius: 18px;
  padding: 8px 10px;
  margin: 0 0 10px;
  flex: 0 0 auto;
}

.live-feed-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  white-space: nowrap;
  animation: live-feed-run 24s linear infinite;
}

.live-feed-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(19,223,255,.14);
  color: #f5f8ff;
  font-size: 12px;
  font-weight: 800;
}

.live-feed-item b {
  color: var(--cyan-2);
}

.live-feed-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@keyframes live-feed-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.wallet-single-grid {
  grid-template-columns: 1fr;
}

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

.wallet-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan-2);
  margin-bottom: 6px;
}

.wallet-divider {
  height: 1px;
  margin: 14px 0;
  background: rgba(255,255,255,.07);
}



.win-fx {
  top: 20%;
  background: linear-gradient(135deg, #13dfff, #8dffb8, #ffd76a);
  color: #03111f;
  border: 0;
  box-shadow: 0 18px 42px rgba(0,0,0,.34), 0 0 32px rgba(19,223,255,.24);
}

.win-fx.animate {
  animation: stake-win-pop 1.7s ease forwards;
}

@keyframes stake-win-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -38%) scale(.65);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  42% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -64%) scale(.94);
  }
}

.win-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 68;
}

.win-particle {
  position: absolute;
  width: 8px;
  height: 18px;
  border-radius: 999px;
  opacity: 0;
  animation: win-particle-fly 1.2s ease-out forwards;
}

@keyframes win-particle-fly {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(.7);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--rot)) scale(1.2);
  }
}



@media (max-width: 640px){
  .history-top-btn {
    margin-right: 6px;
  }

  .balance-card-split {
    margin-left: 2px;
    gap: 4px;
  }

  .live-feed-item {
    padding: 6px 10px;
    font-size: 11px;
  }
}


.quick-bets { display: none !important; }
.history-top-btn { display: inline-grid !important; }





.wallet-top-btn-wide {
  width: auto;
  min-width: 168px;
  padding: 8px 14px;
  grid-auto-flow: column;
  gap: 10px;
  place-items: center start;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20,50,96,.88), rgba(9,29,58,.92));
}

.wallet-top-btn-wide.is-disconnected .wallet-top-value {
  font-size: 18px;
  color: var(--cyan-2);
}

.wallet-top-icon {
  font-size: 18px;
  line-height: 1;
}

.wallet-top-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 2px;
}

.wallet-top-label {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
}

.wallet-top-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.gift-request-row {
  align-items: end;
}

.small-field {
  max-width: 140px;
}

.list-item-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.small-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
}

