/* ═══════════════════════════════════════
   MLB Betting System v2 — by 龍蝦均 🦞
   FanDuel / DraftKings inspired dark theme
   Mobile-first RWD
   ═══════════════════════════════════════ */

:root {
  --bg-dark:      #0D1117;
  --bg-card:      #161B22;
  --bg-card-alt:  #1C2333;
  --bg-hover:     #21262D;
  --border:       #30363D;
  --text:         #E6EDF3;
  --text-dim:     #8B949E;
  --text-muted:   #6E7681;
  --accent:       #00D4FF;
  --accent2:      #58A6FF;
  --away:         #FF2D7A;
  --away-bg:      rgba(255,45,122,0.12);
  --home:         #00D4FF;
  --home-bg:      rgba(0,212,255,0.12);
  --win:          #2EA043;
  --win-bg:       rgba(46,160,67,0.15);
  --lose:         #DA3633;
  --lose-bg:      rgba(218,54,51,0.15);
  --gold:         #FFD700;
  --gold-dim:     #B8860B;
  --radius:       12px;
  --radius-sm:    8px;
}

* { margin:0; padding:0; box-sizing:border-box; }

html, body {
  background: var(--bg-dark);
  color: var(--text);
  font-family: "PingFang TC","Microsoft JhengHei",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ─── Login Page ─── */
#page-login {
  min-height: 100vh;
  background: linear-gradient(160deg, #0D1117 0%, #161B22 50%, #1a2744 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-brand {
  text-align: center;
  margin-bottom: 20px;
}

.login-brand .logo {
  font-size: 42px;
  line-height: 1;
}

.login-brand h1 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
  letter-spacing: 1px;
}

.login-brand h1 span {
  color: var(--gold);
}

.login-brand p {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 2px;
}

.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  width: 100%;
  max-width: 380px;
}

.login-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.login-tabs button {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.login-tabs button.active {
  color: var(--gold);
}

.login-tabs button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  background: #0D1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  width: 100%;
}

.btn-gold:hover { opacity: 0.9; }

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover { background: var(--bg-hover); }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-block { width: 100%; }

/* Settlement status icons */
.badge.pending { color: #FFD700; }
.badge.win { color: #2EA043; }
.badge.lose { color: #DA3633; }

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 12px;
}

.alert-danger {
  background: var(--lose-bg);
  color: var(--lose);
  border: 1px solid rgba(218,54,51,0.3);
}

.alert-success {
  background: var(--win-bg);
  color: var(--win);
  border: 1px solid rgba(46,160,67,0.3);
}

.hidden { display: none !important; }

/* ─── App Shell ─── */
#page-app { display: flex; flex-direction: column; min-height: 100vh; }

/* ─── Top Header ─── */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
}

.app-brand .logo-icon { font-size: 22px; }
.app-brand .brand-text { color: var(--gold); }

.user-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 20px;
  white-space: nowrap;
}

.user-icon { font-size: 12px; }
.user-name { font-size: 12px; font-weight: 600; color: var(--accent); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

.balance-badge {
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.balance-badge .label { color: var(--gold-dim); font-weight: 500; font-size: 11px; }
.balance-badge .amount { color: var(--gold); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-logout:hover { color: var(--text); border-color: var(--text-dim); }

/* ─── Navigation Tabs ─── */
.app-tabs {
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.app-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-btn.active { color: var(--accent); }
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ─── Tab Content ─── */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── Games Tab ─── */
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.page-heading h2 {
  font-size: 17px;
  font-weight: 700;
}

.game-count {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-card-alt);
  padding: 3px 10px;
  border-radius: 10px;
}

.btn-refresh {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-refresh:hover { color: var(--text); }

/* ─── Date Tabs ─── */
.date-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  overflow-x: auto;
}

.date-tab {
  flex-shrink: 0;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 16px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-tab.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.date-count {
  font-size: 11px;
  background: rgba(255,255,255,0.15);
  padding: 1px 7px;
  border-radius: 8px;
  font-weight: 700;
}

.date-tab.active .date-count {
  background: rgba(0,0,0,0.2);
}

/* ─── Game Card ─── */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.game-teams {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

.game-teams .away { color: var(--away); }
.game-teams .at { color: var(--text-dim); font-weight: 400; font-size: 12px; }
.game-teams .home { color: var(--home); }

.game-time {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-card-alt);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ─── Slip Board (3-market-type per game) ─── */
.slip-board {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sb-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  width: 32px;
  flex-shrink: 0;
  text-align: center;
}

.sb-odds-wrap {
  display: flex;
  gap: 4px;
  flex: 1;
}

.sb-btn {
  flex: 1;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s;
  position: relative;
  color: var(--text);
}

.sb-btn:active { transform: scale(0.96); }

.sb-btn .sb-btn-name {
  display: block;
  font-size: 9px;
  color: var(--text-dim);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-btn .sb-btn-odds {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}

.sb-btn .check-mark {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Away team (left) color */
.sb-btn.sel-away { background: var(--away-bg); border-color: var(--away); }
.sb-btn.sel-away .sb-btn-odds { color: var(--away); }

/* Home team (right) color */
.sb-btn.sel-home { background: var(--home-bg); border-color: var(--home); }
.sb-btn.sel-home .sb-btn-odds { color: var(--home); }

/* Over / Under colors */
.sb-btn.sel-over { background: rgba(0,212,255,0.1); border-color: var(--accent); }
.sb-btn.sel-over .sb-btn-odds { color: var(--accent); }
.sb-btn.sel-under { background: rgba(255,215,0,0.1); border-color: var(--gold); }
.sb-btn.sel-under .sb-btn-odds { color: var(--gold); }

/* ─── Correct Score Grid ─── */
.score-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.score-group {
  width: 100%;
}
.score-group-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  padding: 0 2px;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}
.score-option {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s;
  color: var(--text);
  position: relative;
}
.score-option:active { transform: scale(0.96); }
.score-option .score-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.score-option .score-odds {
  display: block;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  margin-top: 2px;
}
.score-option.selected {
  background: rgba(0,212,255,0.1);
  border-color: var(--accent);
}
@media (min-width: 768px) {
  .score-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Ensure custom event cards don't overflow */
#tab-custom .game-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
#tab-custom .game-card .slip-board {
  width: 100%;
  max-width: 100%;
}
#tab-custom .sb-odds-wrap {
  flex-wrap: wrap;
}

/* Live game state */
.game-card.game-live { opacity: 0.7; border-color: #DA3633; }
.game-time-live { font-size: 11px; color: #DA3633; font-weight: 700; white-space: nowrap; }

/* Odds loading placeholder */
.odds-loading { text-align: center; padding: 16px; color: var(--text-dim); font-size: 13px; }

/* No-data state */
.sb-btn.no-data { opacity: 0.35; cursor: not-allowed; }
.sb-btn.no-data .sb-btn-odds { color: var(--text-muted); }

/* ─── Parlay Floating Bar ─── */
.parlay-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.parlay-bar .info { font-size: 12px; color: var(--text-dim); }
.parlay-bar .info strong { color: var(--gold); }

/* ─── Bet Slip Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-sheet {
  background: var(--bg-card);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-sheet .modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-sheet .close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
}

.bet-detail-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.bet-detail-line:last-child { border: none; }

.bet-detail-line .val { font-weight: 700; }
.bet-detail-line .val.gold { color: var(--gold); }
.bet-detail-line .val.green { color: var(--win); }

.stake-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.stake-input .dollar {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.stake-input input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  outline: none;
  text-align: center;
}

.stake-input input:focus { border-color: var(--accent); }

.quick-stakes {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.quick-stakes button {
  flex: 1;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-stakes button:hover, .quick-stakes button.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── My Bets ─── */
.bet-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.bet-filters button {
  flex-shrink: 0;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 5px 14px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.bet-filters button.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.bet-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
}

.bet-item .top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.bet-item .matchup {
  font-weight: 700;
  font-size: 14px;
}

.bet-item .badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
}

.bet-item .badge.pending { background: rgba(255,215,0,0.15); color: var(--gold); }
.bet-item .badge.win { background: var(--win-bg); color: var(--win); }
.bet-item .badge.lose { background: var(--lose-bg); color: var(--lose); }

.bet-item .detail {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.bet-item .payout {
  font-weight: 700;
  font-size: 14px;
}

.bet-item .payout.win { color: var(--win); }
.bet-item .payout.lose { color: var(--lose); }

/* ─── Stats ─── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 22px;
  font-weight: 800;
}

.stat-card .stat-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.record-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.record-item { text-align: center; }
.record-item .num { font-size: 24px; font-weight: 800; }
.record-item .rec-label { font-size: 11px; color: var(--text-dim); }

/* ─── Transactions ─── */
.fund-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.fund-buttons .btn { flex: 1; }

.txn-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.txn-item .txn-type { font-size: 13px; }
.txn-item .txn-time { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.txn-item .txn-amount { font-size: 15px; font-weight: 700; }
.txn-item .txn-balance { font-size: 11px; color: var(--text-dim); text-align: right; }

/* ─── Loading ─── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: -24px;
  margin-bottom: 40px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 14px;
}

.empty-state .icon { font-size: 40px; margin-bottom: 8px; }

/* ─── Footer ─── */
.app-footer {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ─── Responsive ─── */
@media (min-width: 600px) {
  .tab-content { padding: 20px; }
  .game-card { padding: 16px; }
  .bet-actions { gap: 8px; }
  .bet-btn { padding: 10px 8px; }
  .bet-btn .team-name { font-size: 11px; }
  .bet-btn .odds-val { font-size: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .stats-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}


/* ─── Bet Slip Legs ─── */
.slip-leg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 6px;
}

.slip-leg-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.slip-leg-match {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.slip-leg-mt {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slip-leg-mtype {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.slip-leg-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.slip-leg-sel {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.slip-leg-odds {
  font-weight: 700;
  color: var(--gold);
  font-size: 14px;
}

.slip-leg-sel {
  background: var(--bg-dark);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 11px;
}

.slip-leg-odds {
  font-weight: 700;
  color: var(--gold);
  font-size: 14px;
}

.slip-leg-remove {
  background: none;
  border: none;
  color: var(--lose);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

/* ─── Bet Slip Bottom Panel ─── */
.slip-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.slip-panel.open {
  transform: translateY(0);
}

/* Collapsed mini bar */
.slip-mini {
  background: linear-gradient(135deg, var(--bg-card), #1C2744);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
  height: 52px;
}

.slip-mini-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slip-mini-icon { font-size: 18px; }

.slip-mini-count {
  font-size: 13px;
  font-weight: 700;
}

.slip-mini-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slip-mini-label {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.slip-mini-odds {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
}

.slip-mini-arrow {
  font-size: 12px;
  color: var(--text-dim);
  transition: transform 0.2s;
}

/* Expanded content */
.slip-expand {
  max-height: 0;
  overflow: hidden;
  background: var(--bg-card);
  transition: max-height 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  min-height: 0;
}

.slip-panel.expanded .slip-expand {
  max-height: 65vh;
}

.slip-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 2px;
  cursor: ns-resize;
  flex-shrink: 0;
  touch-action: none;
}

.slip-handle-bar {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.slip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.slip-title {
  font-size: 16px;
  font-weight: 700;
}

.slip-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}

.slip-parlay-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  flex-shrink: 0;
}

.slip-minimize {
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.slip-minimize:hover { color: var(--text); background: var(--bg-hover); }

.gold { color: var(--gold); }

.slip-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 16px;
  min-height: 0;
  max-height: 40vh;
}

.slip-footer {
  flex-shrink: 0;
  padding: 6px 16px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  z-index: 2;
}

.slip-mode {
  display: flex;
  gap: 4px;
  padding: 4px 16px;
  border-bottom: 1px solid var(--border);
}

.slip-mode-btn {
  flex: 1;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.slip-mode-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.slip-summary {
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
}

.slip-submit {
  padding: 14px;
  font-size: 16px;
}

/* ─── Card in-slip highlight ─── */
.game-card.in-slip {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,212,255,0.3);
}

/* ─── Selected odds check mark ─── */
.bet-btn {
  position: relative;
}

.bet-btn .check-mark {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Slip Bet Types ─── */
.slip-types {
  padding: 4px 16px 8px;
  overflow-y: auto;
  max-height: 80px;
  flex-shrink: 0;
}

.slip-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.slip-type-row.active {
  border-color: var(--accent);
  background: rgba(0,212,255,0.06);
}

.slip-type-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.slip-type-check {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.15s;
}

.slip-type-check.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.slip-type-label {
  font-size: 14px;
  font-weight: 700;
}

.slip-type-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 1px;
}

.slip-type-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.slip-type-stake-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  width: 90px;
}

.slip-type-stake-wrap:focus-within {
  border-color: var(--accent);
}

.slip-type-dollar {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  margin-right: 2px;
}

.slip-type-stake {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  width: 100%;
  outline: none;
  text-align: right;
  -moz-appearance: textfield;
}

.slip-type-stake::-webkit-outer-spin-button,
.slip-type-stake::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.slip-type-info {
  text-align: right;
  min-width: 80px;
}

.slip-type-odds {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.slip-type-payout {
  font-size: 12px;
  color: var(--win);
  margin-top: 1px;
}

/* ─── Slip Total Summary ─── */
.slip-total {
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
}

.slip-total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.slip-total-val {
  font-weight: 700;
}

.slip-total-val.green { color: var(--win); }

.hidden { display: none !important; }
\r\n\r\n