/* ============================================================
   KittyCasino v8 "Velvet" — single design-system layer
   kc-ui-v8 marker. Loaded AFTER styles.css (base).
   Doctrine: restraint, layered depth, glass/blur, controlled
   glow, 8px grid, tabular numerals, micro-interactions.
   ============================================================ */
:root {
  /* layered surface system */
  --bg: #0a0c11;
  --bg2: #0e1118;
  --panel: #12151d;
  --panel2: #171b25;
  --panel3: #1d2230;
  --border: rgba(255, 255, 255, .055);
  --border2: rgba(255, 255, 255, .09);
  --text: #eef0f6;
  --text2: #c6cbd8;
  --muted: #8b92a6;
  --faint: #5d6478;
  --accent: #e0544f;
  --accent-h: #f06560;
  --accent-dim: rgba(224, 84, 79, .13);
  --gold: #e8b45a;
  --gold-dim: rgba(232, 180, 90, .12);
  --green: #3ddc84;
  --green-dim: rgba(61, 220, 132, .1);
  --red: #f05252;
  --red-dim: rgba(240, 82, 82, .1);
  --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .35);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  --r: 12px;
}

/* ---------- ambient background: deep charcoal + faint warm/cool glows ---------- */
body {
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(224, 84, 79, .07), transparent 60%),
    radial-gradient(900px 700px at 105% 15%, rgba(93, 99, 216, .055), transparent 55%),
    radial-gradient(1200px 900px at 50% 115%, rgba(232, 180, 90, .035), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* ============================================================
   SHELL: sidebar
   ============================================================ */
.sidebar {
  background: linear-gradient(180deg, rgba(18, 21, 29, .92), rgba(11, 13, 19, .96));
  border-right: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: 1px 0 24px rgba(0, 0, 0, .25);
}
.sitem {
  border-radius: 9px;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.sitem:hover { background: rgba(255, 255, 255, .045); transform: translateX(2px); }
.sitem.on {
  background: linear-gradient(90deg, rgba(224, 84, 79, .16), rgba(224, 84, 79, .05));
  box-shadow: inset 2px 0 0 var(--accent);
}

/* ============================================================
   SHELL: topbar — one glass language for everything in it
   ============================================================ */
.topbar {
  background: rgba(10, 12, 17, .72);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}
.nav-inner { height: 56px; }

/* search: glass pill */
.searchwrap {
  background: var(--glass);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 7px 14px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.searchwrap:focus-within {
  border-color: rgba(224, 84, 79, .45);
  box-shadow: var(--shadow-sm), 0 0 0 3px rgba(224, 84, 79, .1);
}

/* balance chip: glass + tabular + tick animation */
.wchip {
  background: var(--glass);
  border: 1px solid var(--border2);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .05);
  padding: 7px 14px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.wchip:hover { border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.wchip.open { border-color: rgba(224, 84, 79, .55); box-shadow: var(--shadow-sm), 0 0 0 3px rgba(224, 84, 79, .12); }
#balamt { transition: color .3s ease; }
#balamt.tickup { animation: baltick-up .8s cubic-bezier(.2, .9, .3, 1); }
#balamt.tickdown { animation: baltick-down .5s ease; }
@keyframes baltick-up {
  0% { color: var(--green); text-shadow: 0 0 18px rgba(61, 220, 132, .55); transform: translateY(0); }
  30% { transform: translateY(-1.5px); }
  100% { color: var(--text); text-shadow: none; transform: none; }
}
@keyframes baltick-down {
  0% { color: var(--red); }
  100% { color: var(--text); }
}

/* avatar button: glass */
.avbtn {
  background: var(--glass);
  border: 1px solid var(--border2);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .16s ease, transform .12s ease;
}
.avbtn:hover { border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.avbtn.on { border-color: rgba(224, 84, 79, .55); box-shadow: 0 0 0 3px rgba(224, 84, 79, .12); }

/* ---------- notification bell: glass chip + red unread dot + dropdown ---------- */
.notifwrap { position: relative; display: inline-flex; }
.notifbtn {
  position: relative; width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--border2);
  backdrop-filter: blur(10px); color: var(--text2);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .16s ease, color .16s ease, transform .12s ease;
}
.notifbtn:hover { color: var(--text); border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.notifbtn:active { transform: translateY(1px) scale(.96); }
.notifbtn .ic { width: 16px; height: 16px; }
.notifbtn .ndot {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 999px; background: linear-gradient(180deg, #ef6a64, #d44a45);
  color: #fff; font-size: 10px; font-weight: 700; font-family: var(--font);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg), 0 2px 10px rgba(224, 84, 79, .55);
  animation: ndotpulse 2.4s ease-in-out infinite;
}
@keyframes ndotpulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--bg), 0 2px 10px rgba(224, 84, 79, .55); }
  50% { box-shadow: 0 0 0 2px var(--bg), 0 2px 16px rgba(224, 84, 79, .85); }
}
.notifpanel {
  position: absolute; top: 46px; right: 0; z-index: 850; width: min(340px, 92vw);
  background: linear-gradient(180deg, rgba(26, 30, 42, .97), rgba(15, 18, 26, .98));
  border: 1px solid var(--border2); border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(20px); overflow: hidden;
  animation: cardin .2s both;
}
.notifhead {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; font-size: 13px; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.notifhead .ic { color: var(--accent); width: 15px; height: 15px; }
.notifbody { max-height: 380px; overflow-y: auto; padding: 6px; }
.notifrow {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px; border-radius: 10px; font-size: 12.5px;
  transition: background .14s ease;
}
.notifrow:hover { background: rgba(255, 255, 255, .03); }
.notifrow .ic { width: 15px; height: 15px; color: var(--muted); margin-top: 2px; flex: none; }
.notifrow .ntxt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.notifrow .ntxt b { font-size: 12.5px; color: var(--text); }
.notifrow .ntxt span { color: var(--muted); font-size: 11.5px; }
.notifrow .ntime { color: var(--faint); font-size: 10.5px; flex: none; }
.notifrow.gold .ic { color: var(--gold); }
.notifrow.race .ic { color: var(--accent); }

/* ---------- announcement bar: glass tint ---------- */
.annbar {
  background: linear-gradient(90deg, rgba(224, 84, 79, .12), rgba(224, 84, 79, .05));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(224, 84, 79, .18);
}

/* ============================================================
   BUTTONS: tactile, layered, glow on primary
   ============================================================ */
.btn {
  position: relative; overflow: hidden;
  border-radius: 10px;
  transition: transform .12s cubic-bezier(.2, .9, .3, 1.4), box-shadow .18s ease, background .18s ease, border-color .18s ease, filter .18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px) scale(.985); filter: brightness(.96); }
.btn:disabled { opacity: .55; transform: none; filter: saturate(.6); cursor: not-allowed; }

.btn.gold {
  background: linear-gradient(180deg, #ef6a64, #d44a45);
  box-shadow: 0 4px 18px rgba(224, 84, 79, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn.gold:hover { box-shadow: 0 6px 26px rgba(224, 84, 79, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }

.btn.green {
  background: linear-gradient(180deg, #46e88d, #2fb968);
  box-shadow: 0 4px 18px rgba(61, 220, 132, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.btn.sec {
  background: var(--glass);
  border-color: var(--border2);
  backdrop-filter: blur(8px);
}

/* the big bet button */
.btn.go {
  padding: 13px 18px; font-size: 14.5px; border-radius: 11px;
  letter-spacing: .01em;
}
.btn.go:not(:disabled) { animation: goBreathe 3.2s ease-in-out infinite; }
@keyframes goBreathe {
  0%, 100% { box-shadow: 0 4px 18px rgba(224, 84, 79, .28), inset 0 1px 0 rgba(255, 255, 255, .22); }
  50% { box-shadow: 0 4px 26px rgba(224, 84, 79, .42), inset 0 1px 0 rgba(255, 255, 255, .22); }
}

/* ripple (spawned by fx.js) */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .35) 0%, transparent 65%);
  transform: scale(0); animation: ripplefx .55s cubic-bezier(.2, .8, .3, 1) forwards;
}
@keyframes ripplefx { to { transform: scale(2.6); opacity: 0; } }

/* ---------- inputs: inset wells ---------- */
input, select {
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--border2);
  border-radius: 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .3);
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus {
  border-color: rgba(224, 84, 79, .5);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .3), 0 0 0 3px rgba(224, 84, 79, .12);
}
.wagerrow input { font-weight: 600; }

/* ============================================================
   LOBBY: hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border2);
  background:
    radial-gradient(700px 320px at 88% -20%, rgba(224, 84, 79, .16), transparent 60%),
    radial-gradient(500px 300px at 8% 120%, rgba(93, 99, 216, .08), transparent 55%),
    linear-gradient(180deg, #171b26, #10131b);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 28px 28px;
  margin-bottom: 24px;
}
.hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
  pointer-events: none;
}
.hero-in { display: flex; align-items: center; gap: 22px; position: relative; }
.hero .mark { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5)); }
.hero .mark svg { width: 100%; height: 100%; }
.hero .wtxt { flex: 1; min-width: 0; }
.hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.hero h1 b { color: var(--accent-h); }
.hero p { font-size: 13.5px; color: var(--muted); margin-top: 5px; max-width: 560px; }
.hero-cta { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 8px; margin-left: auto; }
.hstat {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--glass); border: 1px solid var(--border2);
  border-radius: 12px; padding: 9px 16px; min-width: 84px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.hstat b { font-size: 16px; font-weight: 800; color: var(--text); }
.hstat span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
@media (max-width: 760px) {
  .hero-in { flex-direction: column; align-items: flex-start; }
  .hero-stats { margin-left: 0; }
}

/* ============================================================
   LOBBY: game cards — premium tiles
   ============================================================ */
.gamecard {
  width: 184px; border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .05), transparent 55%),
    var(--tile, linear-gradient(180deg, #1a1f2c, #131722));
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.3), box-shadow .2s ease, border-color .2s ease;
}
.gamecard:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .5), 0 0 0 1px rgba(224, 84, 79, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.gamecard:hover .gicon { transform: scale(1.12) rotate(-3deg); }
.gamecard:hover .gplay { opacity: 1; transform: scale(1); }
.gamecard:active { transform: translateY(-1px) scale(.99); }
.gbody { height: 128px; }
.gbody .gicon { transition: transform .25s cubic-bezier(.2, .9, .3, 1.4); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); width: 48px; height: 48px; }

/* hover play overlay */
.gplay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(80% 80% at 50% 50%, rgba(10, 12, 17, .55), rgba(10, 12, 17, .25));
  opacity: 0; transform: scale(.9);
  transition: opacity .18s ease, transform .18s cubic-bezier(.2, .9, .3, 1.4);
  pointer-events: none;
}
.gplay .ic {
  width: 44px; height: 44px; color: #fff;
  background: linear-gradient(180deg, #ef6a64, #d44a45);
  border-radius: 50%; padding: 12px;
  box-shadow: 0 8px 24px rgba(224, 84, 79, .5), inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* badges */
.gbadge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 999px;
  backdrop-filter: blur(8px);
}
.gbadge .ic { width: 10px; height: 10px; }
.gbadge.hot {
  color: #ffb4b0;
  background: linear-gradient(180deg, rgba(224, 84, 79, .32), rgba(224, 84, 79, .18));
  border: 1px solid rgba(224, 84, 79, .4);
  box-shadow: 0 2px 10px rgba(224, 84, 79, .25);
}
.gbadge.new {
  color: #a9f0c9;
  background: linear-gradient(180deg, rgba(61, 220, 132, .26), rgba(61, 220, 132, .12));
  border: 1px solid rgba(61, 220, 132, .38);
  box-shadow: 0 2px 10px rgba(61, 220, 132, .2);
}

/* card footer */
.gfoot {
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(10, 12, 16, .62), rgba(10, 12, 16, .8));
  border-top: 1px solid rgba(255, 255, 255, .04);
}
.gmeta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 3px;
}
.gmeta .prov { font-size: 10.5px; color: var(--faint); font-weight: 500; }
.gfoot .rtp { font-size: 10.5px; color: var(--muted); margin-top: 0; }

/* section headers */
.chead h2 { font-size: 11.5px; letter-spacing: .11em; color: var(--text2); }
.arrows button {
  background: var(--glass); border: 1px solid var(--border2);
  backdrop-filter: blur(8px);
  transition: border-color .15s ease, color .15s ease, transform .12s ease;
}
.arrows button:hover { color: var(--text); border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); }

/* live bets chips */
.lbet {
  background: var(--glass); border: 1px solid var(--border2);
  backdrop-filter: blur(8px); border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease;
}
.lbet:hover { border-color: rgba(255, 255, 255, .14); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .25));
  padding: 28px 20px 32px;
}
.foot-in { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fbrand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--text2); }
.fbrand .mark { width: 24px; height: 24px; display: inline-flex; }
.fbrand .mark svg { width: 100%; height: 100%; }
.fbrand b { color: var(--text); font-weight: 700; }
.flinks { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: center; }
.flinks .ic { width: 12px; height: 12px; color: var(--accent); }
.flink { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: color .15s ease; }
.flink:hover { color: var(--text); }
.fsep { color: var(--faint); }
.fcopy { font-size: 11px; color: var(--faint); }

/* ============================================================
   SURFACES: panels / stats / modals / dropdowns — glass system
   ============================================================ */
.panel {
  background:
    radial-gradient(600px 200px at 50% -10%, rgba(255, 255, 255, .025), transparent 70%),
    linear-gradient(180deg, #141824, #10131c);
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.stat {
  background: var(--glass); border: 1px solid var(--border2);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.stat .v { font-size: 18px; }

.modal .mbox, .gsetpanel, .gstatspanel, .ginfopanel {
  background: linear-gradient(180deg, rgba(26, 30, 42, .97), rgba(15, 18, 26, .98));
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(20px);
}
.wdrop, .avdrop {
  background: linear-gradient(180deg, rgba(26, 30, 42, .97), rgba(15, 18, 26, .98));
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(20px);
}
.wdrop { top: 58px; }
.avdrop { top: 58px; }
.toast {
  background: linear-gradient(180deg, rgba(26, 30, 42, .97), rgba(15, 18, 26, .98));
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px);
  animation: toastin .35s cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes toastin { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ============================================================
   GAME PAGE: stage with depth (bet sidebar layout kept)
   ============================================================ */
.garea {
  background:
    radial-gradient(700px 340px at 50% -10%, rgba(255, 255, 255, .03), transparent 70%),
    linear-gradient(180deg, #141824, #10131c);
  border: 1px solid var(--border2);
  border-radius: 16px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
  position: relative; overflow: hidden;
}
.garea::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
  pointer-events: none;
}
.gside {
  background: linear-gradient(180deg, rgba(23, 27, 37, .9), rgba(16, 19, 28, .95));
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(10px);
}
.ghead { border-bottom: 1px solid var(--border); }
.ghead .pill {
  background: var(--glass); border: 1px solid var(--border2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* result banner */
.res {
  border-radius: 10px;
  animation: resin .3s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes resin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.res.win {
  background: linear-gradient(180deg, rgba(61, 220, 132, .14), rgba(61, 220, 132, .05));
  border-color: rgba(61, 220, 132, .35);
  box-shadow: 0 0 24px rgba(61, 220, 132, .12), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.res.lose {
  background: linear-gradient(180deg, rgba(240, 82, 82, .1), rgba(240, 82, 82, .03));
  border-color: rgba(240, 82, 82, .28);
}
.res.lose.shake { animation: resshake .4s ease; }
@keyframes resshake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); } 40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(2px); }
}

/* tiles (mines/keno): pressable gems */
.mtile {
  background: linear-gradient(180deg, #1e2331, #171b26);
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 3px 8px rgba(0, 0, 0, .3);
  transition: transform .14s cubic-bezier(.2, .9, .3, 1.5), box-shadow .14s ease, border-color .14s ease, background .2s ease;
}
.mtile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 16px rgba(0, 0, 0, .4); }
.mtile:active { transform: translateY(1px) scale(.96); }
.mtile.picked { border-color: rgba(224, 84, 79, .55); box-shadow: 0 0 14px rgba(224, 84, 79, .2), inset 0 1px 0 rgba(255, 255, 255, .06); }
.mtile.safe {
  background: linear-gradient(180deg, rgba(61, 220, 132, .22), rgba(61, 220, 132, .08));
  border-color: rgba(61, 220, 132, .5);
  box-shadow: 0 0 18px rgba(61, 220, 132, .22);
  animation: tilepop .35s cubic-bezier(.2, .9, .3, 1.6);
}
.mtile.bomb {
  background: linear-gradient(180deg, rgba(240, 82, 82, .24), rgba(240, 82, 82, .08));
  border-color: rgba(240, 82, 82, .55);
  box-shadow: 0 0 18px rgba(240, 82, 82, .25);
  animation: tilepop .35s cubic-bezier(.2, .9, .3, 1.6);
}
@keyframes tilepop { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* big number (dice/limbo/crash) */
.bignum {
  text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
  transition: color .25s ease, text-shadow .25s ease;
}
.bignum.winning { color: var(--green); text-shadow: 0 0 32px rgba(61, 220, 132, .5); animation: bignumwin .6s cubic-bezier(.2, .9, .3, 1.4); }
.bignum.crashed { color: var(--red); text-shadow: 0 0 28px rgba(240, 82, 82, .45); }
@keyframes bignumwin { 0% { transform: scale(.82); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* cards (blackjack/hilo): real depth + flip */
.bjcard {
  background: linear-gradient(160deg, #f7f8fb, #dfe3ec);
  border-radius: 9px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .8);
  border: 1px solid rgba(0, 0, 0, .2);
}
.bjcard.back {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px),
    linear-gradient(160deg, #2c3245, #1c212e);
  border-color: rgba(255, 255, 255, .12);
}
.bjcard.deal { animation: dealin .32s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes dealin {
  0% { opacity: 0; transform: translate(60px, -46px) rotate(14deg) scale(.86); }
  100% { opacity: 1; transform: none; }
}
.bjcard.flip { animation: cardflip .3s ease; transform-style: preserve-3d; }
@keyframes cardflip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

/* wheel / plinko stages */
.wheel-wrap, .plinko-wrap { filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .5)); }
.wheel-pointer { filter: drop-shadow(0 0 8px rgba(224, 84, 79, .6)); }
.wheel-result { text-shadow: 0 0 24px rgba(255, 255, 255, .25); }

/* game shell bar */
.gshell {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.gsbtn { transition: background .15s ease, transform .12s ease, color .15s ease; }
.gsbtn:hover { background: rgba(255, 255, 255, .07); transform: translateY(-1px); }
.gsbtn:active { transform: translateY(1px) scale(.94); }

/* win overlay (fx.js spawns) */
.kc-winflash {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  animation: winflash .7s ease-out forwards;
}
@keyframes winflash { 0% { background: radial-gradient(60% 50% at 50% 45%, rgba(61, 220, 132, .14), transparent 70%); } 100% { background: transparent; } }
.kc-winbig {
  position: fixed; left: 50%; top: 34%; z-index: 9998; pointer-events: none;
  transform: translateX(-50%);
  font-size: 46px; font-weight: 800; letter-spacing: -.02em;
  color: #fff; text-shadow: 0 4px 40px rgba(61, 220, 132, .65), 0 2px 8px rgba(0, 0, 0, .5);
  animation: winbig 1.6s cubic-bezier(.2, .9, .3, 1) forwards;
}
@keyframes winbig {
  0% { opacity: 0; transform: translateX(-50%) scale(.5); }
  18% { opacity: 1; transform: translateX(-50%) scale(1.12); }
  30% { transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.04) translateY(-14px); }
}

/* ============================================================
   MISC POLISH
   ============================================================ */
.pill {
  background: var(--glass); border: 1px solid var(--border2);
  backdrop-filter: blur(6px);
}
.skel {
  background: linear-gradient(100deg, #141824 40%, #1c2130 50%, #141824 60%);
  background-size: 200% 100%;
  animation: skelshimmer 1.4s linear infinite;
  border-radius: 12px;
}
@keyframes skelshimmer { to { background-position: -200% 0; } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232838; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2e3448; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .btn, .mtile, .gamecard, .sitem { transition: none !important; }
  .btn.go:not(:disabled) { animation: none; }
  .notifbtn .ndot { animation: none; }
}
