/* ========================================
   ESTILOS ESPECÍFICOS DE PASSWORD RESET DONE
   ======================================== */

/* Animación de éxito para el icono */
.success-icon {
    animation: successPulse 2s ease-in-out infinite alternate;
}

@keyframes successPulse {
    0% { 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(40, 167, 69, 0.3));
    }
    100% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(40, 167, 69, 0.5));
    }
}

/* Efectos especiales para los botones */
.reset-action-btn-primary,
.reset-action-btn-secondary {
    position: relative;
    overflow: hidden;
}

.reset-action-btn-primary::before,
.reset-action-btn-secondary::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.5s;
    z-index: 1;
}

.reset-action-btn-primary:hover::before,
.reset-action-btn-secondary:hover::before {
    left: 100%;
}

.reset-action-btn-primary span,
.reset-action-btn-secondary span {
    position: relative;
    z-index: 2;
}

/* Efecto de hover mejorado para los pasos */
.space-y-4 > div {
    transform-origin: left center;
}

.space-y-4 > div:hover {
    transform: translateX(8px);
    border-left-width: 6px;
}

/* Animación del gradiente de fondo para el mensaje de éxito */
.bg-gradient-to-br.from-principal\/5.to-secundario\/5 {
    background-size: 200% 200%;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Efecto de respiración para el emoji del email */
.text-5xl {
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Animación para números de pasos */
.w-6.h-6.rounded-full {
    animation: numberPulse 2s ease-in-out infinite;
    animation-delay: calc(var(--step-index, 0) * 0.2s);
}

.space-y-4 > div:nth-child(1) .w-6.h-6.rounded-full {
    --step-index: 0;
}

.space-y-4 > div:nth-child(2) .w-6.h-6.rounded-full {
    --step-index: 1;
}

.space-y-4 > div:nth-child(3) .w-6.h-6.rounded-full {
    --step-index: 2;
}

@keyframes numberPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(93, 118, 139, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(93, 118, 139, 0);
    }
}

/* Efecto de confetti mejorado */
@keyframes confettiFall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mejoras de transición para elementos interactivos */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efectos de hover para el contenedor principal */
.max-w-lg:hover .success-message {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(93, 118, 139, 0.1);
}

/* Animación de entrada mejorada */
.success-message,
.reset-instructions,
.reset-actions {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estados de focus mejorados para accesibilidad */
.reset-action-btn-primary:focus,
.reset-action-btn-secondary:focus {
    outline: 2px solid #5D768B;
    outline-offset: 4px;
}

/* Efecto de brillantez para el divisor */
.w-20.h-0\.5.bg-gradient-to-r {
    animation: shimmerLine 3s ease-in-out infinite;
}

@keyframes shimmerLine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; transform: scaleX(1.1); }
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .flex.gap-4.justify-center.flex-wrap {
        flex-direction: column;
        align-items: center;
    }

    .reset-action-btn-primary,
    .reset-action-btn-secondary {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .space-y-4 {
        gap: 0.75rem !important;
    }

    .space-y-4 > div {
        padding: 0.75rem !important;
    }

    .text-3xl {
        font-size: 1.75rem !important;
    }

    .text-2xl {
        font-size: 1.5rem !important;
    }

    .text-5xl {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 480px) {
    .reset-action-btn-primary,
    .reset-action-btn-secondary {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    .space-y-4 > div {
        padding: 0.6rem !important;
    }

    .text-3xl {
        font-size: 1.5rem !important;
    }

    .text-xl {
        font-size: 1.125rem !important;
    }

    .w-14.h-14 {
        width: 3rem !important;
        height: 3rem !important;
    }
}

/* Modo de contraste alto */
@media (prefers-contrast: high) {
    .reset-action-btn-primary,
    .reset-action-btn-secondary {
        border-width: 3px !important;
    }

    .space-y-4 > div {
        border-left-width: 6px !important;
    }

    .bg-gradient-to-br {
        background: rgba(93, 118, 139, 0.1) !important;
    }
}

/* Modo reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    .success-icon,
    .text-5xl,
    .w-6.h-6.rounded-full,
    .w-20.h-0\.5.bg-gradient-to-r,
    .bg-gradient-to-br.from-principal\/5.to-secundario\/5 {
        animation: none !important;
    }

    .space-y-4 > div:hover {
        transform: none !important;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* Efectos de loading para cuando se reenvía el email */
.reset-action-btn-secondary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.reset-action-btn-secondary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #5D768B;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s ease-in-out infinite;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Efecto de éxito cuando se reenvía el email */
.reset-action-btn-secondary.success {
    background-color: #28A745 !important;
    color: white !important;
    animation: successFlash 0.6s ease-out;
}

@keyframes successFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Mejoras visuales para el SVG */
svg path {
    transition: fill 0.3s ease;
}

.success-icon:hover svg path {
    fill: #20a03a;
}

/* Efecto de partículas sutiles */
.success-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(40, 167, 69, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.success-message:hover::before {
    opacity: 1;
}

/* Animación de entrada para el confetti */
.confetti-particle {
    width: 8px;
    height: 8px;
    position: absolute;
    animation: confettiFall linear forwards;
}