* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f8ff 0%, #e8f2ff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Fondo animado */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(42, 109, 210, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(74, 142, 245, 0.1) 0%, transparent 50%);
  animation: floatBackground 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes floatBackground {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

/* Container principal */
.recuperar-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    0 20px 40px rgba(42, 109, 210, 0.1),
    0 0 0 1px rgba(42, 109, 210, 0.05);
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: slideInUp 0.8s ease-out;
  overflow: hidden;
  text-align: center;
}

.recuperar-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2a6dd2, #4a8ef5, #2a6dd2);
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.logo {
  display: block;
  margin: 0 auto 30px;
  width: 120px;
  height: auto;
  animation: logoFadeIn 1s ease-out 0.3s both;
  filter: drop-shadow(0 4px 8px rgba(42, 109, 210, 0.1));
}

@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Título */
.recuperar-container h2 {
  color: #2a6dd2;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  animation: titleFadeIn 1s ease-out 0.5s both;
  position: relative;
}

.recuperar-container h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #2a6dd2, #4a8ef5);
  border-radius: 2px;
  animation: underlineGrow 0.8s ease-out 0.8s both;
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes underlineGrow {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

/* Formulario */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Input email */
.recuperar-container input[type="email"] {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid rgba(42, 109, 210, 0.1);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  box-sizing: border-box;
  animation: inputSlideIn 0.6s ease-out 0.6s both;
}

@keyframes inputSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.recuperar-container input[type="email"]:focus {
  outline: none;
  border-color: #2a6dd2;
  background: rgba(255, 255, 255, 1);
  box-shadow: 
    0 0 0 3px rgba(42, 109, 210, 0.1),
    0 4px 12px rgba(42, 109, 210, 0.15);
  transform: translateY(-2px);
}

.recuperar-container input[type="email"]::placeholder {
  color: #999;
  font-weight: 400;
}

/* ReCAPTCHA */
#recaptchaRecuperar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  animation: captchaFadeIn 0.6s ease-out 0.7s both;
}

#recaptchaRecuperar > div {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(42, 109, 210, 0.15);
  transition: all 0.3s ease;
}

#recaptchaRecuperar > div:hover {
  box-shadow: 0 6px 16px rgba(42, 109, 210, 0.2);
  transform: translateY(-2px);
}

@keyframes captchaFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive para reCAPTCHA */
@media (max-width: 480px) {
  #recaptchaRecuperar {
    bottom: 15px;
    right: 15px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }
}

/* Botón */
.recuperar-container button {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #2a6dd2 0%, #1e5bb8 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: buttonSlideIn 0.6s ease-out 0.8s both;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@keyframes buttonSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recuperar-container button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent
  );
  transition: left 0.6s ease;
}

.recuperar-container button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(42, 109, 210, 0.3),
    0 4px 12px rgba(42, 109, 210, 0.2);
}

.recuperar-container button:hover::before {
  left: 100%;
}

.recuperar-container button:active {
  transform: translateY(0);
}

.recuperar-container button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.recuperar-container button i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.recuperar-container button:hover i {
  transform: scale(1.1);
}

/* Enlace volver */
.recuperar-container > div {
  margin-top: 25px !important;
  animation: linkFadeIn 0.6s ease-out 0.9s both;
}

@keyframes linkFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recuperar-container a {
  color: #2a6dd2 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
}

.recuperar-container a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(42, 109, 210, 0.1);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.recuperar-container a:hover {
  color: #1e5bb8 !important;
  transform: translateY(-1px);
}

.recuperar-container a:hover::before {
  opacity: 1;
}

.recuperar-container a span {
  position: relative;
  z-index: 1;
}

/* Efectos de partículas de fondo */
.recuperar-container::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 25% 25%, 
    rgba(42, 109, 210, 0.03) 0%, 
    transparent 50%
  );
  animation: rotate 30s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .recuperar-container {
    margin: 20px;
    padding: 30px 25px;
    max-width: 350px;
  }
  
  .logo {
    width: 100px;
    margin-bottom: 25px;
  }
  
  .recuperar-container h2 {
    font-size: 20px;
  }
  
  .recuperar-container input[type="email"],
  .recuperar-container button {
    padding: 14px 16px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .recuperar-container {
    margin: 15px;
    padding: 25px 20px;
    border-radius: 16px;
  }
  
  .logo {
    width: 80px;
    margin-bottom: 20px;
  }
  
  .recuperar-container h2 {
    font-size: 18px;
    margin-bottom: 25px;
  }
  
  .recuperar-container input[type="email"],
  .recuperar-container button {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
  }
  
  form {
    gap: 16px;
  }
}

/* Animaciones adicionales para estados de carga */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Mejoras adicionales para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Estados de focus mejorados para accesibilidad */
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #2a6dd2;
  outline-offset: 2px;
}