/**
 * EXIT INTENT - PRIZE WHEEL STYLES
 * Estilos para ruleta de gamificación
 */

/* ============================================ */
/* CONTENEDOR DE LA RULETA */
/* ============================================ */

.wheel-container {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.wheel-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================ */
/* TÍTULO DE LA RULETA */
/* ============================================ */

.wheel-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ============================================ */
/* CANVAS DE LA RULETA */
/* ============================================ */

#wheelCanvas {
  display: block;
  margin: 1.5rem auto;
  border-radius: 50%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3),
              0 0 0 10px rgba(255,255,255,0.1),
              0 0 0 20px rgba(255,255,255,0.05);
  border: 5px solid white;
  background: white;
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

#wheelCanvas:hover {
  transform: scale(1.02);
}

/* ============================================ */
/* BOTÓN DE GIRAR */
/* ============================================ */

.wheel-spin-btn {
  background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
  color: white;
  border: none;
  padding: 1.25rem 3rem;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4),
              0 0 0 0 rgba(255, 107, 107, 0.5);
  transition: all 0.3s;
  animation: bounce 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wheel-spin-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, #FF8B94 0%, #FF6B6B 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.wheel-spin-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6),
              0 0 0 10px rgba(255, 107, 107, 0.2);
  animation: none;
}

.wheel-spin-btn:hover::before {
  opacity: 1;
}

.wheel-spin-btn:active {
  transform: scale(0.95) translateY(0);
}

.wheel-spin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  animation: none;
  transform: none;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ============================================ */
/* SUBTÍTULO */
/* ============================================ */

.wheel-subtitle {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  margin-top: 1rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ============================================ */
/* MODAL DE PREMIO */
/* ============================================ */

.prize-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 1rem;
}

.prize-modal.active {
  opacity: 1;
}

.prize-modal-content {
  background: white;
  padding: 3rem 2rem;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 500px;
  width: 100%;
  position: relative;
  transform: scale(0.8);
  animation: zoomIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================ */
/* ELEMENTOS DEL MODAL */
/* ============================================ */

.prize-modal-emoji {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: rotate360 1s ease-in-out;
  display: inline-block;
}

@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.prize-modal-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.prize-modal-message {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.prize-modal-prize {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prize-modal-benefits {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 2px solid #28a745;
}

.prize-modal-urgency {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  padding: 1rem;
  border-radius: 12px;
  margin: 1rem 0;
  color: #856404;
  font-weight: 600;
  border: 2px solid #ffc107;
  animation: pulseUrgency 2s ease-in-out infinite;
}

@keyframes pulseUrgency {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }
}

.prize-modal-urgency strong {
  color: #dc3545;
  font-size: 1.2em;
  font-family: 'Courier New', monospace;
}

.prize-modal-cta {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 1.25rem 2.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 100%;
  margin: 1rem 0;
}

.prize-modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(16, 185, 129, 0.5);
}

.prize-modal-cta:active {
  transform: translateY(0);
}

.prize-modal-note {
  font-size: 0.875rem;
  color: #999;
  margin-top: 1rem;
  font-style: italic;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */

@media (max-width: 640px) {
  .wheel-title {
    font-size: 1.25rem;
    padding: 0 1rem;
  }
  
  #wheelCanvas {
    width: 300px !important;
    height: 300px !important;
  }
  
  .wheel-spin-btn {
    font-size: 1.25rem;
    padding: 1rem 2rem;
  }
  
  .prize-modal-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  .prize-modal-emoji {
    font-size: 3.5rem;
  }
  
  .prize-modal-title {
    font-size: 1.5rem;
  }
  
  .prize-modal-prize {
    font-size: 1.75rem;
  }
  
  .prize-modal-cta {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .wheel-container {
    padding: 1.5rem 0.5rem;
  }
  
  #wheelCanvas {
    width: 250px !important;
    height: 250px !important;
  }
  
  .wheel-spin-btn {
    font-size: 1.1rem;
    padding: 0.875rem 1.5rem;
  }
}

/* ============================================ */
/* ANIMACIONES ADICIONALES */
/* ============================================ */

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
  }
}

/* Partículas de fondo (decorativas) */
.wheel-container::after {
  content: '🎊 🎉 ✨ 🎁 💎 ⭐ 🔥 🚀';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 2rem;
  opacity: 0.1;
  pointer-events: none;
  animation: floatParticles 20s linear infinite;
  z-index: 0;
}

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