/* Modern Captcha Styling */
.captcha-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e9ecef !important;
  transition: all 0.3s ease;
  position: relative;
}

.captcha-container:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(37, 46, 87, 0.15) !important;
}

.captcha-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.captcha-container:focus-within::before {
  opacity: 0.1;
}

.captcha-question-wrapper {
  flex: 1;
}

.captcha-equation {
  align-items: center;
  gap: 12px;
}

.captcha-question {
  font-family: 'Courier New', monospace;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(37, 46, 87, 0.1);
  min-width: 120px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: rgba(37, 46, 87, 0.05);
  border: 1px solid rgba(37, 46, 87, 0.1);
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-input {
  width: 100px !important;
  height: 45px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #ffffff;
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

.captcha-input::-webkit-outer-spin-button,
.captcha-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.captcha-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(37, 46, 87, 0.25);
  background: #ffffff;
}

.captcha-refresh {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
  background: #ffffff;
}

.captcha-refresh:hover {
  background: var(--primary);
  color: white;
  transform: rotate(180deg);
  box-shadow: 0 4px 12px rgba(37, 46, 87, 0.3);
}

.captcha-refresh i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .captcha-container {
    padding: 1rem !important;
  }

  .captcha-equation {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .captcha-question {
    min-width: auto;
    text-align: center;
  }

  .captcha-input {
    width: 100% !important;
  }
}

/* Animation for question change */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.captcha-question.updating {
  animation: fadeInUp 0.4s ease;
}