/* Roleta do Desconto (popup) — estilo CASSINO sobre o visual Robô da Oferta: fundo preto, ouro, lâmpadas piscando,
   título verde neon, letras amarelas e brancas. 10/nov/2026. Montada por assets/js/roleta.js. */

.rd-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 6px; overflow: auto;
    background: radial-gradient(ellipse at 50% 25%, rgba(130, 0, 30, .55), rgba(0, 0, 0, .94) 70%); }
.rd-overlay[hidden] { display: none; }

/* moldura de cassino: borda de lâmpadas (pontilhado redondo piscando) + fio de ouro por dentro */
.rd-modal {
    --rd-size: max(250px, min(calc(100vw - 34px), 640px, calc(100vh - 245px)));
    position: relative; box-sizing: border-box; width: calc(var(--rd-size) + 24px); max-width: calc(100vw - 4px); margin: auto;
    padding: 12px 6px 10px; text-align: center; color: #fff;
    background: radial-gradient(ellipse at 50% 0%, #3b0012 0%, #14000a 42%, #000 100%);
    border: 7px dotted #f8c807; border-radius: 26px; animation: rd-marquee 1s steps(1) infinite;
    box-shadow: 0 0 0 3px #5a3b00, inset 0 0 0 3px #b8860b, inset 0 0 40px rgba(248, 200, 7, .12), 0 0 40px rgba(248, 200, 7, .45), 0 24px 60px rgba(0, 0, 0, .8);
}
@keyframes rd-marquee { 0%, 49% { border-color: #f8c807; } 50%, 100% { border-color: #fff6c9; } }

.rd-fechar, .rd-som { position: absolute; top: 6px; padding: 8px 10px; background: none; border: 0; color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; z-index: 5; }
.rd-fechar { right: 6px; }
.rd-som { left: 6px; font-size: 1.15rem; }
.rd-fechar:hover { color: #f8c807; }
.rd-fechar:focus-visible, .rd-som:focus-visible, .rd-gira:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* título verde neon com trevo */
.rd-titulo { margin: 0 0 8px; padding: 0 34px; color: #4be083; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.1rem, 5.2vw, 1.7rem); font-weight: 900; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1;
    text-shadow: 0 0 6px rgba(75, 224, 131, .9), 0 0 18px rgba(75, 224, 131, .6), 0 2px 0 #08301a; }
.rd-gire { display: block; margin-top: 3px; font-size: .66em; letter-spacing: .06em; color: #7dffaa; }
.rd-gire::before { content: '♠ '; color: #f8c807; text-shadow: none; }
.rd-gire::after { content: ' ♥'; color: #ff4d5e; text-shadow: none; }
.rd-dica { min-height: 1.3em; margin: 8px 0 0; padding: 0 6px; color: #f8c807; font-size: clamp(.82rem, 3.6vw, 1rem); font-weight: 700; text-shadow: 0 0 8px rgba(248, 200, 7, .4); }
.rd-outro { display: block; margin: 8px auto 2px; padding: 10px 18px; border: 2px solid #f8c807; border-radius: 999px; background: rgba(248, 200, 7, .06); color: #fff; font: inherit; font-size: clamp(.85rem, 3.7vw, 1rem); font-weight: 800; cursor: pointer; }
.rd-outro[hidden] { display: none; }
.rd-outro:hover { background: rgba(248, 200, 7, .2); }
.rd-outro:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---- roda ---- */
.rd-roda-wrap { position: relative; width: var(--rd-size); aspect-ratio: 1; margin: 0 auto; -webkit-tap-highlight-color: transparent; }
.rd-roda-wrap.rd-clicavel { cursor: pointer; }
.rd-svg { display: block; width: 100%; height: 100%; overflow: visible; transition: opacity .5s, filter .5s; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 0 14px rgba(248, 200, 7, .35)); }
.rd-revelado .rd-svg { opacity: .18; filter: blur(1.5px); }
.rd-luz { fill: #ffe27a; animation: rd-luz 1s linear infinite; }
.rd-luz.b { animation-delay: -.5s; }
@keyframes rd-luz { 0%, 49% { fill: #ffe27a; } 50%, 100% { fill: #fff; } }
.rd-ponteiro { transform-box: fill-box; transform-origin: 50% 20%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.rd-ponteiro.tic { animation: rd-tic .14s ease-out; }
@keyframes rd-tic { 0% { transform: rotate(-16deg); } 100% { transform: rotate(0); } }

/* botão do miolo: medalhão de ouro */
.rd-gira {
    position: absolute; left: 50%; top: 50%; z-index: 2; width: 20%; aspect-ratio: 1; transform: translate(-50%, -50%);
    border-radius: 50%; border: 3px solid #5a3b00; cursor: pointer;
    background: radial-gradient(circle at 35% 30%, #fff3b0, #f8c807 55%, #9a6b00); color: #2b0000;
    font-family: Georgia, 'Times New Roman', serif; font-weight: 900; font-size: clamp(.72rem, 3.4vw, 1.1rem); line-height: 1; letter-spacing: .02em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
    animation: rd-pulsa 1.1s ease-in-out infinite;
}
.rd-gira[hidden] { display: none; }
.rd-gira:disabled { animation: none; cursor: default; }
@keyframes rd-pulsa {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(248, 200, 7, .8); }
    50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 12px rgba(248, 200, 7, 0); }
}

/* ---- produto no centro (revelação) ---- */
.rd-palco {
    position: absolute; left: 50%; top: 50%; z-index: 3; width: 80%; box-sizing: border-box;
    transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 8px 10px 9px; border: 3px solid #f8c807; border-radius: 22px; color: #fff; text-decoration: none; -webkit-tap-highlight-color: transparent;
    background: radial-gradient(ellipse at 50% 0%, #3b0012, #0a0003 70%);
    box-shadow: 0 0 0 2px #5a3b00, 0 0 40px rgba(248, 200, 7, .55);
    animation: rd-entra .6s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes rd-entra { from { transform: translate(-50%, -50%) scale(.2); opacity: 0; } }
.rd-jackpot { color: #ffe27a; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(.8rem, 3.6vw, 1.05rem); font-weight: 900; letter-spacing: .18em;
    text-shadow: 0 0 8px #f8c807, 0 0 18px rgba(248, 200, 7, .7); animation: rd-pisca-texto .7s ease-in-out infinite; }
.rd-foto { width: 50%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: #fff; border-radius: 16px; border: 2px solid #f8c807; }
.rd-foto img { width: 100%; height: 100%; object-fit: contain; }
.rd-nome { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: clamp(.74rem, 3.2vw, .95rem); font-weight: 700; line-height: 1.2; color: #fff; }

.rd-bloco { display: grid; justify-items: center; align-items: center; }
.rd-antes, .rd-depois { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; }
.rd-legenda { font-size: clamp(.64rem, 2.8vw, .8rem); color: #cfcfcf; }
.rd-cheio { position: relative; display: inline-block; font-size: clamp(1.4rem, 6.4vw, 2rem); font-weight: 900; line-height: 1.15; color: #fff; }
.rd-risco { position: absolute; left: -5%; top: 54%; width: 0; height: 4px; border-radius: 2px; background: #ff2d2d; box-shadow: 0 0 6px #ff2d2d; transition: width .5s ease-out; }
.riscado .rd-risco { width: 110%; }

/* queimar o preço cheio */
.rd-fogo { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: flex-end; height: 150%; pointer-events: none; }
.rd-fogo span { font-size: 1.8rem; line-height: 1; opacity: 0; }
.queimando .rd-fogo span { animation: rd-chama 1.3s ease-in both; }
.queimando .rd-fogo span:nth-child(2) { animation-delay: .15s; }
.queimando .rd-fogo span:nth-child(3) { animation-delay: .3s; }
@keyframes rd-chama { 0% { opacity: 0; transform: translateY(10px) scale(.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px) scale(1.4); } }
.queimando .rd-cheio-txt { animation: rd-queima 1.3s ease-in forwards; }
@keyframes rd-queima {
    0% { color: #fff; text-shadow: none; }
    30% { color: #ffa21a; text-shadow: 0 0 10px #ff5a00; }
    70% { color: #4a2000; text-shadow: 0 -3px 12px #f30; opacity: 1; }
    100% { color: #222; opacity: 0; transform: translateY(-4px) scale(.85); filter: blur(4px); }
}
.rd-cheio-txt { display: inline-block; }
.novo .rd-antes { visibility: hidden; }

/* preço com desconto */
.rd-depois { visibility: hidden; opacity: 0; }
.novo .rd-depois { visibility: visible; opacity: 1; animation: rd-pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.rd-novo { color: #ffe27a; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.7rem, 7.6vw, 2.4rem); font-weight: 900; line-height: 1.1; text-shadow: 0 0 10px #f8c807, 0 0 22px rgba(248, 200, 7, .55); }
@keyframes rd-pop { from { transform: scale(.3); opacity: 0; } }

.rd-cta { margin-top: 2px; padding: 6px 14px; border-radius: 999px; border: 2px solid #5a3b00; background: linear-gradient(#fff3b0, #f8c807 55%, #b8860b); color: #2b0000; font-size: clamp(.7rem, 3vw, .88rem); font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }

/* produto piscando */
.pisca .rd-foto { animation: rd-pisca .8s ease-in-out infinite; }
.pisca .rd-novo { animation: rd-pisca-texto .8s ease-in-out infinite; }
.pisca .rd-cta { animation: rd-pisca .8s ease-in-out infinite; }
@keyframes rd-pisca { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(248, 200, 7, 0); } 50% { opacity: .5; box-shadow: 0 0 22px 6px rgba(248, 200, 7, .9); } }
@keyframes rd-pisca-texto { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* chuva de moedas na revelação */
.rd-moedas { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.rd-moedas span { position: absolute; top: -12%; line-height: 1; opacity: 0; animation: rd-moeda 2.1s ease-in both; }
@keyframes rd-moeda { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(125%) rotate(540deg); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .rd-modal, .rd-gira, .rd-luz, .rd-palco, .rd-ponteiro.tic, .rd-jackpot { animation: none; }
    .pisca .rd-foto, .pisca .rd-novo, .pisca .rd-cta { animation: none; }
    .rd-moedas { display: none; }
}

/* botão que reabre a roleta (topo da página inicial) */
.btn-roleta { width: 100%; max-width: 360px; margin-top: 14px; padding: 13px 18px; border: 2px solid #5a3b00; border-radius: 12px;
    background: linear-gradient(#fff3b0, #f8c807 55%, #b8860b); color: #2b0000; font: inherit; font-size: 1rem; font-weight: 900; cursor: pointer;
    box-shadow: 0 0 16px rgba(248, 200, 7, .35); }
.btn-roleta:hover { filter: brightness(1.06); }
.btn-roleta:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---- jogo da Caixa Misteriosa ---- */
.rd-cx { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; transition: opacity .4s; }
.rd-revelado .rd-cx { opacity: 0; }
.rd-cx-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 0 0 auto; }
.rd-cx-slot { position: relative; aspect-ratio: 1 / 1.1; border: 2px dashed rgba(248, 200, 7, .3); border-radius: 12px; }
.rd-cx-card {
    position: absolute; inset: -2px; display: flex; flex-direction: column; gap: 2px; padding: 4px; box-sizing: border-box;
    border: 2px solid #f8c807; border-radius: 12px; background: linear-gradient(#2a0010, #0d0006); color: #fff;
    touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .6); transition: transform .25s ease;
}
.rd-cx-card:focus-visible { outline: 3px solid #fff; }
.rd-cx-card.arrastando { z-index: 20; cursor: grabbing; box-shadow: 0 10px 24px rgba(0, 0, 0, .8), 0 0 18px rgba(248, 200, 7, .6); }
.rd-cx-card.dentro { z-index: 15; }
.rd-cx-foto { flex: 1 1 0; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #fff; border-radius: 8px; }
.rd-cx-foto img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.rd-cx-nome { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: clamp(.52rem, 2.2vw, .72rem); line-height: 1.12; font-weight: 700; }
.rd-cx-preco { color: #ffe27a; font-size: clamp(.72rem, 3.3vw, 1.05rem); font-weight: 900; text-align: center; }
.rd-cx-zona {
    flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 3px dashed #f8c807; border-radius: 16px; background: radial-gradient(ellipse at 50% 100%, rgba(248, 200, 7, .22), transparent 70%);
    transition: background .2s, transform .2s;
}
.rd-cx-zona.alvo { background: rgba(248, 200, 7, .35); transform: scale(1.03); }
.rd-cx-caixa { font-size: calc(var(--rd-size) * .17); line-height: 1; filter: drop-shadow(0 0 12px rgba(248, 200, 7, .7)); }
.rd-cx-caixa.pulo { animation: rd-cx-pulo .35s ease-out; }
@keyframes rd-cx-pulo { 40% { transform: scale(1.25) rotate(-6deg); } }
.rd-cx-caixa.tremendo { animation: rd-cx-treme .12s linear infinite; }
@keyframes rd-cx-treme {
    0%, 100% { transform: translate(0, 0) rotate(0) scale(1.1); }
    25% { transform: translate(-4px, 2px) rotate(-6deg) scale(1.25); }
    75% { transform: translate(4px, -2px) rotate(6deg) scale(1.25); }
}
.rd-cx-cont { color: #fff; font-size: clamp(.7rem, 3vw, .9rem); font-weight: 800; }

/* explosão da caixa */
.rd-boom { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.rd-flash { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
    background: radial-gradient(circle, #fff, #ffe27a 40%, rgba(255, 120, 0, 0) 70%); animation: rd-flash .55s ease-out both; }
@keyframes rd-flash { to { transform: scale(26); opacity: 0; } }
.rd-boom span { position: absolute; line-height: 1; animation: rd-part 1.2s ease-out both; }
@keyframes rd-part {
    from { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
    to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(300deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .rd-cx-caixa.tremendo, .rd-cx-caixa.pulo, .rd-flash, .rd-boom span { animation: none; } .rd-boom { display: none; } }
