/* ============ Velo Bingo on the painted plate (design/v2/bingo.webp) ============
   Sizes use var(--u) = one plate pixel, so everything scales with the painting. */

/* Balls remaining */
.game-bingo .bg-remain {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #fff;
  pointer-events: none;
}
.game-bingo .bg-remain b { font-size: calc(62 * var(--u)); font-weight: 700; }
.game-bingo .bg-remain small { margin-top: calc(4 * var(--u)); font-size: calc(17 * var(--u)); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; text-align: center; line-height: 1.15; }

/* Called balls in the five sockets */
.game-bingo .bg-ball { pointer-events: none; z-index: 2; transition: transform 0.25s; }
.game-bingo .bg-ball img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.game-bingo .bg-ball span {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.95;
  color: #0E0E22;
}
.game-bingo .bg-ball small { font-size: calc(21 * var(--u)); font-weight: 700; }
.game-bingo .bg-ball b { font-family: "Helvetica Neue", "Arial Black", Arial, sans-serif; font-size: calc(40 * var(--u)); font-weight: 900; letter-spacing: -0.04em; }
.game-bingo .bg-ball.big { transform: scale(1.38); z-index: 3; filter: drop-shadow(0 0 calc(10 * var(--u)) rgba(255, 200, 80, 0.85)); }
.game-bingo .bg-ball.drop { animation: bg-drop 0.45s cubic-bezier(.2,1.5,.4,1); }
@keyframes bg-drop { from { transform: translateY(-40%) scale(0.5) rotate(-90deg); opacity: 0; } }

/* One card: numbers placed on the painted cells */
.game-bingo .bg-cards { z-index: 1; }
.game-bingo .bg-card { position: absolute; inset: 0; }
.game-bingo .bg-cards:not(.multi) .bg-cell {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: calc(12 * var(--u));
  cursor: pointer;
}
.game-bingo .bg-cell > span {
  position: relative;
  z-index: 1;
  font-family: "Helvetica Neue", "Arial Black", Arial, sans-serif;
  font-weight: 900;
  font-size: calc(68 * var(--u));
  letter-spacing: -0.04em;
  color: #121212;
}
.game-bingo .bg-cell > i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(142 * var(--u));
  height: calc(142 * var(--u));
  transform: translate(-50%, -50%) scale(0);
  background: url("../../img/v2/bingo/daub.webp") center / contain no-repeat;
  transition: transform 0.18s cubic-bezier(.2,1.5,.4,1);
}
.game-bingo .bg-cell.mk > i { transform: translate(-50%, -50%) scale(1); }
.game-bingo .bg-cell.mk > span { color: #fff; text-shadow: 0 calc(2 * var(--u)) calc(3 * var(--u)) rgba(40, 0, 80, 0.7); }
.game-bingo .bg-cell.cur { box-shadow: inset 0 0 0 calc(4 * var(--u)) #F6C453, 0 0 calc(16 * var(--u)) rgba(255, 200, 80, 0.8); }
.game-bingo .bg-cell.line { background: rgba(255, 205, 80, 0.35); box-shadow: inset 0 0 0 calc(4 * var(--u)) #FFD966; }
.game-bingo .bg-card.ready .bg-cell.mk > i,
.game-bingo .bg-card.ready .bg-cell.free { animation: bg-ready 0.7s ease-in-out infinite alternate; }
@keyframes bg-ready { to { filter: brightness(1.3) drop-shadow(0 0 calc(10 * var(--u)) #FFD966); } }

/* 2–4 cards: smaller cards drawn over the painted card */
.game-bingo .bg-cards.multi {
  display: grid;
  gap: calc(14 * var(--u));
  padding: calc(26 * var(--u));
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.game-bingo .bg-cards.multi[data-n="2"] { grid-template-columns: 1fr; }
.game-bingo .bg-cards.multi::before {
  content: "";
  position: absolute;
  inset: calc(18 * var(--u));
  z-index: -1;
  border-radius: calc(26 * var(--u));
  background: linear-gradient(180deg, #2A1544, #12081F);
}
.game-bingo .bg-cards.multi .bg-card {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 0.7fr repeat(5, 1fr);
  gap: calc(4 * var(--u));
  padding: calc(8 * var(--u));
  border-radius: calc(16 * var(--u));
  background: #1A0E2B;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #D9A03A, 0 0 calc(10 * var(--u)) rgba(255, 190, 80, 0.3);
}
.game-bingo .bg-cards.multi[data-n="2"] .bg-card { width: 62%; justify-self: center; }
.game-bingo .bg-head { display: grid; place-items: center; }
.game-bingo .bg-cards.multi .bg-cell {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: calc(6 * var(--u));
  background: linear-gradient(180deg, #FFF9EC, #F1E5C8);
  cursor: pointer;
}
.game-bingo .bg-cards.multi .bg-cell > span { font-size: calc(34 * var(--u)); }
.game-bingo .bg-cards.multi .bg-cell > i { width: 92%; height: auto; aspect-ratio: 1; }
.game-bingo .bg-cards.multi[data-n="2"] .bg-cell > span { font-size: calc(28 * var(--u)); }

.game-bingo .bg-won:empty { display: none; }
.game-bingo .bg-won {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: calc(14 * var(--u)) calc(30 * var(--u));
  border-radius: calc(20 * var(--u));
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 900;
  font-size: calc(54 * var(--u));
  color: #3A1A00;
  background: linear-gradient(180deg, #FFF0A6, #F6C453 50%, #D98A10);
  box-shadow: 0 0 0 calc(4 * var(--u)) #7A4A0E, 0 calc(10 * var(--u)) calc(26 * var(--u)) rgba(0, 0, 0, 0.6);
  animation: bg-stamp 0.4s cubic-bezier(.2,1.6,.4,1);
  pointer-events: none;
}
.game-bingo .bg-cards.multi .bg-won { font-size: calc(30 * var(--u)); }
.game-bingo .bg-won b { font-family: var(--font); font-weight: 700; }
@keyframes bg-stamp { from { transform: translate(-50%, -50%) rotate(-8deg) scale(2); opacity: 0; } }

/* BINGO button: the painting is the button; the PLAY art covers it between rounds */
.game-bingo .bg-bingo { border-radius: 999px; z-index: 2; }
.game-bingo .bg-bingo:active { transform: scale(0.97); }
.game-bingo .bg-bingo.glow { animation: bg-glow 0.7s ease-in-out infinite alternate; }
@keyframes bg-glow { to { box-shadow: 0 0 calc(40 * var(--u)) calc(14 * var(--u)) rgba(255, 210, 90, 0.75); transform: scale(1.03); } }

/* Bottom panels */
.game-bingo .bg-step { border-radius: 50%; z-index: 2; }
.game-bingo .bg-step:active { background: rgba(255, 255, 255, 0.12); }
.game-bingo .bg-step:disabled::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(8, 3, 16, 0.6); }
.game-bingo .bg-playing .bg-step { pointer-events: none; }
.game-bingo .bg-count { display: flex; align-items: center; justify-content: center; gap: calc(22 * var(--u)); pointer-events: none; }
.game-bingo .bg-count b { font-size: calc(48 * var(--u)); font-weight: 700; color: #fff; }
.game-bingo .bg-cards-ico { position: relative; width: calc(46 * var(--u)); height: calc(52 * var(--u)); }
.game-bingo .bg-cards-ico i {
  position: absolute;
  width: calc(32 * var(--u));
  height: calc(44 * var(--u));
  border-radius: calc(4 * var(--u));
  background: linear-gradient(180deg, #FCEBC0, #D9B670);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #8A5A12;
}
.game-bingo .bg-cards-ico i:first-child { left: 0; top: calc(8 * var(--u)); transform: rotate(-12deg); }
.game-bingo .bg-cards-ico i:last-child { left: calc(12 * var(--u)); top: 0; }
.game-bingo .bg-toggle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.15s; }
.game-bingo .bg-toggle .on { opacity: 0; }
.game-bingo .bg-toggle.is-on .on { opacity: 1; }
.game-bingo .bg-toggle.is-on .off { opacity: 0; }
.game-bingo .bg-pattern { display: grid; place-items: center; }
.game-bingo .bg-mini { display: grid; grid-template-columns: repeat(5, calc(11 * var(--u))); gap: calc(3 * var(--u)); padding: calc(5 * var(--u)); border-radius: calc(6 * var(--u)); background: #1A0E2B; box-shadow: inset 0 0 0 calc(2 * var(--u)) rgba(181, 123, 255, 0.45); }
.game-bingo .bg-mini span { width: calc(11 * var(--u)); height: calc(11 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.game-bingo .bg-mini span.on { background: #B57BFF; box-shadow: 0 0 calc(5 * var(--u)) #9B4DFF; }


/* ---------- Sharp redraws over the painted card and sign ---------- */
/* B I N G O tiles */
.game-bingo .bg-cards:not(.multi) .bg-head { position: absolute; z-index: 1; }
.game-bingo .bg-head {
  border-radius: calc(10 * var(--u));
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.28), transparent 60%),
    linear-gradient(180deg, var(--h1), var(--h2));
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #F3CF7A, inset 0 0 0 calc(4.5 * var(--u)) rgba(70, 40, 5, 0.75), inset 0 calc(-10 * var(--u)) calc(14 * var(--u)) rgba(0, 0, 0, 0.3);
}
.game-bingo .bg-head b {
  font-family: var(--serif);
  font-weight: 900;
  font-size: calc(64 * var(--u));
  line-height: 1;
  background: linear-gradient(180deg, #FFF6C8 0%, #F6CF68 45%, #C88A24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 calc(3 * var(--u)) 0 rgba(60, 30, 0, 0.75));
}
.game-bingo .bg-cards.multi .bg-head b { font-size: calc(30 * var(--u)); filter: drop-shadow(0 calc(2 * var(--u)) 0 rgba(60, 30, 0, 0.75)); }
.game-bingo .bg-head.cb { --h1: #D3202D; --h2: #7E0C16; }
.game-bingo .bg-head.ci { --h1: #D9A32A; --h2: #7E5406; }
.game-bingo .bg-head.cn { --h1: #2353D9; --h2: #0C2278; }
.game-bingo .bg-head.cg { --h1: #1F9C40; --h2: #0A501D; }
.game-bingo .bg-head.co { --h1: #6E26CC; --h2: #300873; }

/* star tile */
.game-bingo .bg-cell.free,
.game-bingo .bg-cards.multi .bg-cell.free {
  background:
    radial-gradient(circle at 50% 45%, rgba(190, 120, 255, 0.45), transparent 62%),
    linear-gradient(160deg, #6324B8, #33096E);
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #E8B95A, inset 0 0 0 calc(4.5 * var(--u)) rgba(50, 20, 80, 0.8), inset 0 0 calc(18 * var(--u)) rgba(0, 0, 0, 0.35);
}
.game-bingo .bg-cell.free .bg-star { width: 78%; height: auto; max-height: 92%; filter: drop-shadow(0 calc(3 * var(--u)) calc(3 * var(--u)) rgba(0, 0, 0, 0.5)); }
.game-bingo .bg-cards.multi .bg-cell.free .bg-star { width: 70%; }

/* PLAY / BINGO marquee sign */
.game-bingo .bg-bingo {
  background:
    linear-gradient(180deg, #FFE7A0 0%, #D9A03A 30%, #9A6418 62%, #E2AE4C 100%);
  box-shadow: 0 0 0 calc(2 * var(--u)) #5A3608, 0 calc(10 * var(--u)) calc(26 * var(--u)) rgba(0, 0, 0, 0.6), 0 0 calc(30 * var(--u)) rgba(255, 190, 80, 0.35);
}
.game-bingo .bg-bulbs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.game-bingo .bg-bulbs i {
  position: absolute;
  width: calc(11 * var(--u));
  height: calc(11 * var(--u));
  margin: calc(-5.5 * var(--u)) 0 0 calc(-5.5 * var(--u));
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #FFFFFF, #FFF2B8 45%, #F2B33C 100%);
  box-shadow: 0 0 calc(8 * var(--u)) calc(2 * var(--u)) rgba(255, 220, 120, 0.85);
  animation: bg-bulb 1.1s steps(1) infinite;
}
@keyframes bg-bulb { 50% { background: radial-gradient(circle at 40% 35%, #F7D788, #B47A22); box-shadow: none; } }
.game-bingo .bg-sign {
  position: absolute;
  inset: calc(26 * var(--u));
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(205, 150, 255, 0.55), transparent 60%),
    linear-gradient(180deg, #7A2FE0 0%, #4E15A6 50%, #2A0868 100%);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #FFE7A0, inset 0 0 0 calc(6 * var(--u)) #8A5A12, inset 0 calc(-12 * var(--u)) calc(18 * var(--u)) rgba(0, 0, 0, 0.4);
}
.game-bingo .bg-word {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-size: calc(92 * var(--u));
  line-height: 1;
  letter-spacing: calc(2 * var(--u));
  background: linear-gradient(180deg, #FFF7CC 0%, #FFD458 42%, #E39A1E 70%, #FFE08A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 calc(4 * var(--u)) 0 #6A3A06) drop-shadow(0 calc(8 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.5));
}
