@-webkit-keyframes shake {
  0%, 100% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }

  25% {
    -webkit-transform: translateX(-5px);
            transform: translateX(-5px);
  }

  75% {
    -webkit-transform: translateX(5px);
            transform: translateX(5px);
  }
}

@keyframes shake {
  0%, 100% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }

  25% {
    -webkit-transform: translateX(-5px);
            transform: translateX(-5px);
  }

  75% {
    -webkit-transform: translateX(5px);
            transform: translateX(5px);
  }
}

@-webkit-keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.9;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.9;
  }
}

@-webkit-keyframes fadeIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(10px);
            transform: translateY(10px);
  }

  to {
    opacity: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(10px);
            transform: translateY(10px);
  }

  to {
    opacity: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}

.captcha-box {
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
  border: 2px solid #e9ecef !important;
}

.captcha-box:hover {
  border-color: #FF5722 !important;
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.1);
  -webkit-transform: translateY(-2px);
          transform: translateY(-2px);
}

.captcha-box.captcha-loading {
  border-color: #007bff !important;
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.2);
}

.captcha-box.captcha-error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 15px rgba(220, 53, 69, 0.2);
  -webkit-animation: shake 0.5s ease-in-out;
          animation: shake 0.5s ease-in-out;
}

.captcha-box.captcha-success {
  border-color: #28a745 !important;
  box-shadow: 0 0 15px rgba(40, 167, 69, 0.2);
}

#refresh-captcha {
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  border: 2px solid #007bff;
  border-radius: 6px !important;
  padding: 0;
}

#refresh-captcha:hover:not(:disabled) {
  background-color: #007bff;
  color: #ffffff;
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
}

#refresh-captcha:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  -webkit-animation: pulse 1.5s infinite;
          animation: pulse 1.5s infinite;
}

.captcha-question-container {
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  -webkit-animation: fadeIn 0.5s ease-out;
          animation: fadeIn 0.5s ease-out;
}

#captcha-question {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

#captcha:focus {
  border-color: #FF5722 !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 87, 34, 0.25) !important;
}

.input-group-text {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
}

.spinner-border-sm {
  width: 1.2rem;
  height: 1.2rem;
}

@media (max-width: 768px) {
  .captcha-box {
    margin-bottom: 1rem;
  }

  #captcha-question {
    font-size: 1.1em !important;
  }
}

