/* Roleta de Descontos - Estilo Shopee Laranja */

/* Overlay principal */
#roleta-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Exibição Imediata quando precisa girar (zero atraso/flash de tela) */
html.roleta-needs-spin #roleta-overlay,
#roleta-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

html.roleta-needs-spin #roleta-overlay .roleta-container,
#roleta-overlay.active .roleta-container {
  transform: scale(1) !important;
}

/* Ocultação Imediata quando já resgatou anteriormente */
html.roleta-already-claimed #roleta-overlay {
  display: none !important;
}

/* Card Container */
.roleta-container {
  background: linear-gradient(145deg, #EE4D2D 0%, #D73C1C 100%);
  width: 100%;
  max-width: 430px;
  border-radius: 20px;
  padding: 20px 16px;
  box-shadow: 0 20px 50px rgba(238, 77, 45, 0.4), 0 0 30px rgba(0,0,0,0.5);
  border: 3px solid #FFC107;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Top Badge Header */
.roleta-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #FFE082, #FFB300);
  color: #B71C1C;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  margin-bottom: 8px;
}

.roleta-title {
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.roleta-subtitle {
  font-size: 14px;
  color: #FFE082;
  margin: 0 0 16px 0;
  font-weight: 600;
}

/* Outer LED Ring */
.roleta-wheel-outer {
  position: relative;
  width: 290px;
  height: 290px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: radial-gradient(circle, #FFB300 65%, #FF8F00 100%);
  padding: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), inset 0 2px 5px rgba(255,255,255,0.6);
}

/* Flashing LED Bulbs */
.led-dots {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.led-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #FFF;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  margin: -5px;
  box-shadow: 0 0 8px #FFF, 0 0 12px #FFD54F;
  animation: ledFlash 1s infinite alternate;
}

@keyframes ledFlash {
  0% { opacity: 0.3; transform: scale(0.8); background: #FFE082; }
  100% { opacity: 1; transform: scale(1.2); background: #FFFFFF; box-shadow: 0 0 12px #FFFFFF, 0 0 16px #FFD54F; }
}

/* Pointer Needle */
.roleta-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 38px;
  height: 46px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
  pointer-events: none;
}

/* Center Canvas Wheel */
.roleta-canvas-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

#roleta-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform-origin: center center;
  transition: transform 4s cubic-bezier(0.15, 0.85, 0.15, 1);
}

/* Center Hub Button */
.roleta-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0%, #FFF3E0 60%, #FFB300 100%);
  border: 4px solid #EE4D2D;
  box-shadow: 0 6px 15px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roleta-center-btn:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.roleta-center-btn:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.roleta-center-btn span {
  font-size: 13px;
  font-weight: 800;
  color: #EE4D2D;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

/* Spin Main Button */
.roleta-spin-btn {
  width: 100%;
  background: linear-gradient(180deg, #FFD54F 0%, #FFB300 50%, #FF8F00 100%);
  color: #5D4037;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 14px 20px;
  border: none;
  border-radius: 30px;
  box-shadow: 0 6px 0 #C67100, 0 10px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.roleta-spin-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #C67100, 0 12px 24px rgba(0,0,0,0.35);
}

.roleta-spin-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #C67100, 0 4px 10px rgba(0,0,0,0.3);
}

.roleta-spin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 4px 0 #9E9E9E !important;
  background: #E0E0E0 !important;
  color: #757575 !important;
}

/* Counter & Chances Left */
.roleta-chances-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 12px;
  border-radius: 12px;
  color: #FFF;
  font-weight: 600;
}

/* Result Modal Steps */
.roleta-modal-step {
  display: none;
}

.roleta-modal-step.active {
  display: block;
  animation: fadeInStep 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Victory Box */
.victory-box {
  background: rgba(255, 255, 255, 0.15);
  border: 2px dashed #FFE082;
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0 16px 0;
}

.victory-title {
  font-size: 26px;
  font-weight: 800;
  color: #FFE082;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.victory-discount-huge {
  font-size: 48px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  margin: 8px 0;
  text-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.victory-discount-huge span {
  color: #FFD54F;
}

/* Canvas Confetti Layer */
#roleta-confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100000;
}

/* Site Sticky Announcement Banner */
#site-discount-banner {
  background: linear-gradient(90deg, #EE4D2D 0%, #FF7337 100%);
  color: #FFFFFF;
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 999;
  animation: slideDownBanner 0.4s ease-out;
}

@keyframes slideDownBanner {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.banner-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

/* Golden Reluzente Badge - Cupom de Alto Valor */
.golden-badge-glow {
  background: linear-gradient(135deg, #FFF59D 0%, #FFD54F 35%, #FFB300 70%, #FF8F00 100%) !important;
  color: #7A0000 !important;
  font-weight: 900 !important;
  border: 1.5px solid #FFFFFF !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7), inset 0 1px 3px rgba(255, 255, 255, 0.9) !important;
  position: relative !important;
  overflow: hidden !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.golden-badge-glow::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(25deg);
  animation: shimmerGoldSweep 2.8s infinite linear;
  pointer-events: none;
}

@keyframes shimmerGoldSweep {
  0% { transform: translateX(-120%) rotate(25deg); }
  45% { transform: translateX(120%) rotate(25deg); }
  100% { transform: translateX(120%) rotate(25deg); }
}
