/* 67BET Casino: dark, fast, phone-first. Everything is scoped to #view-casino. */
#view-casino {
  --cg-bg: #0A0C10;
  --cg-panel: #12151B;
  --cg-panel-2: #1A1E26;
  --cg-input: #0E1116;
  --cg-line: #222733;
  --cg-text: #D5DAE4;
  --cg-dim: #8A93A6;
  --cg-green: #3DD68C;
  --cg-red: #FF5A5F;
  --cg-gold: #F5B83D;
  --cg-blue: #5B9DFF;
  color: var(--cg-text);
  padding: 12px 0 90px;
}
#view-casino * { box-sizing: border-box; }
#view-casino button { font-family: inherit; }

/* ---------- lobby ---------- */
.cg-lobby__head, .cg-game__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.cg-lobby__head { align-items: flex-end; margin: 8px 0 16px; }
.cg-lobby__head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; color: #F3F5F9; }
.cg-lobby__head p { margin: 4px 0 0; font-size: 13px; color: #9AA2B4; }
.cg-lobby__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
/* Flat card, the game's line icon on a tile in its own colour */
.cg-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #1C2029;
  border-radius: 16px;
  background: var(--cg-panel);
  color: #F3F5F9;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.cg-card:hover { border-color: #2A3040; }
.cg-card:active { transform: scale(0.98); }
.cg-card__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone); }
.cg-card__txt { display: flex; flex-direction: column; gap: 3px; }
.cg-card__name { font-size: 16px; font-weight: 700; }
.cg-card__tag { font-size: 12px; color: #9AA2B4; }
.cg-card--red { --tone: #FF7A7E; --tone-bg: #2A1416; }
.cg-card--blue { --tone: #7FB0FF; --tone-bg: #13203A; }
.cg-card--pink { --tone: #F48FC5; --tone-bg: #2A1424; }
.cg-card--teal { --tone: #4FD1C5; --tone-bg: #0F2626; }
.cg-card--orange { --tone: #FFA25C; --tone-bg: #2A1C10; }
.cg-card--navy { --tone: #A5A8FF; --tone-bg: #1A1B33; }
.cg-card--green { --tone: #3DD68C; --tone-bg: #0F2A1F; }
.cg-card--purple { --tone: #C69CFF; --tone-bg: #221838; }
.cg-card--gold { --tone: #F5C76A; --tone-bg: #2A2210; }

.cg-closed { text-align: center; padding: 60px 16px; }
.cg-closed__icon { font-size: 54px; margin-bottom: 10px; }
.cg-closed p { color: var(--cg-dim); }

/* ---------- buttons & fields ---------- */
.cg-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--cg-panel);
  color: #C9CFDB;
  border: 1px solid var(--cg-line);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cg-ghost:hover { border-color: #333A48; color: #F3F5F9; }
.cg-mute { padding: 0; }
.cg-game__bar strong { color: #fff; font-size: 16px; }
.cg-link { background: none; border: 0; color: var(--cg-blue); font-weight: 700; font-size: 12px; cursor: pointer; padding: 0; }

.cg-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
}
.cg-controls {
  order: -1;
  background: var(--cg-panel);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
}
.cg-board {
  background: var(--cg-bg);
  border: 1px solid var(--cg-line);
  border-radius: 12px;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}
.cg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cg-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--cg-dim); font-weight: 600; }
.cg-label b { color: #fff; }
.cg-amount {
  display: flex;
  align-items: center;
  background: var(--cg-input);
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  overflow: hidden;
}
.cg-amount:focus-within { border-color: var(--cg-blue); }
.cg-amount__cur { padding: 0 8px; color: var(--cg-dim); font-weight: 700; }
.cg-amount input, .cg-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 4px;
  outline: none;
}
.cg-input { background: var(--cg-input); border: 1px solid var(--cg-line); border-radius: 8px; padding: 11px 10px; width: 100%; }
.cg-amount button {
  border: 0;
  border-left: 1px solid var(--cg-line);
  background: var(--cg-panel-2);
  color: #fff;
  font-weight: 800;
  padding: 0 14px;
  align-self: stretch;
  cursor: pointer;
}
.cg-amount button:hover { background: #24406a; }
.cg-hint { font-size: 11px; color: var(--cg-dim); line-height: 1.45; }
.cg-readout {
  background: var(--cg-input);
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  padding: 11px 10px;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cg-readout--big { font-size: 18px; color: var(--cg-green); }
.cg-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cg-select {
  width: 100%;
  background: var(--cg-input);
  color: #fff;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  padding: 11px 10px;
  font-weight: 700;
  font-size: 14px;
}
.cg-toggle { display: grid; grid-template-columns: 1fr 1fr; background: var(--cg-input); border-radius: 8px; padding: 3px; gap: 3px; }
.cg-toggle button { border: 0; border-radius: 6px; padding: 10px; background: transparent; color: var(--cg-dim); font-weight: 800; cursor: pointer; }
.cg-toggle button.active { background: var(--cg-panel-2); color: #fff; }

.cg-bet {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 15px;
  background: var(--cg-green);
  color: #06210f;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #11994a;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.cg-bet:hover { filter: brightness(1.07); }
.cg-bet:active { transform: translateY(2px); box-shadow: 0 2px 0 #11994a; }
.cg-bet:disabled { filter: grayscale(0.6) brightness(0.8); cursor: not-allowed; }
.cg-bet--cash { background: var(--cg-gold); color: #2b1a00; box-shadow: 0 4px 0 #b97a06; }

.is-win { color: var(--cg-green) !important; }
.is-lose { color: var(--cg-red) !important; }

/* ---------- dice ---------- */
.cg-dice { width: 100%; max-width: 560px; }
.cg-dice__result { text-align: center; font-size: 54px; font-weight: 900; color: #fff; margin-bottom: 26px; font-variant-numeric: tabular-nums; }
.cg-dice__track { position: relative; height: 34px; background: var(--cg-panel); border-radius: 17px; padding: 12px 14px; }
.cg-dice__bar { height: 10px; border-radius: 5px; }
.cg-dice__track input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cg-dice__marker {
  position: absolute;
  top: -40px;
  transform: translateX(-50%);
  margin-left: 0;
  transition: left 0.35s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.cg-dice__marker span {
  display: block;
  background: #fff;
  color: var(--cg-red);
  font-weight: 900;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 6px;
}
.cg-dice__marker.is-win span { color: #0b7d4f; }
.cg-dice__scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--cg-dim); padding: 6px 12px 0; }
.cg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.cg-stats > * {
  background: var(--cg-panel);
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  color: var(--cg-text);
}
.cg-stats span { font-size: 11px; color: var(--cg-dim); }
.cg-stats b { font-size: 15px; color: #fff; }
.cg-stat-btn { cursor: pointer; font: inherit; }
.cg-stat-btn:hover { border-color: var(--cg-blue); }

/* ---------- limbo ---------- */
.cg-limbo { text-align: center; }
.cg-limbo__num { font-size: clamp(54px, 14vw, 104px); font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.cg-limbo__target { color: var(--cg-dim); margin-top: 8px; }
.cg-limbo__target b { color: #fff; }

/* ---------- coin flip ---------- */
.cg-flip { text-align: center; perspective: 900px; }
.cg-coin {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 22px;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(.2, .7, .2, 1);
}
.cg-coin__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 62px;
  font-weight: 900;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.4);
}
.cg-coin__face--heads { background: radial-gradient(circle at 35% 30%, #ffe27a, #d68a07); color: #7a4500; }
.cg-coin__face--tails { background: radial-gradient(circle at 35% 30%, #9fd8ff, #1d6fc2); color: #06305c; transform: rotateY(180deg); }
.cg-flip__msg { font-weight: 800; font-size: 16px; color: var(--cg-text); }

/* ---------- mines ---------- */
.cg-mines {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 440px;
}
.cg-tile {
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background: var(--cg-panel-2);
  box-shadow: 0 5px 0 #12151B;
  font-size: clamp(20px, 6vw, 34px);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.cg-tile:not(:disabled):hover { background: #2a4a74; transform: translateY(-2px); }
.cg-tile:disabled { cursor: default; }
.cg-tile.is-opening { animation: cg-pulse 0.5s ease infinite; }
.cg-tile.is-gem { background: #0d3b2a; box-shadow: 0 5px 0 #062217; }
.cg-tile.is-mine { background: #3a1620; box-shadow: none; opacity: 0.7; }
.cg-tile.is-hit { background: var(--cg-red); box-shadow: none; animation: cg-shake 0.4s; }
.cg-tile.is-ghost { opacity: 0.35; box-shadow: none; }
@keyframes cg-pulse { 50% { transform: scale(0.94); } }
@keyframes cg-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- plinko ---------- */
/* Like Stake: coloured slots with a darker "base" under them that press down when a ball lands */
.cg-plinko { position: relative; width: 100%; max-width: 680px; padding-bottom: 8px; }
.cg-plinko canvas { width: 100%; display: block; }
.cg-plinko__buckets { display: flex; gap: 3px; margin-top: 2px; }
.cg-plinko__buckets span {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: var(--slot-font, 11px);
  font-weight: 900;
  letter-spacing: -0.4px;
  color: #1a0b00;
  background: var(--slot);
  border-radius: 4px;
  padding: 7px 0 6px;
  text-overflow: clip;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--slot) 55%, #000);
  transition: transform 0.12s ease;
}
.cg-plinko__buckets span.is-hit { animation: cg-slot-hit 0.3s ease; }
@keyframes cg-slot-hit {
  35% { transform: translateY(4px); box-shadow: 0 0 0 color-mix(in srgb, var(--slot) 55%, #000); filter: brightness(1.15); }
}
/* The last results, newest on top, down the right side of the board */
.cg-plinko__recent {
  position: absolute;
  top: 6px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}
.cg-plinko__recent span {
  min-width: 44px;
  padding: 6px 6px;
  border-radius: 6px;
  background: var(--slot);
  color: #1a0b00;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--slot) 55%, #000);
  animation: cg-recent-in 0.25s ease;
}
.cg-plinko__recent span:nth-child(n+2) { opacity: 0.85; }
.cg-plinko__recent span:nth-child(n+4) { opacity: 0.55; }
@keyframes cg-recent-in { from { transform: translateY(-8px); opacity: 0; } }
.cg-plinko__mode { margin-bottom: 2px; }
.cg-bet.is-stop { background: #FF5A5F; color: #fff; box-shadow: 0 4px 0 #b3202f; }
@media (max-width: 520px) {
  .cg-plinko__recent span { min-width: 36px; padding: 4px 4px; font-size: 9.5px; }
}

/* ---------- crash ---------- */
.cg-crash { position: relative; width: 100%; height: 340px; }
.cg-crash canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cg-crash__num {
  position: absolute;
  top: 34%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(48px, 13vw, 86px);
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.cg-crash__msg { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--cg-dim); font-weight: 700; font-size: 13px; padding: 0 12px; }

/* ---------- history & fairness ---------- */
.cg-history { margin-top: 16px; }
.cg-history__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cg-history__head strong { color: #fff; }
.cg-history__list { display: flex; flex-direction: column; gap: 4px; }
.cg-hrow {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr 1fr;
  gap: 8px;
  align-items: center;
  background: var(--cg-panel);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
}
.cg-hrow span:not(:first-child), .cg-hrow .cg-link { text-align: right; }
.cg-fair p { font-size: 13px; line-height: 1.55; color: #b7c9e6; margin: 0 0 14px; }
.cg-fair .cg-field { margin-bottom: 12px; }
.cg-code { display: block; background: #0E1116; border: 1px solid #222733; border-radius: 8px; padding: 10px; font-size: 11.5px; color: #fff; word-break: break-all; }
.cg-fair__verify { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.cg-fair__verify strong { color: #fff; }
.x1-modal-box .cg-fair { --cg-panel: #12151B; --cg-panel-2: #1A1E26; --cg-input: #0E1116; --cg-line: #222733; --cg-dim: #8A93A6; --cg-green: #3DD68C; color: #D5DAE4; }
.x1-modal-box .cg-bet { width: 100%; border: 0; border-radius: 10px; padding: 13px; background: #3DD68C; color: #06210f; font-weight: 900; cursor: pointer; }
.x1-modal-box .cg-hrow { background: #12151B; }

/* ---------- phones: game on top, controls under it ---------- */
@media (max-width: 860px) {
  #view-casino { padding-top: 8px; }
  .cg-wrap { grid-template-columns: 1fr; }
  .cg-controls { order: 0; }
  .cg-board { min-height: 260px; padding: 12px; }
  .cg-crash { height: 260px; }
  .cg-lobby__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cg-dice__result { font-size: 44px; margin-bottom: 30px; }
  .cg-stats { grid-template-columns: 1fr 1fr 1fr; }
  .cg-stats b { font-size: 13px; }
}

/* ---------- table games: cards & chips ---------- */

.cg-cardrow { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 84px; }
.cg-cardx {
  width: 58px;
  height: 82px;
  border-radius: 8px;
  background: #fff;
  color: #1b2333;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 7px;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.cg-cardx.is-new { animation: cg-deal 0.5s cubic-bezier(.2,.75,.25,1) both; }
/* The dealer's hole card turning over: the back folds away, then the face folds in */
.cg-cardx.is-turning { animation: cg-turn-out 0.17s ease-in forwards; }
.cg-cardx.is-flip { animation: cg-turn-in 0.24s ease-out both; }
.cg-cardx span:last-child { align-self: flex-end; font-size: 22px; }
.cg-cardx.is-red { color: #d6243a; }
.cg-cardx--back { background: repeating-linear-gradient(45deg, #1d4ed8 0 6px, #2F6FEB 6px 12px); border: 3px solid #fff; }
.cg-cardx--slot { background: transparent; border: 2px dashed #222733; box-shadow: none; animation: none; }
@keyframes cg-deal {
  0% { opacity: 0; transform: translate(70px, -110px) rotate(-18deg) scale(0.8); }
  25% { opacity: 1; }
  80% { transform: translate(0, 2px) rotate(1deg) scale(1.01); }
  100% { transform: none; }
}
@keyframes cg-turn-out { to { transform: perspective(500px) rotateY(90deg); } }
@keyframes cg-turn-in { from { transform: perspective(500px) rotateY(-90deg); } to { transform: none; } }

.cg-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cg-chip {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.55);
  background: #2F6FEB;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
}
.cg-chip:nth-child(2) { background: #16a34a; }
.cg-chip:nth-child(3) { background: #d97706; }
.cg-chip:nth-child(4) { background: #dc2626; }
.cg-chip:nth-child(5) { background: #7c3aed; }
.cg-chip.active { outline: 3px solid #fff; outline-offset: 2px; }
.cg-rchip {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 20px;
  padding: 2px 4px;
  border-radius: 10px;
  background: #ffd21f;
  color: #2b1a00;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

/* ---------- roulette ---------- */
.cg-roulette { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.cg-reel { position: relative; height: 56px; overflow: hidden; border-radius: 10px; background: #0E1116; border: 1px solid var(--cg-line); }
.cg-reel__strip { display: flex; height: 100%; will-change: transform; }
.cg-reel__strip span {
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.3);
}
.cg-reel__pointer { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #ffd21f; box-shadow: 0 0 10px #ffd21f; }
#view-casino .r-red { background-color: #d6243a; }
#view-casino .r-black { background-color: #1f2937; }
#view-casino .r-green { background-color: #15803d; }
.cg-rlast { display: flex; gap: 4px; min-height: 22px; flex-wrap: wrap; }
.cg-rlast span { min-width: 24px; padding: 3px 5px; border-radius: 5px; font-size: 11px; font-weight: 900; color: #fff; text-align: center; }
.cg-rtable-wrap { overflow-x: auto; padding-bottom: 4px; }
.cg-rtable { display: grid; grid-template-columns: 1fr 13fr; gap: 3px; min-width: 340px; }
.cg-rzero { grid-row: 1; display: flex; }
.cg-rzero .cg-rcell { flex: 1; }
.cg-rnums { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; }
.cg-rdozens, .cg-routside { grid-column: 2; display: grid; gap: 3px; }
.cg-rdozens { grid-template-columns: repeat(3, 1fr); }
.cg-routside { grid-template-columns: repeat(6, 1fr); }
.cg-rcell {
  position: relative;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.cg-rcell.is-out { background-color: var(--cg-panel-2); }
#view-casino .cg-rcell.is-out.r-red { background-color: #d6243a; }
#view-casino .cg-rcell.is-out.r-black { background-color: #1f2937; }
.cg-rcell:hover { filter: brightness(1.2); }
.cg-rcell.is-hit { outline: 3px solid #ffd21f; outline-offset: -3px; filter: brightness(1.25); }

/* ---------- baccarat ---------- */
.cg-baccarat { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.cg-bachands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cg-bachand { background: var(--cg-panel); border-radius: 10px; padding: 10px; }
.cg-bachand__head { display: flex; justify-content: space-between; font-weight: 900; color: var(--cg-dim); margin-bottom: 8px; font-size: 13px; }
.cg-bachand__head b { color: #fff; font-size: 18px; }
.cg-bachand .cg-cardx { width: 46px; height: 66px; font-size: 15px; }
.cg-bacmsg { text-align: center; font-weight: 900; font-size: 16px; color: #fff; min-height: 22px; }
.cg-bacboxes { display: grid; grid-template-columns: 1fr 0.8fr 1fr; gap: 8px; }
.cg-bacbox {
  position: relative;
  border: 2px solid var(--cg-line);
  border-radius: 10px;
  padding: 16px 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.cg-bacbox strong { font-size: 15px; }
.cg-bacbox span { font-size: 11px; color: var(--cg-dim); }
.cg-bacbox--player { background: rgba(37, 99, 235, 0.25); }
.cg-bacbox--tie { background: rgba(22, 163, 74, 0.25); }
.cg-bacbox--banker { background: rgba(220, 38, 38, 0.25); }
.cg-bacbox:hover { border-color: #fff; }

/* ---------- blackjack ---------- */
.cg-bj { width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.cg-bj__side { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 8px; border-radius: 10px; border: 2px solid transparent; }
.cg-bj__side.is-active { border-color: #ffd21f; background: rgba(255, 210, 31, 0.06); }
.cg-bj__label { font-size: 13px; color: var(--cg-dim); font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.cg-bj__label b { color: #fff; font-size: 16px; }
.cg-bj__rule { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #7D8597; }
.cg-bj__hands { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cg-bj__res { padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 900; color: #fff; background: #475569; }
.cg-bj__res--win, .cg-bj__res--blackjack { background: #16a34a; }
.cg-bj__res--lose, .cg-bj__res--bust { background: #dc2626; }
.cg-bj__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cg-act {
  border: 0;
  border-radius: 10px;
  padding: 15px 8px;
  background: var(--cg-panel-2);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 0 #12151B;
}
.cg-act:first-child { background: var(--cg-green); color: #06210f; box-shadow: 0 4px 0 #11994a; }
.cg-act:disabled { opacity: 0.35; cursor: not-allowed; }
@media (max-width: 860px) {
  .cg-cardx { width: 50px; height: 72px; font-size: 16px; }
  .cg-rcell { min-height: 32px; font-size: 11px; }
}
@media (max-width: 860px) {
  /* Roulette table fits a phone without sideways scrolling */
  .cg-rtable { grid-template-columns: 0.75fr 13fr; gap: 2px; min-width: 0; }
  .cg-rnums, .cg-rdozens, .cg-routside { gap: 2px; }
  .cg-rcell { min-height: 30px; font-size: 10px; border-radius: 4px; }
  .cg-rchip { font-size: 8px; min-width: 14px; padding: 1px 3px; top: 1px; right: 1px; }
}

/* ---------- effects (miniapp/casino-fx.js) ---------- */
.cg-bar-right { display: flex; align-items: center; gap: 8px; }
.cg-mute { min-width: 40px; }
.cg-board { position: relative; }
.cg-pop {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 5;
  transform: translate(-50%, -50%);
  font-size: 30px;
  font-weight: 900;
  pointer-events: none;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  animation: cg-pop 1.5s ease-out forwards;
  white-space: nowrap;
}
.cg-pop--win { color: var(--cg-green); }
.cg-pop--lose { color: var(--cg-red); font-size: 24px; }
.cg-pop--push { color: #ffd21f; }
@keyframes cg-pop {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  30% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(1); }
}
.cg-confetti {
  position: absolute;
  top: 45%;
  z-index: 4;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  pointer-events: none;
  animation: cg-confetti 1.3s cubic-bezier(.2,.7,.4,1) forwards;
}
@keyframes cg-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--rot)); }
}
.cg-shake { animation: cg-board-shake 0.45s cubic-bezier(.36,.07,.19,.97); }
@keyframes cg-board-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}
.cg-flash-win { animation: cg-flash-win 0.7s ease; }
.cg-flash-lose { animation: cg-flash-lose 0.7s ease; }
@keyframes cg-flash-win { 30% { box-shadow: inset 0 0 0 3px var(--cg-green), 0 0 40px rgba(31, 220, 106, 0.35); } }
@keyframes cg-flash-lose { 30% { box-shadow: inset 0 0 0 3px var(--cg-red), 0 0 40px rgba(255, 77, 94, 0.35); } }

/* dice number spins while rolling */
.cg-dice__result.is-rolling { color: #8A93A6; filter: blur(0.6px); }
.cg-dice__result.is-win, .cg-dice__result.is-lose { animation: cg-land 0.35s cubic-bezier(.2,.8,.2,1.4); }
@keyframes cg-land { from { transform: scale(1.35); } }
.cg-dice__marker { transition: left 0.45s cubic-bezier(.2,.9,.25,1.2); }

/* limbo glows while counting */
.cg-limbo__num.is-counting { color: #ffd21f; text-shadow: 0 0 28px rgba(255, 210, 31, 0.55); }
.cg-limbo__num.is-win, .cg-limbo__num.is-lose { animation: cg-land 0.35s cubic-bezier(.2,.8,.2,1.4); }

/* coin jumps while it flips */
.cg-coin.is-flipping { animation: cg-coin-jump 0.9s cubic-bezier(.3,.6,.4,1); }
@keyframes cg-coin-jump { 45% { margin-top: -60px; } 100% { margin-top: 0; } }

/* mines: gems pop, the board shakes on a mine */
.cg-tile.is-pop { animation: cg-gem 0.4s cubic-bezier(.2,.8,.2,1.6); }
@keyframes cg-gem { 0% { transform: scale(0.6) rotate(-10deg); } 100% { transform: none; } }
.cg-tile.is-ghost, .cg-tile.is-mine { animation: cg-fade-in 0.4s ease both; }
@keyframes cg-fade-in { from { opacity: 0; transform: scale(0.8); } }

/* crash number pulses in the danger zone */
.cg-crash__num.is-win { animation: cg-land 0.35s cubic-bezier(.2,.8,.2,1.4); }
.cg-crash__num.is-lose { animation: cg-board-shake 0.45s; }

/* lobby cards: the icon wiggles on hover */
.cg-card:hover .cg-card__icon { animation: cg-wiggle 0.5s ease; }
@keyframes cg-wiggle { 25% { transform: rotate(-10deg) scale(1.1); } 75% { transform: rotate(8deg) scale(1.1); } }

/* buttons feel pressed */
.cg-chip:active, .cg-rcell:active, .cg-bacbox:active, .cg-act:active, .cg-tile:active { transform: scale(0.94); }

@media (prefers-reduced-motion: reduce) {
  .cg-confetti, .cg-shake, .cg-cardx.is-new, .cg-cardx.is-flip, .cg-cardx.is-turning, .cg-tile.is-pop { animation: none !important; }
}
