/* ==========================================================
   Casino Fest — visual de cassino festivo
   ========================================================== */

:root {
  --bg: #0b0817;
  --bg-2: #130e28;
  --surface: #1a1336;
  --surface-2: #231a47;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);

  --gold: #ffc940;
  --gold-2: #ffe08a;
  --gold-deep: #e8930f;
  --pink: #ff3d7f;
  --pink-deep: #c4126a;
  --violet: #7b4dff;
  --teal: #19d3a2;
  --red: #ff4d5e;

  --felt-1: #138a63;
  --felt-2: #0b5a41;
  --felt-3: #06352a;
  --rail-1: #2b1838;
  --rail-2: #160b20;

  --cream: #fffdf7;
  --ink: #17122b;
  --card-red: #e3204a;

  --text: #f4f1ff;
  --muted: #a39cc4;

  --display: 'Lilita One', 'Outfit', system-ui, sans-serif;
  --ui: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
button { font-family: inherit; }
svg { flex: none; }

body {
  background:
    radial-gradient(900px 500px at 15% -5%, rgba(123, 77, 255, .22), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(255, 61, 127, .16), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   Cabeçalho do cassino
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 8, 23, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  flex: none;
}
.logo-svg { display: block; height: 58px; width: auto; overflow: visible; }
.logo-svg text { font-family: 'Lilita One', 'Outfit', sans-serif; }
.logo-crown { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3, 1.8, .5, 1); }
.logo:hover .logo-crown { transform: rotate(-10deg) translateY(-2px) scale(1.08); }
.logo .sparkles use { transform-box: fill-box; transform-origin: center; animation: twinkle 2.2s ease-in-out infinite; }
.logo .sparkles use:nth-child(2) { animation-delay: .4s; }
.logo .sparkles use:nth-child(3) { animation-delay: .9s; }
.logo .sparkles use:nth-child(4) { animation-delay: 1.3s; }
.logo .sparkles use:nth-child(5) { animation-delay: .6s; }
.logo .sparkles use:nth-child(6) { animation-delay: 1.6s; }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .35; transform: scale(.55) rotate(45deg); } }

/* Abas de jogos */
.games {
  min-width: 0;
  margin: 0 auto;                /* centralizado entre o logo e as fichas */
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  overflow-x: auto;              /* muitos jogos: o menu rola de lado em vez de passar por baixo das fichas */
  scrollbar-width: none;
}
.games::-webkit-scrollbar { display: none; }
.game-tab {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 14px var(--ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.game-tab svg { width: 26px; height: 26px; margin: -4px 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.game-tab:hover svg { transform: rotate(-8deg) scale(1.1); }
.game-tab.soon svg { opacity: .75; }
.game-tab:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.game-tab.active {
  color: #1d1205;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 4px 14px rgba(255, 201, 64, .3);
}
.soon-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--pink);
  background: rgba(255, 61, 127, .14);
}

/* Carteira (fichas) */
.wallet {
  position: relative;
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 7px 6px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a1f55, #1a1336);
  border: 1px solid rgba(255, 201, 64, .35);
  box-shadow: 0 0 0 4px rgba(255, 201, 64, .06), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.wallet-chip { width: 34px; height: 34px; color: var(--pink); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.wallet-text { display: flex; flex-direction: column; line-height: 1.05; }
.wallet-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wallet-amount {
  font-size: 19px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  transition: color .3s;
}
.wallet.up .wallet-amount { color: var(--teal); }
.wallet.down .wallet-amount { color: #ffb3c6; }
.wallet.up { animation: wallet-bump .5s ease-out; }
.wallet-add {
  flex: none;
  width: 26px; height: 26px;
  margin-left: 2px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe08a, #e8930f);
  box-shadow: 0 2px 0 #8a4b00, inset 0 1px 0 rgba(255, 255, 255, .5);
  color: #3a1d00;
  font: 800 18px/1 var(--ui);
  cursor: pointer;
  transition: transform .12s, filter .15s;
}
.wallet-add:hover { filter: brightness(1.08); transform: scale(1.06); }
.wallet-add:active { transform: translateY(2px); box-shadow: 0 0 0 #8a4b00; }
.wallet-delta {
  position: absolute;
  right: 14px;
  top: 100%;
  margin-top: 4px;
  font-weight: 800;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.wallet-delta.show { animation: delta-float 1.4s ease-out forwards; }
.wallet-delta.plus { color: var(--teal); }
.wallet-delta.minus { color: #ff8fab; }
@keyframes wallet-bump { 40% { transform: scale(1.06); } }
@keyframes delta-float {
  0% { opacity: 0; transform: translateY(-6px); }
  15% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

.profile .avatar { width: 40px; height: 40px; font-size: 14px; }

/* som ligado/desligado */
.sound-btn {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.sound-btn svg { width: 22px; height: 22px; }
.sound-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }
.sound-btn[aria-pressed="false"] { color: var(--muted); }

/* foco visível (teclado) com a cor da marca */
:focus-visible { outline: 3px solid rgba(255, 201, 64, .9); outline-offset: 2px; }

/* rodapé comum */
.site-footer {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 10px 20px 26px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.site-footer span { font: 400 14px var(--display); letter-spacing: .03em; color: var(--gold); }

/* ==========================================================
   Avatares (ilustrações com anel colorido)
   ========================================================== */
.avatar {
  --a1: #6b5bd6; --a2: #3b2f86;
  flex: none;
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--a1), var(--a2));
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--a1);
  color: #fff;
  font: 800 13px var(--ui);
  letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.avatar { overflow: hidden; }
.avatar svg { width: 100%; height: 100%; display: block; }
/* retratos 3D: um pouco de zoom no rosto */
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.18); transform-origin: 50% 32%; user-select: none; }
.ring-you   { --a1: #ffc940; }
.ring-baron { --a1: #19d3a2; }
.ring-lola  { --a1: #a77bff; }
.ring-kenji { --a1: #ff8a3d; }

/* ==========================================================
   Barra da mesa
   ========================================================== */
.app {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 18px 20px 48px;
}
.table-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
}
.tb-title h1 {
  margin: 0;
  font: 400 22px var(--display);
  letter-spacing: .02em;
  color: #fff;
}
.tb-sub { font-size: 12.5px; color: var(--muted); }
.tb-stats { display: flex; gap: 10px; margin-left: auto; align-items: stretch; }
.stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--line);
  min-width: 70px;
}
.stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat.level { min-width: 150px; gap: 4px; }
.level-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.level-bar i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  transition: width .5s ease;
}
.level-next { font-size: 11.5px; color: var(--muted); }

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 10px 16px;
  font: 600 14px var(--ui);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ghost svg { width: 16px; height: 16px; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }

/* ==========================================================
   Layout principal
   ========================================================== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.play { min-width: 0; }

/* ==========================================================
   Mesa
   ========================================================== */
.table {
  position: relative;
  container-type: inline-size;
  /* cabe na altura da tela junto com os controles */
  width: min(100%, max(680px, calc((100vh - 400px) * 1.6)));
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  border-radius: 9999px;
  border: 18px solid var(--rail-1);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .08), transparent 55%),
    radial-gradient(ellipse at 50% 45%, var(--felt-1) 0%, var(--felt-2) 55%, var(--felt-3) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 201, 64, .35),
    inset 0 0 100px rgba(0, 0, 0, .55),
    0 0 0 2px #3e2550,
    0 0 0 5px var(--rail-2),
    0 0 0 7px rgba(255, 201, 64, .45),
    0 40px 90px rgba(0, 0, 0, .6),
    0 0 120px rgba(123, 77, 255, .18);
  --cw: clamp(34px, 7cqw, 72px);
}
.table::before {
  /* reflexo do acolchoado do aro */
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: inherit;
  border: 18px solid transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 30%, transparent 70%, rgba(0, 0, 0, .3)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0) border-box;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0) border-box;
  pointer-events: none;
}
.table::after {
  content: '';
  position: absolute;
  inset: 6.5%;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, .09);
  pointer-events: none;
}

.felt-mark {
  position: absolute;
  left: 50%;
  top: 73%;
  transform: translate(-50%, -50%) rotate(-3deg);
  font: 400 clamp(20px, 4.4cqw, 46px) var(--display);
  letter-spacing: .04em;
  color: rgba(0, 0, 0, .16);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .05);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.felt-mark span { margin-left: .25em; }

.center {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 70%;
}

/* Pote */
.pot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  transition: opacity .4s, transform .4s;
}
.pot.empty .pot-chips { display: none; }
.pot.paid { opacity: 0; transform: scale(.85); }
.pot-chips { display: flex; align-items: flex-end; gap: 2px; --chip: 26px; }
.pot-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 201, 64, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.pot-amount span { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.pot-amount b { font-size: 18px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

.board {
  display: flex;
  gap: clamp(4px, .9vw, 10px);
  justify-content: center;
}
.board .card.empty {
  visibility: visible;
  background: rgba(0, 0, 0, .14);
  border: 2px dashed rgba(255, 255, 255, .12);
  box-shadow: none;
}

/* Faixa de resultado */
.banner {
  /* ocupa o lugar do pote (que some quando é pago) e cresce para cima, longe das cartas */
  position: absolute;
  bottom: calc(100% - 40px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 14px 14px 12px 24px;
  text-align: center;
  isolation: isolate;
  animation: pop .5s cubic-bezier(.3, 1.6, .5, 1);
  z-index: 5;
}
/* fundo + brilho que passa uma vez */
.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 18px;
  background:
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 45%, transparent 55%) -200% 0 / 250% 100% no-repeat,
    radial-gradient(120% 140% at 50% 0%, #4a2a8a, #24164a 60%, #170e33);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 201, 64, .18), 0 0 34px rgba(255, 201, 64, .45), 0 16px 34px rgba(0, 0, 0, .5);
  animation: shine 1.4s .35s ease-out both;
}
/* raios de luz girando atrás */
.banner-rays {
  position: absolute;
  left: 50%; top: 50%;
  width: 340px; height: 340px;
  margin: -170px 0 0 -170px;
  z-index: -2;
  pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 201, 64, .22) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%);
  mask: radial-gradient(circle, #000 18%, transparent 62%);
  animation: rays 14s linear infinite;
}
.banner-kicker {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -55%);
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
  font: 800 11px var(--ui);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #ff6b9d, var(--pink-deep));
  box-shadow: 0 3px 0 #7d0a42, 0 6px 12px rgba(0, 0, 0, .35);
}
.banner-title {
  font: 400 clamp(20px, 3.4cqw, 30px) 'Luckiest Guy', var(--display);
  letter-spacing: .03em;
  line-height: 1;
  padding-top: 3px;
  color: var(--gold);
  -webkit-text-stroke: 1.5px #4a1d00;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #4a1d00, 0 0 18px rgba(255, 201, 64, .5);
  white-space: nowrap;
}
.banner-amount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3cf0c0, #12a87c);
  box-shadow: 0 3px 0 #0a6a4f, inset 0 1px 0 rgba(255, 255, 255, .35);
  color: #04261c;
}
.banner-amount svg { width: 24px; height: 20px; color: var(--gold); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.banner-amount b { font-size: clamp(14px, 2cqw, 17px); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

.banner.lose { padding-left: 18px; }
.banner.lose::before {
  background: linear-gradient(180deg, #2c2352, #1a1336);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
  animation: none;
}
.banner.lose .banner-rays { display: none; }
.banner.lose .banner-kicker { background: #3a2f62; box-shadow: 0 3px 0 #17112f; color: #d9d3f5; }
.banner.lose .banner-title { color: #fff; -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); font-size: clamp(18px, 2.8cqw, 25px); }
.banner.lose .banner-amount { background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--gold); }

@keyframes shine { to { background-position: 200% 0, 0 0; } }
@keyframes rays { to { transform: rotate(360deg); } }

/* Confete */
.confetti-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* ==========================================================
   Cartas
   ========================================================== */
.card {
  position: relative;
  width: var(--cw);
  aspect-ratio: 5 / 7;
  flex: none;
  border-radius: calc(var(--cw) * .09);
  background: linear-gradient(165deg, #ffffff 0%, #f6f6f6 45%, #e9e9e9 100%);
  color: #161616;
  font-family: 'Times New Roman', Times, Georgia, serif;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(0, 0, 0, .06), inset 0 1px 0 #fff;
  user-select: none;
  transition: opacity .25s, transform .25s, box-shadow .25s;
  isolation: isolate; /* o índice (z-index) fica dentro da própria carta, sem vazar sobre a vizinha */
}
.card.red { color: #e5383f; }
.card.empty { visibility: hidden; }

/* Índices dos cantos: valor com serifa e naipe logo abaixo */
.card .c-tl, .card .c-br {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(var(--cw) * .2);
  gap: calc(var(--cw) * .035);
  line-height: .8;
  font-style: normal;
  z-index: 1;
}
.card .c-tl { top: 6%; left: 5%; }
.card .c-br { bottom: 6%; right: 5%; transform: rotate(180deg); }
.card .c-rank {
  font-size: calc(var(--cw) * .27);
  font-weight: 700;
}
.card .c-rank.ten { font-size: calc(var(--cw) * .24); letter-spacing: -.06em; transform: scaleX(.82); }
.card .c-suit { width: calc(var(--cw) * .15); height: calc(var(--cw) * .15); }

/* Naipes no layout clássico (2 a 10) */
.card .c-pips { position: absolute; inset: 0; font-style: normal; }
.card .pip {
  position: absolute;
  width: calc(var(--cw) * .19);
  height: calc(var(--cw) * .19);
  transform: translate(-50%, -50%);
}
.card .pip.flip { transform: translate(-50%, -50%) rotate(180deg); }
.card .c-pips.dense .pip { width: calc(var(--cw) * .165); height: calc(var(--cw) * .165); }
/* Ás: um naipe grande no centro */
.card .pip.ace { width: calc(var(--cw) * .56); height: calc(var(--cw) * .56); filter: drop-shadow(0 calc(var(--cw) * .012) calc(var(--cw) * .02) rgba(0, 0, 0, .18)); }

/* Figuras (J, Q, K): moldura azul com personagem espelhado, sem encostar no índice */
.card .c-court {
  position: absolute;
  left: 26%; right: 26%;
  top: 9%; bottom: 9%;
  width: 48%; height: 82%;
  overflow: visible;
}

/* Verso com a marca Casino Fest */
.card.back {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 95, 162, .45), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px calc(var(--cw) * .1)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px calc(var(--cw) * .1)),
    linear-gradient(160deg, #a24bff, #5a17b8 55%, #350c74);
  border: calc(var(--cw) * .05) solid #fdfcf8;
}
/* moldura dourada interna */
.card.back::after {
  content: '';
  position: absolute;
  inset: 5%;
  border-radius: calc(var(--cw) * .045);
  border: max(1px, calc(var(--cw) * .02)) solid rgba(255, 201, 64, .85);
  box-shadow: inset 0 0 0 max(1px, calc(var(--cw) * .012)) rgba(53, 12, 116, .9), inset 0 0 0 max(2px, calc(var(--cw) * .03)) rgba(255, 201, 64, .35);
}
/* medalhão com a coroa da marca */
.card .c-back {
  position: absolute;
  left: 50%; top: 50%;
  width: 54%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ff7ab3, #e0247a 55%, #9c0f57);
  box-shadow: 0 0 0 max(1px, calc(var(--cw) * .02)) var(--gold), 0 0 calc(var(--cw) * .14) rgba(255, 95, 162, .7);
  font-style: normal;
}
.card .c-back svg { width: 70%; height: 70%; margin-top: -6%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }

.card.deal { animation: deal .38s ease-out backwards; }
.card.flip { animation: flip .4s ease-out backwards; }
.card.hl {
  box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(255, 201, 64, .85);
  transform: translateY(-6px);
}
.table.has-hl .card:not(.hl):not(.back):not(.empty) { opacity: .45; }

@keyframes deal {
  from { opacity: 0; transform: translateY(-46px) scale(.8) rotate(-9deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes flip {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes pop {
  from { opacity: 0; transform: translateX(-50%) scale(.85) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%); }
}

/* ==========================================================
   Fichas
   ========================================================== */
.chips {
  --chip: 24px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45));
}
/* Ficha em perspectiva (símbolo #chip3d); empilhadas mostram a lateral listrada */
.chip {
  display: block;
  width: var(--chip);
  height: calc(var(--chip) * .85);
  color: #e23a4f;
}
.chip + .chip { margin-bottom: calc(var(--chip) * -.7); }
.chip.c1    { color: #e9e4d6; }
.chip.c5    { color: #e8344c; }
.chip.c10   { color: #2f7bff; }
.chip.c25   { color: #14b383; }
.chip.c50   { color: #ff8a2a; }
.chip.c100  { color: #2a2545; }
.chip.c250  { color: #ff3d9a; }
.chip.c500  { color: #7b4dff; }
.chip.c1000 { color: #f2b416; }

/* ==========================================================
   Assentos
   ========================================================== */
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  --cw: clamp(28px, 5.2cqw, 54px);
  transition: opacity .3s;
}
.seat-0 { left: 50%; top: 84%; --cw: clamp(40px, 7.8cqw, 82px); }
.seat-1 { left: 8%;  top: 50%; }
.seat-2 { left: 50%; top: 11%; }
.seat-3 { left: 92%; top: 50%; }

.seat .hole { display: flex; gap: 4px; }
/* cartas dos bots ficam "encaixadas" atrás da placa, como nas mesas online */
.seat:not(.seat-0) .hole { margin-bottom: calc(var(--cw) * -.42); }
.seat:not(.seat-0) .hole .card:first-child { transform: rotate(-6deg); }
.seat:not(.seat-0) .hole .card:last-child  { transform: rotate(6deg); }
.seat-0 .hole { gap: 6px; }
.seat-0 .hole .card:first-child { transform: rotate(-5deg) translateY(2px); }
.seat-0 .hole .card:last-child  { transform: rotate(5deg) translateY(2px); }
.seat-0 .hole .card.hl:first-child { transform: rotate(-5deg) translateY(-6px); }
.seat-0 .hole .card.hl:last-child  { transform: rotate(5deg) translateY(-6px); }

.plate {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 5px;
  background: linear-gradient(180deg, rgba(36, 26, 72, .95), rgba(16, 11, 34, .95));
  border: 1px solid var(--line-2);
  border-radius: 999px;
  min-width: 132px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
  transition: border-color .2s, box-shadow .2s, background .3s;
}
.plate .avatar { width: 50px; height: 50px; margin: -9px 0 -9px -8px; box-shadow: 0 0 0 2.5px #120c26, 0 0 0 4.5px var(--a1), 0 4px 10px rgba(0, 0, 0, .45); }
.who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.name { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.stack { font-size: 13px; color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  min-height: 14px;
  white-space: nowrap;
}
.tag[data-kind="fold"]  { color: #8d86ad; }
.tag[data-kind="check"] { color: #cfc9ea; }
.tag[data-kind="call"]  { color: var(--teal); }
.tag[data-kind="raise"] { color: var(--gold); }
.tag[data-kind="allin"] { color: var(--pink); font-weight: 800; letter-spacing: .03em; }
.tag[data-kind="hint"]  { color: var(--gold-2); }

.seat-0 .plate { min-width: 170px; }

/* Indicador "pensando" */
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.seat.turn .plate {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 201, 64, .35), 0 0 26px rgba(255, 201, 64, .45);
  animation: pulse 1.3s ease-in-out infinite;
}
.seat.folded { opacity: .45; }
.seat.out { opacity: .28; filter: grayscale(1); }
.seat.winner .plate {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255, 201, 64, .35), rgba(36, 26, 72, .95) 70%);
  box-shadow: 0 0 0 2px rgba(255, 201, 64, .4), 0 0 32px rgba(255, 201, 64, .5);
}
.seat.winner .tag { color: var(--gold-2); font-weight: 700; }

@keyframes pulse {
  50% { box-shadow: 0 0 0 5px rgba(255, 201, 64, .18), 0 0 32px rgba(255, 201, 64, .6); }
}

/* Botão do dealer */
.dealer-btn {
  position: absolute;
  right: -8px; top: -9px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e6e1d3);
  color: var(--ink);
  font: 800 11px var(--ui);
  box-shadow: 0 0 0 2px var(--gold), 0 3px 6px rgba(0, 0, 0, .5);
}

/* Apostas na frente de cada assento */
.bet {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
  animation: bet-in .25s ease-out;
}
.bet .chips { --chip: 24px; }
.bet b {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  font-variant-numeric: tabular-nums;
}
.seat-0 .bet { bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
.seat-2 .bet { left: calc(100% + 12px); bottom: 8px; }
.seat-1 .bet { left: calc(100% + 12px); top: 40%; }
.seat-3 .bet { right: calc(100% + 12px); top: 40%; flex-direction: row-reverse; }
@keyframes bet-in { from { opacity: 0; } }

/* Mesa pequena (telas baixas): placas mais compactas */
@container (max-width: 820px) {
  .plate { min-width: 0; padding: 4px 12px 4px 4px; gap: 8px; }
  .plate .avatar { width: 42px; height: 42px; margin: -7px 0 -7px -6px; }
  .seat-0 .plate { min-width: 140px; }
  .name { font-size: 12.5px; }
  .stack { font-size: 12px; }
  .tag { font-size: 11px; }
}

/* ==========================================================
   Controles
   ========================================================== */
.controls {
  margin: 26px auto 0;
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.status {
  min-height: 22px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.status.mine {
  color: var(--gold);
  font: 400 18px var(--display);
  letter-spacing: .04em;
}
.dock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  transition: box-shadow .3s, border-color .3s;
}
.controls.my-turn .dock {
  border-color: rgba(255, 201, 64, .5);
  box-shadow: 0 0 0 4px rgba(255, 201, 64, .08), 0 18px 40px rgba(0, 0, 0, .35);
}
.raise-box { display: flex; align-items: center; gap: 12px; transition: opacity .2s; }
.quick { flex: 1.1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slider { flex: 1; }
.quick button, .slider button {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 9px 6px;
  font: 700 13px var(--ui);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.quick button:hover:not(:disabled), .slider button:hover:not(:disabled) { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); }
.slider { display: flex; gap: 10px; align-items: center; }
.slider button { width: 42px; font-size: 18px; padding: 4px 0; }
.slider input { flex: 1; accent-color: var(--gold); height: 28px; cursor: pointer; }

.actions { display: grid; grid-template-columns: 1fr 1.3fr 1.5fr; gap: 10px; }
.btn {
  position: relative;
  border: 0;
  border-radius: 14px;
  padding: 15px 12px;
  font: 800 16px var(--ui);
  letter-spacing: .01em;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--btn-edge, rgba(0, 0, 0, .4)), 0 10px 20px rgba(0, 0, 0, .3);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-edge, rgba(0, 0, 0, .4)); }
.btn kbd {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .22);
  font: 700 11px var(--ui);
  opacity: .75;
  vertical-align: 2px;
}
.btn.fold  { background: linear-gradient(180deg, #3a2f62, #2a2150); --btn-edge: #17112f; color: #e4dfff; }
.btn.call  { background: linear-gradient(180deg, #2ee0b0, #12a87c); --btn-edge: #0a6a4f; color: #04261c; }
.btn.call kbd, .btn.raise kbd, .btn.next kbd { background: rgba(0, 0, 0, .12); }
.btn.raise { background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, var(--gold-deep)); --btn-edge: #9a5a00; color: #2a1500; }
.btn.next  {
  width: 100%;
  background: linear-gradient(180deg, #ff6b9d, var(--pink) 50%, var(--pink-deep));
  --btn-edge: #7d0a42;
  font: 400 19px var(--display);
  letter-spacing: .04em;
}
.btn:disabled, .quick button:disabled, .slider button:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.4); }
.slider input:disabled { opacity: .4; cursor: not-allowed; }
.controls.disabled .raise-box { opacity: .5; }

/* Bandeja de fichas (blackjack e roleta) */
.chip-tray { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.tray-chip {
  position: relative;
  width: 62px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform .15s, filter .15s, opacity .2s;
}
.tray-chip svg { display: block; width: 62px; height: 53px; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .45)); }
.tray-chip b {
  position: absolute;
  left: 50%; top: 41%;
  transform: translate(-50%, -50%);
  font: 800 14px var(--ui);
  color: #fff;
  -webkit-text-stroke: 3px rgba(0, 0, 0, .45);
  paint-order: stroke fill;
  pointer-events: none;
}
.tray-chip.c1 b, .tray-chip.c1000 b { color: #3a1d00; -webkit-text-stroke: 3px rgba(255, 255, 255, .55); }
.tray-chip:hover:not(:disabled) { transform: translateY(-5px) rotate(-4deg); }
.tray-chip:active:not(:disabled) { transform: translateY(1px) scale(.96); }
.tray-chip:disabled { opacity: .3; cursor: not-allowed; filter: grayscale(.6); }

@media (max-width: 720px) {
  .tray-chip, .tray-chip svg { width: 50px; }
  .tray-chip svg { height: 43px; }
  .tray-chip b { font-size: 12px; }
  .chip-tray { gap: 6px; }
}

/* ==========================================================
   Histórico
   ========================================================== */
.log-wrap {
  position: sticky;
  top: 86px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  overflow: hidden;
}
.log-wrap h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 16px 12px;
  font: 700 12px var(--ui);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.log-wrap h2 svg { width: 16px; height: 16px; color: var(--pink); }
.log {
  list-style: none;
  margin: 0;
  padding: 10px 16px 14px;
  max-height: min(560px, calc(100vh - 200px));
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  color: #cbc5e6;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.log li { padding: 2px 0; }
.log li.sep {
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
  background: rgba(255, 201, 64, .08);
}
.log li.sep:first-child { margin-top: 0; }
.log li.win { color: #fff; font-weight: 700; }
.log li.me { color: var(--gold-2); }

/* Aviso rápido */
.toast {
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 61, 127, .45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
  font-weight: 600;
  font-size: 14px;
  animation: toast-in .25s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ==========================================================
   Responsivo
   ========================================================== */
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .log-wrap { position: static; width: min(760px, 100%); margin: 6px auto 0; }
  .log { max-height: 180px; }
}

/* menu com muitos jogos: quando não cabe tudo numa linha, só o jogo atual mostra o nome */
@media (max-width: 1440px) and (min-width: 901px) {
  .game-tab { padding: 8px 11px; gap: 7px; }
  .game-tab:not(.active) span { display: none; }
  .game-tab:not(.active) svg { width: 28px; height: 28px; }
}
@media (max-width: 980px) and (min-width: 901px) {
  .games { gap: 2px; }
  .game-tab { padding: 8px 8px; }
  .game-tab:not(.active) svg { width: 26px; height: 26px; }
}
@media (max-width: 1120px) {
  /* "Em breve" vira um pontinho para caber o menu */
  .soon-tag { font-size: 0; width: 7px; height: 7px; padding: 0; background: var(--pink); align-self: flex-start; margin-top: 2px; }
}

@media (max-width: 900px) {
  .site-header-inner { flex-wrap: wrap; gap: 10px 14px; padding: 8px 14px; }
  .games { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .games::-webkit-scrollbar { display: none; }
  .wallet { margin-left: auto; }
  .table-bar { flex-wrap: wrap; }
  .tb-stats { margin-left: 0; order: 3; width: 100%; }
  .stat.level { flex: 1; }
  #btn-new { margin-left: auto; }
}

@media (max-width: 720px) {
  .site-header { position: relative; }
  /* no celular a faixa de resultado vai abaixo da mesa central, longe dos assentos */
  .banner { bottom: auto; top: calc(100% + 18px); }
  .app { padding: 12px 10px 34px; }
  .logo-svg { height: 46px; }
  .wallet { padding: 4px 5px; gap: 8px; }
  .wallet-add { width: 24px; height: 24px; font-size: 16px; }
  .wallet-chip { width: 28px; height: 28px; }
  .wallet-amount { font-size: 16px; min-width: 0; }
  .profile { display: none; }
  .sound-btn { width: 34px; height: 34px; }
  .sound-btn svg { width: 19px; height: 19px; }
  .site-footer { padding: 6px 14px 22px; font-size: 12px; }
  .game-tab { padding: 7px 11px; font-size: 13px; }
  .tb-title h1 { font-size: 19px; }
  .table-bar { padding: 10px 12px; gap: 10px; margin-bottom: 14px; }
  .stat b { font-size: 14px; }
  .stat-label { font-size: 9.5px; }
  .tb-sub { display: none; }
  .stat { padding: 5px 10px; min-width: 0; }
  .stat.level { min-width: 0; }
  .btn-ghost { padding: 8px 12px; font-size: 13px; }

  .table {
    aspect-ratio: 3 / 4.3;
    border-width: 11px;
    border-radius: 130px;
    width: 100%;
    --cw: clamp(36px, 13.5cqw, 60px);
  }
  .table::before { inset: -11px; border-width: 11px; }
  .table::after { border-radius: 110px; inset: 4%; }
  .felt-mark { top: 72%; }
  .center { top: 45%; width: 94%; }
  .banner { padding: 12px 10px 9px 16px; gap: 6px 10px; }
  .banner-title { font-size: 20px; }
  .banner-kicker { font-size: 10px; padding: 2px 10px; }
  .banner-amount { padding: 4px 10px 4px 5px; }
  .banner-amount svg { width: 20px; height: 17px; }
  .seat { --cw: clamp(28px, 9.5cqw, 44px); }
  .seat-0 { left: 50%; top: 87.5%; --cw: clamp(42px, 14cqw, 62px); }
  .seat-1 { left: 19%; top: 26%; }
  .seat-2 { left: 50%; top: 9%; }
  .seat-3 { left: 81%; top: 26%; }
  .plate { min-width: 0; padding: 3px 10px 3px 3px; gap: 6px; }
  .plate .avatar { width: 34px; height: 34px; margin: -5px 0 -5px -4px; box-shadow: 0 0 0 2px #120c26, 0 0 0 3.5px var(--a1); }
  .seat-0 .plate { min-width: 0; }
  .name { font-size: 11.5px; }
  .stack { font-size: 11.5px; }
  .tag { font-size: 10.5px; }
  .dealer-btn { width: 20px; height: 20px; font-size: 10px; right: -6px; top: -8px; }
  .seat-1 .bet, .seat-2 .bet, .seat-3 .bet {
    top: calc(100% + 6px); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); flex-direction: row;
  }
  .bet .chips { --chip: 19px; }
  .bet b { font-size: 11.5px; }
  .pot-chips { --chip: 21px; }
  .pot-amount b { font-size: 16px; }
  .seat.turn .plate { animation: none; }
  .dock { padding: 10px; border-radius: 16px; }
  /* ações sempre à mão no celular */
  .controls {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 14px;
    padding: 8px 0 10px;
    gap: 6px;
    background: linear-gradient(180deg, transparent, var(--bg) 22%);
  }
  .status { min-height: 18px; font-size: 13px; }
  .status.mine { font-size: 16px; }
  .raise-box { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn { padding: 13px 8px; font-size: 14px; }
  .btn kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card.deal, .card.flip, .banner, .seat.turn .plate,
  .wallet.up, .wallet-delta.show, .dots i, .bet, .logo .sparkles use { animation: none; }
  .wallet-delta.show { opacity: 1; }
}

/* ---------- Menu do giro automático (slots) ---------- */
.auto-menu {
  position: fixed;
  z-index: 120;
  width: min(300px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2a1452, #170a33);
  border: 1.5px solid rgba(255, 201, 64, .6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 0 4px rgba(255, 201, 64, .08);
  animation: am-in .18s ease-out;
}
.auto-menu[hidden] { display: none; }
@keyframes am-in { from { opacity: 0; transform: translateY(6px); } }
.am-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.am-head b { font: 400 18px var(--display); letter-spacing: .03em; color: var(--gold); }
.am-head small { color: var(--muted); font-size: 12.5px; }
.am-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.am-opt {
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--line-2);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font: 800 17px var(--ui);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.am-opt:hover, .am-opt:focus-visible { background: rgba(255, 201, 64, .16); border-color: var(--gold); outline: none; }
.am-opt:active { transform: scale(.96); }
.am-opt.last { border-color: rgba(255, 201, 64, .7); }
.am-opt.inf { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 20px; }
.am-opt.inf small { font: 700 13px var(--ui); color: var(--muted); }
.am-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.am-check input { width: 18px; height: 18px; accent-color: #ffc940; }
.am-note { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .auto-menu { animation: none; } }
