:root {
  --bg: #0f1923;
  --bg2: #1a2c38;
  --bg3: #213743;
  --bg4: #2f4553;
  --sidebar: #0a1419;
  --topbar: #0f212e;
  --line: #2f4553;
  --line2: #213743;
  --text: #fff;
  --text2: #b1bad3;
  --muted: #6b7d8c;
  --accent: #3b82f6;
  --accent2: #5b8def;
  --green: #3b82f6;
  --red: #ed4245;
  --gold: #ffd700;
  --orange: #ff9b25;
  --blue: #3b82f6;
  --purple: #a855f7;
  --cyan: #5b8def;
  --shadow: 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all .18s ease;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select { font-family: inherit; outline: 0; }
a { color: inherit; text-decoration: none; }
svg.ni { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.mono { font-family: 'SF Mono','Monaco','Cascadia Code','Roboto Mono',monospace; }
.muted { color: var(--muted); font-size: 12px; }
.badge-pending, .badge-success, .badge-banned { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-pending { background: rgba(255,155,37,0.15); color: var(--orange); }
.badge-success { background: rgba(22,199,132,0.15); color: var(--green); }
.badge-banned { background: rgba(234,57,67,0.15); color: var(--red); }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 168px;
  background: var(--sidebar);
  border-right: 1px solid var(--line2);
  display: flex; flex-direction: column;
  z-index: 50;
  overflow: hidden;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  font-size: 17px; font-weight: 800;
  letter-spacing: -.02em;
  border-bottom: 1px solid var(--line2);
  cursor: pointer;
  white-space: nowrap;
  min-width: 168px;
}
.logo-icon { width: 28px; height: 28px; }
.logo-text { background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-section { padding: 0 10px; margin-bottom: 10px; }
.nav-label { font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 12px 4px; letter-spacing: .08em; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text2);
  font-weight: 500; font-size: 13px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
  min-width: 152px;
}
.nav-item:hover { background: var(--bg2); color: var(--text); }
.nav-item.active { background: var(--bg3); color: var(--text); }
.nav-item svg.ni { opacity: .7; }
.nav-item.active svg.ni { color: var(--accent); opacity: 1; }
.sidebar-footer { padding: 10px; border-top: 1px solid var(--line2); }
.login-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 12px; background: #5865F2; color: #fff; font-weight: 600; font-size: 13px; border-radius: 6px;
  white-space: nowrap; min-width: 152px;
}
.login-btn:hover { background: #4752c4; }
.user-mini { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; background: var(--bg3); position: relative; min-width: 152px; }
.user-mini .user-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); }
.user-mini .user-mini-info { flex: 1; min-width: 0; }
.user-mini .user-mini-name { display: flex; align-items: center; gap: 5px; }
.user-mini .user-rank { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.user-mini b { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini .user-mini-balance { display: none; }
.user-mini .user-logout { color: var(--muted); padding: 4px; border-radius: 4px; transition: var(--transition); }
.user-mini .user-logout:hover { color: var(--red); background: rgba(237,66,69,.1); }
.profile-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.profile-rank-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: var(--bg3); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.profile-rank-tag img { width: 16px; height: 16px; object-fit: contain; }
.profile-rank-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #ffec8b); border-radius: 3px; transition: width .5s; }
.rank-img { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }
.rank-img-lg { width: 48px; height: 48px; object-fit: contain; }
.profile-rank-row span { font-size: 11px; color: var(--text2); font-weight: 600; }

.profile-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.profile-col { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 14px; }
.profile-col h3 { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.ps-card { background: var(--bg3); border-radius: var(--radius); padding: 10px; text-align: center; }
.ps-card span { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.ps-card b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pw-card { background: var(--bg3); border-radius: var(--radius); padding: 10px; }
.pw-card span { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.pw-card b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pw-card.profit b { color: var(--accent); }
.profile-recent { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 14px; }
.profile-recent h3 { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius); padding: 12px; }
.stat-card span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.stat-card b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-wrap { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 14px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chart-head h3 { font-size: 13px; font-weight: 700; }
#statsChart { width: 100%; height: 260px; display: block; }

/* PF */
.pf-hero { text-align: center; padding: 24px 16px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); margin-bottom: 14px; }
.pf-hero h1 { font-size: 24px; font-weight: 800; margin: 8px 0; }
.pf-hero p { color: var(--text2); font-size: 13px; max-width: 400px; margin: 0 auto; }
.pf-tabs { display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius); padding: 3px; margin-bottom: 14px; width: fit-content; }
.pf-tab { padding: 7px 16px; color: var(--text2); font-size: 12px; font-weight: 600; border-radius: 5px; }
.pf-tab.active { background: var(--bg3); color: var(--text); }
.pf-panels { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 16px; }
.pf-panel { display: none; }
.pf-panel.active { display: block; }
.pf-panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.pf-steps { padding-left: 18px; color: var(--text2); font-size: 12px; }
.pf-steps li { margin-bottom: 8px; }
.pf-betcount { margin-top: 12px; padding: 10px; background: var(--bg3); border-radius: var(--radius); font-size: 12px; }
.pf-betcount b { color: var(--accent); font-size: 16px; }
.pf-row { display: grid; grid-template-columns: 180px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); align-items: center; }
.pf-row label { color: var(--text2); font-size: 12px; }
.pf-val { background: var(--bg3); padding: 6px 10px; border-radius: var(--radius); font-size: 11px; word-break: break-all; color: var(--accent); }
.pf-rotate { display: flex; gap: 8px; margin-top: 10px; }
.pf-rotate input { flex: 1; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 8px 12px; border-radius: 5px; font-size: 12px; }
.pf-verify-input { display: flex; gap: 8px; margin: 10px 0; }
.pf-verify-input input { flex: 1; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 8px 12px; border-radius: 5px; font-size: 12px; }
.pf-verify-out { margin-top: 10px; }
.pf-verify-out .vr-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line2); font-size: 11px; }
.pf-verify-out .vr-row b { color: var(--accent); word-break: break-all; font-family: monospace; }
.pf-verify-out .vr-head { font-size: 13px; font-weight: 700; padding: 0 0 8px 0; margin-bottom: 6px; border-bottom: 1px solid var(--line2); }
.pf-verify-out .vr-head.win { color: var(--accent); }
.pf-verify-out .vr-head.lose { color: var(--red); }
.pf-verify-out .vr-err { color: var(--red); padding: 6px; font-size: 12px; }

/* =========== NUMBER INPUT =========== */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* =========== COINFLIP PICK =========== */
.cf-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cf-pick-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; background: var(--bg3); border: 2px solid var(--line); border-radius: 6px; color: var(--text); font-weight: 600; font-size: 12px; }
.cf-pick-btn:hover { border-color: var(--accent); }
.cf-pick-btn.active.heads { border-color: var(--accent); background: rgba(59,130,246,.12); }
.cf-pick-btn.active.tails { border-color: var(--red); background: rgba(237,66,69,.12); }
.bet-btn-icon { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }

/* MINES */
.mines-board-wrap { position: relative; aspect-ratio: 1; max-width: min(600px, 100%, 75vh); width: 100%; margin: 0 auto; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 12px; }
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: 8px; width: 100%; height: 100%; }
.mines-tile {
  background: var(--bg3); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .1s, background .1s;
  user-select: none;
  aspect-ratio: 1;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
  min-width: 0; min-height: 0;
}
.mines-tile:hover:not(.revealed):not(.disabled) { background: var(--bg4); transform: scale(.95); }
.mines-tile.gem { background: linear-gradient(135deg, #0e1a44, #0a1530); animation: hlReveal .3s ease; }
.mines-tile.bomb { background: linear-gradient(135deg, #5a1f1f, #3d1414); animation: shake .4s ease; }
.mines-tile svg.ti { width: 50%; height: 50%; }
@keyframes hlReveal { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-2px, 2px); } 40% { transform: translate(2px, -2px); } 60% { transform: translate(-2px, 2px); } 80% { transform: translate(2px, -2px); } }

.mines-result-toast {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 60; padding: 8px 18px; background: rgba(10,20,32,.92);
  border-radius: 999px; box-shadow: 0 4px 16px rgba(0,0,0,.5);
  color: var(--red); font-size: 16px; font-weight: 800;
  animation: resultPop 1.6s ease forwards;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: .02em;
  border: 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.mines-result-toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mines-result-toast.win { color: var(--accent); }
.mines-result-toast.push { color: var(--gold); }
@keyframes resultPop {
  0% { transform: translate(-50%, -50%) scale(.5); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  25% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  85% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(.95); opacity: 0; }
}

.mines-cashout-overlay {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.85);
  background: linear-gradient(135deg, rgba(15, 25, 35, .98) 0%, rgba(26, 58, 138, .3) 100%);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 24px 40px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 48px rgba(59,130,246,.4), inset 0 1px 0 rgba(255,255,255,.1);
  z-index: 50;
  min-width: 240px;
}
.mines-cashout-overlay.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); animation: popIn .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { 0% { transform: translate(-50%, -50%) scale(.85); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.mines-cashout-inner { text-align: center; }
.mines-cashout-label { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px; }
.mines-cashout-mult { font-size: 48px; font-weight: 900; color: #fff; line-height: 1; text-shadow: 0 0 30px rgba(59,130,246,.5); font-variant-numeric: tabular-nums; }
/* BLACKJACK */
.bj-table {
  position: relative;
  background: radial-gradient(ellipse at center, #1a3050 0%, #0a1424 100%);
  border: 1px solid var(--line2);
  border-radius: var(--radius-lg);
  width: 100%;
  flex: 1;
  min-height: 560px;
  padding: 32px 24px 70px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  overflow: hidden;
}
.bj-deck-area { position: absolute; top: 16px; right: 16px; width: 60px; height: 84px; }
.bj-deck-stack { position: absolute; inset: 0; background: linear-gradient(135deg, #1a3050, #0a1424); border: 2px solid #2c4a72; border-radius: 6px; }
.bj-deck-stack:nth-child(1) { transform: translate(-2px, 2px); }
.bj-deck-stack:nth-child(2) { transform: translate(-1px, 1px); }
.bj-deck-stack:nth-child(3) { transform: translate(0, 0); }
.bj-deck-stack:nth-child(4) { transform: translate(1px, -1px); }
.bj-deck-stack:nth-child(5) { transform: translate(2px, -2px); }
.bj-deck-stack.bj-deck-top { background: linear-gradient(135deg, #2c4a72, #1a3050); }
.bj-deck-stack.bj-deck-top::after { content: '♠'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; opacity: .5; }
.bj-zone { padding: 12px 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bj-zone-label { color: rgba(255,255,255,.85); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bj-score { background: rgba(0,0,0,.45); padding: 3px 10px; border-radius: 4px; color: var(--gold); font-size: 13px; font-weight: 700; }
.bj-hand { display: flex; gap: 10px; min-height: 130px; align-items: center; justify-content: center; flex-wrap: wrap; }
.bj-pot { text-align: center; font-size: 16px; font-weight: 800; color: var(--gold); margin: 8px 0; letter-spacing: .5px; }
.card {
  width: 92px; height: 130px;
  background: #fff; color: #0a1830;
  border-radius: 7px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 7px 9px;
  font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,.5);
  animation: dealCard .35s cubic-bezier(.34,1.56,.64,1);
  transform-origin: top right;
  position: relative;
}
@keyframes dealCard { 0% { transform: translate(150px, -150px) scale(.4) rotate(15deg); opacity: 0; } 100% { transform: translate(0,0) scale(1) rotate(0); opacity: 1; } }
.card .card-rank { font-size: 18px; line-height: 1; font-weight: 800; }
.card .card-suit { font-size: 32px; line-height: 1; text-align: center; flex: 1; display: flex; align-items: center; justify-content: center; }
.card.red { color: #dc2626; }
.card .card-corner { display: flex; flex-direction: column; align-items: center; font-size: 12px; line-height: 1.1; gap: 1px; }
.card .card-corner.bot { transform: rotate(180deg); align-self: flex-end; }
.card.hidden { background: linear-gradient(135deg, #1a3050, #0a1424); border: 2px solid #2c4a72; }
.card.hidden::after { content: '?'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 36px; font-weight: 800; }

/* LIMBO */
.lim-stage {
  background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg);
  padding: 32px 24px; min-height: 520px; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  position: relative; overflow: hidden;
}
.lim-stage::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center top, rgba(59,130,246,.15) 0%, transparent 60%); pointer-events: none; }
.lim-recent { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 100%; position: relative; padding: 8px 0; border-bottom: 1px solid var(--line2); width: 100%; }
.lim-recent-pill { padding: 5px 12px; background: var(--bg3); border-radius: 4px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lim-recent-pill.win { color: var(--accent); }
.lim-recent-pill.lose { color: var(--red); }
.lim-display { text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lim-mult { font-size: 120px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(59,130,246,.3); }
.lim-mult.crashed { color: var(--red); }
.lim-mult.won { color: var(--accent); }
.lim-status { color: var(--text2); font-size: 15px; margin-top: 10px; }

/* COINFLIP */
.cf-stage { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 24px; min-height: 480px; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cf-coin-wrap { perspective: 800px; }
.cf-coin { width: 140px; height: 140px; position: relative; transform-style: preserve-3d; transition: transform 2s cubic-bezier(.4, 0, .2, 1); }
.cf-face { position: absolute; inset: 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; backface-visibility: hidden; gap: 6px; }
.cf-face-heads { background: linear-gradient(135deg, #0e1a44, #0a1530); color: var(--accent); transform: rotateY(0); border: 2px solid var(--accent); }
.cf-face-tails { background: linear-gradient(135deg, #5a1f1f, #3d1414); color: var(--red); transform: rotateY(180deg); border: 2px solid var(--red); }
.cf-face-icon svg.ni { width: 48px; height: 48px; }
.cf-result { text-align: center; min-height: 24px; }
.cf-result .win { color: var(--accent); font-size: 16px; font-weight: 700; }
.cf-result .lose { color: var(--red); font-size: 16px; font-weight: 700; }

/* HILO */
.hl-stage { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 24px; min-height: 480px; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.hl-streak { background: var(--bg3); padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.hl-streak b { color: var(--gold); }
.hl-cards { display: flex; align-items: center; gap: 16px; }
.hl-card { width: 100px; height: 140px; }
.hl-card-hidden { background: linear-gradient(135deg, var(--bg4), var(--bg3)); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; color: var(--text2); border: 2px solid var(--line); }
.hl-arrow { color: var(--text2); }
.hl-stats { color: var(--text2); font-size: 13px; text-align: center; }

/* CRASH */
.cr-stage { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 24px; min-height: 320px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cr-display { font-size: 72px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.cr-display.crashed { color: var(--red); }
.cr-history { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.cr-pill { padding: 3px 8px; background: var(--bg3); border-radius: 3px; font-size: 11px; font-weight: 700; }

/* WHEEL */
.whl-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto; }
.whl-pointer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); color: var(--accent); font-size: 32px; z-index: 3; filter: drop-shadow(0 2px 6px rgba(59,130,246,.6)); line-height: 1; }
.whl { width: 100%; height: 100%; border-radius: 50%; position: relative; transition: transform 4s cubic-bezier(.17, .67, .15, 1); border: 4px solid var(--bg); box-shadow: 0 0 0 3px var(--line), 0 12px 36px rgba(0,0,0,.5), inset 0 0 20px rgba(0,0,0,.3); overflow: hidden; }
.whl::after { content: ''; position: absolute; inset: 50% 50%; width: 50px; height: 50px; background: var(--bg2); border: 3px solid var(--accent); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 16px rgba(59,130,246,.5); z-index: 2; }
.whl-seg { position: absolute; width: 50%; height: 50%; top: 50%; left: 50%; transform-origin: 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 18px; color: #fff; font-weight: 800; font-size: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.whl-seg:nth-child(1) { transform: rotate(0deg) skewY(-45deg); background: var(--c); }
.whl-seg:nth-child(2) { transform: rotate(45deg) skewY(-45deg); background: var(--c); }
.whl-seg:nth-child(3) { transform: rotate(90deg) skewY(-45deg); background: var(--c); }
.whl-seg:nth-child(4) { transform: rotate(135deg) skewY(-45deg); background: var(--c); }
.whl-seg:nth-child(5) { transform: rotate(180deg) skewY(-45deg); background: var(--c); }
.whl-seg:nth-child(6) { transform: rotate(225deg) skewY(-45deg); background: var(--c); }
.whl-seg:nth-child(7) { transform: rotate(270deg) skewY(-45deg); background: var(--c); }
.whl-seg:nth-child(8) { transform: rotate(315deg) skewY(-45deg); background: var(--c); }

/* MODALS */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 20px; min-width: 320px; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 12px; right: 12px; padding: 5px; color: var(--muted); border-radius: 4px; }
.modal-close:hover { background: var(--bg3); color: var(--text); }
.modal-card h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* WALLET MODAL */
.modal-wallet { width: 500px; padding: 0; }
.wallet-tabs { display: flex; border-bottom: 1px solid var(--line2); padding: 0 10px; gap: 2px; }
.wallet-tab { display: flex; align-items: center; gap: 5px; padding: 12px 14px; color: var(--text2); font-size: 12px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.wallet-tab:hover { color: var(--text); }
.wallet-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.wallet-panel { display: none; padding: 16px; }
.wallet-panel.active { display: block; }
.wallet-balance-big { text-align: center; padding: 24px 12px; border-bottom: 1px solid var(--line2); background: linear-gradient(135deg, rgba(59,130,246,.15) 0%, rgba(26,58,138,.25) 100%); border-radius: 12px; margin-bottom: 14px; position: relative; overflow: hidden; }
.wallet-balance-big::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top, rgba(59,130,246,.2) 0%, transparent 60%); pointer-events: none; }
.wbal-label { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.wbal-val { font-size: 40px; font-weight: 800; line-height: 1.1; background: linear-gradient(90deg, #fff, #5b8def); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.wbal-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.wallet-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0; }
.wa-card { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--radius); text-align: left; }
.wa-card:hover { border-color: var(--accent); }
.wa-icon { width: 34px; height: 34px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #0a1830; }
.wa-text b { display: block; font-size: 13px; font-weight: 700; }
.wa-text span { display: block; color: var(--muted); font-size: 10px; }
.wallet-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-top: 1px solid var(--line2); padding-top: 8px; }
.ws-card { background: var(--bg3); padding: 10px; border-radius: var(--radius); }
.ws-card span { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; }
.ws-card b { font-size: 14px; font-weight: 700; }
.ws-card.profit b { color: var(--accent); }

.wpanel-h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }

/* Deposit */
.deposit-qr-wrap { display: flex; justify-content: center; margin: 14px 0; }
.deposit-qr-placeholder { width: 180px; height: 180px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 11px; }
.deposit-qr-wrap canvas { background: #fff; border-radius: 8px; }
.deposit-addr-wrap { display: flex; gap: 6px; align-items: center; margin: 12px 0; }
.deposit-addr { flex: 1; background: var(--bg3); border: 1px solid var(--line); border-radius: 5px; padding: 10px; font-size: 11px; word-break: break-all; color: var(--accent); }
.deposit-copy-btn { width: 36px; height: 36px; background: var(--accent); color: #0a1830; border-radius: 5px; display: flex; align-items: center; justify-content: center; }
.deposit-copy-btn:hover { background: #5b8def; }
.deposit-min { font-size: 11px; color: var(--muted); }
.deposit-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--bg3); border: 1px solid var(--line); border-radius: 14px; font-size: 11px; color: var(--text2); margin: 0 0 10px; }
.deposit-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); animation: pulse 1.4s infinite; }
.deposit-status.online .deposit-status-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.deposit-status.error .deposit-status-dot { background: var(--red); box-shadow: 0 0 6px var(--red); animation: none; }
.deposit-status.online .deposit-status-text::before { content: '● '; color: var(--accent); }
.deposit-status.error .deposit-status-text::before { content: '● '; color: var(--red); }
.deposit-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 8px; padding: 10px; }
.deposit-info-grid > div { display: flex; flex-direction: column; gap: 1px; }
.deposit-info-grid span { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.deposit-info-grid b { font-size: 12px; color: var(--text); font-weight: 700; }
.deposit-recent { display: flex; flex-direction: column; gap: 4px; }
.deposit-recent .dr-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 6px; font-size: 12px; }
.deposit-recent .dr-row .dr-info { display: flex; flex-direction: column; }
.deposit-recent .dr-row .dr-info b { color: var(--text); }
.deposit-recent .dr-row .dr-info small { font-size: 10px; color: var(--muted); }
.deposit-recent .dr-row .dr-amt { font-weight: 700; color: var(--accent); }
.deposit-recent .dr-row .dr-status { font-size: 10px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 700; }
.deposit-recent .dr-row .dr-status.confirmed { background: rgba(59,130,246,.15); color: var(--accent); }
.deposit-recent .dr-row .dr-status.pending { background: rgba(255,215,0,.12); color: var(--gold); }
.deposit-recent .dr-row .dr-status.expired { background: rgba(237,66,69,.12); color: var(--red); }

/* Withdraw */
.wdr-field { margin-bottom: 10px; }
.wdr-field label { display: block; color: var(--text2); font-size: 11px; font-weight: 600; margin-bottom: 5px; }
.wdr-field input { width: 100%; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 5px; font-size: 13px; }
.wdr-field input:focus { border-color: var(--accent); }
.wdr-amt-row { display: grid; grid-template-columns: 36px 1fr 36px 44px; gap: 4px; }
.wdr-half, .wdr-double, .wdr-max { background: var(--bg3); border: 1px solid var(--line); color: var(--text); border-radius: 4px; font-weight: 700; font-size: 10px; }
.wdr-half:hover, .wdr-double:hover, .wdr-max:hover { background: var(--bg4); color: var(--accent); }
.wdr-input { width: 100%; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 8px; border-radius: 4px; text-align: center; font-size: 13px; font-weight: 700; }
.wdr-preview { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 6px; padding: 8px; margin: 6px 0; }
.wdr-preview > div { display: flex; flex-direction: column; gap: 1px; }
.wdr-preview span { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wdr-preview b { font-size: 12px; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.wdr-preview-total { padding-left: 6px; border-left: 1px solid var(--line2); }
.wdr-preview-total b { color: var(--accent); }
.wdr-warn { padding: 8px 10px; background: rgba(237,66,69,.1); border: 1px solid rgba(237,66,69,.3); border-radius: 6px; color: var(--red); font-size: 12px; margin: 6px 0; }
.wdr-wager-banner { padding: 10px 12px; background: rgba(255,155,37,.12); border: 1px solid rgba(255,155,37,.35); border-radius: 6px; color: var(--orange); font-size: 12px; margin: 8px 0; line-height: 1.5; }
.wdr-wager-banner strong { color: #fff; }
.withdraw-msg { margin-top: 8px; padding: 8px; background: var(--bg3); border-radius: 5px; display: none; font-size: 12px; }
.withdraw-msg.show { display: block; }
.withdraw-msg.success { color: var(--accent); }
.withdraw-msg.error { color: var(--red); }

.fiat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fiat-card { background: var(--bg3); border: 2px solid var(--line); border-radius: 6px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fiat-card b { font-size: 20px; }
.fiat-card span { font-size: 10px; color: var(--muted); font-weight: 600; }
.fiat-card:hover { border-color: var(--accent); }
.fiat-card.active { border-color: var(--accent); background: rgba(59,130,246,.15); }
.fiat-card.active b { color: var(--accent); }

.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line2); gap: 14px; }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { display: block; font-size: 13px; font-weight: 600; }
.setting-row p { font-size: 11px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--bg4); border-radius: 22px; transition: .2s; }
.slider::before { position: absolute; content: ''; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* VERIFY */
.modal-verify { width: 460px; }
.verify-input { display: flex; gap: 8px; margin-bottom: 10px; }
.verify-input input { flex: 1; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 5px; font-family: monospace; font-size: 11px; }
.verify-input input:focus { border-color: var(--accent); }
.verify-out { background: var(--bg3); border-radius: 6px; padding: 12px; min-height: 50px; }

.toast-box { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { padding: 10px 16px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 5px; font-size: 12px; font-weight: 500; box-shadow: var(--shadow); animation: toastIn .2s ease; max-width: 320px; pointer-events: auto; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--accent); }
.toast.info { border-left-color: var(--blue); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =================== STAKE.COM-STYLE OVERRIDES =================== */

/* === Topbar refinements === */
.hamburger { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text2); border-radius: 6px; }
.hamburger:hover { background: var(--bg3); color: var(--text); }
.top-tabs { display: flex; gap: 2px; }
.top-tab { padding: 7px 18px; color: var(--text2); font-size: 14px; font-weight: 600; border-radius: 6px; transition: background .12s, color .12s; }
.top-tab:hover { color: var(--text); }
.top-tab.active { color: var(--text); background: var(--bg3); }
.topbar-center { display: flex; justify-content: center; align-items: center; }
.brand-logo { font-size: 20px; font-weight: 900; letter-spacing: -.02em; cursor: pointer; background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.balance-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; background: var(--bg3); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: all .12s; }
.balance-pill:hover { background: var(--bg4); border-color: var(--accent); }
.balance-amt { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.balance-currency { display: inline-flex; align-items: center; gap: 2px; padding-left: 4px; border-left: 1px solid var(--line); }
.ltc-coin { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 8px rgba(255,215,0,.4); }
.top-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; background: linear-gradient(180deg, var(--accent) 0%, #2563eb 100%); color: #fff; font-weight: 700; font-size: 13px; border-radius: 8px; transition: var(--transition); box-shadow: 0 2px 8px rgba(59,130,246,.3); border: 0; }
.top-btn:hover { background: linear-gradient(180deg, #5b8def 0%, var(--accent) 100%); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,.45); }
.top-btn.primary { background: linear-gradient(180deg, var(--accent) 0%, #2563eb 100%); }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; color: var(--text2); transition: var(--transition); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--bg4); color: var(--accent); border-color: var(--accent); }

/* === Sidebar refinements === */
.nav-divider { height: 1px; background: var(--line2); margin: 10px 14px; }
.nav-personal .nav-item { font-weight: 600; }

/* === Helper bet panel classes === */
.ctrl-currency { font-size: 11px; color: var(--muted); font-weight: 600; }
.bet-side { display: flex; align-items: center; gap: 5px; }
.ctrl-select svg.ni { position: absolute; right: 10px; pointer-events: none; }
.ctrl-suffix { color: var(--muted); padding-right: 14px; font-size: 13px; font-weight: 700; }
.ctrl-input { width: 100%; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 10px 14px; border-radius: 8px; text-align: right; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: inherit; }
.ctrl-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
.ctrl-readonly { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 700; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* === Coinflip (new 3D coin) === */
.cf-stage { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 32px; min-height: 380px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cf-coin-wrap { perspective: 1200px; width: 200px; height: 200px; }
.cf-coin { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 2.4s cubic-bezier(.32,.72,.32,1); }
.cf-coin.flipping { transition: transform 2.4s cubic-bezier(.32,.72,.32,1); }
.cf-face { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; box-shadow: inset 0 -10px 20px rgba(0,0,0,.4), inset 0 6px 14px rgba(255,255,255,.1), 0 10px 30px rgba(0,0,0,.5); }
.cf-coin-img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.cf-face-heads { transform: rotateY(0); }
.cf-face-tails { transform: rotateY(180deg); }
.cf-edge { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: conic-gradient(from 0deg, rgba(0,0,0,.4), rgba(255,255,255,.15) 25%, rgba(0,0,0,.4) 50%, rgba(255,255,255,.15) 75%, rgba(0,0,0,.4)); transform: translateZ(-1px); }
.cf-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cf-pick-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: var(--bg3); border: 2px solid var(--line); border-radius: 8px; color: var(--text); font-weight: 700; font-size: 13px; transition: all .12s; }
.cf-pick-btn:hover { border-color: var(--accent); }
.cf-pick-btn.active[data-side="heads"] { border-color: #14d655; background: rgba(20,214,85,.12); color: #14d655; }
.cf-pick-btn.active[data-side="tails"] { border-color: var(--red); background: rgba(237,66,69,.12); color: var(--red); }
.cf-result { text-align: center; min-height: 24px; font-size: 14px; font-weight: 700; }
.cf-result .win { color: var(--accent); }
.cf-result .lose { color: var(--red); }

/* === HiLo (new streak display) === */
.hl-stage { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 24px; min-height: 360px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hl-streak-display { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 24px; background: linear-gradient(135deg, var(--bg3), var(--bg)); border: 1px solid var(--line); border-radius: 10px; min-width: 160px; }
.hl-mult { font-size: 32px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.hl-streak-label { font-size: 11px; font-weight: 700; color: var(--text2); letter-spacing: .08em; text-transform: uppercase; }
.hl-cards { display: flex; align-items: center; gap: 18px; }
.hl-card { width: 100px; height: 140px; }
.hl-card-hidden { background: linear-gradient(135deg, var(--bg4), var(--bg3)); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; color: var(--text2); border: 2px solid var(--line); }
.hl-arrow { color: var(--text2); display: flex; align-items: center; }
.hl-stats { color: var(--text2); font-size: 13px; text-align: center; min-height: 18px; }
.hl-flip-in { animation: hl-flip-in .55s cubic-bezier(.34,1.56,.64,1) both; border: 2px solid var(--accent) !important; box-shadow: 0 0 14px var(--accent); }
.hl-flip-wrong { animation: hl-flip-wrong .55s cubic-bezier(.34,1.56,.64,1) both; border: 2px solid var(--red) !important; box-shadow: 0 0 14px var(--red); }
@keyframes hl-flip-in { 0% { transform: rotateY(180deg) scale(.7); opacity: 0; } 60% { transform: rotateY(-10deg) scale(1.08); opacity: 1; } 100% { transform: rotateY(0) scale(1); opacity: 1; } }
@keyframes hl-flip-wrong { 0% { transform: rotateY(180deg) scale(.7); opacity: 0; } 50% { transform: rotateY(-10deg) scale(1.08); } 70% { transform: rotateX(20deg); } 100% { transform: rotateX(0); opacity: 1; } }
.hl-card .card { animation: hl-pulse 1.4s ease-in-out; }
@keyframes hl-pulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 50% { box-shadow: 0 0 0 6px rgba(59,130,246,0); } 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); } }

/* === Bottom bar (fixed at bottom on game pages) === */
.game-bottombar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; background: var(--topbar); border-top: 1px solid var(--line2); padding: 8px 16px; gap: 12px; }
.gb-left, .gb-right { display: flex; align-items: center; gap: 4px; flex: 1; }
.gb-right { justify-content: flex-end; }
.gb-center { flex: 0 0 auto; }
.gb-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--text2); border-radius: 6px; font-size: 12px; font-weight: 600; transition: background .12s, color .12s; }
.gb-btn:hover { background: var(--bg3); color: var(--text); }
.gb-btn.fairness { padding: 8px 14px; }
.gb-btn.fairness:hover { color: var(--accent); }
.gb-logo { font-size: 16px; font-weight: 900; letter-spacing: -.02em; background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body.has-bottombar { padding-bottom: 56px; }

/* === Floating Stats Box === */
.floating-stats { position: fixed; top: 80px; right: 20px; z-index: 55; width: 380px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.6); overflow: hidden; }
.floating-stats .fs-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg3); border-bottom: 1px solid var(--line2); cursor: grab; user-select: none; }
.floating-stats .fs-head b { font-size: 13px; font-weight: 700; }
.floating-stats .fs-close { color: var(--muted); padding: 4px; border-radius: 4px; }
.floating-stats .fs-close:hover { color: var(--text); background: var(--bg4); }
.floating-stats .fs-body { padding: 12px; }
.floating-stats .fs-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.floating-stats .fs-card { background: var(--bg3); border-radius: 5px; padding: 8px 10px; }
.floating-stats .fs-card span { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.floating-stats .fs-card b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.floating-stats .fs-card.fs-wins b { color: var(--green, #16c784); }
.floating-stats .fs-card.fs-losses b { color: var(--red, #ea3943); }
.floating-stats .fs-card.fs-pl-pos b { color: var(--green, #16c784); }
.floating-stats .fs-card.fs-pl-neg b { color: var(--red, #ea3943); }
.floating-stats #fsChart { width: 100%; height: 140px; display: block; border-radius: 4px; }
.floating-stats .fs-refresh { color: #fff; background: var(--bg4); padding: 5px; border-radius: 5px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }
.floating-stats .fs-refresh:hover { color: var(--accent); background: var(--bg3); border-color: var(--accent); }
.floating-stats .fs-refresh svg { width: 14px; height: 14px; }
.floating-stats .fs-meta { display: flex; gap: 6px; align-items: center; font-size: 10px; color: var(--muted); margin-bottom: 6px; }

/* ----- WAGER RACE BANNER ----- */
.race-banner { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line2); margin-bottom: 18px; }
.race-banner-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #1a2c38 0%, #213743 40%, #2f4553 100%); }
.race-banner-bg::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, rgba(59,130,246,.4), transparent 50%), radial-gradient(circle at 0% 100%, rgba(91,141,239,.3), transparent 60%); }
.race-banner-content { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; gap: 24px; }
.race-banner-left { flex: 1; }
.race-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; background: rgba(255,215,0,.1); border: 1px solid rgba(255,215,0,.3); border-radius: 4px; }
.race-banner h3 { font-size: 24px; font-weight: 800; color: var(--text); margin: 10px 0 14px; }
.race-prize-row { display: flex; gap: 20px; flex-wrap: wrap; }
.race-prize-stat { display: flex; flex-direction: column; gap: 2px; }
.race-prize-stat span { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .04em; }
.race-prize-stat b { font-size: 17px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.race-prize-stat b#raceCountdown { color: var(--accent); font-family: 'Courier New', monospace; }
.race-prize-stat.race-prize-timer { padding-left: 16px; border-left: 1px solid var(--line); }
.race-banner-right { display: flex; align-items: center; }
.race-my-rank { display: flex; flex-direction: column; align-items: center; padding: 14px 20px; background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.4); border-radius: 10px; }
.race-my-rank span { font-size: 10px; color: var(--accent2); text-transform: uppercase; letter-spacing: .04em; }
.race-my-rank b { font-size: 28px; font-weight: 800; color: var(--accent); }
.race-my-rank small { font-size: 10px; color: var(--text2); margin-top: 2px; }
.race-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(0,0,0,.2); }
.race-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 50%, var(--gold) 100%); transition: width 1s linear; box-shadow: 0 0 12px var(--accent); }

.race-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.race-podium-card { position: relative; padding: 18px 14px 14px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; text-align: center; }
.race-podium-card .podium-place { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.race-podium-card.p1 { border-color: rgba(255,215,0,.5); background: linear-gradient(180deg, rgba(255,215,0,.08) 0%, var(--bg2) 100%); }
.race-podium-card.p1 .podium-place { color: var(--gold); }
.race-podium-card.p2 { border-color: rgba(192,192,192,.4); }
.race-podium-card.p2 .podium-place { color: #c0c0c0; }
.race-podium-card.p3 { border-color: rgba(205,127,50,.4); }
.race-podium-card.p3 .podium-place { color: #cd7f32; }
.race-podium-card .podium-user { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 10px; }
.race-podium-card .podium-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); }
.race-podium-card.p1 .podium-avatar { border-color: var(--gold); }
.race-podium-card .podium-name { font-size: 13px; font-weight: 700; color: var(--text); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.race-podium-card .podium-wagered { font-size: 16px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.race-podium-card .podium-prize { font-size: 12px; color: var(--gold); font-weight: 700; margin-top: 2px; }
@media (max-width: 700px) { .race-banner-content { flex-direction: column; align-items: flex-start; } .race-banner-right { width: 100%; } .race-my-rank { width: 100%; flex-direction: row; gap: 12px; justify-content: space-between; } }

/* === Provably Fair Overlay === */
.pf-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.pf-overlay-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; width: 560px; max-height: 85vh; overflow-y: auto; box-shadow: 0 16px 48px rgba(0,0,0,.6); }
.pf-overlay-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: var(--bg2); }
.pf-overlay-head h2 { font-size: 16px; font-weight: 700; flex: 1; }
.pf-overlay-head button { color: var(--muted); padding: 4px; border-radius: 4px; }
.pf-overlay-head button:hover { color: var(--text); background: var(--bg3); }
.pf-overlay-body { padding: 16px; }

/* === Wallet modal LTC icon === */
.wallet-ltc { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 8px; }

/* === Pick (Coinflip) overrides === */
.cf-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* =================== NEW: Brand logo image =================== */
.brand-logo-img { height: 36px; display: block; filter: drop-shadow(0 0 6px rgba(59,130,246,.15)); }
.brand-logo-fallback { font-size: 18px; font-weight: 900; letter-spacing: -.02em; background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo .logo-icon { width: 32px; height: 32px; }
.sidebar-logo .logo-full { height: 32px; display: block; }
.sidebar-logo .logo-fallback { display: none; align-items: center; gap: 10px; }
.sidebar-logo .logo-fallback .logo-text { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.gb-logo-img { height: 28px; display: inline-block; filter: drop-shadow(0 0 4px rgba(59,130,246,.15)); vertical-align: middle; }
@media (max-width: 768px) {
  .sidebar-logo .logo-full { height: 24px; }
  .gb-logo-img { height: 22px; }
}

/* =================== NEW: Notification panel =================== */
.notif-btn { position: relative; }
.notif-dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; border: 2px solid var(--topbar); }
.notif-panel { position: fixed; top: 64px; right: 16px; z-index: 90; width: 360px; max-height: 70vh; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.5); display: none; flex-direction: column; overflow: hidden; }
.notif-panel.show { display: flex; animation: notifIn .2s ease; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.notif-head b { font-size: 14px; font-weight: 700; }
.notif-close { color: var(--muted); padding: 4px; border-radius: 4px; }
.notif-close:hover { color: var(--text); background: var(--bg3); }
.notif-list { flex: 1; overflow-y: auto; }
.notif-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 12px; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line2); }
.notif-item:hover { background: var(--bg3); }
.notif-item .ni-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.notif-item .ni-text { flex: 1; min-width: 0; }
.notif-item .ni-text b { display: block; font-size: 12px; font-weight: 600; }
.notif-item .ni-text span { display: block; color: var(--muted); font-size: 10px; }
.notif-item .ni-amt { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.notif-item .ni-amt.pos { color: var(--accent); }
.notif-item .ni-amt.neg { color: var(--red); }

/* =================== NEW: Stats / Fairness modals =================== */
.modal-stats { width: 600px; }
.modal-fairness { width: 560px; }
.modal-fairness .pf-hero { background: transparent; border: 0; padding: 12px 0; }
.modal-fairness .pf-panels { background: transparent; border: 0; padding: 0; }
.modal-tx { width: 640px; }
.tx-tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 3px; margin-bottom: 12px; }
.tx-tab { flex: 1; padding: 7px; color: var(--text2); font-size: 12px; font-weight: 600; border-radius: 4px; }
.tx-tab:hover { color: var(--text); }
.tx-tab.active { background: var(--bg3); color: var(--text); }
.tx-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.tx-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 6px; }
.tx-row .tx-icon { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #0a1830; }
.tx-row .tx-icon.deposit { background: var(--accent); }
.tx-row .tx-icon.withdraw { background: var(--gold); }
.tx-row .tx-icon.bonus { background: var(--purple); color: #fff; }
.tx-row .tx-info b { display: block; font-size: 12px; font-weight: 700; }
.tx-row .tx-info span { display: block; color: var(--muted); font-size: 10px; }
.tx-row .tx-amt { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-row .tx-amt.pos { color: var(--accent); }
.tx-row .tx-amt.neg { color: var(--red); }
.tx-row .tx-amt small { display: block; color: var(--muted); font-size: 9px; font-weight: 600; text-align: right; margin-top: 2px; }
.tx-empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 12px; background: var(--bg3); border-radius: 6px; }

/* =================== NEW: Faucet / Test deposit =================== */
.deposit-divider { height: 1px; background: var(--line2); margin: 18px 0 14px; }
.deposit-test-row { display: flex; gap: 8px; align-items: stretch; }
.deposit-test-row .ctrl-input { flex: 1; }
.deposit-test-msg { margin-top: 8px; padding: 8px 10px; background: var(--bg3); border-radius: 5px; font-size: 12px; display: none; }
.deposit-test-msg.show { display: block; }
.deposit-test-msg.success { color: var(--accent); }
.deposit-test-msg.error { color: var(--red); }

/* =================== NEW: Bet panel polish =================== */
.ctrl-block { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.ctrl-block:last-of-type { border-bottom: 0; }
.bet-input, .ctrl-input, .ctrl-readonly, .ctrl-select { transition: border-color .12s; }
.bet-input:focus, .ctrl-input:focus { border-color: var(--accent); }
.gc-play { position: relative; }

/* =================== NEW: Sidebar nav-label =================== */
.nav-label { color: var(--muted); }

.page { display: none !important; animation: pageIn .25s ease; }
.page.active { display: block !important; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.main { margin-left: 168px; min-height: 100vh; position: relative; }

@media (max-width: 768px) {
  .sidebar { width: 52px; }
  .sidebar .logo-text, .sidebar .nav-label, .sidebar .nav-item span, .sidebar .login-btn span, .sidebar .user-mini > div { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 10px; }
  .main { margin-left: 52px !important; }
  .topbar { padding: 8px 10px; }
  .hero-title { font-size: 26px; }
  .profile-cols { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr 1fr; }
  .history-row { grid-template-columns: 28px 1fr 0.5fr 0.5fr 50px; }
  .history-row .hr-game span, .history-row .hr-bet, .history-row .hr-verify { display: none; }
  .lim-mult { font-size: 72px; }
  .cr-display { font-size: 48px; }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--line); }
/* LEADERBOARD */
.lb-row { display: grid; grid-template-columns: 40px 1.6fr 1fr 80px; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; margin-bottom: 6px; transition: var(--transition); }
.lb-row:hover { background: var(--bg3); border-color: var(--accent); transform: translateX(2px); }
.lb-pos { font-size: 14px; font-weight: 800; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.lb-pos.pos-1, .lb-pos.pos-2, .lb-pos.pos-3 { font-size: 18px; }
.lb-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; }
.lb-user-info { display: flex; flex-direction: column; min-width: 0; }
.lb-user-info b { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-rank-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.lb-bar { background: var(--bg3); height: 6px; border-radius: 3px; overflow: hidden; }
.lb-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #5b8def); border-radius: 3px; transition: width .5s; }
.lb-val { font-weight: 800; font-size: 13px; color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .lb-row { grid-template-columns: 32px 1fr 60px; gap: 8px; padding: 8px 10px; } .lb-bar { display: none; } }

/* HOME PAGE - HERO, BUTTONS, CARDS */
.hero { position: relative; border-radius: 16px; overflow: hidden; min-height: 280px; background: linear-gradient(135deg, #1e3a5f 0%, #0f1923 60%, #0a1419 100%); border: 1px solid var(--line2); margin-bottom: 28px; display: flex; align-items: center; padding: 40px 36px; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%; background: radial-gradient(circle, rgba(59,130,246,.25) 0%, transparent 60%); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="M0 50 L50 0 L100 50 L50 100 Z" fill="none" stroke="rgba(59,130,246,.05)"/></svg>') repeat; opacity: .4; pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.3); border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.hero-title { font-size: 42px; font-weight: 900; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 12px; color: var(--text); }
.hero-grad { background: linear-gradient(90deg, var(--accent), #aacbff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 15px; color: var(--text2); margin-bottom: 22px; line-height: 1.5; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; background: linear-gradient(180deg, var(--accent) 0%, #2563eb 100%); color: #fff; font-weight: 700; font-size: 14px; border-radius: 8px; box-shadow: 0 4px 14px rgba(59,130,246,.35); transition: var(--transition); cursor: pointer; border: 0; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(59,130,246,.5); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 12px 22px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; border-radius: 8px; transition: var(--transition); cursor: pointer; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--accent); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; }
.section-head h2 { font-size: 18px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.section-more { color: var(--text2); font-size: 12px; font-weight: 600; text-decoration: none; transition: var(--transition); }
.section-more:hover { color: var(--accent); }

.live-wins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 1200px) { .live-wins { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .live-wins { grid-template-columns: 1fr; } }
.live-win { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; transition: var(--transition); position: relative; overflow: hidden; }
.live-win::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--accent), var(--accent2)); }
.live-win:hover { border-color: var(--accent); transform: translateY(-1px); background: var(--bg3); }
.live-win.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 28px; gap: 10px; }
.live-win.empty::before { display: none; }
.live-win .lw-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.live-win .lw-game-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(59,130,246,.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.live-win .lw-user img { width: 28px; height: 28px; border-radius: 50%; }
.live-win .lw-info { display: flex; flex-direction: column; min-width: 0; }
.live-win .lw-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.live-win .lw-game { font-size: 9px; color: var(--accent2); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.live-win .lw-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex-shrink: 0; }
.live-win .lw-mult { color: var(--accent); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.live-win .lw-bet { color: var(--muted); font-size: 10px; font-weight: 600; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.game-card { display: block; background: var(--bg2); border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: var(--transition); cursor: pointer; padding: 0; }
.game-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(59,130,246,.2); }
.game-card-img { position: relative; width: 100%; aspect-ratio: 3/4; background-size: 100% 100%; background-repeat: no-repeat; background-position: center; background-color: var(--bg3); border-radius: 0; }
.game-card-img::after { content: ''; position: absolute; inset: 0; background: transparent; border-radius: 0; }
.game-card-badge { position: absolute; top: 8px; left: 8px; padding: 3px 7px; background: rgba(59,130,246,.9); color: #fff; font-size: 9px; font-weight: 800; border-radius: 4px; z-index: 1; letter-spacing: .05em; }
.game-card-info { display: none; }

@media (max-width: 768px) {
  .hero { padding: 28px 20px; min-height: 200px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 13px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .live-wins { grid-template-columns: 1fr; }
}

/* TOPBAR */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--topbar); border-bottom: 1px solid var(--line2); backdrop-filter: blur(8px); height: 64px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.balance-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: var(--transition); }
.balance-pill:hover { background: var(--bg4); border-color: var(--accent); }
.balance-amt { font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.balance-currency { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.balance-wager-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; background: var(--orange); color: #fff; border-radius: 50%; font-size: 10px; line-height: 1; cursor: help; }
.hamburger { display: none; background: var(--bg3); border: 1px solid var(--line); border-radius: 6px; padding: 6px; color: var(--text); cursor: pointer; }

/* PROFILE */
.profile-hero { position: relative; margin-bottom: 24px; }
.profile-banner { height: 120px; background: linear-gradient(135deg, var(--accent) 0%, #1a3a8a 50%, var(--bg) 100%); border-radius: 12px; border: 1px solid var(--line2); }
.profile-avatar-wrap { position: relative; width: 96px; height: 96px; margin: -48px 0 0 24px; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--bg); background: var(--bg3); object-fit: cover; }
.profile-info { padding: 8px 24px 0; }
.profile-info h1 { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.profile-handle { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.profile-rank-row { display: flex; align-items: center; gap: 10px; max-width: 400px; }
.profile-rank-bar { flex: 1; height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.profile-rank-text { font-size: 11px; font-weight: 700; color: var(--text2); white-space: nowrap; }
.profile-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.profile-col h3 { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ps-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; }
.ps-card span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.ps-card b { font-size: 16px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

/* PROFILE RANKS GRID */
.profile-ranks { background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.profile-ranks h3 { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }
.profile-ranks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.profile-rank-card { background: var(--bg3); border: 1px solid var(--line2); border-radius: 10px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; transition: var(--transition); }
.profile-rank-card.achieved { background: linear-gradient(180deg, var(--bg3) 0%, rgba(59,130,246,.08) 100%); }
.profile-rank-card.current { border-color: var(--rank-color, var(--accent)); box-shadow: 0 0 0 2px rgba(59,130,246,.18); }
.profile-rank-card.current::before { content: 'CURRENT'; position: absolute; top: 6px; right: 6px; background: var(--rank-color, var(--accent)); color: #000; font-size: 8px; font-weight: 800; padding: 2px 5px; border-radius: 3px; }
.profile-rank-card-img { width: 52px; height: 52px; object-fit: contain; }
.profile-rank-card-name { font-size: 13px; font-weight: 800; color: var(--rank-color, var(--text)); text-transform: uppercase; letter-spacing: .04em; }
.profile-rank-card-req { font-size: 10px; color: var(--muted); }
.profile-rank-card-arrow { font-size: 10px; color: var(--text2); font-weight: 600; opacity: .7; }

/* WALLET MODAL improvements */
.wallet-tabs { display: flex; gap: 0; background: var(--bg3); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.wallet-tab { flex: 1; padding: 8px 14px; background: transparent; border: 0; color: var(--text2); font-weight: 700; font-size: 12px; border-radius: 8px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 6px; }
.wallet-tab:hover { color: var(--text); }
.wallet-tab.active { background: var(--accent); color: #fff; }
.wallet-balance-card { background: linear-gradient(135deg, var(--accent) 0%, #1a3a8a 100%); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.wallet-balance-label { font-size: 11px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .05em; }
.wallet-balance-amount { font-size: 32px; font-weight: 800; color: #fff; margin-top: 4px; }
.wallet-balance-pts { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }

/* LEADERBOARD TABS */
.lb-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.lb-tab { padding: 7px 14px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; color: var(--text2); font-weight: 700; font-size: 12px; cursor: pointer; transition: var(--transition); }
.lb-tab:hover { background: var(--bg4); }
.lb-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* HISTORY FILTERS */
.history-filters { display: flex; gap: 6px; }
.history-filters select { background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 6px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.history-list { display: flex; flex-direction: column; gap: 4px; }
.history-empty { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }
.history-row { display: grid; grid-template-columns: 40px 1fr 80px 60px 70px 32px; gap: 12px; padding: 10px 14px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 8px; align-items: center; font-size: 13px; transition: var(--transition); }
.history-row:hover { background: var(--bg4); border-color: var(--line); }
.history-row.hr-pending { opacity: .6; }
.hr-icon { width: 32px; height: 32px; background: var(--bg2); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.hr-game { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hr-game b { font-size: 13px; font-weight: 700; color: var(--text); }
.hr-game span { font-size: 11px; color: var(--muted); }
.hr-payout { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.hr-payout.win { color: var(--accent); }
.hr-payout.lose { color: var(--red); }
.hr-result { font-size: 11px; font-weight: 800; text-align: center; padding: 3px 6px; border-radius: 4px; background: rgba(237,66,69,.12); color: var(--red); }
.hr-result.win { background: rgba(59,130,246,.15); color: var(--accent); }
.hr-verify { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--bg2); border: 1px solid var(--line2); border-radius: 6px; color: var(--text2); cursor: pointer; transition: var(--transition); }
.hr-verify:hover { color: var(--accent); border-color: var(--accent); }


/* STAKE-LIKE GAME LAYOUT */
.game-shell { max-width: 1500px; margin: 0 auto; padding: 12px; height: calc(100vh - 60px); display: flex; flex-direction: column; }
.game-layout { display: grid; grid-template-columns: 280px 1fr; gap: 12px; flex: 1; min-height: 0; }
.game-side { display: flex; flex-direction: column; gap: 8px; min-height: 400px; flex: 1; }
.game-side .game-control {
  flex: 1;
  overflow-y: visible;
  min-height: 280px;
  background: #142028;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-side .game-bottom-row {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 0;
  padding: 4px 6px;
  background: #142028;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-around;
}
.game-tabs { display: flex; gap: 3px; background: #0c1419; border-radius: 20px; padding: 3px; width: 100%; }
.game-tab { flex: 1; padding: 8px 0; background: transparent; border: 0; color: var(--muted); font-weight: 700; font-size: 12px; border-radius: 18px; cursor: pointer; transition: background .15s, color .15s; text-align: center; }
.game-tab:hover { color: var(--text2); }
.game-tab.active { background: #1e3a4a; color: #fff; }
.ctrl-label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: none; letter-spacing: 0; }
.ctrl-block { display: flex; flex-direction: column; gap: 4px; padding: 0; }
.bet-row { display: flex; gap: 4px; align-items: stretch; }
.bet-input {
  flex: 1;
  background: #0c1419;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 10px;
  min-width: 0;
}
.bet-input:focus { outline: none; border-color: var(--accent); }
.bet-mini {
  background: #0c1419;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text2);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  min-width: 42px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bet-mini:hover { color: var(--text); border-color: rgba(255,255,255,.15); }
.ctrl-select {
  background: #0c1419;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
}
.ctrl-select select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0;
  color: var(--text); padding: 9px 12px;
  font-size: 13px; font-weight: 600;
  width: 100%; cursor: pointer; font-family: inherit;
}
.ctrl-select input {
  background: transparent; border: 0;
  color: var(--text); padding: 9px 12px;
  font-size: 14px; font-weight: 700;
  width: 100%; font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.gc-play {
  width: 100%; padding: 12px; font-size: 13px; font-weight: 800;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  text-transform: uppercase; letter-spacing: .04em;
  border: 0;
}
.gc-play:hover:not(:disabled) { filter: brightness(1.1); }
.gc-play:active:not(:disabled) { filter: brightness(.9); }
.gc-play:disabled { background: #1e3a4a; color: var(--muted); cursor: not-allowed; }
.gc-play.state-cashout { background: linear-gradient(135deg, #16a34a, #15803d); }
.gc-play.state-bust { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.gc-secondary {
  width: 100%; padding: 10px; font-size: 12px; font-weight: 700;
  background: #0c1419; color: var(--text2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.gc-secondary:hover { border-color: rgba(255,255,255,.15); color: var(--text); }
.ctrl-profit {
  display: flex; align-items: center; justify-content: space-between;
  background: #0c1419; border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: 9px 10px; font-size: 12px;
}
.ctrl-profit > span { color: var(--text2); font-weight: 600; }
.ctrl-profit > b { color: var(--text); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.gbr-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 6px; background: transparent; border: 0; border-radius: 6px;
  color: var(--muted); cursor: pointer; transition: .15s;
}
.gbr-btn:hover { color: var(--accent); }
.gbr-btn .ni { width: 18px; height: 18px; }
.game-canvas { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 0; flex: 1; width: 100%; padding: 0; }
.game-canvas > * { width: 100%; }
.gf-btn .ni { width: 14px; height: 14px; }
@media (max-width: 900px) { .game-layout { grid-template-columns: 1fr; } .game-side { order: 2; } .game-canvas { order: 1; } }

/* FAIRNESS PAGE */
.pf-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.pf-page-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 18px; }
.pf-page-card h4 { margin: 0 0 12px; font-size: 14px; color: var(--text); font-weight: 700; }
.pf-page-card .pf-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: 12px; color: var(--text2); }
.pf-page-card .pf-row:last-child { border: 0; }

/* REWARDS */
.rewards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.reward-card { display: flex; gap: 14px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 18px; transition: var(--transition); }
.reward-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,.15); }
.reward-card .reward-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.reward-card .reward-icon .ni { width: 24px; height: 24px; }
.reward-card .reward-body { flex: 1; min-width: 0; }
.reward-card .reward-body h4 { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--text); }
.reward-card .reward-body p { margin: 0 0 10px; font-size: 12px; line-height: 1.4; }
.reward-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; padding: 10px; background: var(--bg3); border-radius: 8px; }
.reward-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reward-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.reward-stats b { font-size: 12px; color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-status.ready { color: var(--green); }
.rw-status.cooldown { color: var(--gold); }
.rw-status.locked { color: var(--muted); }
.rw-claim { width: 100%; padding: 10px; font-size: 12px; font-weight: 700; }
.rw-claim:disabled { opacity: .5; cursor: not-allowed; }
.rewards-history { margin-top: 24px; }
.reward-promo { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: linear-gradient(135deg, rgba(59,130,246,.1) 0%, rgba(91,141,239,.05) 100%); border: 1px solid rgba(59,130,246,.3); border-radius: 12px; margin: 18px 0 24px; }
.reward-promo-head { display: flex; align-items: center; gap: 12px; }
.reward-promo-icon { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #0a1830; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reward-promo-head h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.reward-promo-head p { font-size: 12px; margin: 2px 0 0; }
.reward-promo-form { display: flex; gap: 8px; }
.reward-promo-form input { flex: 1; background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 11px 14px; border-radius: 8px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.reward-promo-form input:focus { border-color: var(--accent); }
.reward-promo-form button { padding: 0 24px; }
.reward-promo-msg { font-size: 13px; font-weight: 600; min-height: 18px; }
.reward-promo-msg.success { color: var(--accent); }
.reward-promo-msg.error { color: var(--red); }

/* ADMIN PANEL */
.admin-tabs { display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; margin-bottom: 18px; width: fit-content; flex-wrap: wrap; }
.admin-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: transparent; border: 0; color: var(--text2); font-weight: 700; font-size: 12px; border-radius: 8px; cursor: pointer; transition: var(--transition); }
.admin-tab:hover { color: var(--text); }
.admin-tab.active { background: var(--accent); color: #fff; }
.admin-tab .ni { width: 14px; height: 14px; }
.admin-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.admin-card h4 { margin: 0 0 12px; font-size: 14px; color: var(--text); font-weight: 700; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.admin-card .ac-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.admin-card .ac-val { font-size: 22px; font-weight: 900; color: var(--text); }
.admin-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.admin-row label { font-size: 12px; color: var(--text2); min-width: 130px; }
.admin-row .ctrl-input { flex: 1; min-width: 100px; max-width: 220px; }
.admin-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-toolbar .ctrl-input { flex: 1; min-width: 180px; }
.admin-users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.admin-user-row { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: var(--transition); }
.admin-user-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.admin-user-row.banned { border-color: var(--red); }
.admin-user-row .au-head { display: flex; align-items: center; gap: 10px; }
.admin-user-row .au-avatar { width: 40px; height: 40px; border-radius: 50%; }
.admin-user-row .au-name { font-weight: 700; color: var(--text); font-size: 13px; }
.admin-user-row .au-id { font-size: 10px; color: var(--muted); }
.admin-user-row .au-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 11px; }
.admin-user-row .au-stats > div { background: var(--bg3); padding: 4px 6px; border-radius: 6px; }
.admin-user-row .au-stats span { color: var(--muted); display: block; font-size: 9px; }
.admin-user-row .au-stats b { color: var(--text); font-size: 12px; }
.admin-games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.admin-game-row { background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; cursor: pointer; transition: var(--transition); }
.admin-game-row:hover { border-color: var(--accent); transform: translateY(-2px); }
.admin-game-row.disabled { opacity: .5; }
.admin-game-row .agr-img { width: 100%; aspect-ratio: 3/4; background-size: 100% 100%; background-color: var(--bg3); }
.admin-game-row .agr-info { padding: 10px 12px; }
.admin-game-row .agr-name { font-weight: 800; color: var(--text); font-size: 14px; }
.admin-game-row .agr-stats { display: flex; gap: 6px; margin-top: 4px; font-size: 10px; color: var(--muted); }
.admin-game-row .agr-toggle { margin-top: 8px; }
.btn-danger { background: var(--red); color: #fff; border: 0; padding: 8px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 12px; }
.btn-danger:hover { background: #c73030; }
.au-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.au-actions button { padding: 5px 10px; font-size: 11px; background: var(--bg3); border: 1px solid var(--line); color: var(--text2); border-radius: 6px; cursor: pointer; }
.au-actions button:hover { color: var(--text); border-color: var(--accent); }
.au-actions button.danger { color: var(--red); border-color: var(--red); }
.au-actions button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.ad-history-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.ad-history-table th, .ad-history-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line2); }
.ad-history-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10px; }
.ad-history-table tr:hover { background: var(--bg3); }
.ad-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; display: none; align-items: center; justify-content: center; }
.ad-modal-bg.show { display: flex; }
.ad-modal { background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 20px; min-width: 320px; max-width: 600px; max-height: 80vh; overflow-y: auto; }
.ad-modal h3 { margin: 0 0 12px; color: var(--text); }
.ad-modal .ad-form-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ad-modal .ad-form-row label { font-size: 12px; color: var(--text2); min-width: 100px; }
.ad-modal .ctrl-input { flex: 1; }
.maintenance-banner { background: linear-gradient(90deg, var(--red), #c73030); color: #fff; padding: 10px 18px; text-align: center; font-weight: 700; font-size: 13px; }
.pf-page-card .pf-row code { background: var(--bg3); padding: 4px 8px; border-radius: 6px; color: var(--accent); font-size: 11px; word-break: break-all; max-width: 60%; text-align: right; font-family: monospace; }
@media (max-width: 700px) { .pf-page-grid { grid-template-columns: 1fr; } }

/* =================== LAUNCH UI POLISH =================== */
.logo-fallback, .gb-logo, .brand-logo-fallback, .logo-text { display: none !important; }
.brand-logo-img { height: 58px; width: auto; max-width: 220px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(59,130,246,.2)); }
.sidebar-logo .logo-full { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
.gb-logo-img { height: 42px; width: auto; max-width: 140px; object-fit: contain; }

.ctrl-label { font-size: 11px; font-weight: 600; color: var(--text2); }

.settings-overlay, #settingsOverlay .modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,.65) !important;
  backdrop-filter: blur(4px);
}
#settingsOverlay .modal-card {
  position: relative;
  z-index: 10001;
  max-height: 90vh;
  overflow: auto;
}

.fs-pl-pos { color: var(--green) !important; }
.fs-pl-neg { color: var(--red) !important; }
.hr-svg { width: 18px; height: 18px; color: var(--accent); }

.mines-tile.revealing { pointer-events: none; }
.mines-tile.gem { animation: gemPop .35s cubic-bezier(.34,1.4,.64,1) both; background: rgba(34,211,238,.15); border-color: #22d3ee; }
.mines-tile.bomb-hit {
  animation: bombShake .5s ease both;
  background: linear-gradient(135deg, #7a1a1a 0%, #4a0a0a 100%) !important;
  border-color: var(--red) !important;
  position: relative;
  overflow: hidden;
}
.mines-tile.bomb-hit::after {
  content: ''; position: absolute; inset: -4px;
  background: radial-gradient(circle at center, rgba(234,57,67,.4) 0%, transparent 70%);
  animation: bombFlash .5s ease-out;
  pointer-events: none;
}
@keyframes gemPop { from { transform: scale(.85); opacity:.5 } to { transform: scale(1); opacity:1 } }
@keyframes bombShake {
  0% { transform: translate(0,0) scale(1); }
  10% { transform: translate(-6px,4px) scale(1.05); }
  20% { transform: translate(5px,-3px) scale(1.08); }
  30% { transform: translate(-4px,5px) scale(1.03); }
  40% { transform: translate(3px,-4px) scale(1); }
  50% { transform: translate(-2px,2px) scale(.98); }
  60% { transform: translate(1px,-1px) scale(1); }
  70% { transform: translate(-1px,1px) scale(1); }
  80%,100% { transform: translate(0,0) scale(1); }
}
@keyframes bombFlash {
  0% { opacity: 1; transform: scale(.8); }
  100% { opacity: 0; transform: scale(2); }
}

@keyframes dealCard {
  from { opacity: 0; transform: translateY(-30px) scale(.8) rotate(-8deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
.bj-action-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px !important; font-size: 12px !important; }
.bj-act-icon { width: 16px; height: 16px; opacity: .9; }
.bj-actions { display: flex; flex-direction: column; gap: 6px; }

.cf-coin-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cf-coin { width: 140px; height: 140px; transform-style: preserve-3d; }
.cf-coin.flipping { filter: drop-shadow(0 12px 24px rgba(0,0,0,.4)); }
.cf-coin.cf-land { transform: scale(1) !important; transition: transform .3s ease !important; }
.cf-pick-btn.active { border-color: var(--accent); background: rgba(59,130,246,.15); color: var(--accent); }
.cf-pick-btn .ni { width: 16px; height: 16px; }

.lim-recent { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; max-height: 72px; overflow-y: auto; }
.lim-recent-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--bg3); border: 1px solid var(--line2);
  animation: pillIn .3s ease both;
}
.lim-recent-pill.win { color: var(--green); border-color: rgba(67,181,129,.3); background: rgba(67,181,129,.08); }
.lim-recent-pill.lose { color: var(--red); border-color: rgba(237,66,69,.3); background: rgba(237,66,69,.08); }
.lim-pill-icon { width: 12px; height: 12px; }
@keyframes pillIn { from { opacity:0; transform:translateY(6px) } to { opacity:1; transform:none } }

.hl-card { transition: transform .35s ease, box-shadow .35s ease; }
.hl-flip-in { animation: hlFlip .4s ease both; }
@keyframes hlFlip { from { transform: rotateY(90deg); opacity:0 } to { transform: rotateY(0); opacity:1 } }
.hl-actions { display: flex; flex-direction: column; gap: 6px; }

/* =================== MOBILE RESPONSIVE =================== */
@media (max-width: 768px) {
  .sidebar { width: 52px; }
  .sidebar .logo-text, .sidebar .nav-label, .sidebar .nav-item span, .sidebar .login-btn span, .sidebar .user-mini > div { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 10px; min-width: 0; }
  .sidebar .user-mini { justify-content: center; min-width: 0; padding: 6px; }
  .sidebar .user-mini .user-avatar { width: 28px; height: 28px; }
  .sidebar .login-btn { min-width: 0; padding: 8px; }
  .sidebar-logo .logo-full { height: 24px; }
  .main { margin-left: 52px !important; width: calc(100vw - 52px) !important; }
  .topbar { padding: 6px 8px; gap: 6px; }
  .topbar .topbar-left { gap: 6px; }
  .brand-logo-img { height: 34px; max-width: 120px; }
  .topbar .topbar-right { gap: 4px; }
  .topbar .balance-box { padding: 4px 8px; font-size: 11px; }
  .gb-bar { gap: 4px; padding: 6px 8px; flex-wrap: nowrap; overflow-x: auto; }
  .gb-btn { min-width: 32px; height: 32px; flex-shrink: 0; }
  .gb-logo-img { height: 24px; }

  .game-layout { grid-template-columns: 1fr; gap: 8px; }
  .game-side { order: 2; min-height: 0; }
  .game-side .game-control { min-height: 0; padding: 12px; }
  .game-canvas { order: 1; min-height: 300px; padding: 0; }
  .game-canvas > * { width: 100%; }
  .game-bottom-row { gap: 4px; padding: 4px 6px; }

  .mines-grid { max-width: 100%; gap: 4px; padding: 8px; }
  .mines-tile { aspect-ratio: 1; min-height: 48px; border-radius: 6px; }

  .cf-stage { padding: 16px; min-height: 280px; }
  .cf-coin-wrap { width: 140px; height: 140px; }
  .cf-coin { width: 120px; height: 120px; }

  .bj-layout { flex-direction: column; gap: 8px; }
  .bj-hand { min-height: 80px; }
  .bj-card { height: 90px; }

  .hl-table { gap: 4px; padding: 8px; }
  .hl-card-slot { width: 56px; height: 80px; font-size: 20px; }

  .wheel-canvas-wrap { min-height: 200px; }

  .lim-mult { font-size: 48px; }
  .lim-graphic { min-height: 200px; }

  .page { padding: 10px; }
  .hero { padding: 20px 16px; min-height: 160px; }
  .hero-title { font-size: 22px; }
  .hero-sub { font-size: 12px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }

  .admin-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 4px; }
  .admin-tab { font-size: 11px; padding: 6px 10px; white-space: nowrap; flex-shrink: 0; }
  .admin-row { flex-direction: column; align-items: stretch; gap: 4px; }

  .profile-cols { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .profile-wallet-grid { grid-template-columns: 1fr; }

  .wallet-modal { width: 100vw; max-width: 100vw; height: 100vh; border-radius: 0; }
  .wallet-content { padding: 12px; }
  .wallet-tabs { gap: 4px; }
  .wallet-tab { font-size: 11px; padding: 8px 6px; }

  .deposit-qr-wrap { max-width: 180px; }
  .deposit-qr-wrap canvas { width: 160px !important; height: 160px !important; }

  .floating-stats { width: calc(100vw - 20px); right: 10px; top: 60px; }

  .history-row { grid-template-columns: 24px 1fr 0.5fr 40px; gap: 4px; font-size: 11px; }
  .history-row .hr-game span, .history-row .hr-bet, .history-row .hr-verify { display: none; }

  .modal-card { width: calc(100vw - 24px); min-width: 0; }
  .mines-cashout-overlay { padding: 16px 24px; }
  .leaderboard-card { padding: 14px; }

  .race-banner-content { flex-direction: column; align-items: flex-start; gap: 8px; }
  .race-my-rank { width: 100%; }

  .lb-row { grid-template-columns: 28px 1fr 50px; gap: 6px; padding: 6px 8px; font-size: 12px; }
  .lb-bar { display: none; }

  .ctrl-block { gap: 4px; }
  .ctrl-label { font-size: 10px; }
  .bet-input { font-size: 12px; padding: 6px 8px; }
  .gc-play { padding: 10px; font-size: 12px; }
  .gc-secondary { padding: 8px; font-size: 11px; }
  .game-side .game-bottom-row { margin-top: 4px; padding: 4px 6px; }
  .gbr-btn { height: 28px; }
}

@media (max-width: 480px) {
  .sidebar { width: 44px; }
  .sidebar .nav-item { gap: 0; padding: 8px; }
  .sidebar .user-mini { padding: 4px; }
  .sidebar .user-mini .user-avatar { width: 24px; height: 24px; }
  .main { margin-left: 44px !important; width: calc(100vw - 44px) !important; }

  .topbar .balance-box { padding: 3px 6px; font-size: 10px; }
  .topbar .balance-label { display: none; }
  .brand-logo-img { height: 28px; }

  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }

  .mines-tile { min-height: 40px; border-radius: 4px; }
  .cf-coin-wrap { width: 100px; height: 100px; }
  .cf-coin { width: 90px; height: 90px; }
  .bj-card { height: 70px; }
  .hl-card-slot { width: 44px; height: 64px; font-size: 16px; }

  .hero { padding: 16px 12px; min-height: 120px; }
  .hero-title { font-size: 18px; }
  .hero-game-row { gap: 6px; }

  .page { padding: 6px; }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }

  .floating-stats { width: calc(100vw - 12px); right: 6px; top: 50px; }
  .fs-stats { grid-template-columns: repeat(2, 1fr); gap: 4px; }

  .gbr-btn .ni { width: 14px; height: 14px; }
}

/* =================== FIXED TOPBAR + SIDEBAR COLLAPSE =================== */
.main { margin-left: 168px; min-height: 100vh; position: relative; padding-top: 64px; }

body.sidebar-collapsed .sidebar { width: 52px; }
body.sidebar-collapsed .sidebar .nav-item span,
body.sidebar-collapsed .sidebar .nav-label,
body.sidebar-collapsed .sidebar .login-btn span,
body.sidebar-collapsed .sidebar .user-mini > div,
body.sidebar-collapsed .sidebar .sidebar-top-tabs .nav-item span { display: none; }
body.sidebar-collapsed .sidebar .nav-item,
body.sidebar-collapsed .sidebar .sidebar-top-tabs .nav-item { justify-content: center; padding: 10px; }
body.sidebar-collapsed .sidebar .user-mini { justify-content: center; min-width: 0; padding: 6px; }
body.sidebar-collapsed .sidebar .user-mini .user-avatar { width: 28px; height: 28px; }
body.sidebar-collapsed .sidebar .login-btn { min-width: 0; padding: 8px; }
body.sidebar-collapsed .main { margin-left: 52px !important; }

/* Sidebar top tabs (Casino / Sport) */
.sidebar-top-tabs { padding: 12px 10px 6px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line2); margin-bottom: 8px; }
.sidebar-top-tabs .nav-item { font-weight: 700; color: var(--text); }
.sidebar-top-tabs .nav-item.active { background: var(--accent); color: #fff; }
.sidebar-top-tabs .nav-item.active .ni { color: #fff; opacity: 1; }

/* Profile menu */
.profile-menu { position: relative; }
.profile-menu-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; color: var(--text2); font-weight: 600; font-size: 13px; cursor: pointer; transition: var(--transition); }
.profile-menu-btn:hover { background: var(--bg4); color: var(--text); }
.profile-dropdown { position: absolute; top: calc(100% + 6px); right: 0; z-index: 90; min-width: 220px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.5); display: none; flex-direction: column; padding: 6px; overflow: hidden; }
.profile-menu.show .profile-dropdown { display: flex; animation: notifIn .2s ease; }
.profile-dropdown button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: transparent; border: 0; color: var(--text2); font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; border-radius: 6px; transition: background .12s, color .12s; }
.profile-dropdown button:hover { background: var(--bg3); color: var(--text); }
.profile-dropdown button:last-child { color: var(--red); }
.profile-dropdown button .ni { width: 15px; height: 15px; }

/* Topbar: logo left, balance center */
.topbar-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-center { display: flex; align-items: center; justify-content: center; flex: 1; gap: 18px; }
.brand-logo-img { height: 52px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(59,130,246,.2)); }
/* Balance pill centered, matte/rough */
.topbar .balance-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 16px; background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: var(--transition); font-size: 14px; box-shadow: none; }
.topbar .balance-pill:hover { background: var(--bg4); border-color: var(--accent); }
.topbar .balance-amt { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); }
.topbar .balance-currency { display: inline-flex; align-items: center; gap: 3px; padding-left: 6px; border-left: 1px solid var(--line); font-size: 11px; color: var(--muted); font-weight: 600; }
.topbar .ltc-coin { width: 18px; height: 18px; }
.topbar .balance-wager-badge { width: 20px; height: 20px; font-size: 11px; }

/* Notif panel: adjust top for fixed header */
.notif-panel { top: 72px; }

/* Floating stats: adjust top for fixed header */
.floating-stats { top: 80px; }

/* Casino page */
.casino-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* Sport coming soon */
.coming-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; gap: 16px; padding: 40px; }
.coming-soon-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.coming-soon-icon svg { width: 32px; height: 32px; }
.coming-soon h1 { font-size: 32px; font-weight: 800; }
.coming-soon p { color: var(--text2); font-size: 14px; max-width: 360px; }

/* Override responsive for fixed topbar */
@media (max-width: 768px) {
  body.sidebar-collapsed .main { margin-left: 52px !important; }
  .topbar { padding: 6px 10px; height: 56px; }
  .main { padding-top: 56px; }
  .topbar-center { gap: 10px; }
  .topbar .balance-pill { padding: 5px 10px 5px 12px; font-size: 12px; }
  .topbar .balance-amt { font-size: 12px; }
  .brand-logo-img { height: 32px; }

  .profile-menu-btn span { display: none; }
  .profile-menu-btn { padding: 7px 10px; }
  .notif-panel { top: 64px; right: 8px; width: 320px; }
  .floating-stats { top: 72px; right: 8px; width: calc(100vw - 24px); }
}
@media (max-width: 480px) {
  body.sidebar-collapsed .main { margin-left: 44px !important; }
  .topbar { padding: 4px 6px; height: 52px; }
  .main { padding-top: 52px; }
  .topbar-center { gap: 6px; }
  .topbar .balance-pill { padding: 4px 8px; font-size: 11px; gap: 4px; }
  .topbar .balance-amt { font-size: 11px; }
  .brand-logo-img { height: 24px; }
  .topbar .ltc-coin { width: 14px; height: 14px; }
  .profile-dropdown { right: -4px; min-width: 200px; }
  .coming-soon h1 { font-size: 24px; }
  .coming-soon p { font-size: 13px; }
}

/* LAUNCH WALLET, HISTORY, COINFLIP + HILO POLISH */
.modal-wallet {
  width: min(920px, calc(100vw - 28px));
  background: #191b22;
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .62);
}
.modal-wallet .wallet-tabs {
  margin-left: 344px;
  max-width: 360px;
  background: #272634;
  border: 0;
  border-radius: 8px;
  padding: 4px;
}
.modal-wallet .wallet-tab {
  min-height: 38px;
  border-radius: 7px;
  color: #c5cad7;
}
.modal-wallet .wallet-tab.active {
  background: #159cf7;
  color: #fff;
  box-shadow: 0 8px 20px rgba(21, 156, 247, .28);
}
.wallet-deposit-modern {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  margin-top: -44px;
}
.deposit-ltc-pane {
  background: #101216;
  border-radius: 10px;
  padding: 18px 16px 20px;
  border: 1px solid rgba(255, 255, 255, .04);
}
.deposit-coin-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 20px;
}
.deposit-coin-head img {
  width: 26px;
  height: 26px;
}
.deposit-main-pane {
  min-width: 0;
  padding-top: 62px;
}
.wallet-label {
  display: block;
  margin: 13px 0 7px;
  color: #a7b0c3;
  font-size: 11px;
  font-weight: 700;
}
.wallet-select-static,
.bonus-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 7px;
  background: #24242e;
  color: #dce4f3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.wallet-select-static .ni {
  margin-left: auto;
  width: 15px;
  transform: rotate(90deg);
  color: #a7b0c3;
}
.bonus-select {
  cursor: pointer;
  justify-content: flex-start;
  transition: border-color .18s, background .18s, transform .18s;
}
.bonus-select small {
  margin-left: auto;
  color: #9aa6ba;
  font-size: 11px;
}
.bonus-select:hover,
.bonus-select.selected {
  border-color: rgba(21, 156, 247, .55);
  background: #2a2d3a;
}
.deposit-ltc-pane .deposit-qr-wrap {
  width: 160px;
  height: 160px;
  margin: 10px auto 16px;
  background: #fff;
  border-radius: 4px;
  padding: 8px;
}
.deposit-ltc-pane .deposit-qr-img,
.deposit-ltc-pane canvas {
  width: 100% !important;
  height: 100% !important;
}
.deposit-ltc-pane .deposit-addr-wrap {
  background: #23242c;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .06);
  padding: 0 5px 0 10px;
}
.deposit-copy-btn.icon-only {
  width: 34px;
  min-width: 34px;
  padding: 0;
}
.wallet-note {
  margin: 16px 0 0;
  color: #c0c7d4;
  line-height: 1.45;
  font-size: 12px;
}
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 9px;
  margin: 10px 0 16px;
}
.crypto-option {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: #242530;
  border-radius: 7px;
  color: #eef4ff;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  text-align: left;
  padding: 7px;
  column-gap: 10px;
}
.crypto-option b {
  font-size: 13px;
}
.crypto-option small {
  color: #7f8898;
  font-size: 10px;
}
.crypto-option.disabled {
  opacity: .54;
  cursor: not-allowed;
}
.crypto-option.active {
  opacity: 1;
  background: #139af2;
  border-color: #39b8ff;
  box-shadow: 0 12px 28px rgba(19, 154, 242, .22);
}
.coin-badge {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  color: #fff;
}
.coin-badge.eth { background: #627eea; }
.coin-badge.btc { background: #f7931a; }
.coin-badge.usdt { background: #26a17b; }
.coin-badge.trx { background: #ef0027; }
.coin-badge.sol { background: #111; }
.coin-badge.ltc { background: #345d9d; }
.coin-badge.xrp { background: #06070a; }
.coin-badge.usdc { background: #2775ca; }
.wallet-modern-info {
  grid-template-columns: repeat(3, 1fr);
}
.history-list {
  gap: 0;
}
.fb-history-row {
  grid-template-columns: 42px minmax(180px, 1.2fr) .8fr .7fr .8fr .7fr 42px;
  border-radius: 0;
  border-width: 0 0 1px;
  background: transparent;
  min-height: 61px;
}
.history-list .fb-history-row:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.fb-history-row:hover {
  background: rgba(31, 48, 63, .62);
}
.hr-bet {
  color: #c8d7e7;
  font-variant-numeric: tabular-nums;
}
.bet-info-card {
  width: min(400px, calc(100vw - 24px));
  background: #142a34;
  border-color: rgba(152, 188, 210, .16);
  text-align: center;
}
.bet-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7d9e8;
  font-size: 13px;
  margin-bottom: 16px;
}
.bet-info-card h3 {
  margin: 0 0 5px;
}
.bet-id-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #d6e7f4;
  font-size: 12px;
}
.bet-id-line button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #bdd2e2;
}
.bet-brand {
  margin: 18px 0;
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  color: #fff;
}
.bet-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, .055);
  border-radius: 7px;
  padding: 16px 8px;
}
.bet-summary-grid div + div {
  border-left: 1px solid rgba(255, 255, 255, .08);
}
.bet-summary-grid span,
.bet-proof span {
  display: block;
  color: #abc0cf;
  font-size: 11px;
  margin-bottom: 7px;
}
.bet-summary-grid b.win { color: #00f084; }
.bet-summary-grid b.lose { color: #ff6370; }
.bet-proof {
  margin-top: 12px;
  text-align: left;
  display: grid;
  gap: 8px;
}
.bet-proof div {
  background: rgba(0, 0, 0, .15);
  border-radius: 6px;
  padding: 10px;
}
.bet-proof code {
  color: #e8f4ff;
  word-break: break-all;
  font-size: 11px;
}
.bonus-claim-card {
  width: min(380px, calc(100vw - 24px));
  text-align: center;
}
.bonus-claim-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(34, 197, 94, .12);
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bonus-claim-icon .ni {
  width: 26px;
  height: 26px;
}
.bonus-link-code {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.cf-face {
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.38), transparent 18%),
    radial-gradient(circle at 50% 50%, #ffe78a 0%, #f6b937 48%, #b97912 100%);
  border: 7px solid #ffd76f;
}
.cf-face-tails {
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.32), transparent 18%),
    radial-gradient(circle at 50% 50%, #8fd3ff 0%, #2d7fe5 50%, #164793 100%);
  border-color: #9bd8ff;
}
.cf-coin-img {
  opacity: 0;
}
.cf-face::after {
  content: 'H';
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: rgba(10, 15, 25, .16);
  color: #fff7d1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 74px;
  font-weight: 1000;
  text-shadow: 0 4px 12px rgba(0,0,0,.36);
}
.cf-face-tails::after {
  content: 'T';
  color: #e6f7ff;
}
.cf-coin.flipping {
  animation: coinArc 2.4s cubic-bezier(.25,.85,.2,1);
  filter: drop-shadow(0 0 24px rgba(59,130,246,.35));
}
@keyframes coinArc {
  0% { translate: 0 0; }
  42% { translate: 0 -18px; }
  100% { translate: 0 0; }
}
#page-hilo .game-shell,
#page-hilo .game-panel,
#page-hilo .game-stage {
  background: linear-gradient(180deg, #0b1726, #08111d);
}
#page-hilo .gc-play,
#page-hilo .hl-actions .gc-play {
  min-height: 44px;
  border-radius: 9px;
}
#page-hilo .hl-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#page-hilo .hl-actions .gc-secondary,
#page-hilo .hl-actions .gc-play:last-child {
  grid-column: 1 / -1;
}
.hl-stats {
  background: rgba(21, 156, 247, .08);
  border: 1px solid rgba(21, 156, 247, .18);
  border-radius: 8px;
  padding: 10px 12px;
}
.sidebar {
  box-shadow: inset -1px 0 rgba(255,255,255,.05), 12px 0 40px rgba(0,0,0,.18);
}
.sidebar .nav-section {
  padding-top: 14px;
}
.sidebar .nav-item {
  min-height: 42px;
  margin: 2px 12px;
  border-radius: 7px;
}
.sidebar .nav-item.active {
  background: linear-gradient(90deg, #2f6ce0, #235ac2);
  box-shadow: 0 10px 25px rgba(47, 108, 224, .22);
}
@media (max-width: 820px) {
  .modal-wallet .wallet-tabs {
    margin-left: 0;
    max-width: none;
  }
  .wallet-deposit-modern {
    grid-template-columns: 1fr;
    margin-top: 0;
  }
  .deposit-main-pane {
    padding-top: 0;
  }
  .crypto-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fb-history-row {
    grid-template-columns: 34px 1fr .7fr 36px;
  }
  .fb-history-row .hr-bet,
  .fb-history-row .hr-result,
  .fb-history-row .hr-payout:nth-of-type(2) {
    display: none;
  }
}

/* =================== FINAL POLISH: HEADER TABS + LIVE WINS =================== */
.topbar { min-height: 88px; height: 88px; padding: 12px 18px; }
.main { padding-top: 88px; }
.notif-panel { top: 96px; }
.floating-stats { top: 104px; }

.brand-logo-img {
  height: 104px !important;
  width: auto;
  max-width: 360px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(35,224,120,.18));
}

.top-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(15, 33, 46, .86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.top-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(47,69,83,.95), rgba(31,50,62,.95));
  color: var(--text2);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.top-tab:hover {
  color: var(--text);
  background: linear-gradient(180deg, rgba(62,86,101,.98), rgba(38,60,73,.98));
}
.top-tab.active {
  color: #06170d !important;
  background: linear-gradient(180deg, #27d873, #109047) !important;
  border-color: rgba(91,229,132,.7);
  box-shadow: 0 10px 22px rgba(35,224,120,.18), inset 0 1px 0 rgba(255,255,255,.18);
}
.top-tab.active::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #06170d;
  opacity: .75;
}

.section-head h2 {
  gap: 10px;
  letter-spacing: 0;
}
.live-title-icon {
  width: 28px !important;
  height: 28px !important;
  padding: 5px;
  border: 1px solid rgba(35,224,120,.28);
  border-radius: 8px;
  color: #23e078;
  background: rgba(35,224,120,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.live-wins {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
}
.live-win {
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a2c38, #142530);
  border: 1px solid rgba(91,229,132,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.live-win::before {
  width: 4px;
  background: linear-gradient(180deg, #23e078, #3b82f6);
}
.live-win:hover {
  border-color: rgba(91,229,132,.42);
  background: linear-gradient(180deg, #203443, #172b36);
}
.live-win .lw-game-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #23e078;
  background: rgba(35,224,120,.12);
  border: 1px solid rgba(35,224,120,.16);
}
.live-win .lw-name {
  max-width: 150px;
  font-size: 13px;
  font-weight: 800;
}
.live-win .lw-game {
  color: #58a6ff;
  letter-spacing: .1em;
}
.live-win .lw-mult {
  color: #23e078;
  font-size: 15px;
}
.live-win .lw-bet {
  color: var(--text2);
  font-size: 10px;
}
.live-win.empty {
  justify-content: center;
  min-height: 72px;
  border-style: dashed;
}

@media (max-width: 900px) {
  .topbar { min-height: 72px; height: 72px; }
  .main { padding-top: 72px; }
  .brand-logo-img { height: 72px !important; max-width: 220px; }
  .top-tab { min-width: 70px; height: 36px; padding: 0 12px; font-size: 12px; }
  .live-wins { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 520px) {
  .topbar { min-height: 60px; height: 60px; padding: 6px 8px; }
  .main { padding-top: 60px; }
  .top-tabs { gap: 4px; padding: 3px; }
  .top-tab { min-width: 54px; height: 32px; padding: 0 9px; font-size: 11px; }
  .top-tab.active::before { display: none; }
  .brand-logo-img { height: 48px !important; max-width: 150px; }
  .live-wins { grid-template-columns: 1fr; }
}

/* =================== REQUEST POLISH 2026-06-15 =================== */
.topbar {
  min-height: 82px !important;
  height: 82px !important;
  padding: 8px 18px 8px 22px !important;
}
.main {
  padding-top: 82px !important;
}
.sidebar {
  padding-top: 82px;
}
.sidebar-nav {
  padding-top: 0 !important;
}
.topbar-left {
  gap: 18px !important;
  transform: translateX(-2px);
}
.top-tabs {
  gap: 9px !important;
  padding: 5px !important;
  border-radius: 10px !important;
}
.top-tab {
  min-width: 106px !important;
  height: 46px !important;
  padding: 0 22px !important;
  font-size: 15px !important;
}
.brand-logo-img {
  height: 88px !important;
  max-width: 430px !important;
  transform: translateY(1px);
}
.topbar .balance-pill {
  padding: 9px 17px !important;
}
.live-title-icon {
  color: #facc15 !important;
  background: rgba(250,204,21,.12) !important;
  border-color: rgba(250,204,21,.28) !important;
}

@media (max-width: 900px) {
  .topbar { min-height: 66px !important; height: 66px !important; }
  .main { padding-top: 66px !important; }
  .sidebar { padding-top: 66px; }
  .brand-logo-img { height: 94px !important; max-width: 230px !important; }
  .top-tab { min-width: 78px !important; height: 38px !important; padding: 0 13px !important; }
}

@media (max-width: 520px) {
  .topbar { min-height: 58px !important; height: 58px !important; padding: 5px 7px !important; }
  .main { padding-top: 58px !important; }
  .sidebar { padding-top: 58px; }
  .brand-logo-img { height: 58px !important; max-width: 150px !important; }
  .top-tab { min-width: 58px !important; height: 32px !important; padding: 0 9px !important; font-size: 11px !important; }
}

/* =================== REQUEST PATCH: 2026-06-15 LAYOUT + BJ CARDS =================== */
.topbar-left {
  gap: 14px !important;
  transform: translateX(-18px) !important;
}
.top-tabs {
  gap: 5px !important;
  padding: 3px !important;
  border-radius: 8px !important;
}
.top-tab {
  min-width: 53px !important;
  height: 28px !important;
  padding: 0 9px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}
.top-tab.active::before {
  width: 6px !important;
  height: 6px !important;
  margin-right: 5px !important;
}
.brand-logo-img {
  height: 140px !important;
  max-width: 380px !important;
}
.deposit-qr-placeholder:has(.deposit-qr-img) {
  background: #fff;
  padding: 8px;
}
.deposit-qr-img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 8px;
}
.bj-table {
  min-height: 760px !important;
  padding: 38px 28px 82px !important;
  background: radial-gradient(ellipse at center, #111827 0%, #05070b 72%, #020304 100%) !important;
}
.bj-deck-area {
  width: 100px !important;
  height: 140px !important;
}
.bj-zone {
  gap: 16px !important;
}
.bj-hand {
  min-height: 280px !important;
  gap: 18px !important;
  flex-wrap: wrap;
}
.card {
  width: 184px !important;
  height: 260px !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  font-size: 36px !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.75) !important;
}
.card .card-rank {
  font-size: 36px !important;
}
.card .card-suit {
  font-size: 72px !important;
}
.card .card-corner {
  font-size: 24px !important;
}
.card.hidden {
  background: linear-gradient(135deg, #263246, #111827) !important;
  border: 2px solid #3b4a62 !important;
  overflow: hidden;
}
.card.hidden::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 10px;
  background-image:
    linear-gradient(rgba(148,163,184,.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.24) 1px, transparent 1px);
  background-size: 16px 16px;
}
.card.hidden::after {
  content: '' !important;
}

@media (max-width: 900px) {
  .topbar-left { transform: translateX(-10px) !important; gap: 8px !important; }
  .brand-logo-img { height: 96px !important; max-width: 240px !important; }
  .top-tab { min-width: 48px !important; height: 28px !important; padding: 0 7px !important; font-size: 11px !important; }
  .bj-table { min-height: 640px !important; padding: 26px 16px 58px !important; }
  .card { width: 132px !important; height: 188px !important; padding: 10px 12px !important; }
  .card .card-rank { font-size: 27px !important; }
  .card .card-suit { font-size: 54px !important; }
  .card .card-corner { font-size: 18px !important; }
  .bj-hand { min-height: 210px !important; gap: 12px !important; }
}

@media (max-width: 520px) {
  .topbar-left { transform: translateX(-4px) !important; gap: 5px !important; }
  .brand-logo-img { height: 62px !important; max-width: 140px !important; }
  .top-tabs { gap: 3px !important; padding: 2px !important; }
  .top-tab { min-width: 42px !important; height: 26px !important; padding: 0 6px !important; font-size: 10px !important; }
  .bj-table { min-height: 560px !important; padding: 20px 10px 46px !important; }
  .card { width: 96px !important; height: 136px !important; padding: 8px 9px !important; }
  .card .card-rank { font-size: 20px !important; }
  .card .card-suit { font-size: 40px !important; }
  .card .card-corner { font-size: 14px !important; }
  .bj-hand { min-height: 152px !important; gap: 8px !important; }
}

/* =================== FLIPBET LOBBY REFRESH =================== */
:root {
  --bg: #07111f;
  --bg2: #0d1a2b;
  --bg3: #13243a;
  --bg4: #1b3350;
  --sidebar: #0b1728;
  --topbar: rgba(10, 20, 35, .96);
  --line: rgba(148, 163, 184, .18);
  --line2: rgba(148, 163, 184, .12);
  --text: #f8fafc;
  --text2: #b8c4d8;
  --muted: #7f8da6;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --green: #22c55e;
  --red: #ef4444;
  --gold: #facc15;
  --shadow: 0 18px 50px rgba(0, 0, 0, .34);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .42);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, #081426 0%, #06101e 48%, #050b16 100%) !important;
  color: var(--text);
  letter-spacing: 0 !important;
}

.main {
  margin-left: 240px !important;
  padding: 146px 28px 42px !important;
  min-height: 100vh;
  background: transparent !important;
}

.sidebar {
  width: 240px !important;
  background: linear-gradient(180deg, #101d31 0%, #0b1728 100%) !important;
  border-right: 1px solid rgba(148, 163, 184, .14) !important;
  box-shadow: 18px 0 40px rgba(0, 0, 0, .18);
  padding: 14px 12px !important;
}

.sidebar-nav {
  padding: 6px 0 !important;
}

.nav-section {
  padding: 0 !important;
  margin-bottom: 18px !important;
}

.nav-label {
  padding: 10px 12px 8px !important;
  color: #74839a !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.nav-item {
  min-width: 0 !important;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  color: #b7c2d6 !important;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease !important;
}

.nav-item:hover {
  background: rgba(59, 130, 246, .11) !important;
  color: #fff !important;
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, .95), rgba(37, 99, 235, .72)) !important;
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(59, 130, 246, .26);
}

.nav-item svg.ni {
  width: 18px;
  height: 18px;
  opacity: .86 !important;
}

.nav-item.active svg.ni {
  color: #fff !important;
}

.sidebar-footer {
  padding: 12px 0 0 !important;
  border-top: 1px solid rgba(148, 163, 184, .12) !important;
}

.login-btn,
.header-login-btn {
  min-width: 0 !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #5865f2, #3b82f6) !important;
  box-shadow: 0 12px 30px rgba(59, 130, 246, .28);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}

.login-btn:hover,
.header-login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow: 0 16px 38px rgba(59, 130, 246, .36);
}

.topbar {
  position: fixed !important;
  left: 240px !important;
  right: 0 !important;
  top: 0 !important;
  height: 74px !important;
  min-height: 74px !important;
  padding: 0 28px !important;
  background: var(--topbar) !important;
  border-bottom: 1px solid rgba(148, 163, 184, .12) !important;
  backdrop-filter: blur(16px);
  z-index: 45 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.topbar-left {
  transform: none !important;
  gap: 16px !important;
  min-width: 0;
}

.hamburger {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(148, 163, 184, .08);
  border: 1px solid rgba(148, 163, 184, .12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  height: 46px;
}

.brand-logo-img {
  height: 46px !important;
  max-width: 188px !important;
  object-fit: contain !important;
  transform: none !important;
}

.topbar-center,
.profile-menu,
.notif-btn,
.topbar-right > .icon-btn {
  display: none !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.header-login-btn {
  width: auto !important;
  height: 42px;
  padding: 0 18px !important;
  font-weight: 800 !important;
}

.main-category-bar {
  position: fixed;
  top: 74px;
  left: 240px;
  right: 0;
  z-index: 42;
  padding: 12px 28px 14px;
  background: linear-gradient(180deg, rgba(7, 17, 31, .96), rgba(7, 17, 31, .82));
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  backdrop-filter: blur(14px);
}

.main-category-bar .top-tabs {
  width: fit-content;
  display: flex !important;
  gap: 8px !important;
  padding: 5px !important;
  border-radius: 999px !important;
  background: rgba(15, 30, 50, .9) !important;
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.main-category-bar .top-tab {
  min-width: 0 !important;
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  color: #95a3b8 !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: background .2s ease, color .2s ease, transform .2s ease !important;
}

.main-category-bar .top-tab:hover {
  color: #fff !important;
  background: rgba(148, 163, 184, .1) !important;
}

.main-category-bar .top-tab.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, .72), rgba(96, 165, 250, .3)) !important;
  box-shadow: 0 8px 24px rgba(59, 130, 246, .18);
}

.main-category-bar .top-tab.active::before {
  display: none !important;
}

.page {
  max-width: 1360px;
  margin: 0 auto;
}

.hero {
  min-height: 170px !important;
  padding: 24px !important;
  margin-bottom: 28px !important;
  border-radius: 8px !important;
  background:
    linear-gradient(135deg, rgba(18, 34, 56, .96), rgba(10, 22, 38, .96)),
    linear-gradient(90deg, rgba(59, 130, 246, .16), transparent) !important;
  border: 1px solid rgba(148, 163, 184, .14) !important;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-content {
  max-width: 760px !important;
}

.hero-badge {
  width: fit-content;
  margin-bottom: 12px !important;
  border-radius: 999px !important;
  padding: 7px 11px !important;
  color: #dbeafe !important;
  background: rgba(59, 130, 246, .12) !important;
  border: 1px solid rgba(96, 165, 250, .18) !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.hero-title {
  font-size: clamp(28px, 3.2vw, 44px) !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  margin: 0 0 10px !important;
}

.hero-grad {
  -webkit-text-fill-color: inherit !important;
  background: none !important;
}

.hero-sub {
  max-width: 620px !important;
  color: #aab8cf !important;
  font-size: 15px !important;
  margin: 0 !important;
}

.hero-ctas {
  display: none !important;
}

.section-head {
  margin: 26px 0 14px !important;
}

.section-head h2 {
  gap: 9px !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.section-more {
  color: #8fb7ff !important;
  font-weight: 800 !important;
}

.live-wins {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 12px !important;
}

.live-win {
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(19, 36, 58, .98), rgba(13, 26, 43, .98)) !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18) !important;
}

.game-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 16px !important;
}

.game-card {
  border-radius: 8px !important;
  background: #0d1a2b !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  overflow: hidden !important;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, filter .22s ease !important;
}

.game-card:hover {
  transform: translateY(-5px) scale(1.015) !important;
  border-color: rgba(96, 165, 250, .55) !important;
  box-shadow: 0 18px 42px rgba(30, 64, 175, .28), 0 0 0 1px rgba(96, 165, 250, .16) !important;
  filter: saturate(1.08);
}

.game-card-img {
  aspect-ratio: 1 / 1.22 !important;
  background-size: cover !important;
  background-position: center !important;
}

.game-card-info {
  display: block !important;
  padding: 10px 11px 12px !important;
}

.game-card-info b {
  display: block;
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
  margin-bottom: 3px;
}

.game-card-info span {
  display: block;
  color: #8391a8;
  font-size: 11px;
  line-height: 1.3;
}

.game-card-badge {
  border-radius: 6px !important;
  background: rgba(37, 99, 235, .9) !important;
  letter-spacing: 0 !important;
}

.game-shell {
  border-radius: 8px !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
  background: linear-gradient(180deg, rgba(13, 26, 43, .94), rgba(8, 18, 32, .98)) !important;
  box-shadow: var(--shadow-lg);
}

.game-layout {
  grid-template-columns: 310px minmax(0, 1fr) !important;
  gap: 16px !important;
}

.game-side,
.game-control {
  background: #0c1829 !important;
  border-color: rgba(148, 163, 184, .12) !important;
  border-radius: 8px !important;
}

.ctrl-block,
.ctrl-readonly,
.ctrl-profit {
  border-radius: 8px !important;
}

.ctrl-label {
  color: #8f9db3 !important;
  letter-spacing: 0 !important;
  font-size: 11px !important;
}

.bet-input,
.ctrl-readonly {
  background: #081322 !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  color: #fff !important;
}

.bet-mini,
.gbr-btn {
  border-radius: 8px !important;
  background: #14243a !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
  transition: background .2s ease, transform .2s ease, color .2s ease !important;
}

.bet-mini:hover,
.gbr-btn:hover {
  background: rgba(59, 130, 246, .18) !important;
  transform: translateY(-1px);
}

.gc-play {
  border-radius: 8px !important;
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .28);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}

.gc-play:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 16px 38px rgba(37, 99, 235, .34);
}

.cf-stage,
.hl-stage {
  position: relative;
  min-height: 540px !important;
  border-radius: 8px !important;
  background:
    linear-gradient(180deg, rgba(17, 34, 57, .98), rgba(7, 15, 28, .98)) !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
}

.cf-stage {
  justify-content: center !important;
}

.cf-orbit {
  position: absolute;
  width: min(48vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(96, 165, 250, .12);
  box-shadow: inset 0 0 80px rgba(59, 130, 246, .08);
}

.cf-coin-wrap {
  position: relative;
  width: 230px !important;
  height: 230px !important;
  perspective: 1100px;
  z-index: 1;
}

.cf-coin {
  position: relative;
  width: 230px !important;
  height: 230px !important;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 26px 38px rgba(0, 0, 0, .45));
}

.cf-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  background: radial-gradient(circle at 35% 26%, #fff7cc, #f5c542 48%, #9f640a 100%);
  border: 7px solid #f8d35a;
  box-shadow: inset 0 8px 24px rgba(255, 255, 255, .34), inset 0 -12px 28px rgba(88, 51, 0, .42);
}

.cf-face-tails {
  transform: rotateY(180deg);
}

.cf-coin-img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  padding: 14px;
}

.cf-edge {
  display: none !important;
}

.cf-coin-shadow {
  position: absolute;
  left: 50%;
  bottom: -28px;
  width: 150px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .44);
  filter: blur(14px);
  transform: translateX(-50%);
}

.cf-coin.flipping + .cf-coin-shadow {
  animation: coinShadow 2.45s ease both;
}

.cf-coin.cf-land {
  animation: coinLand .32s ease both;
}

.cf-result {
  z-index: 1;
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #aab8cf;
  background: rgba(8, 19, 34, .86);
  border: 1px solid rgba(148, 163, 184, .12);
  font-weight: 800;
}

.cf-result b {
  color: #fff;
}

.cf-result span {
  color: #93a4bd;
  font-size: 12px;
}

.cf-result.is-win {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .3);
  box-shadow: 0 0 30px rgba(34, 197, 94, .14);
}

.cf-result.is-lose {
  color: #fecaca;
  border-color: rgba(239, 68, 68, .28);
}

.cf-pick {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px !important;
}

.cf-pick-btn {
  min-height: 68px;
  flex-direction: column;
  gap: 5px !important;
  border-radius: 8px !important;
  background: #081322 !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  transition: transform .2s ease, border-color .2s ease, background .2s ease !important;
}

.cf-pick-btn small {
  color: #7f8da6;
  font-size: 11px;
  font-weight: 800;
}

.cf-pick-btn:hover {
  transform: translateY(-1px);
}

.cf-pick-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, .3), rgba(96, 165, 250, .1)) !important;
  border-color: rgba(96, 165, 250, .52) !important;
  box-shadow: 0 12px 30px rgba(59, 130, 246, .18);
}

.hl-stage {
  justify-content: center !important;
  gap: 28px !important;
}

.hl-streak-display {
  border-radius: 8px !important;
  background: rgba(8, 19, 34, .78) !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
  padding: 12px 18px !important;
}

.hl-mult {
  color: #60a5fa !important;
  letter-spacing: 0 !important;
}

.hl-cards {
  gap: clamp(16px, 4vw, 42px) !important;
}

.hl-card {
  width: 150px !important;
  height: 212px !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .38);
}

.hl-card-hidden {
  background:
    linear-gradient(135deg, #1d3554, #0b1728) !important;
  border: 1px solid rgba(96, 165, 250, .3) !important;
  color: #dbeafe !important;
  font-size: 54px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.hl-arrow {
  width: 82px !important;
  height: 82px !important;
  border-radius: 50% !important;
  background: rgba(59, 130, 246, .14) !important;
  border: 1px solid rgba(96, 165, 250, .26) !important;
  color: #93c5fd !important;
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px;
  transition: background .2s ease, color .2s ease, transform .2s ease !important;
}

.hl-arrow span {
  font-size: 11px;
  font-weight: 900;
}

.hl-arrow.is-lower {
  background: rgba(239, 68, 68, .14) !important;
  border-color: rgba(248, 113, 113, .26) !important;
  color: #fca5a5 !important;
}

.hl-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 9px !important;
}

.hl-actions .gc-play[data-choice="higher"] {
  background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
}

.hl-actions .gc-play[data-choice="lower"] {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
}

.hl-actions .state-cashout {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
}

.hl-actions .hl-disabled {
  background: #162338 !important;
  color: #65748c !important;
  cursor: not-allowed !important;
  opacity: .62 !important;
  box-shadow: none !important;
}

@keyframes coinLand {
  0% { transform: translateY(0) scale(1.06); }
  55% { transform: translateY(8px) scale(.99); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes coinShadow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .75; }
  50% { transform: translateX(-50%) scale(.66); opacity: .38; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 900px) {
  .main {
    margin-left: 64px !important;
    padding: 132px 16px 32px !important;
  }

  .sidebar {
    width: 64px !important;
    padding: 12px 8px !important;
  }

  .sidebar .nav-label,
  .sidebar .nav-item span,
  .sidebar .login-btn span,
  .sidebar .user-mini-info {
    display: none !important;
  }

  .nav-item {
    justify-content: center !important;
    padding: 10px !important;
  }

  .topbar,
  .main-category-bar {
    left: 64px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .topbar {
    height: 66px !important;
    min-height: 66px !important;
  }

  .main-category-bar {
    top: 66px;
  }

  .brand-logo-img {
    height: 40px !important;
    max-width: 150px !important;
  }

  .game-layout {
    grid-template-columns: 1fr !important;
  }

  .game-side {
    order: 2;
  }

  .game-canvas {
    order: 1;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 126px 12px 28px !important;
  }

  .topbar {
    height: 62px !important;
    min-height: 62px !important;
  }

  .main-category-bar {
    top: 62px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-login-btn {
    height: 38px;
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  .header-login-btn span {
    max-width: 112px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-logo-img {
    height: 34px !important;
    max-width: 118px !important;
  }

  .hero {
    padding: 18px !important;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .game-card-info span {
    display: none;
  }

  .cf-stage,
  .hl-stage {
    min-height: 430px !important;
    padding: 18px !important;
  }

  .cf-coin-wrap,
  .cf-coin {
    width: 176px !important;
    height: 176px !important;
  }

  .hl-card {
    width: 104px !important;
    height: 148px !important;
  }

  .hl-arrow {
    width: 58px !important;
    height: 58px !important;
  }

  .hl-arrow span {
    display: none;
  }
}

body.sidebar-collapsed .sidebar {
  width: 64px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

body.sidebar-collapsed .main {
  margin-left: 64px !important;
}

body.sidebar-collapsed .topbar,
body.sidebar-collapsed .main-category-bar {
  left: 64px !important;
}

body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .login-btn span,
body.sidebar-collapsed .user-mini-info {
  display: none !important;
}

body.sidebar-collapsed .nav-item {
  justify-content: center !important;
}

.cf-coin.cf-land {
  animation: none !important;
}

/* =================== SIDEBAR CONTROLBAR + LARGER LOGO =================== */
.sidebar {
  padding-top: 12px !important;
}

.sidebar-controlbar {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 0 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.sidebar-toggle-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 8px !important;
  background: rgba(148, 163, 184, .09) !important;
  border: 1px solid rgba(148, 163, 184, .14) !important;
  color: #dbeafe !important;
  box-shadow: none !important;
}

.sidebar-toggle-btn:hover {
  background: rgba(59, 130, 246, .18) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.sidebar-mode-tabs {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 5px !important;
  padding: 4px !important;
  border-radius: 999px !important;
  background: rgba(8, 19, 34, .74) !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
}

.sidebar-mode-tabs .top-tab {
  min-width: 0 !important;
  width: 100% !important;
  height: 32px !important;
  padding: 0 8px !important;
  gap: 5px !important;
  font-size: 11px !important;
  border-radius: 999px !important;
}

.sidebar-mode-tabs .top-tab svg.ni {
  width: 14px;
  height: 14px;
}

.main {
  padding-top: 92px !important;
}

.topbar {
  height: 88px !important;
  min-height: 88px !important;
  padding-left: 28px !important;
}

.topbar-left {
  transform: none !important;
}

.brand-logo {
  height: 88px !important;
  min-width: 300px;
  overflow: visible;
}

.brand-logo-img {
  height: 184px !important;
  max-width: 520px !important;
  transform: translateY(1px) !important;
  transform-origin: left center;
  object-fit: contain !important;
}

.main-category-bar {
  display: none !important;
}

body.sidebar-collapsed .sidebar-controlbar {
  grid-template-columns: 1fr;
  justify-items: center;
}

body.sidebar-collapsed .sidebar-mode-tabs {
  display: none !important;
}

body.sidebar-collapsed .sidebar-toggle-btn {
  width: 42px !important;
}

@media (max-width: 900px) {
  .main {
    padding-top: 82px !important;
  }

  .topbar {
    height: 76px !important;
    min-height: 76px !important;
  }

  .brand-logo {
    height: 76px !important;
    min-width: 210px;
  }

  .brand-logo-img {
    height: 132px !important;
    max-width: 330px !important;
  }
}

@media (max-width: 560px) {
  .topbar {
    height: 66px !important;
    min-height: 66px !important;
  }

  .main {
    padding-top: 74px !important;
  }

  .brand-logo {
    height: 66px !important;
    min-width: 142px;
  }

  .brand-logo-img {
    height: 88px !important;
    max-width: 190px !important;
  }
}

/* =================== GAME VIEWPORT FIT + SIDEBAR COMPACTNESS =================== */
.sidebar {
  display: flex !important;
  flex-direction: column !important;
}

.sidebar-controlbar {
  flex: 0 0 auto;
  padding-bottom: 10px !important;
  margin-bottom: 8px !important;
}

.sidebar-nav {
  flex: 1 1 auto !important;
  min-height: 0;
  overflow-y: auto !important;
  padding-right: 2px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, .35) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, .35);
  border-radius: 999px;
}

.sidebar .nav-section {
  margin-bottom: 12px !important;
}

.sidebar .nav-divider {
  margin: 8px 4px 10px !important;
}

.sidebar .nav-label {
  padding: 7px 12px 6px !important;
  font-size: 9px !important;
}

.sidebar .nav-item {
  min-height: 38px !important;
  padding: 8px 12px !important;
  gap: 10px !important;
  border-radius: 8px !important;
}

.sidebar .nav-item svg.ni {
  width: 16px !important;
  height: 16px !important;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding-top: 10px !important;
}

.user-mini {
  min-width: 0 !important;
  padding: 8px !important;
}

.user-mini .user-avatar {
  width: 30px !important;
  height: 30px !important;
}

body.has-bottombar {
  padding-bottom: 0 !important;
}

body.has-bottombar .main {
  height: 100vh;
  overflow: hidden;
  padding-top: 88px !important;
  padding-bottom: 50px !important;
}

body.has-bottombar .page.active {
  height: calc(100vh - 138px);
  max-width: none;
}

body.has-bottombar .game-shell {
  height: 100% !important;
  max-width: 1320px !important;
  padding: 8px !important;
  margin: 0 auto !important;
  overflow: hidden;
}

body.has-bottombar .game-layout {
  height: 100%;
  min-height: 0;
  grid-template-columns: 308px minmax(0, 1fr) !important;
  gap: 14px !important;
}

body.has-bottombar .game-side {
  min-height: 0 !important;
  height: 100%;
  gap: 8px !important;
}

body.has-bottombar .game-side .game-control {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  gap: 8px !important;
  padding: 12px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, .35) transparent;
}

body.has-bottombar .game-side .game-control::-webkit-scrollbar {
  width: 5px;
}

body.has-bottombar .game-side .game-control::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, .35);
  border-radius: 999px;
}

body.has-bottombar .game-side .game-bottom-row {
  flex: 0 0 40px !important;
  min-height: 40px !important;
  padding: 4px !important;
  border-radius: 8px !important;
}

body.has-bottombar .gbr-btn {
  height: 30px !important;
  min-height: 30px !important;
}

body.has-bottombar .ctrl-block {
  gap: 4px !important;
}

body.has-bottombar .bet-input {
  height: 36px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

body.has-bottombar .bet-mini {
  height: 36px !important;
}

body.has-bottombar .gc-play,
body.has-bottombar .gc-secondary {
  min-height: 40px !important;
  height: 40px !important;
}

body.has-bottombar .game-canvas {
  min-height: 0 !important;
  height: 100%;
  justify-content: center !important;
  overflow: hidden;
}

body.has-bottombar #page-mines .game-canvas {
  justify-content: flex-start !important;
  padding-top: 0 !important;
}

body.has-bottombar #page-mines .mines-board-wrap {
  width: min(100%, 560px, calc(100vh - 186px)) !important;
  max-width: min(100%, 560px, calc(100vh - 186px)) !important;
  height: min(100%, 560px, calc(100vh - 186px)) !important;
  max-height: min(100%, 560px, calc(100vh - 186px)) !important;
  padding: 10px !important;
  margin-top: 0 !important;
}

body.has-bottombar #page-mines .mines-grid {
  gap: 10px !important;
  padding: 0 !important;
}

body.has-bottombar #page-mines .mines-tile {
  min-height: 0 !important;
  border-radius: 8px !important;
}

.game-bottombar {
  left: 240px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 6px 28px !important;
  background: rgba(8, 19, 34, .94) !important;
  backdrop-filter: blur(14px);
}

body.sidebar-collapsed .game-bottombar {
  left: 64px !important;
}

@media (max-width: 1180px) {
  body.has-bottombar .game-layout {
    grid-template-columns: 286px minmax(0, 1fr) !important;
  }

  body.has-bottombar #page-mines .mines-board-wrap {
    width: min(100%, 520px, calc(100vh - 186px)) !important;
    max-width: min(100%, 520px, calc(100vh - 186px)) !important;
    height: min(100%, 520px, calc(100vh - 186px)) !important;
    max-height: min(100%, 520px, calc(100vh - 186px)) !important;
  }
}

@media (max-width: 900px) {
  body.has-bottombar .main {
    overflow-y: auto;
    padding-top: 76px !important;
    padding-bottom: 48px !important;
  }

  body.has-bottombar .page.active {
    height: auto;
  }

  body.has-bottombar .game-shell {
    height: auto !important;
    min-height: calc(100vh - 124px);
  }

  body.has-bottombar .game-layout {
    grid-template-columns: 1fr !important;
  }

  .game-bottombar {
    left: 64px !important;
    height: 40px !important;
    padding: 5px 16px !important;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .sidebar .nav-item {
    min-height: 34px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .sidebar .nav-section {
    margin-bottom: 8px !important;
  }

  body.has-bottombar .main {
    padding-top: 82px !important;
    padding-bottom: 46px !important;
  }

  body.has-bottombar .page.active {
    height: calc(100vh - 128px);
  }

  body.has-bottombar #page-mines .mines-board-wrap {
    width: min(100%, 520px, calc(100vh - 166px)) !important;
    max-width: min(100%, 520px, calc(100vh - 166px)) !important;
    height: min(100%, 520px, calc(100vh - 166px)) !important;
    max-height: min(100%, 520px, calc(100vh - 166px)) !important;
  }
}

/* =================== REMOVE GAME BOTTOM STRIP + FLOATING FAIRNESS + HILO ACTION FIX =================== */
.game-bottombar {
  display: none !important;
}

body.has-bottombar .main {
  padding-bottom: 12px !important;
}

body.has-bottombar .page.active {
  height: calc(100vh - 100px) !important;
}

body.has-bottombar .game-shell {
  height: 100% !important;
}

body.has-bottombar #page-mines .mines-board-wrap {
  width: min(100%, 590px, calc(100vh - 142px)) !important;
  max-width: min(100%, 590px, calc(100vh - 142px)) !important;
  height: min(100%, 590px, calc(100vh - 142px)) !important;
  max-height: min(100%, 590px, calc(100vh - 142px)) !important;
}

.floating-fairness-btn {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 75;
  height: 40px;
  padding: 0 14px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(8, 19, 34, .9);
  border: 1px solid rgba(96, 165, 250, .28);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.floating-fairness-btn:hover {
  transform: translateY(-2px);
  background: rgba(20, 39, 65, .95);
  border-color: rgba(96, 165, 250, .52);
}

.floating-fairness-btn svg.ni {
  width: 15px;
  height: 15px;
  color: #60a5fa;
}

.hl-actions {
  display: grid !important;
  gap: 9px !important;
}

.hl-actions.two {
  grid-template-columns: 1fr 1fr !important;
}

.hl-actions.three {
  grid-template-columns: 1fr !important;
}

.hl-actions .gc-play {
  min-width: 0;
  min-height: 48px !important;
  height: auto !important;
  padding: 10px 8px !important;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: normal;
  line-height: 1.1;
}

.hl-actions.two .gc-play {
  flex-direction: row;
  gap: 7px;
}

.hl-actions .gc-play svg.ni {
  width: 15px;
  height: 15px;
}

.hl-actions .gc-play small {
  display: block;
  color: rgba(255, 255, 255, .82);
  font-size: 10px;
  font-weight: 900;
}

.hl-actions .gc-play:disabled {
  transform: none !important;
  filter: none !important;
}

.hl-actions .state-cashout {
  min-height: 52px !important;
}

@media (min-width: 1180px) {
  .hl-actions.three {
    grid-template-columns: 1fr 1fr 1fr !important;
  }
}

@media (max-width: 900px) {
  body.has-bottombar .main {
    padding-bottom: 16px !important;
  }

  body.has-bottombar .page.active {
    height: auto !important;
  }

  .floating-fairness-btn {
    right: 14px;
    bottom: 14px;
  }
}

/* =================== LOGGED-IN HEADER RESTORE + ADMIN CONTROL ROOM =================== */
.topbar-center,
.topbar-auth-control {
  display: none !important;
}

.header-login-btn {
  display: inline-flex !important;
}

body.logged-in .header-login-btn {
  display: none !important;
}

body.logged-in .topbar-center {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

body.logged-in .topbar-auth-control {
  display: inline-flex !important;
}

body.logged-in .profile-menu.topbar-auth-control {
  display: inline-flex !important;
}

.topbar-right .icon-btn,
.profile-menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px !important;
  background: rgba(15, 30, 50, .82) !important;
  border: 1px solid rgba(148, 163, 184, .14) !important;
  color: #c9d6eb !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease !important;
}

.profile-menu-btn {
  width: auto;
  padding: 0 13px !important;
  gap: 8px !important;
  font-weight: 800 !important;
}

.topbar-right .icon-btn:hover,
.profile-menu-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, .42) !important;
  background: rgba(37, 99, 235, .18) !important;
  color: #fff !important;
}

.topbar .balance-pill {
  display: inline-flex !important;
  height: 42px;
  padding: 0 14px !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(20, 39, 65, .95), rgba(10, 22, 38, .95)) !important;
  border: 1px solid rgba(96, 165, 250, .22) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
}

.topbar .balance-amt {
  color: #fff !important;
  font-weight: 900 !important;
}

.topbar .balance-currency {
  color: #91a4c4 !important;
}

.notif-dot {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .14);
}

.profile-dropdown {
  right: 0 !important;
  top: calc(100% + 10px) !important;
  min-width: 238px !important;
  border-radius: 8px !important;
  background: rgba(10, 22, 38, .98) !important;
  border: 1px solid rgba(148, 163, 184, .16) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .42) !important;
  backdrop-filter: blur(16px);
}

.profile-dropdown button {
  min-height: 38px;
  border-radius: 7px !important;
}

#page-adminpanel {
  max-width: 1480px;
}

#page-adminpanel .section-head {
  position: sticky;
  top: 88px;
  z-index: 9;
  margin: -6px 0 14px !important;
  padding: 14px 0 12px;
  background: linear-gradient(180deg, rgba(7, 17, 31, .98), rgba(7, 17, 31, .88));
  backdrop-filter: blur(12px);
}

#page-adminpanel .section-head h2 {
  font-size: 22px !important;
}

#adminContent {
  display: block;
}

.admin-tabs {
  position: sticky;
  top: 152px;
  z-index: 8;
  width: 100% !important;
  display: flex !important;
  gap: 8px !important;
  padding: 7px !important;
  margin: 0 0 16px !important;
  border-radius: 8px !important;
  background: rgba(10, 22, 38, .86) !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(12px);
  overflow-x: auto;
}

.admin-tab {
  min-height: 38px;
  padding: 0 14px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease !important;
}

.admin-tab:hover {
  color: #fff !important;
  background: rgba(148, 163, 184, .08) !important;
}

.admin-tab.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, .96), rgba(59, 130, 246, .62)) !important;
  border-color: rgba(96, 165, 250, .38) !important;
  box-shadow: 0 10px 28px rgba(37, 99, 235, .22);
}

.admin-panel {
  animation: adminPanelIn .18s ease both;
}

@keyframes adminPanelIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 12px !important;
}

.admin-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px !important;
  padding: 15px !important;
  margin-bottom: 12px !important;
  background: linear-gradient(180deg, rgba(15, 30, 50, .98), rgba(10, 22, 38, .98)) !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.admin-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, rgba(59, 130, 246, 0));
  opacity: .72;
}

.admin-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px !important;
  color: #f8fafc !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.admin-card .ac-label {
  color: #8392ab !important;
  font-size: 10px !important;
  letter-spacing: 0 !important;
  font-weight: 900;
}

.admin-card .ac-val {
  color: #fff !important;
  font-size: clamp(18px, 2vw, 26px) !important;
  letter-spacing: 0 !important;
}

.admin-row {
  gap: 10px !important;
  padding: 8px 0 !important;
}

.admin-row label {
  color: #9aa8bd !important;
  font-weight: 800;
}

.admin-row .ctrl-input,
.admin-toolbar .ctrl-input,
#page-adminpanel input[type="text"],
#page-adminpanel input[type="number"],
#page-adminpanel select {
  min-height: 38px;
  border-radius: 8px !important;
  background: rgba(5, 13, 25, .86) !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  color: #fff !important;
}

#page-adminpanel input:focus,
#page-adminpanel select:focus {
  border-color: rgba(96, 165, 250, .56) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

#page-adminpanel button,
.au-actions button,
.ad-history-table button {
  border-radius: 8px !important;
  min-height: 36px;
  font-weight: 900 !important;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease, background .18s ease !important;
}

#page-adminpanel button:hover,
.au-actions button:hover,
.ad-history-table button:hover {
  transform: translateY(-1px);
}

#page-adminpanel .btn-primary,
.au-actions .primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  border: 1px solid rgba(96, 165, 250, .34) !important;
  color: #fff !important;
}

#page-adminpanel .btn-danger,
.au-actions .danger,
.ad-history-table .danger {
  background: linear-gradient(135deg, #991b1b, #ef4444) !important;
  color: #fff !important;
}

.admin-toolbar {
  padding: 12px !important;
  border-radius: 8px;
  background: rgba(10, 22, 38, .72);
  border: 1px solid rgba(148, 163, 184, .1);
}

.admin-users-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 12px !important;
}

.admin-user-row {
  border-radius: 8px !important;
  padding: 13px !important;
  background: linear-gradient(180deg, rgba(15, 30, 50, .98), rgba(10, 22, 38, .98)) !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.admin-user-row:hover {
  border-color: rgba(96, 165, 250, .52) !important;
  transform: translateY(-2px) !important;
}

.admin-user-row.banned {
  border-color: rgba(239, 68, 68, .44) !important;
}

.admin-user-row .au-avatar {
  width: 46px !important;
  height: 46px !important;
  border: 2px solid rgba(96, 165, 250, .28);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
}

.admin-user-row .au-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff !important;
  font-size: 14px !important;
}

.admin-user-row .au-id {
  color: #7d8ba3 !important;
}

.admin-user-row .au-stats {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 7px !important;
}

.admin-user-row .au-stats > div,
.admin-stat {
  border-radius: 8px !important;
  padding: 8px !important;
  background: rgba(5, 13, 25, .72) !important;
  border: 1px solid rgba(148, 163, 184, .09);
}

.admin-user-row .au-stats span,
.admin-stat span {
  color: #7f8da6 !important;
  letter-spacing: 0 !important;
  font-weight: 900;
}

.admin-user-row .au-stats b,
.admin-stat b {
  color: #f8fafc !important;
}

.au-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .16);
}

.admin-status-pill.live,
.badge-success {
  background: rgba(34, 197, 94, .13) !important;
  color: #86efac !important;
  border-color: rgba(34, 197, 94, .25) !important;
}

.admin-status-pill.danger,
.badge-banned {
  background: rgba(239, 68, 68, .13) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, .25) !important;
}

.admin-status-pill.rank {
  background: rgba(250, 204, 21, .13);
  color: #fde68a;
  border-color: rgba(250, 204, 21, .24);
}

.admin-games-grid {
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)) !important;
  gap: 14px !important;
}

.admin-game-row {
  border-radius: 8px !important;
  background: rgba(15, 30, 50, .96) !important;
  border: 1px solid rgba(148, 163, 184, .13) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.admin-game-row:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(96, 165, 250, .52) !important;
}

.admin-game-row .agr-img {
  aspect-ratio: 1 / 1.08 !important;
  background-size: cover !important;
  background-position: center !important;
}

.admin-game-row .agr-info {
  padding: 11px !important;
}

.admin-game-row .agr-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-game-row .agr-stats {
  flex-wrap: wrap;
  color: #8a9ab4 !important;
}

.ad-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .12);
}

.ad-history-table th,
.ad-history-table td {
  padding: 10px 11px !important;
  border-bottom: 1px solid rgba(148, 163, 184, .08);
}

.ad-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  background: #101d31;
  color: #93a4bd;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ad-history-table td {
  background: rgba(8, 19, 34, .62);
  color: #dbe5f5;
}

.ad-history-table tr:hover td {
  background: rgba(37, 99, 235, .08);
}

#adUserContent .admin-card,
#adGameContent .admin-card {
  overflow-x: auto;
}

@media (max-width: 900px) {
  body.logged-in .topbar-center {
    display: none !important;
  }

  .profile-menu-btn span {
    display: none;
  }

  .admin-tabs {
    top: 76px;
  }

  .admin-users-grid {
    grid-template-columns: 1fr !important;
  }
}

/* FINAL LAUNCH OVERRIDES */
.wallet-deposit-modern { display: grid !important; grid-template-columns: 320px minmax(0, 1fr) !important; gap: 24px !important; }
.deposit-ltc-pane { background: #101216 !important; border-radius: 10px !important; padding: 18px 16px 20px !important; }
.deposit-main-pane { min-width: 0 !important; }
.crypto-grid { display: grid !important; grid-template-columns: repeat(3, minmax(120px, 1fr)) !important; gap: 9px !important; }
.fb-history-row { grid-template-columns: 42px minmax(180px, 1.2fr) .8fr .7fr .8fr .7fr 42px !important; min-height: 61px !important; background: transparent !important; border-width: 0 0 1px !important; }
.bet-info-card { width: min(400px, calc(100vw - 24px)) !important; background: #142a34 !important; text-align: center !important; }
.cf-face { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.38), transparent 18%), radial-gradient(circle at 50% 50%, #ffe78a 0%, #f6b937 48%, #b97912 100%) !important; border: 7px solid #ffd76f !important; }
.cf-face-tails { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.32), transparent 18%), radial-gradient(circle at 50% 50%, #8fd3ff 0%, #2d7fe5 50%, #164793 100%) !important; border-color: #9bd8ff !important; }
.cf-coin-img { opacity: 0 !important; }
.cf-face::after { content: 'H'; width: 58%; height: 58%; border-radius: 50%; background: rgba(10,15,25,.16); color: #fff7d1; display: flex; align-items: center; justify-content: center; font-size: 74px; font-weight: 1000; text-shadow: 0 4px 12px rgba(0,0,0,.36); }
.cf-face-tails::after { content: 'T'; color: #e6f7ff; }
#page-hilo .hl-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
#page-hilo .hl-actions .gc-secondary, #page-hilo .hl-actions .gc-play:last-child { grid-column: 1 / -1 !important; }
@media (max-width: 820px) {
  .wallet-deposit-modern { grid-template-columns: 1fr !important; }
  .crypto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .fb-history-row { grid-template-columns: 34px 1fr .7fr 36px !important; }
}

/* BLACKJACK + WALLET FIT FIXES */
.sidebar,
.sidebar-nav {
  overflow-x: hidden !important;
}
.sidebar-nav {
  scrollbar-width: none !important;
}
.sidebar-nav::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

#page-blackjack {
  overflow: hidden !important;
}
#page-blackjack .game-shell {
  height: calc(100vh - 88px) !important;
  min-height: 0 !important;
  padding: 10px !important;
  overflow: hidden !important;
}
#page-blackjack .game-layout {
  grid-template-columns: 258px minmax(0, 1fr) !important;
  gap: 12px !important;
  min-height: 0 !important;
  height: 100% !important;
}
#page-blackjack .game-side {
  min-height: 0 !important;
  height: 100% !important;
}
#page-blackjack .game-control {
  min-height: 0 !important;
  height: auto !important;
  padding: 12px !important;
}
#page-blackjack .game-bottom-row {
  display: none !important;
}
#page-blackjack .bet-row {
  grid-template-columns: minmax(0, 1fr) 88px !important;
}
#page-blackjack .bj-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
#page-blackjack .bj-actions .gc-play,
#page-blackjack .bj-action-btn {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  box-shadow: none !important;
}
#page-blackjack .bj-action-btn:disabled {
  opacity: .45 !important;
  filter: grayscale(.25) !important;
  cursor: not-allowed !important;
  background: #203145 !important;
}
#page-blackjack #bjDealBtn {
  grid-column: 1 / -1 !important;
}
#page-blackjack .game-canvas {
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
#page-blackjack .bj-table {
  position: relative !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 18px 22px !important;
  display: grid !important;
  grid-template-rows: minmax(155px, 1fr) 64px minmax(185px, 1fr) !important;
  align-items: center !important;
  background:
    radial-gradient(circle at 52% 46%, rgba(36, 62, 86, .32), transparent 36%),
    linear-gradient(180deg, #0c1c2b 0%, #07111d 100%) !important;
  border: 1px solid rgba(148, 163, 184, .12) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}
#page-blackjack .bj-table::before {
  content: 'BLACKJACK PAYS 3 TO 2';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 72px;
  border-radius: 6px;
  background: rgba(24, 47, 63, .72);
  color: rgba(205, 219, 232, .48);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  pointer-events: none;
}
#page-blackjack .bj-zone {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  min-height: 0 !important;
  gap: 8px !important;
  padding: 0 !important;
}
#page-blackjack .bj-zone-label {
  font-size: 12px !important;
  background: transparent !important;
}
#page-blackjack .bj-score {
  min-width: 48px !important;
  text-align: center !important;
}
#page-blackjack .bj-pot {
  z-index: 1 !important;
  align-self: center !important;
  margin: 0 !important;
  font-size: 13px !important;
}
#page-blackjack .bj-hand {
  min-height: 124px !important;
  height: 124px !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}
#page-blackjack .bj-hand .card {
  width: clamp(78px, 8vw, 108px) !important;
  height: clamp(110px, 11.25vw, 150px) !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  margin-left: clamp(-28px, -2vw, -14px) !important;
  border-radius: 9px !important;
  padding: 8px 9px !important;
  font-size: 20px !important;
}
#page-blackjack .bj-hand .card:first-child {
  margin-left: 0 !important;
}
#page-blackjack .card .card-rank {
  font-size: clamp(20px, 2.3vw, 29px) !important;
}
#page-blackjack .card .card-suit {
  font-size: clamp(38px, 4.5vw, 58px) !important;
}
#page-blackjack .card .card-corner {
  font-size: clamp(13px, 1.3vw, 17px) !important;
}
#page-blackjack .bj-deck-area {
  top: 18px !important;
  right: 22px !important;
  width: 70px !important;
  height: 98px !important;
  opacity: .9;
}

.modal-card.modal-wallet {
  width: min(900px, calc(100vw - 38px)) !important;
  max-width: none !important;
  max-height: min(720px, calc(100vh - 38px)) !important;
  overflow: hidden !important;
  padding: 14px !important;
}
.modal-wallet .wallet-tabs {
  width: calc(100% - 340px) !important;
  max-width: none !important;
  margin: 0 0 12px 340px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}
.modal-wallet .wallet-tab {
  min-width: 0 !important;
  padding: 0 8px !important;
  white-space: nowrap !important;
}
.modal-wallet .wallet-tab svg.ni {
  width: 15px !important;
  height: 15px !important;
}
.modal-wallet .wallet-panel {
  max-height: calc(100vh - 122px) !important;
  overflow: auto !important;
  padding-right: 2px !important;
}
.modal-wallet .wallet-panel[data-wpanel="deposit"] {
  overflow: hidden !important;
}
.modal-wallet .wallet-deposit-modern {
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 24px !important;
  margin-top: -50px !important;
  min-height: 552px !important;
}
.modal-wallet .deposit-ltc-pane,
.modal-wallet .deposit-main-pane {
  min-width: 0 !important;
}
.modal-wallet .deposit-main-pane {
  padding-top: 62px !important;
  overflow: hidden !important;
}
.modal-wallet .bonus-select {
  min-height: 44px !important;
}
.modal-wallet .bonus-select span {
  line-height: 1.1 !important;
}
.modal-wallet .crypto-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.modal-wallet .crypto-option {
  min-width: 0 !important;
}
.modal-wallet .deposit-info-grid.wallet-modern-info {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.modal-wallet .deposit-recent {
  max-height: 86px !important;
  overflow: auto !important;
}

@media (max-width: 920px) {
  #page-blackjack .game-layout {
    grid-template-columns: 230px minmax(0, 1fr) !important;
  }
  .modal-card.modal-wallet {
    overflow: auto !important;
  }
  .modal-wallet .wallet-tabs {
    width: 100% !important;
    margin: 0 0 12px 0 !important;
  }
  .modal-wallet .wallet-deposit-modern {
    grid-template-columns: 1fr !important;
    margin-top: 0 !important;
  }
  .modal-wallet .deposit-main-pane {
    padding-top: 0 !important;
  }
}

/* WALLET / GAME FINAL REPAIR PASS */
.modal-wallet .deposit-ltc-pane {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.modal-wallet .deposit-coin-head {
  min-height: 34px !important;
}
.modal-wallet .deposit-status {
  width: max-content !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  font-size: 11px !important;
}
.modal-wallet .deposit-qr-wrap {
  width: 168px !important;
  height: 168px !important;
  min-height: 168px !important;
  margin: 14px auto 16px !important;
  padding: 8px !important;
  overflow: hidden !important;
}
.modal-wallet .deposit-qr-placeholder {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.modal-wallet .deposit-qr-img {
  width: 152px !important;
  height: 152px !important;
  max-width: 152px !important;
  max-height: 152px !important;
  object-fit: contain !important;
  border-radius: 4px !important;
}
.modal-wallet .deposit-addr-wrap {
  min-height: 58px !important;
  align-items: stretch !important;
}
.modal-wallet .deposit-addr {
  min-width: 0 !important;
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  white-space: normal !important;
  word-break: break-all !important;
  line-height: 1.35 !important;
  font-size: 11px !important;
}
.modal-wallet .wallet-note {
  font-size: 12px !important;
  line-height: 1.45 !important;
}
.modal-wallet .wallet-modern-info b {
  font-size: 11px !important;
  line-height: 1.2 !important;
  word-break: normal !important;
}

#page-blackjack .bj-hand .card {
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}
#page-blackjack .card .card-rank,
#page-blackjack .card .card-suit,
#page-blackjack .card .card-corner {
  max-width: 100% !important;
  line-height: 1 !important;
  overflow: hidden !important;
}
#page-blackjack .card .card-suit {
  flex: 0 0 auto !important;
}
#page-blackjack .card .card-corner.bot {
  margin-top: 0 !important;
}

#page-hilo .game-layout {
  grid-template-columns: 280px minmax(0, 1fr) !important;
}
#page-hilo .hl-actions.two {
  grid-template-columns: 1fr 1fr !important;
}
#page-hilo .hl-actions.three {
  grid-template-columns: 1fr 1.15fr 1fr !important;
}
#page-hilo .hl-actions .gc-play {
  height: 46px !important;
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
#page-hilo .state-cashout {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  color: #05110a !important;
}

#page-coinflip .cf-stage {
  min-height: 0 !important;
  height: 100% !important;
  gap: 18px !important;
}
#page-coinflip .cf-orbit {
  width: 330px !important;
  height: 330px !important;
  opacity: .35 !important;
}
#page-coinflip .cf-coin-wrap,
#page-coinflip .cf-coin {
  width: 190px !important;
  height: 190px !important;
}
#page-coinflip .cf-coin {
  transform-style: preserve-3d !important;
  transition: transform 1.9s cubic-bezier(.22,.8,.2,1) !important;
}
#page-coinflip .cf-face {
  border-radius: 50% !important;
  overflow: hidden !important;
}
#page-coinflip .cf-face::after {
  width: 86px !important;
  height: 86px !important;
  font-size: 68px !important;
  line-height: 1 !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}
#page-coinflip .cf-coin-shadow {
  opacity: .55 !important;
}
#page-coinflip .cf-coin.flipping {
  animation: none !important;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,.38)) !important;
}
#page-coinflip .cf-coin.cf-land {
  transition: transform .22s ease !important;
}

body.sidebar-collapsed .sidebar {
  width: 64px !important;
}
body.sidebar-collapsed .main,
body.sidebar-collapsed .topbar,
body.sidebar-collapsed .main-category-bar {
  left: 64px !important;
  margin-left: 64px !important;
}
body.sidebar-collapsed .sidebar-controlbar {
  padding: 10px 8px !important;
  justify-content: center !important;
}
body.sidebar-collapsed .sidebar-mode-tabs {
  display: none !important;
}
body.sidebar-collapsed .nav-section {
  padding: 8px 6px !important;
}
body.sidebar-collapsed .nav-item {
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 3px auto !important;
  padding: 0 !important;
  justify-content: center !important;
}
body.sidebar-collapsed .nav-item svg.ni {
  width: 18px !important;
  height: 18px !important;
}
body.sidebar-collapsed .sidebar-footer {
  padding: 8px 6px !important;
}
body.sidebar-collapsed .user-mini {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  justify-content: center !important;
}

.live-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2300;
  width: min(360px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  background: #101723;
  border: 1px solid rgba(104, 132, 172, .28);
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .44);
  overflow: hidden;
}
.live-chat-head {
  min-height: 58px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(23, 37, 57, .96), rgba(15, 23, 35, .96));
  border-bottom: 1px solid rgba(104, 132, 172, .18);
}
.live-chat-head b {
  display: block;
  color: var(--text);
  font-size: 14px;
}
.live-chat-head span {
  display: block;
  margin-top: 2px;
  color: var(--green);
  font-size: 11px;
}
.live-chat-list {
  flex: 1;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-empty {
  margin: auto;
  color: var(--muted);
  font-size: 12px;
}
.chat-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}
.chat-row img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(104, 132, 172, .25);
}
.chat-row > div {
  min-width: 0;
  padding: 8px 10px;
  background: rgba(21, 34, 52, .9);
  border: 1px solid rgba(104, 132, 172, .16);
  border-radius: 8px;
}
.chat-row.mine > div {
  background: rgba(46, 104, 223, .18);
  border-color: rgba(77, 136, 255, .32);
}
.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.chat-meta b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
}
.chat-meta span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
}
.chat-row p {
  margin: 0;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
.live-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(104, 132, 172, .18);
  background: rgba(8, 13, 20, .58);
}
.live-chat-form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: #0b1320;
  border: 1px solid rgba(104, 132, 172, .24);
  border-radius: 8px;
  outline: none;
}
.live-chat-form input:focus {
  border-color: rgba(77, 136, 255, .7);
  box-shadow: 0 0 0 3px rgba(77, 136, 255, .12);
}
.live-chat-form .btn-primary {
  height: 42px;
  padding: 0 16px;
}

@media (max-width: 720px) {
  .live-chat {
    right: 10px;
    bottom: 10px;
    height: min(500px, calc(100vh - 90px));
  }
}

/* COINFLIP FINAL FACE + SPIN FIX */
#page-coinflip .cf-coin-wrap {
  perspective: 1100px !important;
}
#page-coinflip .cf-coin {
  transform-style: preserve-3d !important;
  will-change: transform !important;
}
#page-coinflip .cf-face {
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#page-coinflip .cf-face-heads {
  transform: rotateY(0deg) translateZ(1px) !important;
}
#page-coinflip .cf-face-tails {
  transform: rotateY(180deg) translateZ(1px) !important;
}
#page-coinflip .cf-face-heads::after {
  content: "H" !important;
  color: #fff7d1 !important;
}
#page-coinflip .cf-face-tails::after {
  content: "T" !important;
  color: #e6f7ff !important;
}
#page-coinflip .cf-coin.flipping {
  animation: cfSpinPulse 2.35s ease-in-out !important;
}
#page-coinflip .cf-coin.cf-land {
  animation: cfSettle .28s ease-out !important;
}
@keyframes cfSpinPulse {
  0% { filter: drop-shadow(0 10px 18px rgba(0,0,0,.34)); }
  42% { filter: drop-shadow(0 24px 34px rgba(0,0,0,.44)); }
  100% { filter: drop-shadow(0 12px 22px rgba(0,0,0,.36)); }
}
@keyframes cfSettle {
  0% { filter: drop-shadow(0 18px 28px rgba(0,0,0,.46)); }
  100% { filter: drop-shadow(0 12px 22px rgba(0,0,0,.36)); }
}

/* COINFLIP H/T FACE LOCK */
#page-coinflip .cf-face::after {
  content: none !important;
  display: none !important;
}
#page-coinflip .cf-face {
  overflow: hidden !important;
}
#page-coinflip .cf-face-heads {
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.58), transparent 17%),
    radial-gradient(circle at 50% 50%, #ffdf6c 0%, #f6b937 48%, #a96b10 100%) !important;
  border: 8px solid #ffe18a !important;
  box-shadow:
    inset 0 12px 22px rgba(255,255,255,.22),
    inset 0 -22px 30px rgba(89,50,5,.42),
    0 22px 48px rgba(0,0,0,.38) !important;
}
#page-coinflip .cf-face-tails {
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.48), transparent 17%),
    radial-gradient(circle at 50% 50%, #8fd3ff 0%, #2d7fe5 50%, #123f83 100%) !important;
  border-color: #9bd8ff !important;
}
#page-coinflip .cf-letter {
  position: absolute;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7,12,22,.2);
  color: #fff7d1;
  font-size: clamp(56px, 5.2vw, 86px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 5px 16px rgba(0,0,0,.4);
  box-shadow:
    inset 0 4px 10px rgba(255,255,255,.12),
    inset 0 -8px 18px rgba(0,0,0,.16);
  pointer-events: none;
}
#page-coinflip .cf-face-tails .cf-letter {
  color: #ecf8ff;
  background: rgba(6,20,45,.26);
}
#page-coinflip .cf-coin.flipping .cf-letter {
  opacity: .94;
}
@media (prefers-reduced-motion: reduce) {
  #page-coinflip .cf-coin,
  #page-coinflip .cf-coin.flipping,
  #page-coinflip .cf-coin.cf-land {
    transition-duration: .01ms !important;
    animation: none !important;
  }
}

