/* Spin to Win Promotion Wheel */
/* ProTechTrader.com - Gamified Coupon System */

/* Modal Overlay */
.spin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.spin-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.spin-modal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close Button */
.spin-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.spin-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Header */
.spin-header {
  text-align: center;
  margin-bottom: 30px;
}

.spin-header h2 {
  color: #fff;
  font-size: 32px;
  margin: 0 0 10px 0;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.spin-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  margin: 0;
}

/* Wheel Container */
.spin-wheel-container {
  position: relative;
  width: 350px;
  height: 350px;
  margin: 0 auto 30px auto;
}

/* Wheel SVG */
.spin-wheel {
  width: 100%;
  height: 100%;
  transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Pointer/Arrow */
.spin-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 40px solid #FFD700;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  z-index: 10;
}

/* Center Button */
.spin-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border: 5px solid #fff;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.spin-button:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.spin-button:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(0.95);
}

.spin-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Result Display */
.spin-result {
  text-align: center;
  display: none;
}

.spin-result.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.spin-result h3 {
  color: #FFD700;
  font-size: 28px;
  margin: 0 0 15px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.spin-result-prize {
  background: rgba(255, 255, 255, 0.95);
  color: #667eea;
  font-size: 36px;
  font-weight: 700;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.spin-result-code {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px dashed #FFD700;
  letter-spacing: 2px;
}

.spin-result-code small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 5px;
  letter-spacing: normal;
}

.spin-apply-btn {
  background: #FFD700;
  color: #333;
  border: none;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.spin-apply-btn:hover {
  background: #FFA500;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .spin-modal {
    padding: 30px 20px;
  }

  .spin-wheel-container {
    width: 280px;
    height: 280px;
  }

  .spin-button {
    width: 80px;
    height: 80px;
    font-size: 16px;
  }

  .spin-header h2 {
    font-size: 24px;
  }

  .spin-result-prize {
    font-size: 28px;
    padding: 15px;
  }

  .spin-result-code {
    font-size: 20px;
  }
}

/* Confetti Animation */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #FFD700;
  animation: confetti-fall 3s linear forwards;
  opacity: 0;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(600px) rotate(720deg);
  }
}
