/* Roleta da sorte — Betorya (página pública). Complementa marcação criada por roulette.js */

.br-root {
  --br-wheel: min(82vw, 400px);
  --br-ring-r: calc(var(--br-wheel) * 0.52);
  box-sizing: border-box;
  min-height: 100%;
  font-family: var(--font-inter, system-ui, sans-serif);
}

@media (max-width: 640px) {
  .br-root {
    --br-wheel: min(74vw, 330px);
  }
}

.br-root *,
.br-root *::before,
.br-root *::after {
  box-sizing: border-box;
}

.br-page {
  --br-page-pad-top: calc(max(20px, env(safe-area-inset-top, 0px)) + 6px);
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--br-page-pad-top) 16px max(88px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 20%, #1a2840 0%, #0a0e14 55%, #05070b 100%);
  background-size: cover;
  background-position: center;
  color: #f4f4f5;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  .br-page {
    overflow-x: clip;
  }
}

/* Full-bleed horizontal; altura em JS (~metade do ecrã ou até à roleta, o que for maior). */
.br-top-banner-slot {
  display: none;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  width: 100dvw;
  max-width: 100vw;
  max-width: 100dvw;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  pointer-events: none;
  overflow: hidden;
  box-sizing: border-box;
  background-color: transparent;
}

.br-top-banner-img {
  width: 100%;
  height: 100%;
  display: block;
  /* Desktop: arte inteira sem distorção/corte. */
  object-fit: contain;
  object-position: center top;
  pointer-events: none;
  position: relative;
  z-index: 2;
}

@media (max-width: 640px) {
  .br-top-banner-img {
    /* Mobile: mostrar o banner inteiro, sem corte. */
    object-fit: contain;
    object-position: center top;
  }
}

.br-top-banner-slot.has-image {
  display: block;
  box-shadow: none;
}

.br-top-banner-slot.has-image::after {
  content: none;
}


.br-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #05070b;
  transition: opacity 0.4s ease;
}

.br-overlay.is-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.br-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Empurra título, roleta e blocos abaixo quando há banner (altura definida em JS). */
.br-banner-spacer {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--br-wheel);
  height: 0;
  min-height: 0;
  display: none;
  pointer-events: none;
}

.br-banner-spacer.is-active {
  display: block;
}

.br-hero {
  position: relative;
  z-index: 8;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 8px;
  padding: 0 4px 4px;
}

.br-page.has-top-banner .br-hero {
  margin-top: 0;
  transform: translateY(calc(var(--br-wheel) * -0.055));
  margin-bottom: calc(var(--br-wheel) * 0.08);
}

@media (max-width: 640px) {
  .br-page.has-top-banner .br-hero {
    margin-top: 0;
    transform: translateY(calc(var(--br-wheel) * -0.075));
    margin-bottom: calc(var(--br-wheel) * 0.06);
  }
}

.br-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 5.2vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.12;
  background: linear-gradient(
    105deg,
    #fff8e1 0%,
    #f0d78c 22%,
    #ffd866 42%,
    #e8c76b 52%,
    #fff2c4 72%,
    #f5e6b8 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(255, 210, 120, 0.5)) drop-shadow(0 0 26px rgba(212, 175, 55, 0.22));
  animation: br-shimmer-gold 4.2s ease-in-out infinite;
}

.br-title,
.br-sub {
  display: none;
}

@keyframes br-shimmer-gold {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.br-sub {
  margin: 0 0 12px;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-align: center;
  max-width: 36ch;
  line-height: 1.35;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.55);
}

.br-rounds-wrap {
  width: 100%;
  max-width: var(--br-wheel);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.br-rounds {
  margin: 0;
  font-size: clamp(0.9rem, 3vw, 1.03rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.2;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(150deg, rgba(8, 18, 42, 0.82) 0%, rgba(10, 28, 62, 0.72) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #eaf6ff;
  text-align: center;
  white-space: normal;
  text-wrap: balance;
  max-width: 100%;
  box-sizing: border-box;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease;
}

/* Texto fixo: duas linhas (+N giros ao reset | temporizador até ao próximo reset). */
.br-rounds-fixed {
  white-space: pre-line;
}

/* Segundo texto: contador ao vivo de giros disponíveis agora (saldo). */
.br-rounds-live {
  font-size: clamp(0.78rem, 2.85vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 9px 16px;
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(150deg, rgba(15, 35, 72, 0.92) 0%, rgba(12, 28, 58, 0.9) 100%);
  color: #e0f2fe;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 0 20px rgba(37, 99, 235, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.br-rounds-live--zero {
  border-color: rgba(248, 113, 113, 0.5);
  color: #ffd0d0;
  background: linear-gradient(150deg, rgba(88, 20, 20, 0.9) 0%, rgba(120, 28, 28, 0.85) 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.br-rounds--unlimited {
  color: #b7f7d2;
  border-color: rgba(126, 236, 178, 0.45);
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.86) 0%, rgba(16, 185, 129, 0.72) 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 0 20px rgba(126, 236, 178, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.br-rounds--limited {
  color: #eaf6ff;
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(150deg, rgba(239, 68, 68, 0.88) 0%, rgba(153, 27, 27, 0.78) 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 0 20px rgba(248, 113, 113, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.br-rounds--empty {
  color: #ffd0d0;
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(150deg, rgba(239, 68, 68, 0.88) 0%, rgba(153, 27, 27, 0.78) 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.32),
    0 0 18px rgba(248, 113, 113, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .br-title {
    animation: none;
    background: none;
    -webkit-text-fill-color: #f8e6a8;
    color: #f8e6a8;
    filter: drop-shadow(0 1px 8px rgba(212, 175, 55, 0.35));
  }

  .br-rounds,
  .br-rounds--unlimited {
    animation: none;
  }

  .br-rounds-live {
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .br-wheel {
    animation: none;
  }
}

.br-recent-panel {
  --br-recent-marquee-h: clamp(172px, 40vw, 208px);
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--br-wheel);
  border-radius: 16px;
  /* A arte já inclui cantos e moldura; uma só camada evita desalinhamento entre PNGs. */
  border: none;
  background-color: rgba(12, 18, 30, 0.45);
  background-image: url("/roulette/download-1-bg.png");
  /* Largura 100%, altura proporcional: evita “esmagar” o PNG e a faixa parecer inclinada/torta. */
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* Padding-top: título centrado na faixa azul do PNG sem cortar ascendentes. */
  padding: 8px 18px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  margin-top: 12px;
}

.br-recent-title {
  margin: 0 0 8px;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  text-align: center;
  font-style: normal;
}

/* Duas linhas compactas, centradas na faixa azul; fonte menor para não encostar à moldura. */
.br-recent-title-banner {
  display: block;
  width: 100%;
  max-width: min(100%, 38ch);
  box-sizing: border-box;
  min-height: 0;
  padding: 0 12px;
  margin: 0;
  font-size: clamp(11.5px, 3.45vw, 15px);
  font-weight: 900;
  font-style: normal;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.br-recent-title-sub {
  display: block;
  width: 100%;
  max-width: min(100%, 24ch);
  margin: 1px 0 0;
  padding: 0 12px;
  font-size: clamp(12px, 3.65vw, 16px);
  font-weight: 900;
  font-style: normal;
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: #e8f4ff;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transform: none;
}

.br-recent-marquee {
  height: var(--br-recent-marquee-h);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 10px;
  /* Menos fade nas pontas: mais linhas visíveis e alinhadas à “janela” da moldura. */
  mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
}

.br-recent-marquee-track {
  animation: br-recent-marquee-up var(--br-recent-duration, 20s) linear infinite;
  will-change: transform;
}

@keyframes br-recent-marquee-up {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .br-recent-marquee-track {
    animation: none;
    transform: translate3d(0, 0, 0);
  }

  .br-spin {
    animation: none;
    box-shadow:
      0 4px 0 #172554,
      0 8px 24px rgba(37, 99, 235, 0.45),
      0 0 0 1px rgba(147, 197, 253, 0.3),
      0 0 22px rgba(59, 130, 246, 0.42);
  }

  .br-spin::before {
    animation: none;
    opacity: 0;
  }
}

.br-recent-block {
  margin: 0;
  padding: 0 4px;
  list-style: none;
  width: 100%;
  box-sizing: border-box;
}

.br-recent-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 34px;
  padding: 4px 4px 4px 2px;
  width: 100%;
  box-sizing: border-box;
}

.br-recent-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
  align-self: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  padding: 0;
}

.br-recent-avatar-img {
  display: block;
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
}

.br-recent-user {
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(12.5px, 3.4vw, 15px);
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  opacity: 0.95;
}

.br-recent-prize {
  flex: 0 0 auto;
  align-self: center;
  font-size: clamp(12px, 3.25vw, 14.5px);
  font-weight: 800;
  line-height: 1.2;
  color: #7dd3fc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.br-stage {
  position: relative;
  z-index: 2;
  width: var(--br-wheel);
  height: var(--br-wheel);
  margin-top: 0;
  transform: translateY(0);
}

.br-page.has-top-banner .br-stage {
  margin-top: calc(var(--br-wheel) * -0.12);
}

@media (max-width: 640px) {
  .br-page.has-top-banner .br-stage {
    margin-top: calc(var(--br-wheel) * -0.14);
  }
}

.br-page.has-top-banner .br-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--br-wheel) * -0.095);
  width: 140vw;
  min-width: 980px;
  height: clamp(96px, 18vw, 170px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  border-radius: 18px;
  /* Faixa atrás da roleta, na zona do fundo (já abaixo do banner). */
  background-image: url("/app-download/promo-first-deposit-ribbon.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.95;
}

@media (max-width: 640px) {
  .br-page.has-top-banner .br-stage::after {
    top: calc(var(--br-wheel) * -0.09);
    width: 165vw;
    min-width: 0;
    height: clamp(96px, 30vw, 165px);
  }
}

/* Luzes ao redor */
.br-bulbs {
  position: absolute;
  inset: -8px;
  pointer-events: none;
  z-index: 0;
}

.br-bulb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e0f2fe, #38bdf8 55%, #1e40af);
  box-shadow:
    0 0 10px rgba(96, 165, 250, 0.95),
    0 0 22px rgba(59, 130, 246, 0.55);
  transform-origin: center center;
  transform: rotate(var(--a)) translateY(calc(-1 * var(--br-ring-r)));
  animation: br-bulb-pulse 0.9s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes br-bulb-pulse {
  0%,
  100% {
    opacity: 0.5;
    filter: brightness(0.85);
    box-shadow:
      0 0 6px rgba(96, 165, 250, 0.55),
      0 0 14px rgba(59, 130, 246, 0.4);
  }
  50% {
    opacity: 1;
    filter: brightness(1.25);
    box-shadow:
      0 0 14px rgba(186, 230, 253, 0.95),
      0 0 28px rgba(59, 130, 246, 0.65);
  }
}

.br-wheel-layer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
}

.br-wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: clamp(64px, 18.5vw, 88px);
  height: clamp(64px, 18.5vw, 88px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), rgba(0, 0, 0, 0.18));
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.46),
    0 0 0 2px rgba(0, 0, 0, 0.18) inset;
  pointer-events: none;
  overflow: hidden;
}

.br-wheel-center-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  user-select: none;
  -webkit-user-drag: none;
}

/* Sombra no disco completo (PNG com alpha — sem “caixa” branca). */
.br-wheel-spin {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* Garante o eixo de rotação no centro exato do elemento (evita “giro torto”). */
  transform-origin: 50% 50%;
  transform-box: fill-box;
  background: transparent;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.15, 0.85, 0.18, 1);
  will-change: transform;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.75)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

.br-wheel {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 50% 50%;
  /* Brilho leve para a "imagem da roleta" (o glow fica só na fatia da imagem). */
  filter: brightness(1.04) saturate(1.06);
  will-change: filter;
  animation: none;
}

.br-stage:not(.is-spinning) .br-wheel {
  animation: br-wheel-image-glow-pulse 2.8s ease-in-out infinite;
}

.br-stage.is-spinning .br-wheel {
  animation: none;
  filter: brightness(1.05) saturate(1.07);
}

@keyframes br-wheel-image-glow-pulse {
  0%,
  100% {
    filter: brightness(1.03) saturate(1.05);
  }
  50% {
    filter: brightness(1.10) saturate(1.10);
  }
}

.br-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
}

/* Container de posicionamento do rótulo (JS posiciona no raio com rotate/translate). */
.br-label-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: 0;
  transform-origin: center center;
  pointer-events: none;
}

.br-label-image {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: center center;
}

.br-label-text {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: center center;
  text-align: center;
  font-size: clamp(7px, 2.1vw, 9.5px);
  font-weight: 700;
  line-height: 1.12;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  hyphens: auto;
  word-break: break-word;
  /* Controlado para caber dentro da fatia (agora mais perto do aro). */
  width: clamp(56px, 15vw, 92px);
  padding: 0 2px;
}

.br-label-image {
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  /* Tamanho controlado pelo admin via CSS var setada em roulette.js */
  max-height: var(--br-prize-img-max-h, 34px);
  max-width: 72px;
}

/* Arte alternada: índice par = fatia branca, ímpar = vermelha (alinhado ao PNG padrão). */
.br-label-item--on-white {
  color: #141018;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 1px rgba(255, 255, 255, 0.4);
}

.br-label-item--on-red {
  color: #fafafa;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.45);
}

/* Seta no topo: overlap maior para a ponta entrar nas fatias (escala com o tamanho da roda). */
.br-pointer-wrap {
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 6;
  width: clamp(36px, 11vw, 52px);
  height: clamp(44px, 13vw, 64px);
  margin-bottom: calc(var(--br-wheel) * -0.14 - 6px);
  transform: translateX(-50%);
  background: transparent;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55)) drop-shadow(0 2px 10px rgba(59, 130, 246, 0.4));
}

.br-pointer {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  /* Origem no centro da arte: a ponta oscila para os lados (pêndulo); tremor em JS. */
  transform-origin: 50% 50%;
  transform: rotate(0deg);
  will-change: transform;
}

.br-spin {
  position: relative;
  z-index: 30;
  margin-top: 12px;
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 14px 48px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f8fafc;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(165deg, #3b82f6 0%, #2563eb 42%, #1e40af 100%);
  box-shadow:
    0 4px 0 #172554,
    0 8px 28px rgba(37, 99, 235, 0.5),
    0 0 0 1px rgba(147, 197, 253, 0.35),
    0 0 26px rgba(59, 130, 246, 0.4);
  animation: br-spin-glow-pulse 2.6s ease-in-out infinite;
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.br-spin::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 45%;
  height: 180%;
  border-radius: 40%;
  background: linear-gradient(
    95deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.08) 65%,
    transparent 100%
  );
  transform: translateX(-150%) rotate(18deg);
  /* linear + sweep contínuo: o keyframe antigo mantinha translateX(220%) de ~58% a 100% (travava à direita). */
  animation: br-spin-shine 2.6s linear infinite;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

@keyframes br-spin-glow-pulse {
  0%,
  100% {
    box-shadow:
      0 4px 0 #172554,
      0 8px 24px rgba(37, 99, 235, 0.42),
      0 0 0 1px rgba(147, 197, 253, 0.28),
      0 0 20px rgba(59, 130, 246, 0.38);
  }
  50% {
    box-shadow:
      0 4px 0 #172554,
      0 10px 32px rgba(37, 99, 235, 0.55),
      0 0 0 1px rgba(191, 219, 254, 0.45),
      0 0 32px rgba(96, 165, 250, 0.5);
  }
}

@keyframes br-spin-shine {
  0% {
    transform: translateX(-150%) rotate(18deg);
    opacity: 0;
  }
  6% {
    opacity: 0.95;
  }
  94% {
    opacity: 0.95;
  }
  100% {
    transform: translateX(250%) rotate(18deg);
    opacity: 0;
  }
}

.br-spin:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.br-spin:active:not(:disabled) {
  transform: translateY(2px);
  animation: none;
  box-shadow:
    0 2px 0 #172554,
    0 4px 16px rgba(37, 99, 235, 0.4),
    0 0 14px rgba(59, 130, 246, 0.45);
}

.br-spin:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  animation: none;
  box-shadow:
    0 4px 0 #172554,
    0 6px 16px rgba(0, 0, 0, 0.25);
}

.br-spin:disabled::before {
  animation: none;
  opacity: 0;
}

.br-spin-subline {
  position: relative;
  z-index: 25;
  margin: 26px 0 10px;
  padding: 6px 14px 0;
  width: 100%;
  max-width: var(--br-wheel);
  box-sizing: border-box;
  text-align: center;
  font-family: var(--font-inter, system-ui, sans-serif);
  line-height: 1.4;
}

.br-dev-reset {
  margin: 2px 0 12px;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(7, 13, 24, 0.7);
  color: #dbeafe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 14px;
}

.br-dev-reset:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .br-page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .br-spin {
    margin-top: 10px;
    padding: 12px 34px;
    font-size: 0.92rem;
    letter-spacing: 0.11em;
  }

  .br-spin-subline {
    margin-top: 18px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

.br-spin-subline-lead {
  color: #f1f5f9;
  font-size: clamp(0.78rem, 2.9vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.br-spin-subline-amount {
  display: inline-block;
  font-size: clamp(0.95rem, 4vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  background: linear-gradient(180deg, #e0f2fe 0%, #7dd3fc 28%, #38bdf8 58%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(8, 12, 24, 0.85))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 18px rgba(59, 130, 246, 0.35));
}

/* Modal — acima da barra inferior fixa (z-100) e alinhado à gaveta móvel */
.br-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: grid;
  grid-template: 1fr / 1fr;
  place-items: center;
  padding: 24px;
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: br-fade-in 0.35s ease;
}

/* Confete dourado (por cima do cartão do prémio; pointer-events none para não bloquear botões) */
.br-confetti-layer {
  grid-area: 1 / 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.br-confetti-layer * {
  pointer-events: none;
}

.br-confetti-piece {
  position: absolute;
  bottom: -6px;
  border-radius: 2px;
  opacity: 0.98;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.55);
  animation-name: br-confetti-fly;
  animation-timing-function: cubic-bezier(0.22, 0.85, 0.32, 1);
  animation-fill-mode: forwards;
}

@keyframes br-confetti-fly {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--br-dx, 0px), -110vh, 0) rotate(var(--br-confetti-rot, 360deg)) scale(0.55);
    opacity: 0;
  }
}

.br-modal-backdrop[hidden] {
  display: none;
}

@keyframes br-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.br-modal {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  border-radius: 22px;
  border: 1px solid rgba(59, 130, 246, 0.38);
  background: linear-gradient(165deg, #141c2e 0%, #0d1424 42%, #080d18 100%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(43, 127, 255, 0.06) inset,
    0 0 48px rgba(37, 99, 235, 0.14);
  padding: 26px 22px 22px;
  text-align: center;
  animation: br-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes br-pop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.br-modal h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #e8f4ff;
  text-shadow: 0 0 28px rgba(59, 130, 246, 0.35);
}

.br-modal-img {
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.br-modal-prize {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.br-modal-desc {
  margin: 0 0 22px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #94a3b8;
}

.br-modal--refer {
  max-width: min(360px, calc(100vw - 32px));
  text-align: left;
  padding: 18px 18px 16px;
}

.br-modal--refer .br-modal-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.br-modal--refer .br-modal-prize {
  margin: 0 0 8px;
}

/* Uma linha curta entre o subtítulo e os botões (missão Indique 3 amigos). */
.br-modal-desc.br-modal-desc--refer-hint {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #94a3b8;
  text-align: center;
  text-wrap: balance;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.br-modal--refer .br-modal-title,
.br-modal--refer .br-modal-prize,
.br-modal--refer .br-modal-desc,
.br-modal--refer .br-modal-actions--refer {
  text-align: center;
}

.br-modal--refer .br-modal-actions--refer {
  margin-top: 2px;
}

.br-modal-img--banner {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  /* Banner paisagem: mostrar imagem completa (evitar crop tipo cover). */
  max-height: min(50vh, 280px);
  margin: 0 auto 14px;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
}

/* Popup «Indique 3 amigos»: altura suficiente para 16:9 sem cortar texto da arte. */
.br-modal--refer .br-modal-img--banner {
  margin-bottom: 10px;
  max-height: min(52vh, 300px);
}

.br-modal-prize--emphasis {
  font-size: 1.15rem;
  color: #93c5fd;
}

.br-modal-regulamento {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #94a3b8;
}

.br-modal-regulamento-lead {
  margin: 0 0 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.br-modal-regulamento-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
}

.br-modal-regulamento-list li {
  margin: 0.35em 0;
}

.br-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
}

.br-modal-cta {
  width: 100%;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f8fafc;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(165deg, #3b82f6 0%, #2563eb 48%, #1d4ed8 100%);
  box-shadow:
    0 4px 16px rgba(37, 99, 235, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition:
    filter 0.15s ease,
    transform 0.15s ease;
}

.br-modal-cta:hover:not(:disabled) {
  filter: brightness(1.06);
}

.br-modal-cta:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.br-modal-cta--secondary {
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  letter-spacing: 0.06em;
  border: 1px solid rgba(96, 165, 250, 0.4);
  box-shadow: none;
}

.br-modal-cta--secondary:hover:not(:disabled) {
  background: rgba(30, 58, 138, 0.35);
  border-color: rgba(147, 197, 253, 0.55);
}

.br-modal-cta--secondary:active {
  background: rgba(59, 130, 246, 0.18);
}

.br-error {
  color: #fca5a5;
  font-size: 0.875rem;
  text-align: center;
  padding: 24px;
}
