/* ============================================================
   KittyCasino v6 — premium minimal dark UI
   Palette: charcoal-blue base, single red-rose accent, Inter
   ============================================================ */
:root {
  --bg: #0f1117;
  --bg2: #13161d;
  --panel: #161923;
  --panel2: #1b1f2a;
  --card: #161923;
  --card2: #1b1f2a;
  --border: #232733;
  --border2: #2c313f;
  --text: #e8eaf0;
  --text2: #c3c8d4;
  --muted: #8a91a3;
  --faint: #5c6373;
  --accent: #e0544f;
  --accent-h: #ea6a65;
  --accent-dim: rgba(224, 84, 79, .12);
  --gold: #e0544f;            /* legacy var names kept, now accent */
  --gold-dim: rgba(224, 84, 79, .12);
  --green: #3ddc84;
  --green-dim: rgba(61, 220, 132, .1);
  --red: #f05252;
  --red-dim: rgba(240, 82, 82, .1);
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --r: 10px;
  --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: #2c313f #0f1117; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.num, .amt, input[type="number"] { font-variant-numeric: tabular-nums; }
::selection { background: rgba(224, 84, 79, .35); }
a { color: var(--accent); text-decoration: none; }
code { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: .92em; background: var(--bg2); padding: 2px 6px; border-radius: 6px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--text); }
h3 { font-size: 13.5px; color: var(--text2); margin: 20px 0 8px; }
.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .5s ease;
}
.loadercat { width: 72px; height: 72px; animation: lpulse 2.2s ease-in-out infinite; }
.loadercat svg { width: 100%; height: 100%; }
@keyframes lpulse { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1); } }
.ltext { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

/* ---------- layout shell ---------- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
  width: 224px; background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width .25s ease;
  overflow: hidden;
}
.sidebar.min { width: 64px; }
.shead {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; cursor: pointer; flex: none;
  border-bottom: 1px solid var(--border);
}
.shead .mark { width: 26px; height: 26px; flex: none; }
.shead .mark svg { width: 100%; height: 100%; }
.shead .word { font-size: 14.5px; font-weight: 600; color: var(--text2); letter-spacing: -.01em; white-space: nowrap; }
.shead .word b { color: var(--text); font-weight: 700; }
.sidebar.min .word, .sidebar.min .sitem span, .sidebar.min .sgroup, .sidebar.min .stoggle span { display: none; }
.sitems { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.sgroup {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--faint); padding: 14px 10px 6px; white-space: nowrap;
}
.sitem {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  white-space: nowrap; position: relative; border: none; background: none;
  transition: color .15s, background .15s;
}
.sitem .ic { width: 17px; height: 17px; opacity: .8; }
.sitem:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.sitem.on {
  color: var(--text); background: var(--accent-dim);
}
.sitem.on::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; border-radius: 2px; background: var(--accent);
}
.sitem.on .ic { color: var(--accent); opacity: 1; }
.sfoot { flex: none; border-top: 1px solid var(--border); padding: 6px; }
.stoggle {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--faint); white-space: nowrap;
}
.stoggle:hover { color: var(--muted); background: rgba(255, 255, 255, .03); }
.stoggle .ic { width: 15px; height: 15px; }
.sidebar.min .stoggle .ic svg { transform: rotate(180deg); }
.mainwrap { margin-left: 224px; transition: margin .25s ease; min-height: 100vh; display: flex; flex-direction: column; }
.mainwrap.shift { margin-left: 64px; }
.sbback { display: none; }

/* ---------- top bar ---------- */
.nav-inner {
  height: 52px; display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
}
.searchwrap { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 380px; }
.searchwrap .ic { color: var(--faint); width: 16px; height: 16px; }
.searchwrap input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font); font-size: 13.5px;
}
.searchwrap input::placeholder { color: var(--faint); }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.wchip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border2);
  font-size: 13.5px; transition: border-color .15s;
}
.wchip:hover { border-color: #3a4050; }
.wchip .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.wchip .cur { color: var(--faint); font-size: 11.5px; font-weight: 600; }
.wchip .chev { width: 14px; height: 14px; color: var(--faint); }
.wchip.open { border-color: var(--accent); }
.wchip .cicon { width: 16px; height: 16px; }
.avbtn {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: var(--panel2); border: 1px solid var(--border2);
  color: var(--text2); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.avbtn:hover { border-color: #3a4050; }
.avbtn.on { border-color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  color: var(--text); background: var(--panel2);
}
.btn .ic { width: 15px; height: 15px; }
.btn.gold { background: var(--accent); color: #fff; }
.btn.gold:hover { background: var(--accent-h); }
.btn.green { background: var(--green); color: #0c2417; }
.btn.green:hover { filter: brightness(1.08); }
.btn.sec { background: var(--panel2); border-color: var(--border2); color: var(--text2); }
.btn.sec:hover { border-color: #3a4050; color: var(--text); }
.btn.ghost { background: transparent; border-color: var(--border2); color: var(--text2); }
.btn.ghost:hover { border-color: #3a4050; }
.btn.danger { background: var(--red-dim); color: var(--red); border-color: rgba(240, 82, 82, .3); }
.btn.big { padding: 11px 20px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.go { width: 100%; padding: 12px; font-size: 14px; }

/* ---------- welcome strip (replaces hero) ---------- */
.welcome {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 24px;
}
.welcome .mark { width: 40px; height: 40px; flex: none; }
.welcome .mark svg { width: 100%; height: 100%; }
.welcome .wtxt { flex: 1; min-width: 0; }
.welcome .wtxt h1 { font-size: 16px; font-weight: 700; color: var(--text); }
.welcome .wtxt p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.welcome .btn { flex: none; }

/* ---------- live bets strip ---------- */
.livebets { margin-bottom: 24px; }
.lbhead {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 8px;
}
.lbhead .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: lpulse 2s infinite; }
.lbstrip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none;
}
.lbstrip::-webkit-scrollbar { display: none; }
.lbet {
  display: flex; align-items: center; gap: 8px; flex: none;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; font-size: 12.5px;
}
.lbet .u { color: var(--text2); font-weight: 500; }
.lbet .g { color: var(--faint); }
.lbet .w { color: var(--green); font-weight: 600; }
.lbet .l { color: var(--faint); }

/* ---------- game rows / tiles ---------- */
.crow { margin-bottom: 28px; }
.chead {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.chead h2 {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}
.chead h2 .ic { width: 13px; height: 13px; opacity: .7; }
.arrows { display: flex; gap: 4px; }
.arrows button {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--panel); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.arrows button:hover { color: var(--text); border-color: var(--border2); }
.arrows button .ic { width: 13px; height: 13px; }
.rail {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; scroll-behavior: smooth;
}
.rail::-webkit-scrollbar { display: none; }
.gamecard {
  width: 168px; flex: none; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--tile, var(--panel));
  overflow: hidden; position: relative;
  transition: transform .18s ease, border-color .18s ease;
}
.gamecard:hover { transform: translateY(-3px); border-color: var(--border2); }
.gamecard:active { transform: translateY(-1px); }
.gbody {
  height: 118px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.gbody .gicon { width: 44px; height: 44px; color: rgba(255, 255, 255, .88); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.gbody .gicon svg { width: 100%; height: 100%; }
.gbody .ears { display: none; }
.gbody .pills { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.gbody .pills .pill { display: none; }
.gdot {
  position: absolute; top: 10px; right: 10px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
}
.gfoot { padding: 10px 12px 12px; background: rgba(10, 12, 16, .55); border-top: 1px solid rgba(255, 255, 255, .04); }
.gfoot h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gfoot .rtp { font-size: 11px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* pills — now tiny muted text badges */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, .05);
  border-radius: 5px; padding: 2px 7px;
}
.pill .ic { width: 10px; height: 10px; }
.pill.hot { color: var(--accent); background: var(--accent-dim); }
.pill.new { color: var(--green); background: var(--green-dim); }
.pill.own, .pill.adm { color: var(--accent); background: var(--accent-dim); }
.pill.mod, .pill.rank { color: var(--muted); background: rgba(255, 255, 255, .05); }

/* ---------- panels / generic ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--faint); padding: 40px 20px; font-size: 13.5px;
}
.empty .ic { width: 22px; height: 22px; opacity: .6; }
.skel {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%);
  background-size: 200% 100%; border-radius: 10px;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 16px);
  background: var(--panel2); border: 1px solid var(--border2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 8px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 9998; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(240, 82, 82, .4); }
.toast .ic { color: var(--green); }
.toast.err .ic { color: var(--red); }
.confetti { position: fixed; top: -12px; z-index: 9997; pointer-events: none; animation: cfall 3.2s ease-in forwards; }
@keyframes cfall { to { transform: translateY(105vh) rotate(540deg); } }
.bigwin {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--border2);
  padding: 10px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  z-index: 9996; box-shadow: var(--shadow); animation: cardin .3s both;
}
.annbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-dim); border-bottom: 1px solid rgba(224, 84, 79, .2);
  color: var(--text2); font-size: 13px; padding: 8px 20px;
}
.annbar .ic { color: var(--accent); width: 15px; height: 15px; }
.annbar .x { margin-left: auto; cursor: pointer; color: var(--faint); display: flex; }
.annbar .x .ic { width: 13px; height: 13px; }
@keyframes cardin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- game page (Stake layout) ---------- */
.gpage { display: flex; gap: 16px; align-items: flex-start; }
.garea {
  flex: 1; min-width: 0; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; min-height: 420px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}
.ghead {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.ghead .ic { width: 18px; height: 18px; color: var(--muted); }
.ghead h2 { font-size: 15px; }
.gside { width: 300px; flex: none; display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted);
}
input, select {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px;
  color: var(--text); font-family: var(--font); font-size: 13.5px;
  padding: 9px 12px; outline: none; width: 100%;
  transition: border-color .15s;
}
input:focus, select:focus { border-color: #3a4050; }
input::placeholder { color: var(--faint); }
.res {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 8px; min-height: 40px;
}
.res.win { border-color: rgba(61, 220, 132, .3); color: var(--green); background: var(--green-dim); }
.res.lose { border-color: rgba(240, 82, 82, .3); color: var(--red); background: var(--red-dim); }
.res .ic { width: 14px; height: 14px; }
.bignum {
  font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text); letter-spacing: -.02em;
  display: flex; align-items: center; justify-content: center; padding: 60px 0;
}
.bignum.crashed { color: var(--red); }
.bignum .ic { width: 40px; height: 40px; color: var(--muted); }

/* mines / keno grids */
.mgrid { display: grid; grid-template-columns: repeat(5, 64px); gap: 8px; justify-content: center; padding: 16px 0; }
.mtile {
  width: 64px; height: 64px; border-radius: 10px; cursor: pointer;
  background: var(--panel2); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: var(--muted);
  transition: background .15s, border-color .15s;
}
.mtile:hover { border-color: #3a4050; }
.mtile .ic { width: 22px; height: 22px; }
.mtile.safe { background: var(--green-dim); border-color: rgba(61, 220, 132, .35); color: var(--green); }
.mtile.bomb { background: var(--red-dim); border-color: rgba(240, 82, 82, .35); color: var(--red); }
.mtile.picked { background: var(--accent-dim); border-color: rgba(224, 84, 79, .4); color: var(--accent); }

/* plinko */
.pboard { display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.pmult {
  font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border2); border-radius: 12px; padding: 16px 28px;
}

/* mousehop road */
.mroad { display: flex; gap: 8px; justify-content: center; padding: 60px 0; flex-wrap: wrap; }
.step {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center; color: var(--faint);
}
.step .ic { width: 20px; height: 20px; }
.step.done { background: var(--green-dim); border-color: rgba(61, 220, 132, .35); color: var(--green); }
.step.dead { background: var(--red-dim); border-color: rgba(240, 82, 82, .35); color: var(--red); }

/* blackjack */
.bjbox { margin-bottom: 16px; }
.bh { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.bh .val { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.bjhand { display: flex; gap: 8px; flex-wrap: wrap; min-height: 90px; }
.bjcard {
  width: 62px; height: 88px; border-radius: 8px;
  background: #f4f5f7; color: #1a1d26;
  display: grid; grid-template-rows: auto 1fr auto; padding: 6px 8px;
  font-size: 15px; font-weight: 700; position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
.bjcard.red { color: #d33a3a; }
.bjcard .corner { grid-row: 1; }
.bjcard .suit { position: absolute; bottom: 6px; right: 8px; width: 16px; height: 16px; }
.bjacts { display: flex; gap: 8px; margin-top: 10px; }

/* slots */
.slotgrid { display: grid; gap: 8px; justify-content: center; padding: 20px 0; }
.slotcell {
  width: 66px; height: 66px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.slotcell .ic { width: 26px; height: 26px; }
.slotcell.win { border-color: rgba(61, 220, 132, .4); color: var(--green); background: var(--green-dim); }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8, 9, 13, .72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.mbox {
  background: var(--panel); border: 1px solid var(--border2);
  border-radius: 14px; padding: 24px; width: min(400px, 94vw);
  box-shadow: var(--shadow); animation: cardin .25s both;
}
.mbox h2 { margin-bottom: 16px; font-size: 16px; }
.mx {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: var(--faint); cursor: pointer;
  display: flex; padding: 4px;
}
.mx:hover { color: var(--text); }
.mx .ic { width: 16px; height: 16px; }

/* ---------- wallet dropdown ---------- */
.wdrop {
  position: absolute; top: 54px; right: 12px; z-index: 800;
  width: min(360px, 94vw);
  background: var(--panel); border: 1px solid var(--border2);
  border-radius: 12px; box-shadow: var(--shadow);
  animation: cardin .2s both; overflow: hidden;
}
.wdrop .sec { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.wdrop .sec:last-child { border-bottom: none; }
.wdrop .tot { display: flex; justify-content: space-between; align-items: flex-start; }
.wdrop .tot .l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.wdrop .tot .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.wdrop .tot .u { font-size: 12px; color: var(--faint); margin-top: 2px; }
.currow { display: flex; gap: 6px; flex-wrap: wrap; }
.currow button {
  flex: 1; padding: 6px 10px; border-radius: 7px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 600;
}
.currow button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.coinrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.coinrow .ci { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.coinrow .cn { font-size: 13px; font-weight: 600; }
.coinrow .cs { font-size: 11.5px; color: var(--faint); }
.coinrow .cv { margin-left: auto; text-align: right; }
.coinrow .cv .a { font-size: 13px; font-weight: 600; }
.coinrow .cv .u { font-size: 11px; color: var(--faint); }
.wagerbar { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; margin: 6px 0; }
.wagerfill { height: 100%; background: var(--accent); border-radius: 3px; }
.wdrop .acts { display: flex; gap: 8px; }
.wdrop .acts .btn { flex: 1; }
.txrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.txrow .tt { color: var(--text2); font-weight: 500; }
.txrow .td { color: var(--faint); font-size: 11.5px; }
.txrow .ta { margin-left: auto; font-weight: 600; }

/* ---------- avatar dropdown ---------- */
.avdrop {
  position: absolute; top: 54px; right: 12px; z-index: 800;
  width: 240px; background: var(--panel); border: 1px solid var(--border2);
  border-radius: 12px; box-shadow: var(--shadow);
  animation: cardin .2s both; overflow: hidden;
}
.avdrop .who { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.avdrop .who .n { font-size: 14px; font-weight: 600; }
.avdrop .who .r { margin-top: 3px; }
.mi {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--text2);
  cursor: pointer;
}
.mi:hover { background: rgba(255, 255, 255, .03); color: var(--text); }
.mi .ic { width: 15px; height: 15px; color: var(--muted); }

/* ---------- tables / stats ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
th {
  text-align: left; font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--faint); padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text2); }
tr:last-child td { border-bottom: none; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.stat {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
}
.stat .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .05em; }
.betrow {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.betrow:last-child { border-bottom: none; }
.betrow .num { font-variant-numeric: tabular-nums; }
.admtab { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.admtab button {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 500;
}
.admtab button .ic { width: 14px; height: 14px; }
.admtab button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.togglerow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.searchbar { margin-bottom: 10px; }
.lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: flex; flex-direction: column; gap: 5px; }

/* ---------- chat ---------- */
.chatfab {
  position: fixed; bottom: 20px; right: 20px; z-index: 700;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border2);
  color: var(--text2); font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  box-shadow: var(--shadow);
}
.chatfab:hover { border-color: #3a4050; color: var(--text); }
.chatfab .ic { width: 15px; height: 15px; }
#chatpanel {
  position: fixed; bottom: 20px; right: 20px; z-index: 700;
  width: 300px; height: 420px;
  background: var(--panel); border: 1px solid var(--border2);
  border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: all .22s ease;
}
#chatpanel.open { transform: none; opacity: 1; pointer-events: auto; }
#chatpanel .chead {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; margin-bottom: 0;
}
#chatpanel .chead .ic { width: 15px; height: 15px; color: var(--muted); }
#chatpanel .cx { margin-left: auto; background: none; border: none; color: var(--faint); cursor: pointer; display: flex; }
#chatpanel .cx .ic { width: 13px; height: 13px; }
.cmsgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cmsg { font-size: 13px; color: var(--text2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cmsg .pill { flex: none; }
#chatForm { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
#chatForm input { flex: 1; }
#chatForm button {
  width: 38px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
}
#chatForm button .ic { width: 15px; height: 15px; }

/* ---------- support widget ---------- */
.supfab {
  position: fixed; bottom: 20px; left: 20px; z-index: 700;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border2);
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.supfab:hover { color: var(--text); border-color: #3a4050; }
.supfab .ic { width: 18px; height: 18px; }
.supfab .dot { display: none; }
.supfab.hasnew .dot {
  display: block; position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
#supwidget {
  position: fixed; bottom: 74px; left: 20px; z-index: 700;
  width: min(320px, 90vw); height: 400px;
  background: var(--panel); border: 1px solid var(--border2);
  border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: all .22s ease;
}
#supwidget.open { transform: none; opacity: 1; pointer-events: auto; }
#supwidget .shead {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}
#supwidget .shead .ic { width: 15px; height: 15px; color: var(--muted); }
#supwidget .shead .sub { font-size: 11px; color: var(--faint); font-weight: 500; }
#supwidget .cx { margin-left: auto; background: none; border: none; color: var(--faint); cursor: pointer; display: flex; }
#supwidget .cx .ic { width: 13px; height: 13px; }
.smsgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.supmsg {
  max-width: 85%; padding: 8px 12px; border-radius: 10px;
  font-size: 13px; line-height: 1.45;
}
.supmsg.me { align-self: flex-end; background: var(--accent-dim); color: var(--text); border-bottom-right-radius: 4px; }
.supmsg.them { align-self: flex-start; background: var(--panel2); color: var(--text2); border-bottom-left-radius: 4px; }
.supmsg.sys { align-self: center; color: var(--faint); font-size: 12px; background: none; }
#supwidget form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
#supwidget form input { flex: 1; }
#supwidget form button {
  width: 38px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
}
#supwidget form button .ic { width: 15px; height: 15px; }

/* ---------- misc ---------- */
.money { font-variant-numeric: tabular-nums; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; z-index: 9500;
  background: var(--panel2); border: 1px solid var(--border2);
  color: var(--text2); font-size: 11px; padding: 6px 10px; border-radius: 7px;
  white-space: nowrap; transform: translate(-50%, -130%);
  box-shadow: var(--shadow); pointer-events: none;
}
.spin { display: inline-flex; animation: lspin 1s linear infinite; }
.spin .ic { width: 15px; height: 15px; }
@keyframes lspin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .word, .sidebar .sitem span, .sidebar .sgroup, .sidebar .stoggle span { display: none; }
  .mainwrap { margin-left: 64px; }
  .gpage { flex-direction: column; }
  .gside { width: 100%; }
  .welcome { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .sidebar { transform: translateX(-100%); width: 224px; }
  .sidebar.open { transform: none; }
  .sidebar .word, .sidebar .sitem span, .sidebar .sgroup, .sidebar .stoggle span { display: block; }
  .mainwrap { margin-left: 0; }
  .mainwrap.shift { margin-left: 0; }
  .nav-inner { padding: 0 14px; }
  .searchwrap { max-width: none; }
  .mgrid { grid-template-columns: repeat(5, 52px); }
  .mtile { width: 52px; height: 52px; }
}

/* ---------- v6 additions: topbar / content / pagehead / favbtn ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(15, 17, 23, .85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.content { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.foot {
  text-align: center; color: var(--faint); padding: 24px 0;
  font-size: 12px; font-weight: 500; border-top: 1px solid var(--border);
}
.pagehead { margin-bottom: 20px; }
.pagehead h2 {
  font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.pagehead h2 .ic { width: 17px; height: 17px; color: var(--accent); }
.pagehead p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.hint { font-size: 12.5px; color: var(--faint); }

/* favorite heart on tiles */
.favbtn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  background: rgba(10, 12, 16, .45); border: none;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .5); opacity: 0;
  transition: opacity .15s, color .15s;
}
.favbtn .ic { width: 13px; height: 13px; }
.gamecard:hover .favbtn { opacity: 1; }
.favbtn:hover { color: var(--text); }
.favbtn.on { opacity: 1; color: var(--accent); }

/* keno grid */
.kgrid { display: grid; grid-template-columns: repeat(8, 52px); gap: 8px; justify-content: center; padding: 16px 0; }
.kgrid .mtile { width: 52px; height: 52px; }
@media (max-width: 640px) {
  .kgrid { grid-template-columns: repeat(8, 40px); }
  .kgrid .mtile { width: 40px; height: 40px; font-size: 13px; }
}

/* ---------- plinko (rebuilt) ---------- */
.plinko-wrap { display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.plinko-wrap canvas { border-radius: 12px; background: var(--bg2); border: 1px solid var(--border); max-width: 100%; }

/* ---------- wheel (rebuilt) ---------- */
.wheel-wrap {
  position: relative; width: 340px; height: 400px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; padding-top: 26px;
}
.wheel-pointer {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 20px solid var(--text);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}
.wheel-rot { width: 300px; height: 300px; will-change: transform; }
.wheel-rot svg { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 10px 34px rgba(0,0,0,.5), 0 0 0 6px var(--panel2), 0 0 0 8px var(--border2); }
.wheel-result {
  margin-top: 14px; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text2); min-height: 40px; letter-spacing: -.01em;
}

/* blackjack card deal animation + flip */
.bjcard { transform-origin: center; }
.bjcard.deal { animation: bjdeal .3s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes bjdeal {
  from { transform: translate(40px, -60px) rotate(12deg) scale(.8); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.bjcard.back { display: flex; align-items: center; justify-content: center; background: #d8452f; }
.bjcard.back .backpat {
  width: 40px; height: 56px; border-radius: 5px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.16) 0 4px, transparent 4px 8px),
              repeating-linear-gradient(-45deg, rgba(255,255,255,.16) 0 4px, transparent 4px 8px);
  border: 1px solid rgba(255,255,255,.25);
}
.bjcard.flip { animation: bjflip .18s ease both; }
@keyframes bjflip { from { transform: rotateY(90deg); } to { transform: none; } }

/* crash */
.crashwrap { display:flex; flex-direction:column; align-items:center; gap:10px; padding:24px 0; }
.chist { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; font-size:12px; }
.chist .ch { padding:2px 8px; border-radius:10px; background:#1c2027; }
.chist .ch.g { color:#3ddc84; } .chist .ch.y { color:#f7c948; } .chist .ch.r { color:#e0544f; }
#cdisp.crashed { color:#e0544f; }
.cphase { color:#8a91a3; font-size:13px; }


/* ================= game shell (settings / theater / stats / fairness) ================= */
.gshell { width: 100%; max-width: 640px; margin-top: 10px; position: relative; }
.gsicons { display: flex; gap: 6px; justify-content: flex-end; }
.gsbtn { background: var(--surf2, #1b1f2a); border: 1px solid var(--line, #2c313f); color: var(--text2, #9aa3b5); border-radius: 6px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.gsbtn:hover { color: var(--text, #e8ecf3); border-color: var(--accent, #e0544f); }
.gsbtn svg { width: 15px; height: 15px; }
.gsetpanel, .ginfopanel { background: var(--surf, #161923); border: 1px solid var(--line, #2c313f); border-radius: 8px; padding: 8px; margin-top: 6px; width: 280px; margin-left: auto; }
.gsrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 6px; font-size: 13px; color: var(--text2, #9aa3b5); }
.gsrow + .gsrow { border-top: 1px solid var(--line, #2c313f); }
.gsrow span { display: inline-flex; align-items: center; gap: 7px; }
.gsrow span svg { width: 14px; height: 14px; }
.gsvol { display: flex; align-items: center; gap: 6px; }
.gsvol input[type=range] { width: 90px; }
.gstatspanel { position: fixed; z-index: 300; width: 300px; background: var(--surf, #161923); border: 1px solid var(--line, #2c313f); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.gshead { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--line, #2c313f); cursor: grab; user-select: none; }
.gshead svg { width: 14px; height: 14px; }
.gsbody { max-height: 320px; overflow-y: auto; padding: 4px 0 8px; }
.gssub { padding: 8px 12px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, #6b7487); }
.gsclose { background: none; border: 0; color: var(--muted); cursor: pointer; display: inline-flex; }
.gsclose svg { width: 13px; height: 13px; }
.gsrow.cur { background: rgba(224,84,79,.08); }
.fairbar { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; background: var(--surf, #161923); border: 1px solid var(--line, #2c313f); border-radius: 8px; font-size: 12.5px; color: var(--text2, #9aa3b5); width: fit-content; }
.fairbar svg { width: 14px; height: 14px; }
.theater .sidebar { display: none; }
.theater .gpage { max-width: 1100px; }

/* ================= wager row (½ / 2×) ================= */
.wagerrow { display: flex; gap: 6px; }
.wagerrow input { flex: 1; min-width: 0; }
.btn.tiny { padding: 4px 9px; font-size: 12px; }
.btn.whalf, .btn.wdbl { flex: 0 0 auto; }

/* ================= HiLo ================= */
.hilo-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0; }
.hilo-mult { font-size: 26px; font-weight: 800; }
.hilo-card { min-height: 120px; display: flex; align-items: center; justify-content: center; }
.hilo-skips { font-size: 12.5px; color: var(--muted, #6b7487); }
.hiloacts { display: flex; gap: 8px; margin-top: 8px; }
.hiloacts .num { font-size: 11px; opacity: .85; margin-left: 4px; }

/* ================= Mouse Hop ================= */
.mh-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; }
.mh-mult { font-size: 26px; font-weight: 800; }
.mroad { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mroad .step { width: 44px; height: 44px; border-radius: 8px; background: var(--surf2, #1b1f2a); border: 1px solid var(--line, #2c313f); display: inline-flex; align-items: center; justify-content: center; }
.mroad .step svg { width: 20px; height: 20px; }
.mroad .step.done { border-color: var(--green, #4fae6a); background: rgba(79,174,106,.12); }
.mroad .step.dead { border-color: var(--red, #e0544f); background: rgba(224,84,79,.15); animation: mshake .3s; }
@keyframes mshake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-3px) } 75% { transform: translateX(3px) } }
/* ================= ADMIN CONTROL ROOM ================= */
.admwrap { display: flex; gap: 18px; align-items: flex-start; }
.admside { width: 210px; flex-shrink: 0; position: sticky; top: 70px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.admhead { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.admhead .mark { width: 34px; height: 34px; display: block; }
.admhead .t { font-weight: 700; font-size: 14.5px; }
.admhead .s { font-size: 11px; color: var(--muted); }
.admnav { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: none; background: none; color: var(--muted); font: 600 13px Inter; border-radius: 9px; cursor: pointer; text-align: left; }
.admnav:hover { background: var(--hover); color: var(--text); }
.admnav.on { background: var(--accent); color: #fff; }
.admmain { flex: 1; min-width: 0; }
.admtitle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.admtitle h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.admcols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
@media (max-width: 1100px) { .admcols { grid-template-columns: 1fr; } .admside { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; } .admwrap { flex-direction: column; } }
.admtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.admtable th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--border); }
.admtable td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admtable tr:hover td { background: var(--hover); }
.admrow { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; align-items: center; }
.admrow input, .admrow select { background: var(--card2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font: 500 13px Inter; }
.admrow label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.admrow label input { background: var(--card2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font: 500 13px Inter; }
.admscroll { overflow-y: auto; max-height: 300px; display: flex; flex-direction: column; gap: 2px; }
.admchart { width: 100%; height: auto; }
.admprofile { margin-top: 16px; }
.permmatrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 10px 0; }
.permcell { display: flex; align-items: center; gap: 7px; background: var(--card2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font: 500 11.5px Inter; cursor: pointer; }
.permcell input { accent-color: var(--accent); }
.permcell:hover { border-color: var(--accent); }
