/* bet tracker */
#betBtn { position: relative; white-space: nowrap; }
.bet-badge { margin-left: 7px; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.1); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
#betBtn.win { color: #0b1a07 !important; background: #5fe36b !important; border-color: #5fe36b !important; box-shadow: 0 0 0 0 rgba(95,227,107,.6); animation: bet-win 1.8s ease-out infinite; }
#betBtn.win .bet-badge { background: rgba(0,0,0,.15); }
#betBtn.lost .bet-badge { background: rgba(255,95,87,.2); color: #ff948b; }
@keyframes bet-win { 0% { box-shadow: 0 0 0 0 rgba(95,227,107,.55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(95,227,107,0); } }
@media (prefers-reduced-motion: reduce) { #betBtn.win { animation: none; } }

#betDlg { padding: 16px; }
.bet-headbtns { display: flex; gap: 6px; }
.bet-empty { color: var(--mute); font-size: 13px; margin: 8px 0 12px; }
.bet-sum { margin: 2px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 700; }
.bet-sum.won { border-color: #5fe36b; color: #8ff59a; background: rgba(95,227,107,.08); }
.bet-sum.lost { border-color: rgba(255,95,87,.5); color: #ff948b; }
.bet-leg { position: relative; margin-bottom: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.bet-leg.hit { border-color: rgba(95,227,107,.55); background: rgba(95,227,107,.06); }
.bet-leg.miss { border-color: rgba(255,95,87,.45); background: rgba(255,95,87,.05); }
.bet-top { display: flex; align-items: center; gap: 8px; }
.bet-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.bet-tag { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--mute); }
.bet-leg.hit .bet-tag { color: #8ff59a; }
.bet-leg.miss .bet-tag { color: #ff948b; }
.bet-x { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--mute); font-size: 18px; line-height: 1; cursor: pointer; }
.bet-x:hover { color: var(--text); background: rgba(255,255,255,.08); }
.bet-what { margin-top: 3px; color: #c9d1c2; font-size: 13px; }
.bet-bar { height: 6px; margin: 9px 0 5px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.bet-bar i { display: block; height: 100%; background: var(--accent); transition: width .5s ease; }
.bet-leg.hit .bet-bar i { background: #5fe36b; }
.bet-leg.miss .bet-bar i { background: #ff5f57; }
.bet-num { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bet-game { margin-top: 4px; color: var(--mute); font-size: 11px; }
.bet-actions { display: flex; gap: 8px; justify-content: flex-end; margin: 12px 0 4px; }
.bet-addtoggle { width: 100%; margin-top: 8px; min-height: 40px; }
.bet-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.bet-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mute); }
.bet-field select, .bet-field input, .bet-form select, .bet-form input { width: 100%; box-sizing: border-box; min-height: 42px; margin: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
.bet-seg { display: flex; gap: 6px; }
#betDlg .bet-seg button { background: var(--panel) !important; color: var(--text) !important; flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); cursor: pointer; }
#betDlg .bet-seg button.on { background: var(--accent) !important; border-color: var(--accent); color: #0b1207 !important; font-weight: 700; }
.bet-hint { color: var(--mute); font-size: 12px; }
.bet-msg { min-height: 16px; color: #ff948b; font-size: 12px; }
.bet-toast { position: fixed; left: 50%; bottom: 20px; z-index: 2000; max-width: min(92vw, 420px); padding: 11px 16px; border: 1px solid rgba(95,227,107,.5); border-radius: 10px; background: #0f1a10; color: #b6f7bd; font-size: 13px; font-weight: 700; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.bet-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 700px) {
  #betDlg { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; box-sizing: border-box; }
  #betBtn { flex: 0 0 auto; }
}
