/* ========== SPIN WHEEL STYLES ========== */

/* Spin Wheel Container */
.spin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2xl);
  margin: var(--spacing-2xl) 0;
}

/* Wheel Wrapper */
.wheel-wrapper {
  position: relative;
  width: 400px;
  height: 400px;
}

/* Arrow Pointer */
.wheel-pointer {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 40px solid #ff6b6b;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  z-index: 10;
}

/* Wheel */
.spin-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 15px rgba(255, 255, 255, 0.1),
    0 0 0 20px rgba(255, 255, 255, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  background: conic-gradient(
    from 0deg,
    #667eea 0deg 90deg,
    /* Segment 1: $25 - Purple */ #f5576c 90deg 180deg,
    /* Segment 2: Bad Luck - Pink */ #4facfe 180deg 270deg,
    /* Segment 3: $50 - Blue */ #43e97b 270deg 360deg
      /* Segment 4: $100 - Green */
  );
}

.spin-wheel.spinning {
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Wheel Segments */
.wheel-segment {
  position: absolute;
  width: 50%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Position each segment in its quadrant */
.wheel-segment:nth-child(1) {
  /* $25 - Purple (0-90deg) = TOP-RIGHT */
  top: 0;
  right: 0;
}

.wheel-segment:nth-child(2) {
  /* Bad Luck - Pink (90-180deg) = BOTTOM-RIGHT */
  bottom: 0;
  right: 0;
}

.wheel-segment:nth-child(3) {
  /* $50 - Blue (180-270deg) = BOTTOM-LEFT */
  bottom: 0;
  left: 0;
}

.wheel-segment:nth-child(4) {
  /* $100 - Green (270-360deg) = TOP-LEFT */
  top: 0;
  left: 0;
}

.segment-content {
  text-align: center;
  color: white;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: rotate(0deg);
  padding: 10px;
}

/* Rotate content to be readable in each segment */
.wheel-segment:nth-child(1) .segment-content {
  transform: rotate(45deg) translateX(10px) translateY(10px);
}

.wheel-segment:nth-child(2) .segment-content {
  transform: rotate(-45deg) translateX(10px) translateY(-10px);
}

.wheel-segment:nth-child(3) .segment-content {
  transform: rotate(45deg) translateX(-10px) translateY(-10px);
}

.wheel-segment:nth-child(4) .segment-content {
  transform: rotate(-45deg) translateX(-10px) translateY(10px);
}

.segment-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.segment-text {
  font-size: 0.85rem;
  line-height: 1.2;
}

/* Center Button */
.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 5px solid white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
  transition: all var(--transition-normal);
  z-index: 5;
}

.wheel-center:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.wheel-center:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: linear-gradient(135deg, #999 0%, #666 100%);
}

/* Cooldown Display */
.cooldown-display {
  text-align: center;
  padding: var(--spacing-xl);
  background: rgba(255, 107, 107, 0.1);
  border: 2px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius-lg);
  display: none;
}

.cooldown-display.active {
  display: block;
}

.cooldown-timer {
  font-size: 3rem;
  font-weight: 800;
  color: #ff6b6b;
  margin: var(--spacing-md) 0;
  font-variant-numeric: tabular-nums;
}

.cooldown-message {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Result Display */
.result-display {
  text-align: center;
  padding: var(--spacing-xl);
  background: rgba(67, 233, 123, 0.1);
  border: 2px solid rgba(67, 233, 123, 0.3);
  border-radius: var(--radius-lg);
  display: none;
  animation: slideIn 0.5s ease;
}

.result-display.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card-display {
  width: 200px;
  height: 280px;
  margin: 0 auto var(--spacing-xl);
  position: relative;
  display: block;
  overflow: visible;
}

.result-card-display .card-3d-container {
  width: 200px;
  height: 280px;
  position: relative;
  display: block;
}

.result-card-display .gift-card-3d {
  position: relative;
  width: 100%;
  height: 100%;
}

.result-card-display .card-brand-name {
  font-size: 20px;
  letter-spacing: 2px;
}

.result-card-display .card-logo {
  width: 100px;
  height: 100px;
}

.result-card-display .card-value {
  font-size: 36px;
}

.result-card-display .card-content {
  padding: 30px 20px;
}

.result-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-lg);
  position: relative;
  z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
  .wheel-wrapper {
    width: 300px;
    height: 300px;
  }

  .wheel-center {
    width: 80px;
    height: 80px;
    font-size: 1rem;
  }

  .segment-icon {
    font-size: 1.5rem;
  }

  .segment-text {
    font-size: 0.8rem;
  }

  .cooldown-timer {
    font-size: 2rem;
  }
}

/* ========== VERIFY SPINNER ========== */
.verify-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#verifyBtn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
}

/* ========== VERIFICATION PROGRESS (STEP DOTS) ========== */
.verify-progress-container {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) 0;
}

.verify-steps-wrapper {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 320px;
  margin: 0 auto;
}

/* Background line */
.verify-steps-line-bg {
  position: absolute;
  top: 17px;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  z-index: 0;
}

/* Progress fill line */
.verify-steps-line-fill {
  position: absolute;
  top: 17px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 2px;
  z-index: 0;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Individual step item */
.verify-step-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

/* Step circle/node */
.verify-step-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #94a3b8;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Completed step */
.verify-step-item.completed .verify-step-node {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: white;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
  animation: checkmark-pop 0.4s ease;
}

/* Active/current step */
.verify-step-item.active .verify-step-node {
  border-color: #fbbf24;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
  animation: pulse-active 2s ease-in-out infinite;
}

/* Step label text */
.verify-step-label {
  font-size: 0.75rem;
  color: #71717a;
  font-weight: 500;
  text-align: center;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.verify-step-item.completed .verify-step-label {
  color: #10b981;
  font-weight: 600;
}

.verify-step-item.active .verify-step-label {
  color: #fbbf24;
  font-weight: 600;
}

/* Animations */
@keyframes checkmark-pop {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse-active {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .verify-steps-wrapper {
    max-width: 280px;
  }

  .verify-step-node {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .verify-steps-line-bg,
  .verify-steps-line-fill {
    top: 15px;
  }

  .verify-step-label {
    font-size: 0.65rem;
  }
}
