/* Bomba da fortuna (postos de combustível / serviços automotivos).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): o corpo da bomba é o verde da
 * campanha; dourado, creme, céu de fim de tarde e cinzas em hex direto. Nunca
 * azul. Nenhum "R$" e nenhum "litros" na cena.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - Os dígitos rodam por JS (translateY em px, altura do dígito = altura da
 *    janela, medida no JS e passada em --bf-h).
 *  - Posições em % do palco: viewBox 160×110 no mesmo 16:11 do palco. Visor do
 *    contador em x 64.5–95.5, y 47–64; globo em (80,19).
 */

.bf__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: #FFF1DA;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5);
    user-select: none;
    font-family: Arial, sans-serif;
}
.bf__cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.bf__rotulo {
    position: absolute;
    left: 4%; top: 12%;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--jg-14532d, #14532d);
    border: 1px solid #C9A227;
    font: 700 10px/1 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFF3C4;
    white-space: nowrap;
    z-index: 8;
}
.bf__rotulo img { width: 12px; height: 12px; }

.bf__legenda { font: 700 2.9px/1 Arial, sans-serif; fill: #8A6D1F; letter-spacing: .15px; }
.bf__luz { font: 700 3.2px/1 Consolas, 'Courier New', monospace; fill: #6B7570; letter-spacing: .3px; }
.bf--jogando .bf__luz { fill: #FFB547; animation: bf-pisca .5s steps(2, jump-none) infinite; }
.bf--premiado .bf__luz { fill: #FFE26E; }
.bf--consolo .bf__luz { fill: #D5DBD8; }
@keyframes bf-pisca { 50% { opacity: .35; } }

/* ---------------- contador ---------------- */

.bf__contador {
    position: absolute;
    left: 41.2%; width: 17.6%;
    top: 43.9%; height: 13.2%;
    display: flex; gap: 6%;
    z-index: 3;
}
.bf__janela {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: linear-gradient(180deg, #CFC7B2, #FFFDF6 30%, #FFFDF6 70%, #CFC7B2);
    box-shadow: inset 0 0 0 1px #6B5B3E, inset 0 3px 4px -2px rgba(0, 0, 0, .5), inset 0 -3px 4px -2px rgba(0, 0, 0, .5);
}
.bf__fita { will-change: transform; }
.bf__fita span {
    display: block;
    height: var(--bf-h, 40px);
    line-height: var(--bf-h, 40px);
    text-align: center;
    font: 700 calc(var(--bf-h, 40px) * .74)/var(--bf-h, 40px) Arial, Helvetica, sans-serif;
    font-variant-numeric: lining-nums tabular-nums;
    color: #1E2320;
}
/* trava de cada dígito ao parar: um "clique" visual */
.bf__janela--parou { animation: bf-clique .18s ease-out; }
@keyframes bf-clique { 40% { transform: translateY(1px); } }

/* 7-7-7: janelas douradas */
.bf--premiou .bf__janela {
    animation: bf-ouro .5s ease-out forwards;
}
@keyframes bf-ouro {
    to { background: linear-gradient(180deg, #E0B43A, #FFF3B0 35%, #FFF3B0 65%, #E0B43A);
         box-shadow: inset 0 0 0 1px #8A6D1F, 0 0 8px 2px rgba(255, 214, 90, .9); }
}

/* ---------------- globo e bico ---------------- */

.bf__globo-ouro { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.bf--premiou .bf__globo-ouro { animation: bf-globo 1s ease-out forwards; }
@keyframes bf-globo {
    0%   { opacity: 0; }
    40%  { opacity: 1; transform: scale(1.12); }
    100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 3px rgba(255, 214, 90, .95)); }
}

.bf__bico { transform-box: fill-box; transform-origin: 0% 50%; }
.bf--consolo .bf__bico { animation: bf-estalo .35s ease-out; }
@keyframes bf-estalo {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-9deg) translateX(-.6px); }
    55% { transform: rotate(4deg); }
}

/* ---------------- confetes e prêmio ---------------- */

.bf__confetes { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.bf__confetes i {
    position: absolute;
    left: 50%; top: 18%;
    width: 1.7%; height: 2.6%;
    border-radius: 1px;
    opacity: 0;
}
.bf--premiou .bf__confetes i { animation: bf-confete 1.3s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes bf-confete {
    0%   { opacity: 0; transform: rotate(0deg); }
    15%  { opacity: 1; }
    100% { opacity: 1; left: calc(50% + var(--dx)); top: calc(18% + var(--dy)); transform: rotate(var(--r)); }
}

.bf__bolha {
    position: absolute;
    left: 50%; top: 17%;
    width: 20%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 3px solid #D4AF37;
    box-shadow: 0 0 0 3px rgba(255, 243, 196, .9), 0 10px 22px -8px rgba(0, 0, 0, .5);
    transform: translate(-50%, -50%) scale(.1);
    opacity: 0;
    z-index: 7;
}
.bf__bolha img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf--premiou .bf__bolha { animation: bf-sobe var(--bf-revela, .7s) .25s cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes bf-sobe {
    0%   { transform: translate(-50%, -50%) scale(.1); opacity: 0; }
    30%  { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ---------------- placa do prêmio ---------------- */

.bf__placa {
    position: absolute;
    left: 50%; bottom: 3%;
    width: 58%;
    transform: translate(-50%, 16px);
    opacity: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 6px 9px;
    box-sizing: border-box;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFF8DC, #F5E3A1);
    border: 1.5px solid #C9A227;
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .7);
    text-align: center;
    z-index: 9;
}
.bf__placa div { font: 700 clamp(11px, 2.8vw, 13px)/1.25 Arial, sans-serif; color: var(--jg-14532d, #14532d); min-width: 0; }
.bf__placa small { display: block; font: 700 9px/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8A6D1F; margin-bottom: 2px; }
.bf--placa .bf__placa { animation: bf-placa .5s cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes bf-placa { to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------------- botão e mensagem ---------------- */

.bf__botao {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 12px 10px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    color: #fff;
    font: 700 15px/1.2 Arial, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 6px 14px -6px rgba(var(--jg-rgb-0a7a00, 10,122,0), .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.bf__botao:hover:not(:disabled) { filter: brightness(1.06); }
.bf__botao:disabled { opacity: .55; cursor: default; }

.bf__msg {
    max-width: 480px;
    min-height: 56px;
    margin: 10px auto 0;
    padding: 8px 12px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    text-align: center;
    font: 700 clamp(11px, 3vw, 14px)/1.35 Arial, sans-serif;
    color: #46564c;
    background: var(--jg-eef4ef, #EEF4EF);
    border: 1px solid var(--jg-dce6de, #DCE6DE);
}
.bf__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.bf__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.bf__msg b { color: var(--jg-0a7a00, #0A7A00); }
.bf__msg--consolo b { color: #5C6B60; }

/* ---------------- vitrine ---------------- */

.bf__premios {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin: 14px auto 0; max-width: 640px;
}
.bf__titulo {
    width: 100%; text-align: center;
    font: 700 13px/1.3 Arial, sans-serif; color: var(--jg-14532d, #14532d); margin-bottom: 2px;
}
.bf__premio { width: 74px; text-align: center; font: 600 10px/1.2 Arial, sans-serif; color: #46564c; }
.bf__premio img { width: 100%; border-radius: 6px; display: block; margin-bottom: 3px; }

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .bf--jogando .bf__luz { animation: none; }
    .bf__janela--parou { animation: none; }
    .bf--premiou .bf__janela { animation: none;
        background: linear-gradient(180deg, #E0B43A, #FFF3B0 35%, #FFF3B0 65%, #E0B43A);
        box-shadow: inset 0 0 0 1px #8A6D1F, 0 0 8px 2px rgba(255, 214, 90, .9); }
    .bf--premiou .bf__globo-ouro { animation: none; opacity: 1; filter: drop-shadow(0 0 3px rgba(255, 214, 90, .95)); }
    .bf--consolo .bf__bico { animation: none; }
    .bf--premiou .bf__confetes i { animation: none; opacity: 1; left: calc(50% + var(--dx)); top: calc(18% + var(--dy)); transform: rotate(var(--r)); }
    .bf--premiou .bf__bolha { animation: none; transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .bf--placa .bf__placa { animation: none; transform: translate(-50%, 0); opacity: 1; }
}
