/* ═══════════════════════════════════════════════════════════════
   Roleta do Achadinho — VISUAL PREMIUM
   Estética cassino/luxury com tons dourados, anel de LEDs e glow
   ═══════════════════════════════════════════════════════════════ */

/* === Container "palco" da roleta (fundo escuro) === */
.roleta-palco {
  background:
    radial-gradient(ellipse at top, rgba(245,158,11,.18) 0%, transparent 55%),
    radial-gradient(ellipse at bottom, rgba(14,165,233,.10) 0%, transparent 60%),
    linear-gradient(180deg, #0c1424 0%, #0f172a 50%, #0c1424 100%);
  border-radius: 24px;
  padding: 40px 20px 90px;
  margin: 0 -16px 24px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,.5),
    0 20px 60px rgba(0,0,0,.2);
}

/* Brilho estrelado no fundo */
.roleta-palco::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,.3), transparent),
    radial-gradient(1.5px 1.5px at 60% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 80% 80%, rgba(255,255,255,.3), transparent),
    radial-gradient(2px 2px at 70% 15%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 20% 90%, rgba(255,255,255,.3), transparent),
    radial-gradient(1.5px 1.5px at 90% 50%, rgba(255,255,255,.4), transparent);
  background-size: 250px 250px;
  pointer-events: none;
  opacity: 0.7;
  animation: estrelas-pisca 4s ease-in-out infinite alternate;
}

@keyframes estrelas-pisca {
  0%   { opacity: 0.4; }
  100% { opacity: 0.8; }
}


/* === Wrapper da roleta === */
.roleta-wrapper {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

/* Halo dourado por trás da roleta */
.roleta-wrapper::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(245,158,11,.35) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(20px);
  z-index: -1;
  animation: halo-pulsa 3s ease-in-out infinite alternate;
}

@keyframes halo-pulsa {
  0%   { opacity: 0.6; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}


/* === Ponteiro dourado === */
.roleta-ponteiro {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 40px;
  height: 56px;
  filter:
    drop-shadow(0 4px 10px rgba(0,0,0,.5))
    drop-shadow(0 0 12px rgba(245,158,11,.6));
  animation: ponteiro-tremo 0.05s linear infinite;
  animation-play-state: paused;
}
.roleta-wrapper.girando .roleta-ponteiro {
  animation-play-state: running;
}
@keyframes ponteiro-tremo {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(1px); }
}


/* === SVG da roleta === */
.roleta-svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.4));
}

#roleta-rotacionavel {
  transform-origin: center;
  transform-box: fill-box;
  transition: transform 5.5s cubic-bezier(0.17, 0.67, 0.16, 1.0);
}

/* LEDs do anel externo — animação de "luzes em sequência" */
.led {
  fill: #f59e0b;
  opacity: 0.4;
  animation: led-pisca 1.2s ease-in-out infinite;
}
.led.led-secundario {
  fill: #fbbf24;
}
.roleta-wrapper.girando .led {
  animation-duration: 0.4s;
}
@keyframes led-pisca {
  0%, 100% { opacity: 0.3; filter: drop-shadow(0 0 1px rgba(245,158,11,0)); }
  50%      { opacity: 1;   filter: drop-shadow(0 0 4px rgba(245,158,11,1)); }
}


/* === Botão de girar === */
.roleta-actions {
  position: absolute;
  bottom: -56px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  max-width: 360px;
  z-index: 5;
}

.btn-roleta {
  display: inline-block;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 900;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  position: relative;
  overflow: hidden;
}

.btn-roleta--ativa {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
  background-size: 200% 200%;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  box-shadow:
    0 8px 25px rgba(245,158,11,.5),
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 -3px 0 rgba(0,0,0,.2);
  animation: btn-glow 2s ease-in-out infinite, btn-shimmer 3s linear infinite;
}
.btn-roleta--ativa::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 2.5s infinite;
}
@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}
@keyframes btn-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes btn-glow {
  0%, 100% { box-shadow: 0 8px 25px rgba(245,158,11,.5), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.2); }
  50%      { box-shadow: 0 8px 35px rgba(245,158,11,.8), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.2); }
}
.btn-roleta--ativa:hover {
  transform: translateY(-3px) scale(1.03);
}
.btn-roleta--ativa:active { transform: translateY(0) scale(0.98); }
.btn-roleta--ativa:disabled { animation: none; opacity: 0.6; cursor: wait; }

.btn-roleta--cta {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  box-shadow: 0 6px 20px rgba(14,165,233,.4), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-roleta--cta:hover { transform: translateY(-2px); }

.btn-roleta--disabled {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.3);
}

.roleta-actions small {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
}
.roleta-actions small a { color: #fbbf24; font-weight: 700; }


/* === Header da página === */
.roleta-titulo {
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  z-index: 3;
}
.roleta-titulo h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24 0%, #fff 50%, #fbbf24 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(245,158,11,.4);
  animation: titulo-shine 4s linear infinite;
  letter-spacing: -1px;
}
@keyframes titulo-shine {
  to { background-position: 200% center; }
}
.roleta-titulo p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.85);
  font-size: 15px;
}
.roleta-titulo strong { color: #fbbf24; }


/* === Confete (CSS-only) === */
.confete-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 6;
}
.confete {
  position: absolute;
  width: 10px;
  height: 14px;
  top: -20px;
  opacity: 0;
}
.confete-container.ativo .confete {
  animation: confete-cai 2.5s ease-out forwards;
}
@keyframes confete-cai {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}


/* ═══════════════════════════════════════════════════════════════
   Card do achadinho (resultado) — versão dourada premium
   ═══════════════════════════════════════════════════════════════ */
.achadinho-card {
  margin: 80px auto 24px;
  max-width: 640px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95) 0%, rgba(254,243,199,.95) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 20px;
  box-shadow:
    0 0 0 2px #fbbf24,
    0 0 0 4px rgba(251,191,36,.3),
    0 20px 50px rgba(245,158,11,.25);
  overflow: hidden;
  position: relative;
  animation: drop-in 0.7s cubic-bezier(0.17, 0.67, 0.16, 1.0);
}
.achadinho-card::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24, #fcd34d);
  background-size: 300% 300%;
  z-index: -1;
  border-radius: 20px;
  animation: borda-anima 4s linear infinite;
}
@keyframes borda-anima {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes drop-in {
  0%   { transform: translateY(-30px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.achadinho-card-header {
  padding: 16px 22px;
  font-weight: 800;
  font-size: 16px;
  color: #78350f;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-bottom: 2px solid rgba(245,158,11,.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.countdown {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #dc2626;
  font-weight: 800;
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #fecaca;
}

.achadinho-card-body {
  padding: 22px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
}

.achadinho-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: linear-gradient(135deg, #fef9c3, #fffbeb);
  border-radius: 12px;
  border: 2px solid #fde047;
  flex-shrink: 0;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(245,158,11,.2);
}

.achadinho-info { flex: 1; min-width: 220px; }

.achadinho-loja {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, #92400e, #78350f);
}

.achadinho-titulo {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.achadinho-precos {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.achadinho-preco-atual {
  font-size: 30px;
  font-weight: 900;
  color: #047857;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.achadinho-preco-anterior {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 15px;
}
.achadinho-desconto {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(220,38,38,.4);
}

.btn-pegar-oferta {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff !important;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow:
    0 6px 16px rgba(16,185,129,.4),
    inset 0 1px 0 rgba(255,255,255,.3);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn-pegar-oferta::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  transition: left 0.6s;
}
.btn-pegar-oferta:hover::before { left: 100%; }
.btn-pegar-oferta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16,185,129,.55);
}


/* ═══════════════════════════════════════════════════════════════
   Modal de resultado (após girar)
   ═══════════════════════════════════════════════════════════════ */
.modal-resultado-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fade-in 0.4s ease-out;
}
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }

.modal-resultado-card {
  background: linear-gradient(135deg, #fff 0%, #fef9c3 100%);
  border-radius: 24px;
  padding: 36px 28px 32px;
  max-width: 500px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow:
    0 0 0 3px #fbbf24,
    0 0 0 6px rgba(251,191,36,.3),
    0 30px 80px rgba(0,0,0,.5);
  animation: pop-in 0.6s cubic-bezier(0.17, 0.67, 0.16, 1.0);
}
.modal-resultado-card::after {
  content: '🎉';
  position: absolute;
  top: -30px; left: -10px;
  font-size: 48px;
  animation: confete-emoji 1.5s ease-in-out infinite alternate;
}
.modal-resultado-card::before {
  content: '🎁';
  position: absolute;
  top: -25px; right: -10px;
  font-size: 42px;
  animation: confete-emoji 1.5s ease-in-out 0.5s infinite alternate;
}
@keyframes confete-emoji {
  0%   { transform: rotate(-10deg) scale(1); }
  100% { transform: rotate(10deg) scale(1.15); }
}

@keyframes pop-in {
  0%   { transform: scale(0.6) rotate(-3deg); opacity: 0; }
  60%  { transform: scale(1.08) rotate(1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.modal-resultado-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 32px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.modal-resultado-close:hover { color: #0f172a; }

.modal-resultado-titulo {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ═══════════════════════════════════════════════════════════════
   Info box
   ═══════════════════════════════════════════════════════════════ */
.roleta-info {
  background: linear-gradient(135deg, #f8fafc 0%, #fffbeb 100%);
  padding: 26px 28px;
  border-radius: 16px;
  margin-top: 32px;
  border: 1px solid #fde68a;
  box-shadow: 0 4px 12px rgba(245,158,11,.08);
}
.roleta-info h2 {
  margin: 0 0 14px;
  font-size: 20px;
  color: #78350f;
  font-weight: 800;
}
.roleta-info ol {
  margin: 0;
  padding-left: 22px;
  color: #475569;
  line-height: 1.8;
}
.roleta-info ol strong { color: #d97706; }


/* ═══════════════════════════════════════════════════════════════
   Mobile
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .roleta-palco { padding: 30px 12px 80px; border-radius: 18px; margin: 0 -12px 24px; }
  .roleta-titulo h1 { font-size: 28px; }
  .roleta-titulo p { font-size: 14px; }
  .roleta-wrapper { max-width: 380px; }
  .roleta-svg { max-width: 360px; }
  .btn-roleta { padding: 14px 28px; font-size: 14px; }
  .achadinho-card-body { padding: 18px; gap: 14px; }
  .achadinho-img { width: 110px; height: 110px; }
  .achadinho-titulo { font-size: 16px; }
  .achadinho-preco-atual { font-size: 24px; }
  .modal-resultado-card { padding: 28px 22px 24px; }
  .modal-resultado-titulo { font-size: 22px; }
}
