/* SW Coin Games — 3D glossy pieces, glass panels, neon accents on black. */
:root {
  --gm-bg: #05060a;
  --gm-p1: #ff3d6e;
  --gm-p2: #3dff9a;
  --gm-p3: #2fe6ff;
  --gm-p4: #ffb62e;
  --gm-gold: #ffd166;
  --gm-txt: #f3f5fb;
  --gm-mut: rgba(235, 240, 255, .6);
  --gm-dim: rgba(235, 240, 255, .4);
}

.games-screen,
.gm-screen {
  background:
    radial-gradient(60% 38% at 12% 8%, rgba(255, 61, 110, .18), transparent 70%),
    radial-gradient(55% 35% at 95% 30%, rgba(47, 230, 255, .13), transparent 70%),
    radial-gradient(70% 40% at 30% 80%, rgba(130, 80, 255, .16), transparent 70%),
    radial-gradient(50% 30% at 100% 100%, rgba(61, 255, 154, .08), transparent 70%),
    var(--gm-bg);
  color: var(--gm-txt);
}
.gm-screen {
  position: relative;
  overflow: hidden;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  gap: 0;
}
.gm-screen::before,
.games-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image: radial-gradient(rgba(255, 255, 255, .5) .6px, transparent .7px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, transparent 90%);
  mask-image: linear-gradient(180deg, transparent, #000 30%, transparent 90%);
}
.games-screen { position: relative; }
.games-screen > *, .gm-screen > * { position: relative; z-index: 1; }
.gm-screen button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }

.gm-panel {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 24px -6px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.gm-row { display: flex; align-items: center; }
.gm-grow { flex: 1; min-width: 0; }
.gm-mut { color: var(--gm-mut); }
.gm-coin { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* header */
.gm-hdr { display: flex; align-items: center; gap: 10px; height: 48px; flex: none; }
.gm-iconbtn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.gm-iconbtn svg { width: 20px; height: 20px; }
.gm-ttl { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px 0 6px; border-radius: 21px; white-space: nowrap; overflow: hidden; }
.gm-ttl .gm-sm { width: 26px; height: 29px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); flex: none; }
.gm-ttl .gm-stk { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.gm-ttl .gm-stk img { height: 9px; width: auto; align-self: flex-start; margin-bottom: 3px; }
.gm-ttl .gm-stk b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.gm-ttl small { color: var(--gm-mut); font-size: 12px; font-weight: 600; }
.gm-lang { display: flex; padding: 3px; border-radius: 18px; height: 38px; flex: none; }
.gm-lang button { padding: 0 9px; border-radius: 14px; font-size: 12px; font-weight: 800; color: var(--gm-mut); height: 32px; }
.gm-lang button.on { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

.gm-chips { display: flex; justify-content: space-between; margin-top: 10px; flex: none; }
.gm-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #dfe6ff; }
.gm-chip b { color: var(--gm-gold); font-variant-numeric: tabular-nums; }

/* avatars + player bars */
.gm-av { --c: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; color: #fff; overflow: hidden; position: relative;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff 0%), color-mix(in srgb, var(--c) 30%, #000) 80%);
  box-shadow: 0 0 0 2px var(--gm-bg), 0 0 0 3.5px var(--c), 0 4px 8px rgba(0, 0, 0, .6); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.gm-av img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* glass ring over every in-game avatar */
.gm-av::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; pointer-events: none; z-index: 1;
  background: linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 42%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32), inset 0 1px 1.5px rgba(255, 255, 255, .45); }
.gm-av.xs { width: 18px; height: 18px; font-size: 9px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55), 0 0 8px color-mix(in srgb, var(--c) 55%, transparent); }
.gm-skin .gm-av.xs { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55), 0 0 8px color-mix(in srgb, var(--c) 55%, transparent) !important; }
/* avatar + name tag (score lines, labels, turn indicators) */
.gm-nt { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; vertical-align: middle; }
.gm-nt .gm-av.xs { flex: none; }
.gm-nt-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-nt.r { flex-direction: row-reverse; }
.gm-score { flex-wrap: wrap; align-items: center; row-gap: 4px; }
.gm-score-ps { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; flex-wrap: nowrap; }
.gm-score-ps .gm-nt { max-width: 96px; }
.gm-round-res .gm-av.xs, .gm-res-faces .gm-av.xs { display: inline-grid; vertical-align: -4px; }
.gm-res-faces { display: inline-flex; gap: 3px; }
.gm-b3 .gm-nt { max-width: 100%; }
.gm-slot small .gm-nt-n { white-space: normal; text-align: left; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gm-av.lg { width: 64px; height: 64px; font-size: 22px; box-shadow: 0 0 0 3px var(--gm-bg), 0 0 0 5.5px var(--c), 0 0 26px 2px color-mix(in srgb, var(--c) 45%, transparent); }
.gm-pbar { --c: #fff; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 20px; margin-top: 10px; flex: none; transition: box-shadow .3s, border-color .3s; }
.gm-pbar.on { border-color: var(--c); box-shadow: 0 0 18px -6px var(--c), inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 24px -6px rgba(0, 0, 0, .6); }
.gm-pbar b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-pbar small { display: block; font-size: 11px; color: var(--gm-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-pbar.off { opacity: .55; }
.gm-tm { min-width: 54px; height: 36px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; flex: none;
  background: linear-gradient(180deg, #3a3d52, #262838); box-shadow: 0 3px 0 #111219, inset 0 1px 0 rgba(255, 255, 255, .2); }
.gm-tm.on { background: linear-gradient(180deg, #ff7d9c, #e02659); box-shadow: 0 3px 0 #8e1236, 0 0 16px rgba(255, 61, 110, .6), inset 0 1px 0 rgba(255, 255, 255, .4); }
.gm-tm.low { animation: gm-pulse .5s infinite; }

.gm-hint { margin-top: 12px; padding: 9px 14px; border-radius: 18px; font-size: 12.5px; color: var(--gm-mut); text-align: center; line-height: 1.45; flex: none; }
.gm-hint b { color: #fff; }
.gm-spacer { flex: 1; min-height: 6px; }
.gm-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.gm-body::-webkit-scrollbar { display: none; }

/* 3D buttons */
.gm-actions { display: flex; gap: 10px; margin-top: 10px; flex: none; }
.gm-actions > * { flex: 1; }
.gm-b3 { height: 52px; border-radius: 18px; font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff !important; padding: 0 14px; white-space: nowrap;
  background: linear-gradient(180deg, #ff7d9c, #ff3d6e 55%, #e02659) !important;
  box-shadow: 0 5px 0 #8e1236, 0 12px 20px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .15);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35); transition: transform .1s, box-shadow .1s, filter .2s; }
.gm-b3:active { transform: translateY(3px); box-shadow: 0 2px 0 #8e1236, 0 6px 12px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .45); }
.gm-b3.gy { background: linear-gradient(180deg, #5b5f78, #3b3e52 60%, #2e3042) !important; box-shadow: 0 5px 0 #181924, 0 12px 20px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .25); }
.gm-b3.gn { color: #053 !important; background: linear-gradient(180deg, #9dffc9, #3dff9a 55%, #1fd67a) !important; box-shadow: 0 5px 0 #0c7a45, 0 12px 20px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .6); text-shadow: none; }
.gm-b3.gd { color: #4a2400 !important; background: linear-gradient(180deg, #ffe7a3, #ffd166 55%, #f0a92a) !important; box-shadow: 0 5px 0 #9a6208, 0 12px 20px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .6); text-shadow: none; }
.gm-b3.sm { height: 40px; border-radius: 14px; font-size: 13.5px; box-shadow: 0 4px 0 #8e1236, 0 8px 14px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .45); }
.gm-b3.sm.gy { box-shadow: 0 4px 0 #181924, 0 8px 14px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .25); }
.gm-b3[disabled] { filter: saturate(.25) brightness(.7); pointer-events: none; }

@keyframes gm-pulse { 50% { opacity: .45; } }
@keyframes gm-pop { from { transform: scale(.6); opacity: .2; } }
@keyframes gm-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes gm-spin { to { transform: rotate(360deg); } }

/* ===================== Games tab (lobby) ===================== */
.gm-balance-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; border-radius: 18px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, rgba(255, 209, 102, .18), rgba(255, 209, 102, .06)); border: 1px solid rgba(255, 209, 102, .4); color: var(--gm-gold); box-shadow: 0 0 16px -6px rgba(255, 209, 102, .7); }
.games-screen .screen-body > .topbar {
  position: sticky;
  top: 0;
  z-index: 9;
  flex-shrink: 0;
  padding: 8px 10px;
}
.gm-balance-pill .gm-balance-label { color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.gm-balance-pill .gm-coin { width: 22px; height: 22px; }
.gm-reward { margin-top: 12px; padding: 14px; }
.gm-reward.ready { border-color: #3dff9a; box-shadow: 0 0 22px rgba(61,255,154,.28), inset 0 1px 0 rgba(255,255,255,.2); }
.gm-reward-head { display:flex; justify-content:space-between; gap:10px; font-size:13px; }
.gm-reward-head span, .gm-reward small { color:var(--gm-mut); }
.gm-reward-bar { height:8px; margin:10px 0 8px; border-radius:8px; background:rgba(255,255,255,.12); overflow:hidden; }
.gm-reward-bar i { display:block; height:100%; border-radius:8px; background:linear-gradient(90deg,#ffd166,#3dff9a); }
.gm-reward small { display:block; margin-bottom:10px; }
.gm-reward .gm-b3 { width:100%; }
.gm-wallet { padding: 16px 18px; border-radius: 28px; position: relative; overflow: hidden; flex: none; }
.gm-wallet::before { content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 209, 102, .26), transparent 65%); pointer-events: none; }
.gm-wallet .gm-wlbl { font-size: 12px; color: var(--gm-mut); font-weight: 700; }
.gm-wallet .gm-wbal { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.gm-wallet .gm-wbal .gm-coin { width: 36px; height: 36px; }
.gm-wallet .gm-wbal b { font-size: 36px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.gm-wallet .gm-wbal span { font-size: 13px; color: var(--gm-mut); font-weight: 700; align-self: flex-end; margin-bottom: 8px; }
.gm-wallet .gm-wnote { font-size: 11.5px; color: var(--gm-mut); margin-top: 6px; line-height: 1.5; }
.gm-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.gm-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .09); color: #dfe6ff; line-height: 1.5; }
.gm-tag.gold { color: var(--gm-gold); border-color: rgba(255, 209, 102, .3); }
.gm-sect { font-size: 12.5px; font-weight: 800; color: var(--gm-mut); margin: 18px 4px 10px; letter-spacing: .05em; text-transform: uppercase; }
html[data-lang="my"] .gm-sect { text-transform: none; letter-spacing: 0; }
.gm-card { padding: 14px; border-radius: 26px; margin-bottom: 12px; animation: gm-in .35s ease both; }
.gm-card .gm-top { display: flex; gap: 14px; align-items: center; }
.gm-art { width: 82px; height: 82px; border-radius: 25px; flex: none; display: grid; place-items: center; position: relative; overflow: hidden; transform: perspective(420px) rotateY(-7deg) rotateX(3deg);
  background: radial-gradient(circle at 30% 25%, rgba(138, 91, 255, .72), rgba(48, 28, 120, .32) 72%); border: 1px solid rgba(220, 202, 255, .58);
  box-shadow: 0 9px 0 rgba(0, 0, 0, .4), 0 15px 22px rgba(0, 0, 0, .28), inset 0 2px 0 rgba(255, 255, 255, .34), inset -5px -8px 14px rgba(10, 5, 40, .28); font-size: 30px; }
.gm-art::after { content: ""; position: absolute; inset: -30% 35% 45% -30%; transform: rotate(-24deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent); pointer-events: none; }
.gm-art.rps { background: radial-gradient(circle at 30% 25%, rgba(255, 61, 110, .55), rgba(110, 30, 70, .2) 72%); border-color: rgba(255, 120, 160, .45); font-size: 22px; line-height: 1; text-align: center; }
.gm-art.dice { background: radial-gradient(circle at 30% 25%, rgba(47, 230, 255, .45), rgba(20, 70, 110, .2) 72%); border-color: rgba(47, 230, 255, .45); }
.gm-art.c4 { background: radial-gradient(circle at 30% 25%, rgba(120, 100, 255, .6), rgba(60, 40, 170, .25) 72%); }
.gm-art.ttt { background: radial-gradient(circle at 30% 25%, rgba(61, 255, 154, .4), rgba(20, 90, 60, .2) 72%); border-color: rgba(61, 255, 154, .4); }
.gm-art.bingo { background: radial-gradient(circle at 30% 25%, rgba(255, 209, 102, .5), rgba(120, 70, 10, .2) 72%); border-color: rgba(255, 209, 102, .45); }
.gm-art svg { width: 58px; height: 58px; }
.gm-card h3 { font-size: 16.5px; font-weight: 800; line-height: 1.3; margin: 0; }
.gm-card p { font-size: 12.5px; color: var(--gm-mut); margin: 2px 0 0; line-height: 1.45; }
.gm-card .gm-play { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.gm-card .gm-play .gm-b3 { flex: 1; }
.gm-image-card { min-height: 196px; position: relative; overflow: hidden; padding: 0; border-radius: 28px; isolation: isolate; }
.gm-card-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; transition: transform .35s ease, filter .35s ease; }
.gm-card-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 5, 24, .08) 8%, rgba(10, 5, 24, .22) 42%, rgba(10, 5, 24, .94) 100%), linear-gradient(90deg, rgba(10, 5, 24, .64), transparent 72%); }
.gm-image-card:hover .gm-card-bg { transform: scale(1.06); filter: saturate(1.12) brightness(1.06); }
.gm-card-content { min-height: 196px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; }
.gm-image-card .gm-top { align-items: flex-end; }
.gm-image-card h3, .gm-image-card p { text-shadow: 0 2px 10px rgba(0, 0, 0, .72); }
.gm-image-card h3 { font-size: 19px; }
.gm-image-card p { color: rgba(255,255,255,.84); }
.gm-image-card .gm-tags { margin-top: 9px; }
.gm-image-card .gm-tag { background: rgba(15, 8, 35, .44); border-color: rgba(255,255,255,.24); backdrop-filter: blur(8px); }
.gm-image-card .gm-tag.gold { color: #ffe29a; background: rgba(116, 65, 19, .5); }
.gm-image-card .gm-play { margin-top: 12px; }
.gm-image-card .gm-seg { background: rgba(7, 4, 20, .46); border-color: rgba(255,255,255,.24); backdrop-filter: blur(10px); }
.gm-image-card .gm-b3 { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.48); box-shadow: inset 0 1px rgba(255,255,255,.3), 0 8px 18px rgba(0,0,0,.28); backdrop-filter: blur(14px) saturate(1.3); }
.gm-image-card.gm-blackjack-card { min-height: 196px; }
.gm-image-card.gm-blackjack-card .gm-card-content { min-height: 196px; padding: 12px; }
.gm-image-card.gm-blackjack-card .gm-card-content p { font-size: 11.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-image-card.gm-blackjack-card .gm-tags { display: inline-flex; vertical-align: middle; margin-top: 6px; }
.gm-image-card.gm-blackjack-card .gm-bj-tstake { display: inline-flex; vertical-align: middle; margin: 6px 0 0 4px; gap: 4px; font-size: 11px; }
.gm-image-card.gm-blackjack-card .gm-bj-tstake > span { font-size: 0; width: 0; overflow: hidden; }
.gm-image-card.gm-blackjack-card .gm-bj-tstake .gm-bj-step { width: 24px; height: 24px; font-size: 15px; }
.gm-image-card.gm-blackjack-card .gm-bj-tstake b { min-width: 64px; font-size: 11px; }
.gm-image-card.gm-blackjack-card .gm-play { margin-top: 8px; }
.gm-image-card.gm-blackjack-card .gm-seg { padding: 2px; }
.gm-image-card.gm-blackjack-card .gm-seg button { min-width: 29px; height: 28px; padding: 0 5px; font-size: 12px; }
.gm-image-card.gm-blackjack-card .gm-play .gm-b3.sm { height: 36px; }
.gm-image-card.gm-blackjack-card .gm-play { position: relative; z-index: 2; }
.gm-seg { display: flex; padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); flex: none; }
.gm-seg button { min-width: 34px; height: 32px; border-radius: 11px; font-size: 13px; font-weight: 800; color: var(--gm-mut); padding: 0 8px; border: 0; background: none; font-family: inherit; cursor: pointer; }
.gm-seg button.on { background: rgba(255, 61, 110, .25); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 61, 110, .6); }
.gm-hist-scroll { height: 240px; min-height: 240px; max-height: 240px; flex: 0 0 240px; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 1px 3px 8px 0; }
.gm-hist { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.gm-hrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; }
.gm-hrow .gm-hicon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex: none; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.gm-hrow b { font-size: 13.5px; display: block; }
.gm-hrow small { font-size: 11.5px; color: var(--gm-mut); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-delta { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 12px; display: inline-flex; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.gm-delta.up { color: #3dff9a; background: rgba(61, 255, 154, .13); border: 1px solid rgba(61, 255, 154, .3); }
.gm-delta.dn { color: #ff7d99; background: rgba(255, 61, 110, .12); border: 1px solid rgba(255, 61, 110, .28); }
.gm-delta.eq { color: var(--gm-mut); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.gm-empty { text-align: center; color: var(--gm-mut); font-size: 13px; padding: 14px; }

/* searching overlay */
.gm-overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px;
  background: rgba(3, 4, 8, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: gm-in .25s ease; }
.gm-overlay h2 { font-size: 21px; font-weight: 900; line-height: 1.4; margin: 0; }
.gm-radar { position: relative; width: 190px; height: 190px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.gm-radar i { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; border: 1.5px solid rgba(255, 61, 110, .55); animation: gm-rad 2.4s ease-out infinite; opacity: .18; }
.gm-radar i:nth-child(2) { animation-delay: .8s; transform: scale(.66); opacity: .15; }
.gm-radar i:nth-child(3) { animation-delay: 1.6s; transform: scale(.33); opacity: .12; }
.gm-radar .gm-sweep { position: absolute; top: 14px; right: 14px; bottom: 14px; left: 14px; border-radius: 50%; background: linear-gradient(135deg, transparent 48%, rgba(255, 61, 110, .46) 52%, transparent 57%); background: conic-gradient(from 0deg, rgba(255, 61, 110, .38), transparent 28%); animation: gm-spin 1.6s linear infinite; }
.gm-radar img { display: block; width: 76px; height: 54px; max-width: 100%; object-fit: contain; position: relative; z-index: 2; opacity: 1; visibility: visible; -webkit-filter: brightness(0) invert(1); filter: brightness(0) invert(1); }
@keyframes gm-rad { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.gm-seats { display: flex; gap: 10px; justify-content: center; }
.gm-seats .gm-av.q { --c: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .05); animation: gm-pulse 1.4s infinite; }
.gm-overlay .gm-b3 { min-width: 180px; }
@media (prefers-reduced-motion: reduce) {
  .gm-radar i, .gm-radar .gm-sweep { animation: none; }
}
/* radar player overlay: me while searching, opponent pops in on match (iOS glass) */
.gm-radar-duo > .gm-radar-logo { display: none; }
.gm-rfx { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 3; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.gm-rfx.matched { justify-content: space-between; padding: 0 2px; }
.gm-rav { position: relative; display: flex; flex-direction: column; align-items: center; flex: none; }
.gm-rav-ring { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 22px; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .08) 55%, rgba(255, 61, 110, .35));
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), inset 0 1px 1px rgba(255, 255, 255, .55), 0 10px 26px rgba(0, 0, 0, .5), 0 0 26px rgba(255, 61, 110, .42); }
.gm-radar .gm-rav-ring img { position: absolute; top: 3px; left: 3px; width: calc(100% - 6px); height: calc(100% - 6px); max-width: none; border-radius: 50%; object-fit: cover; z-index: 1; -webkit-filter: none; filter: none; }
.gm-rav-name { position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%); max-width: 92px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.gm-rfx.searching .gm-rav.me .gm-rav-ring { width: 72px; height: 72px; animation: gm-rav-breathe 2.4s ease-in-out infinite; }
.gm-rav.blip { position: absolute; top: 14px; right: 6px; }
.gm-rav.blip .gm-rav-ring { width: 34px; height: 34px; font-size: 14px; color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28), 0 0 18px rgba(255, 61, 110, .5); animation: gm-pulse 1.4s infinite; }
.gm-rav.blip .gm-rav-name { font-size: 10px; padding: 1px 7px; top: calc(100% + 4px); color: rgba(255, 255, 255, .7); }
.gm-rfx.matched .gm-rav.me { animation: gm-rav-left .45s cubic-bezier(.2, .9, .3, 1) both; }
.gm-rfx.matched .gm-rav.opp { animation: gm-rav-pop .55s cubic-bezier(.2, 1.5, .4, 1) var(--d, .15s) both; }
.gm-rfx.matched .gm-rav.opp .gm-rav-ring { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), inset 0 1px 1px rgba(255, 255, 255, .55), 0 10px 26px rgba(0, 0, 0, .5), 0 0 26px rgba(139, 92, 255, .55); }
.gm-rvs { font-size: 15px; font-weight: 900; font-style: italic; letter-spacing: .5px; padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 0 22px rgba(255, 61, 110, .55); animation: gm-rav-pop .45s cubic-bezier(.2, 1.5, .4, 1) .3s both; }
.gm-ropps { display: grid; gap: 6px; justify-items: center; }
.gm-ropps.n3, .gm-ropps.n4 { grid-template-columns: repeat(2, 40px); }
.gm-rav.sm .gm-rav-ring { width: 40px; height: 40px; font-size: 15px; }
.gm-rav.sm .gm-rav-name { display: none; }
@keyframes gm-rav-left { from { transform: translateX(61px) scale(1.12); } }
@keyframes gm-rav-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes gm-rav-breathe { 50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), inset 0 1px 1px rgba(255, 255, 255, .55), 0 10px 26px rgba(0, 0, 0, .5), 0 0 40px rgba(255, 61, 110, .7); } }
@media (prefers-reduced-motion: reduce) {
  .gm-rav, .gm-rav-ring, .gm-rvs { animation: none !important; }
}

/* invite list */
.gm-friends { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; margin: 10px 0; }
.gm-group-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-height: 46vh; overflow-y: auto; margin: 12px 0 8px; padding: 2px; }
.gm-group-game { position: relative; min-height: 112px; overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(10,6,25,.62); color: #fff; text-align: left; cursor: pointer; font: inherit; isolation: isolate; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.gm-group-game:hover, .gm-group-game:focus-visible { transform: translateY(-2px); border-color: rgba(255,255,255,.52); outline: none; }
.gm-group-game.selected { border-color: rgba(255,209,102,.9); box-shadow: 0 0 0 2px rgba(255,209,102,.24), 0 10px 24px rgba(0,0,0,.28); }
.gm-group-game > img, .gm-group-game-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.gm-group-game > img { z-index: -2; object-fit: cover; }
.gm-group-game-shade { z-index: -1; background: linear-gradient(180deg, rgba(8,4,24,.08), rgba(8,4,24,.88)); }
.gm-group-game-body { position: absolute; inset: auto 9px 9px; display: flex; flex-direction: column; gap: 3px; }
.gm-group-game-body b { font-size: .78rem; line-height: 1.2; text-shadow: 0 2px 7px rgba(0,0,0,.7); }
.gm-group-game-body small { overflow: hidden; color: rgba(255,255,255,.76); font-size: .61rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.gm-group-selected { margin: 6px 2px; color: var(--gm-gold); }
.gm-game-picker {
  margin: 12px 0 14px;
  padding: 10px 12px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .1);
}
.gm-game-picker span { color: var(--gm-mut); }
.gm-game-picker select {
  min-height: 44px;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(8, 6, 16, .72);
  color: #fff;
}
.gm-friend { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); cursor: pointer; color: inherit; font: inherit; text-align: left; width: 100%; }
.gm-friend .avatar { width: 38px; height: 38px; }
.gm-friend b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-friend .gm-on { width: 9px; height: 9px; border-radius: 50%; background: #555; flex: none; }
.gm-friend .gm-on.on { background: var(--gm-p2); box-shadow: 0 0 8px var(--gm-p2); }
.gm-friend[disabled] { opacity: .45; pointer-events: none; }
.gm-invite-actions { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 9px; margin-top: 12px; }
.gm-invite-actions .btn { width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 9px 10px; line-height: 1.25; white-space: normal; }
.gm-invite-actions .btn.secondary { color: rgba(255,255,255,.86); }

/* match intro */
.gm-intro { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(3, 4, 8, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: gm-fade 1.5s ease forwards; pointer-events: none; }
.gm-intro h2 { margin: 0; font-size: 30px; font-weight: 900; background: linear-gradient(90deg, #ff3d6e, #ffd166, #3dff9a); -webkit-background-clip: text; background-clip: text; color: transparent; animation: gm-pop .55s cubic-bezier(.2, 1.5, .4, 1); }
.gm-intro .gm-duel { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: 330px; }
.gm-intro .gm-duel > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; animation: gm-pop .5s cubic-bezier(.2, 1.5, .4, 1); }
.gm-vs { font-size: 16px; font-weight: 900; color: rgba(255, 255, 255, .5); font-style: italic; }
@keyframes gm-fade { 0%, 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* ===================== RPS ===================== */
.gm-backs { display: flex; justify-content: center; gap: 12px; margin-top: 12px; flex: none; }
.gm-cardback { width: 60px; height: 82px; border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #3b3470, #15122e 75%); border: 2px solid #d9b25a;
  box-shadow: 0 4px 0 #0b0918, 0 10px 16px -2px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .3s; }
.gm-cardback img { width: 60%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.gm-backs .gm-cardback:nth-child(1) { transform: rotate(-6deg); }
.gm-backs .gm-cardback:nth-child(3) { transform: rotate(6deg); }
.gm-backs.picked .gm-cardback:nth-child(2) { transform: translateY(-10px); border-color: var(--gm-p2); box-shadow: 0 4px 0 #0b0918, 0 0 18px rgba(61, 255, 154, .6); }
.gm-arena { position: relative; overflow: hidden; margin-top: 14px; padding: 16px 10px 12px; border-radius: 28px; flex: none;
  background: radial-gradient(120% 90% at 50% 40%, rgba(138, 91, 255, .28), rgba(255, 255, 255, .03) 70%); }
.gm-arena .gm-wmk { position: absolute; width: 150px; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .08; pointer-events: none; }
.gm-arena .gm-row { justify-content: space-around; position: relative; }
.gm-slot { text-align: center; width: 110px; }
.gm-slot .gm-face { width: 92px; height: 92px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center; font-size: 50px; font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #4b4f6b, #2b2d40); box-shadow: 0 6px 0 #16171f, 0 14px 20px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .25); text-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.gm-slot .gm-face.mine { background: linear-gradient(180deg, #8a5bff, #5a2fd0); box-shadow: 0 6px 0 #2c1470, 0 14px 20px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .3); }
.gm-slot .gm-face.win { box-shadow: 0 6px 0 #0c7a45, 0 0 26px rgba(61, 255, 154, .7), inset 0 2px 0 rgba(255, 255, 255, .3); background: linear-gradient(180deg, #3ad98a, #149a58); }
.gm-slot .gm-face.lose { filter: saturate(.4) brightness(.7); }
.gm-slot .gm-face.flip { animation: gm-flip .5s ease; }
@keyframes gm-flip { 0% { transform: rotateY(90deg) scale(.8); } 100% { transform: none; } }
.gm-slot small { display: block; margin-top: 10px; font-size: 11.5px; color: var(--gm-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ring { position: relative; width: 66px; height: 66px; display: grid; place-items: center; }
.gm-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.gm-ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.gm-ring .trk { stroke: rgba(255, 255, 255, .1); }
.gm-ring .val { stroke: #ff3d6e; transition: stroke-dashoffset .25s linear; }
.gm-ring b { position: relative; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 900; background: linear-gradient(180deg, #2e3042, #1a1b26); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15); font-variant-numeric: tabular-nums; }
.gm-vs-lbl { text-align: center; font-size: 13px; font-weight: 900; color: rgba(255, 255, 255, .55); margin-top: 6px; font-style: italic; }
.gm-score { display: flex; justify-content: center; gap: 8px; margin-top: 10px; font-size: 12.5px; font-weight: 800; color: var(--gm-mut); }
.gm-score b { color: #fff; }
.gm-round-res { text-align: center; font-size: 15px; font-weight: 900; margin-top: 8px; min-height: 22px; animation: gm-pop .45s cubic-bezier(.2, 1.5, .4, 1); }
.gm-round-res.win { color: var(--gm-p2); }
.gm-round-res.lose { color: #ff7d99; }
.gm-picks { display: flex; justify-content: center; gap: 12px; margin-top: 18px; flex: none; }
.gm-pick { --k: #8a5bff; width: 98px; height: 128px; border-radius: 18px; display: grid; place-items: center; font-size: 56px; border: 4px solid #fff !important; position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--k) 78%, #fff), var(--k)) !important;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--k) 45%, #000), 0 16px 22px -4px rgba(0, 0, 0, .65), inset 0 2px 0 rgba(255, 255, 255, .45); transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), filter .2s; }
.gm-pick[data-pick="rock"] { --k: #8a5bff; }
.gm-pick[data-pick="paper"] { --k: #2fb8f0; }
.gm-pick[data-pick="scissors"] { --k: #ff5a8a; }
.gm-pick:active { transform: translateY(3px) scale(.97); }
.gm-pick.sel { border-color: #3dff9a !important; transform: translateY(-10px); box-shadow: 0 6px 0 color-mix(in srgb, var(--k) 45%, #000), 0 0 0 3px rgba(61, 255, 154, .45), 0 0 26px rgba(61, 255, 154, .6); }
.gm-pick[disabled]:not(.sel) { filter: saturate(.3) brightness(.55); }

/* ===================== Dice ===================== */
.gm-rhead { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 14px; margin-top: 12px; flex: none; }
.gm-rhead b { font-size: 14px; }
.gm-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .11); white-space: nowrap; }
.gm-dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; flex: none; }
.gm-dcell { --c: #fff; padding: 10px 6px 10px; text-align: center; border-radius: 24px; transition: border-color .3s, box-shadow .3s, opacity .3s; }
.gm-dcell.top { border-color: var(--gm-gold); box-shadow: 0 0 22px -4px var(--gm-gold), 0 10px 24px -6px rgba(0, 0, 0, .6); }
.gm-dcell.out { opacity: .45; }
.gm-dcell .gm-row { gap: 8px; justify-content: center; }
.gm-dcell .gm-row b { font-size: 13px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-dice { display: flex; justify-content: center; align-items: center; gap: 0; height: 96px; }
.gm-dice svg { width: 76px; height: 76px; overflow: visible; }
.gm-dice.rolling svg { animation: gm-roll .7s cubic-bezier(.3, 1.3, .5, 1); }
.gm-dice.rolling svg:nth-child(2) { animation-delay: .08s; }
.gm-dice.wait svg { opacity: .35; filter: grayscale(1); }
.gm-dice.wait.act svg { animation: gm-bob 1.1s ease-in-out infinite; opacity: .6; }
@keyframes gm-roll { 0% { transform: translateY(-40px) rotate(-200deg) scale(.6); opacity: .2; } 70% { transform: translateY(4px) rotate(12deg); } 100% { transform: none; } }
@keyframes gm-bob { 50% { transform: translateY(-6px); } }
.gm-dtotal { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; min-height: 26px; }
.gm-dcell.top .gm-dtotal { color: var(--gm-gold); }

/* ===================== Connect Four ===================== */
.gm-c4wrap { margin: 8px auto 0; width: 100%; max-width: 352px; flex: none; }
.gm-c4prev { display: grid; grid-template-columns: repeat(7, 1fr); height: 44px; padding: 0 12px; }
.gm-c4prev i { justify-self: center; align-self: center; width: 36px; height: 36px; border-radius: 50%; opacity: 0; transition: opacity .15s; }
.gm-c4prev i.on { opacity: 1; animation: gm-bob 1s ease-in-out infinite; }
.gm-c4board { position: relative; padding: 12px 12px 40px; border-radius: 22px; background: linear-gradient(180deg, #6d5cf0, #3d2fb0);
  box-shadow: 0 14px 0 #241a70, 0 30px 40px rgba(0, 0, 0, .7), inset 0 3px 0 rgba(255, 255, 255, .25), inset 0 -3px 0 rgba(0, 0, 0, .2); }
.gm-c4board::before { content: ""; position: absolute; left: 10px; right: 10px; top: 6px; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .18); }
.gm-c4grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; position: relative; }
.gm-c4col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; border-radius: 22px; padding: 0; cursor: pointer; transition: background .2s; }
.gm-c4col.sel { background: rgba(255, 255, 255, .12); }
.gm-hole { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #0d0a24, #1a1440 80%, #2a2170); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .15); position: relative; }
.gm-disc { position: absolute; inset: 1px; border-radius: 50%; }
.gm-disc.s0, .gm-c4prev i.s0 { background: radial-gradient(circle at 38% 32%, #ffb1c5, #ff3d6e 50%, #a62848); box-shadow: inset 0 -3px 5px rgba(0, 0, 0, .3), 0 2px 3px rgba(0, 0, 0, .5); }
.gm-disc.s1, .gm-c4prev i.s1 { background: radial-gradient(circle at 38% 32%, #b1ffd7, #3dff9a 50%, #28a664); box-shadow: inset 0 -3px 5px rgba(0, 0, 0, .3), 0 2px 3px rgba(0, 0, 0, .5); }
.gm-disc::after { content: ""; position: absolute; left: 22%; top: 14%; width: 34%; height: 22%; border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(1px); }
.gm-disc.drop { animation: gm-drop .45s cubic-bezier(.5, 0, .6, 1.4); }
@keyframes gm-drop { from { transform: translateY(var(--dy, -300px)); } }
.gm-disc.line { box-shadow: 0 0 0 3px #fff, 0 0 18px 4px rgba(255, 255, 255, .7); animation: gm-pulse .8s infinite; }
.gm-c4brand { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 12px; background: rgba(20, 14, 60, .6); border: 1px solid rgba(255, 255, 255, .15); }
.gm-c4brand img:first-child { height: 16px; }
.gm-c4brand img:last-child { height: 8px; }

/* ===================== Vanishing TicTacToe ===================== */
.gm-tttboard { margin-top: 18px; padding: 16px 16px 22px; border-radius: 30px; flex: none; }
.gm-tttgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gm-tile { position: relative; aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(180deg, #4c4a78, #34325a) !important; box-shadow: 0 7px 0 #1c1a38, 0 16px 22px -4px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .22); transition: transform .1s; }
.gm-tile:active { transform: translateY(3px); }
.gm-tile svg { width: 72%; height: 72%; }
.gm-tile .gm-wm { width: 52%; opacity: .16; filter: grayscale(.4); }
.gm-tile.vanish { outline: 2px dashed rgba(255, 154, 181, .75); outline-offset: -7px; }
.gm-tile.vanish.o { outline-color: rgba(157, 255, 201, .75); }
.gm-tile.vanish svg { opacity: .4; }
.gm-tile .gm-vtag { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 9.5px; font-weight: 800; color: #ff9ab5; white-space: nowrap; }
.gm-tile.o .gm-vtag { color: #9dffc9; }
.gm-tile.new svg { animation: gm-pop .35s cubic-bezier(.2, 1.5, .4, 1); }
.gm-tile.line { box-shadow: 0 7px 0 #1c1a38, 0 0 0 3px rgba(255, 255, 255, .8), 0 0 26px rgba(255, 255, 255, .5), inset 0 2px 0 rgba(255, 255, 255, .22); }
.gm-tile.gone::after { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .5), transparent 70%); animation: gm-poof .6s ease forwards; }
@keyframes gm-poof { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* ===================== BINGO ===================== */
.gm-opps { display: flex; gap: 8px; margin-top: 10px; flex: none; }
.gm-opp { --c: #fff; flex: 1; padding: 8px 4px; text-align: center; border-radius: 20px; min-width: 0; }
.gm-opp .gm-av { margin: 0 auto; }
.gm-opp b { display: block; font-size: 11.5px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-opp small { font-size: 10.5px; color: var(--gm-mut); }
.gm-opp.on { border-color: var(--c); box-shadow: 0 0 18px -4px var(--c); }
.gm-opp.off { opacity: .45; }
.gm-callbar { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; flex: none; }
.gm-ball { width: 62px; height: 62px; border-radius: 50%; flex: none; display: grid; place-items: center; background: radial-gradient(circle at 35% 28%, #e8fcff, #2fe6ff 45%, #0a6f8a); box-shadow: 0 5px 0 #064a5c, 0 10px 16px rgba(0, 0, 0, .6); }
.gm-ball span { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 900; font-size: 19px; color: #0a4f63; box-shadow: inset 0 -3px 5px rgba(0, 0, 0, .2); }
.gm-ball.new { animation: gm-pop .45s cubic-bezier(.2, 1.5, .4, 1); }
.gm-callbar small { color: var(--gm-mut); font-size: 11px; display: block; }
.gm-callbar .gm-say { font-size: 15px; font-weight: 900; line-height: 1.35; }
.gm-callbar .gm-say.me { color: var(--gm-p2); }
.gm-bcard { margin-top: 10px; padding: 10px; border-radius: 24px; position: relative; overflow: hidden; perspective: 900px; background: linear-gradient(145deg, #7768ff 0%, #4b3bc2 45%, #2d2387 100%); flex: none;
  box-shadow: 0 8px 0 #221a6c, 0 18px 30px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -10px 22px rgba(16, 10, 80, .28); }
.gm-bcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(125deg, rgba(255,255,255,.18), transparent 26%, transparent 74%, rgba(21,10,90,.2)); mix-blend-mode: screen; }
.gm-bhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 2px; }
.gm-bhead .gm-brand { display: flex; align-items: center; gap: 5px; }
.gm-bhead .gm-brand img:first-child { height: 22px; width: 43px; object-fit: contain; }
.gm-bhead .gm-brand img:last-child { height: 8px; }
.gm-bletters { display: flex; gap: 5px; }
.gm-bletters i { font-style: normal; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 15px; color: rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .25); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3); }
.gm-bletters i.on { color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.gm-bletters i.on:nth-child(1) { background: linear-gradient(180deg, #ff7d9c, #e02659); }
.gm-bletters i.on:nth-child(2) { background: linear-gradient(180deg, #b69aff, #7a4dff); }
.gm-bletters i.on:nth-child(3) { background: linear-gradient(180deg, #8ff2ff, #16b6d6); }
.gm-bletters i.on:nth-child(4) { background: linear-gradient(180deg, #9dffc9, #1fd67a); color: #053; }
.gm-bletters i.on:nth-child(5) { background: linear-gradient(180deg, #ffe7a3, #f0a92a); color: #4a2400; }
.gm-bgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.gm-bt { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-size: 19px; font-weight: 900; color: #2c2a55; position: relative; font-variant-numeric: tabular-nums; cursor: pointer;
  background: linear-gradient(145deg, #ffffff 0%, #ececff 52%, #c7c7e2 100%) !important; box-shadow: 0 5px 0 #8988b5, 0 10px 14px rgba(0, 0, 0, .4), inset 0 2px 0 #fff, inset -2px -3px 5px rgba(99, 93, 160, .16); transform: translateZ(8px); transition: transform .1s, filter .15s; padding: 0; }
.gm-bt:hover { filter: brightness(1.06) saturate(1.1); transform: translateY(-2px) translateZ(10px); }
.gm-bt:active { transform: translateY(2px); }
.gm-bt.m::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff4c2, #ffd166 45%, #d88a00); box-shadow: 0 3px 0 #9a6208, inset 0 -2px 4px rgba(0, 0, 0, .2); }
.gm-bt.last::before { background: radial-gradient(circle at 36% 30%, #ffc2d2, #ff3d6e 45%, #b0183f); box-shadow: 0 3px 0 #7a0f30, inset 0 -2px 4px rgba(0, 0, 0, .2); }
.gm-bt.last { outline: 3px solid #2fe6ff; outline-offset: 1px; box-shadow: 0 4px 0 #9d9cc2, 0 0 18px rgba(47, 230, 255, .8); }
.gm-bt.m span { position: relative; color: #4a2400; }
.gm-bt.last span { color: #fff; }
.gm-bt.lined::before { box-shadow: 0 3px 0 #9a6208, 0 0 0 2px rgba(255, 255, 255, .9), 0 0 12px rgba(255, 209, 102, .9); }
.gm-bt.new::before { animation: gm-pop .4s cubic-bezier(.2, 1.5, .4, 1); }
.gm-bgrid.wait .gm-bt:not(.m) { cursor: default; }

/* ===================== Result ===================== */
.gm-res { text-align: center; margin-top: 18px; flex: none; }
.gm-res .gm-crown { font-size: 46px; line-height: 1; animation: gm-pop .6s cubic-bezier(.2, 1.5, .4, 1); }
.gm-res h1 { margin: 6px 0 2px; font-size: 32px; font-weight: 900; line-height: 1.25; animation: gm-pop .55s cubic-bezier(.2, 1.5, .4, 1); }
html[data-lang="my"] .gm-res h1 { font-size: 26px; }
.gm-res h1.win { background: linear-gradient(90deg, #ffd166, #ff3d6e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gm-res h1.lose { color: #ff7d99; }
.gm-res h1.draw { color: #dfe6ff; }
.gm-res p { margin: 0; color: var(--gm-mut); font-size: 13px; }
.gm-res .gm-delta { font-size: 16px; padding: 5px 16px; margin-top: 10px; }
.gm-bigpot { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 14px; }
.gm-bigpot .gm-coin { width: 34px; height: 34px; }
.gm-bigpot b { font-size: 36px; font-weight: 900; color: var(--gm-gold); text-shadow: 0 0 22px rgba(255, 209, 102, .55); font-variant-numeric: tabular-nums; }
.gm-rrows { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; flex: none; }
.gm-rrow { --c: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 20px; }
.gm-rrow.w { border-color: var(--gm-gold); box-shadow: 0 0 22px -6px var(--gm-gold), inset 0 1px 0 rgba(255, 255, 255, .2); }
.gm-rrow b { font-size: 14px; display: block; }
.gm-rrow small { display: block; font-size: 11.5px; color: var(--gm-mut); }
.gm-sum { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 20px; font-size: 13px; color: var(--gm-mut); font-weight: 700; margin-top: 14px; flex: none; }
.gm-sum b { color: #fff; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.gm-conf { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.gm-conf i { position: absolute; top: -14px; width: 8px; height: 14px; border-radius: 3px; animation: gm-fall linear forwards; }
@keyframes gm-fall { to { transform: translateY(110vh) rotate(720deg); } }
.gm-mini { max-width: 240px; margin: 12px auto 0; transform: scale(1); }
.gm-mini .gm-c4board { padding: 8px 8px 10px; box-shadow: 0 8px 0 #241a70, 0 14px 20px rgba(0, 0, 0, .6); }
.gm-mini .gm-c4grid, .gm-mini .gm-c4col { gap: 4px; }
.gm-mini .gm-tttgrid { gap: 8px; }
.gm-mini .gm-tile { border-radius: 14px; box-shadow: 0 4px 0 #1c1a38; }

/* invite banner */
.gm-invite-stack { position: fixed; left: 50%; top: calc(10px + var(--safe-top)); transform: translateX(-50%); z-index: 60; width: min(94vw, 440px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.gm-invite-stack .gm-invite { position: relative; left: auto; top: auto; transform: none; width: 100%; box-sizing: border-box; pointer-events: auto; }
.gm-invite-game { width: 48px; height: 48px; object-fit: cover; border-radius: 14px; flex: none; border: 1px solid rgba(255,255,255,.35); }
.gm-friend.selected { border-color: rgba(255,209,102,.95); background: rgba(255,209,102,.16); box-shadow: 0 0 0 2px rgba(255,209,102,.18); }
.gm-player-count { width: 100%; margin: 4px 0 2px; min-height: 40px; border-radius: 12px; padding: 0 10px; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.gm-invite { position: fixed; left: 50%; top: calc(10px + var(--safe-top)); transform: translateX(-50%); z-index: 60; width: min(94vw, 420px); padding: 12px; border-radius: 22px; display: flex; gap: 10px; align-items: center;
  background: linear-gradient(145deg, rgba(40, 42, 56, .92), rgba(20, 22, 30, .92)); border: 1px solid rgba(255, 209, 102, .45); box-shadow: 0 14px 34px -8px rgba(0, 0, 0, .8), 0 0 22px -8px rgba(255, 209, 102, .7); color: #fff; animation: gm-in .35s cubic-bezier(.2, 1.3, .4, 1); }
.gm-invite b { font-size: 13.5px; display: block; }
.gm-invite small { font-size: 11.5px; color: var(--gm-mut); display: block; }
.gm-invite .gm-b3 { height: 38px; font-size: 13px; padding: 0 12px; flex: none; }

@media (max-height: 740px) {
  .gm-pick { width: 88px; height: 110px; font-size: 48px; }
  .gm-slot .gm-face { width: 80px; height: 80px; font-size: 42px; }
  .gm-dice { height: 80px; }
  .gm-dice svg { width: 64px; height: 64px; }
  .gm-tttboard { margin-top: 10px; }
  .gm-bt { font-size: 17px; }
}
.gm-screen button:disabled, .games-screen button:disabled { opacity: 1; cursor: default; }
.gm-coin { display: inline-block; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3CradialGradient id='c' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23fff4c2'/%3E%3Cstop offset='.45' stop-color='%23ffd166'/%3E%3Cstop offset='1' stop-color='%23e08a00'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='12' r='11' fill='url%28%23c%29'/%3E%3Ccircle cx='12' cy='12' r='8.2' fill='none' stroke='rgba%28120%2C60%2C0%2C.35%29' stroke-width='1'/%3E%3Cpath d='M14.6 9.1c-.5-.8-1.5-1.2-2.6-1.2-1.5 0-2.6.8-2.6 2 0 2.7 5.3 1.4 5.3 4.1 0 1.2-1.2 2.1-2.8 2.1-1.2 0-2.3-.5-2.8-1.4' fill='none' stroke='%237a3f00' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }


.gm-day-exchange { margin: 8px 0; padding: 12px; display: block; width: 100%; min-width: 0; box-sizing: border-box; }
.gm-day-exchange-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; min-width: 0; line-height: 1.3; margin-bottom: 6px; }
.gm-day-exchange-head b, .gm-day-exchange-head span { min-width: 0; overflow-wrap: anywhere; }
.gm-day-exchange-head span { color: var(--gm-mut); font-size: 12px; }
.gm-day-exchange small { display: block; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; margin-bottom: 7px; }
.gm-day-exchange-label { display: block; color: var(--gm-mut); font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.gm-day-exchange-input { display: block; width: 100%; min-width: 0; box-sizing: border-box; height: 42px; border-radius: 999px; padding: 8px 14px; margin-bottom: 6px; }
.gm-day-exchange-coins { display: block; color: #ffd166; min-height: 1.25em; line-height: 1.25; overflow-wrap: anywhere; margin-bottom: 7px; }
.gm-day-exchange > .gm-b3 { display: flex; width: 100%; min-height: 42px; height: auto; box-sizing: border-box; padding: 8px 12px; white-space: normal; line-height: 1.15; }
/* Blackjack fixed-stake table */
.gm-art.blackjack { width: 74px; height: 74px; display: grid; place-items: center; position: relative; border-radius: 22px; color: #ffcf67; background: radial-gradient(circle at 35% 25%, #ffefb0, #b77512 38%, #3a1609 40%, #120b1e 76%); box-shadow: inset 0 1px 0 #fff8, 0 10px 18px #0006; transform: rotate(-7deg); }
.gm-art.blackjack span { position: absolute; top: 8px; left: 12px; font-size: 25px; }
.gm-art.blackjack b { font-size: 23px; color: #fff; text-shadow: 0 2px 0 #7e3300; transform: rotate(7deg); }
.gm-bj-body { gap: 12px; }
.gm-bj-dealer, .gm-bj-table { padding: 13px; border-radius: 24px; text-align: center; background: radial-gradient(circle at 50% 0%, #2b866e, #113f3b 64%, #0b1b2a); border-color: #d0a44566; box-shadow: inset 0 1px 0 #fff3, 0 14px 26px #0005; }
.gm-bj-table { background: radial-gradient(circle at 50% 0%, #392c73, #17152f 70%); }
.gm-bj-label { color: #ffd166; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.gm-bj-cards { display: flex; justify-content: center; align-items: center; min-height: 74px; gap: 7px; }
.gm-bj-card { width: 45px; height: 64px; position: relative; display: block; border-radius: 9px; color: #25152f; background: linear-gradient(145deg, #fff, #e7dfe7); border: 2px solid #f5d57f; box-shadow: 0 5px 0 #8b5b22, 0 9px 14px #0007; font-family: Georgia, serif; animation: bj-card-in .28s ease both; }
.gm-bj-corner { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; font-weight: 900; line-height: .82; }
.gm-bj-corner.top { top: 3px; left: 4px; }
.gm-bj-corner.bottom { right: 4px; bottom: 3px; transform: rotate(180deg); }
.gm-bj-corner b { font-size: 13px; }
.gm-bj-corner small { font-size: 11px; margin-top: 2px; }
.gm-bj-pips { position: absolute; inset: 18px 6px 17px; display: grid; grid-template-columns: repeat(2, 1fr); align-content: space-around; justify-items: center; font-size: 10px; line-height: 1; }
.gm-bj-pips i { font-style: normal; }
.gm-bj-pips .face-pip { grid-column: 1 / -1; align-self: center; font-size: 27px; }
.gm-bj-card.red { color: #c3264b; }
.gm-bj-card.back { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #ffd166; background: repeating-linear-gradient(45deg, #32215e 0 5px, #1b163c 5px 10px); border-color: #ffd166; font-family: inherit; font-size: 8px; letter-spacing: .08em; }
.gm-bj-card.back img { width: 27px; height: 27px; object-fit: contain; filter: drop-shadow(0 1px 2px #0009); }
.gm-bj-card.back b { font-size: 7px; }
.gm-bj-dealer > strong, .gm-bj-table > strong { display: block; margin-top: 7px; color: #fff; font-size: 23px; }
.gm-bj-result { margin: 8px auto 0; width: fit-content; padding: 5px 10px; border-radius: 999px; color: #1b1028; background: #ffd166; font-weight: 900; font-size: 11px; }
.gm-bj-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.gm-bj-player { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 8px; border-radius: 16px; background: #ffffff0b; border: 1px solid #ffffff14; }
.gm-bj-player.active { border-color: #ffd166; background: #ffd16618; box-shadow: 0 0 14px #ffd16629; }
.gm-bj-player.dealer { border-color: #d0a44566; }
.gm-bj-player b, .gm-bj-player small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-bj-player small { display: block; color: var(--gm-mut); font-size: 10px; }
.gm-bj-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 10px #ffd166; animation: bj-dot 1s ease-in-out infinite; }
@keyframes bj-card-in { from { opacity: 0; transform: translateY(8px) rotate(-5deg); } to { opacity: 1; transform: none; } }
@keyframes bj-dot { 50% { opacity: .35; transform: scale(.65); } }
@media (max-width: 370px) { .gm-bj-card { width: 39px; height: 59px; } .gm-bj-players { grid-template-columns: 1fr; } }

/* Keep every live game inside a phone-shaped mobile app canvas. */
.gm-screen {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  border: 1px solid rgba(238, 214, 255, .28);
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(5, 1, 16, .42), inset 0 1px 0 rgba(255, 255, 255, .16);
}
@media (max-width: 430px) {
  .gm-screen { border-radius: 0; border-inline: 0; box-shadow: none; }
}

/* Server update: the match is frozen and resumes where it stopped. */
.gm-paused {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 4, 20, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.gm-paused-card {
  max-width: 340px;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 20px;
  border-radius: 22px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
}
.gm-paused-ico { font-size: 2rem; line-height: 1; }
.gm-paused-card p { margin: 0; font-size: .92rem; line-height: 1.5; opacity: .88; }

/* Random-match confirmation: both players must opt in before stakes are placed. */
.gm-ready-overlay { gap: 10px; padding: max(20px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom)); }
.gm-ready-overlay .gm-radar { width: min(190px, 52vw); height: min(190px, 52vw); margin: 0 0 4px; flex: none; }
.gm-ready-overlay h2 { margin-top: 2px; }
.gm-ready-prompt { max-width: 320px; margin: 0; color: rgba(245, 247, 255, .82); font-size: 13px; line-height: 1.5; }
.gm-ready-clock { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 15px; border-radius: 999px; color: #ffe39a; background: rgba(255, 209, 102, .1); border: 1px solid rgba(255, 209, 102, .3); font-variant-numeric: tabular-nums; }
.gm-ready-clock span { min-width: 2ch; font-size: 25px; font-weight: 950; line-height: 1; }
.gm-ready-clock small { font-size: 11px; font-weight: 800; }
.gm-ready-clock.urgent { color: #ff91aa; background: rgba(255, 61, 110, .14); border-color: rgba(255, 91, 125, .48); }
.gm-ready-status { min-height: 1.4em; color: #fff; font-size: 13px; font-weight: 800; }
.gm-ready-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; width: min(100%, 350px); margin-top: 2px; }
.gm-ready-actions #gm-ready-start { min-width: 0; min-height: 48px; }
.gm-ready-actions #gm-ready-cancel { min-width: 96px; min-height: 48px; }
@media (max-height: 700px) {
  .gm-ready-overlay { gap: 7px; }
  .gm-ready-overlay .gm-radar { width: 142px; height: 142px; }
}
