/* ── Overlay ── */
.roleta-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: roletaFadeIn .35s ease forwards;
}
@keyframes roletaFadeIn { to { opacity: 1 } }

/* ── Modal Box ── */
.roleta-box {
  background: #fff;
  border-radius: 16px;
  padding: 0 20px 24px;
  width: 92vw;
  max-width: 400px;
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
  color: #111;
  position: relative;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
}

.roleta-header {
  background: #d81a0d;
  margin: 0 -20px;
  padding: 18px 20px 14px;
  border-radius: 16px 16px 0 0;
}

.roleta-titulo {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 2px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
}

.roleta-sub {
  font-size: 12px;
  color: rgba(255,255,255,.85);
  margin: 0;
  font-weight: 500;
}

/* ── Banner Space ── */
.roleta-banner {
  margin: 0 -20px;
  overflow: hidden;
}
.roleta-banner:empty { display: none; }
.roleta-banner img { width: 100%; height: auto; display: block; }

/* ── Gift Info ── */
.gift-info {
  padding: 14px 0 6px;
}

.gift-picks-text {
  font-size: 14px;
  color: #555;
  margin: 0;
  font-weight: 500;
}

.gift-picks-num {
  display: inline-block;
  background: #d81a0d;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  text-align: center;
  vertical-align: middle;
}

/* ── Gift Grid ── */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 8px 0 8px;
}

.gift-box {
  aspect-ratio: 1;
  border: 2px solid #eee;
  border-radius: 12px;
  background: linear-gradient(135deg, #fafafa, #f0f0f0);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-box:hover:not(.opened):not(.opening) {
  transform: scale(1.06);
  border-color: #d81a0d;
  box-shadow: 0 4px 16px rgba(216,26,13,.15);
}

.gift-box:active:not(.opened):not(.opening) {
  transform: scale(.94);
}

.gift-box-front,
.gift-box-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  transition: opacity .3s ease, transform .3s ease;
}

.gift-box-front {
  opacity: 1;
  transform: scale(1);
}

.gift-box-back {
  opacity: 0;
  transform: scale(.5);
}

.gift-box.opened .gift-box-front {
  opacity: 0;
  transform: scale(.5);
}

.gift-box.opened .gift-box-back {
  opacity: 1;
  transform: scale(1);
}

.gift-box-icon {
  font-size: 36px;
  line-height: 1;
}

.gift-box-qmark {
  font-size: 14px;
  font-weight: 800;
  color: #ccc;
  margin-top: 2px;
}

.gift-box-reveal-icon {
  font-size: 28px;
  line-height: 1;
}

.gift-box-reveal-label {
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.2;
  padding: 0 4px;
}

/* ── Opening Animation ── */
.gift-box.opening {
  animation: giftShake .5s ease;
  pointer-events: none;
}

@keyframes giftShake {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-12deg) scale(1.1); }
  30% { transform: rotate(10deg) scale(1.1); }
  45% { transform: rotate(-8deg) scale(1.05); }
  60% { transform: rotate(6deg); }
  75% { transform: rotate(-3deg); }
}

/* ── Product Image in Gift Box ── */
.gift-reveal-product-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* ── Product Win Box (first 2 picks) ── */
.gift-box.product-win {
  border-color: #d81a0d;
  background: linear-gradient(135deg, #fff5f5, #ffe8e6);
  box-shadow: 0 0 20px rgba(216,26,13,.2);
  animation: giftWinPulse 1s ease;
  cursor: default;
}

.gift-box.product-win .gift-box-reveal-label {
  color: #d81a0d;
  font-weight: 800;
  font-size: 9px;
}

@keyframes giftWinPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(216,26,13,.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 24px 4px rgba(216,26,13,.3); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(216,26,13,.2); }
}

/* ── Product Reveal Box (auto-opened) ── */
.gift-box.product-reveal {
  border-color: #ddd;
  background: linear-gradient(135deg, #fafafa, #f0f0f0);
  cursor: default;
}

.gift-box.product-reveal .gift-box-reveal-label {
  color: #555;
  font-weight: 600;
  font-size: 9px;
}

/* ── Ticket Box ── */
.gift-box.ticket {
  border-color: #f5a623;
  background: linear-gradient(135deg, #fffbe6, #fff3c4);
  box-shadow: 0 0 20px rgba(245,166,35,.3);
  animation: giftWinPulse 1s ease;
  cursor: default;
}

.gift-box.ticket .gift-box-reveal-icon {
  font-size: 32px;
}

.gift-box.ticket .gift-box-reveal-label {
  color: #d81a0d;
  font-weight: 800;
  font-size: 11px;
}

/* ── Roulette Wheel ── */
.roleta-tentativas {
  font-size: 13px;
  color: #666;
  margin: 10px 0 12px;
}
.roleta-tentativas b {
  color: #d81a0d;
  font-size: 16px;
}

.roleta-wheel-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 16px;
}

.roleta-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid #d81a0d;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}

.roleta-wheel {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 4px solid #d81a0d;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  transition: none;
}

.roleta-wheel svg {
  display: block;
  width: 100%;
  height: 100%;
}

.roleta-wheel.girando {
  transition: transform 4s cubic-bezier(.17,.67,.12,.99);
}

/* ── Spin Button ── */
.roleta-btn {
  background: #d81a0d;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 44px;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 0 4px 16px rgba(216,26,13,.3);
  transition: transform .15s, box-shadow .15s;
  animation: btnPulse 2s ease infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(216,26,13,.3), 0 0 0 0 rgba(216,26,13,.3); }
  50% { box-shadow: 0 4px 16px rgba(216,26,13,.3), 0 0 0 10px rgba(216,26,13,0); }
}
.roleta-btn:hover { transform: scale(1.04); }
.roleta-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; animation: none; }

/* ── Result ── */
.roleta-resultado {
  margin: 14px 0 0;
  font-size: 16px;
  font-weight: 700;
  min-height: 24px;
}
.roleta-resultado.ganhou {
  color: #d81a0d;
  font-size: 18px;
  animation: roletaPulse .6s ease;
}
.roleta-resultado.perdeu {
  color: #999;
}
@keyframes roletaPulse {
  0%, 100% { transform: scale(1) }
  50% { transform: scale(1.12) }
}

/* ── Confetti ── */
.confetti-container {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ══════════════════════════════════
   WIN SCREEN — Dramatic Animation
   ══════════════════════════════════ */
.win-screen {
  padding: 30px 0 10px;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .5s ease, transform .5s ease;
}
.win-screen.visible {
  opacity: 1;
  transform: scale(1);
}

.win-big-percent {
  font-size: 96px;
  font-weight: 900;
  color: #d81a0d;
  line-height: 1;
  animation: winPercentPop .6s cubic-bezier(.175,.885,.32,1.275) .2s both;
}
.win-big-percent span {
  font-size: 48px;
  vertical-align: super;
}
@keyframes winPercentPop {
  0% { transform: scale(0) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.win-label {
  font-size: 18px;
  font-weight: 800;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: -4px 0 20px;
  animation: winLabelSlide .5s ease .5s both;
}
@keyframes winLabelSlide {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.win-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.win-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  opacity: 0;
  transform: translateX(-30px);
}
.win-screen.visible .win-item:nth-child(1) { animation: winItemSlide .4s ease .7s forwards; }
.win-screen.visible .win-item:nth-child(2) { animation: winItemSlide .4s ease 1s forwards; }
.win-screen.visible .win-item:nth-child(3) { animation: winItemSlide .4s ease 1.3s forwards; }

@keyframes winItemSlide {
  0% { transform: translateX(-30px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.win-item-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.win-item-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.win-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.win-item-old {
  font-size: 12px;
  color: #aaa;
  text-decoration: line-through;
}

.win-item-new {
  font-size: 16px;
  font-weight: 800;
  color: #d81a0d;
}
.win-screen.visible .win-item:nth-child(1) .win-item-new { animation: priceFlash .3s ease .9s both; }
.win-screen.visible .win-item:nth-child(2) .win-item-new { animation: priceFlash .3s ease 1.2s both; }
.win-screen.visible .win-item:nth-child(3) .win-item-new { animation: priceFlash .3s ease 1.5s both; }

@keyframes priceFlash {
  0% { transform: scale(1); color: #333; }
  50% { transform: scale(1.3); color: #d81a0d; }
  100% { transform: scale(1); color: #d81a0d; }
}

/* ── Claim Button (base) ── */
.roleta-fechar {
  display: none;
  margin: 14px auto 0;
  background: #d81a0d;
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(216,26,13,.25);
  transition: transform .15s;
  position: relative;
  overflow: hidden;
}
.roleta-fechar:hover { transform: scale(1.04); }

/* ── Win Claim Button with Shine ── */
.win-claim {
  display: inline-block !important;
  margin-top: 20px;
  padding: 14px 36px;
  font-size: 16px;
  letter-spacing: 1.5px;
  opacity: 0;
  animation: winClaimAppear .5s ease 2s forwards;
  position: relative;
  overflow: hidden;
}
.win-claim::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: btnShine 2s ease 2.5s infinite;
}
@keyframes winClaimAppear {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes btnShine {
  0% { left: -100%; }
  40% { left: 120%; }
  100% { left: 120%; }
}

/* ── Promo Banner (before game) ── */
.promo-banner-site {
  background: linear-gradient(90deg, #d81a0d, #c0150a);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  animation: promoPulse 3s ease infinite;
}
@keyframes promoPulse {
  0%, 100% { background: linear-gradient(90deg, #d81a0d, #c0150a); }
  50% { background: linear-gradient(90deg, #e0341d, #d81a0d); }
}

.promo-banner-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.promo-banner-icon {
  font-size: 16px;
}

/* ── Countdown Bar ── */
.oferta-bar {
  background: #d81a0d;
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.oferta-bar.expirada { background: #666; }
.oferta-bar-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.oferta-bar-icon {
  font-size: 16px;
  animation: fireFlicker 1s ease infinite alternate;
}
@keyframes fireFlicker {
  0% { opacity: .8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.15); }
}
.oferta-bar-timer {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,.2);
  padding: 2px 8px;
  border-radius: 4px;
}
.oferta-bar-detail { font-weight: 700; }

/* ── Disabled Packs ── */
.recharge-card.pack-disabled {
  opacity: .35;
  pointer-events: none;
  filter: grayscale(1);
}

/* ── Discount Badges on Cards ── */
.recharge-card .discount-strip,
.offer-card .discount-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #d81a0d;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 0;
  text-align: center;
  letter-spacing: .3px;
  text-transform: uppercase;
  line-height: 1.2;
  z-index: 2;
}

.recharge-card .recharge-prices,
.offer-card .recharge-prices { display: block; margin-top: 2px; }
.recharge-card .price-original,
.offer-card .price-original { font-size: 9px; color: #888; text-decoration: line-through; display: block; }
.recharge-card .price-discount,
.offer-card .price-discount { font-size: 11px; font-weight: 700; color: #d81a0d; display: block; }

/* ── Login Shake Animation ── */
.modal-needs-login { animation: shakeModal .6s ease; }
@keyframes shakeModal {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-8px); }
  30%, 60%, 90% { transform: translateX(8px); }
}

.login-prompt-banner {
  background: #d81a0d;
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* ── Checkout Timer ── */
.checkout-timer {
  background: #d81a0d;
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.checkout-timer-clock {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.checkout-timer.expired { background: #666; }
