/* Estilos para el modal unificado de recuperación de contraseña */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #ffffff;
    padding: 0;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    font-family: Arial, sans-serif;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    border: 1px solid #e9ecef;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #bf0411;
    background: #f8f9fa;
    transform: scale(1.1);
}

/* Header del modal */
.modal-header {
    background: linear-gradient(135deg, #2d2dd5 0%, #bf0411 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.modal-header h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Barra de progreso */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step-item.completed .step-number {
    background: #28a745;
    transform: scale(1.1);
}

.step-item.active .step-number {
    background: #fcee21;
    color: #2d2dd5;
    transform: scale(1.1);
}

.step-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}

.step-check {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    animation: checkBounce 0.5s ease;
}

@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.step-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.step-line.completed {
    background: #28a745;
}

/* Cuerpo del modal */
.modal-body {
    padding: 30px;
    min-height: 300px;
}

/* Secciones del formulario */
.form-section {
    display: none;
    text-align: center;
    animation: sectionFadeIn 0.2s ease-out;
}

.form-section.active {
    display: block;
}

@keyframes sectionFadeIn {
    from { 
        opacity: 0;
    }
    to { 
        opacity: 1;
    }
}

.section-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #2d2dd5;
    transition: all 0.3s ease;
}

.section-icon.success {
    color: #28a745;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.form-section h3 {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.form-section p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Estilos para formularios */
.form-group {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2d2dd5;
    background: white;
    box-shadow: 0 0 0 3px rgba(45, 45, 213, 0.1);
}

/* Estilos para validación de contraseñas */
.password-match {
    border-color: #28a745 !important;
    background: #f8fff9 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.password-mismatch {
    border-color: #dc3545 !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.password-match-message {
    color: #28a745;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.password-match-message i {
    margin-right: 8px;
    font-size: 16px;
}

/* Estilos para botones */
.btn-primary {
    background: linear-gradient(135deg, #bf0411 0%, #2d2dd5 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(191, 4, 17, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-link {
    background: none;
    border: none;
    color: #2d2dd5;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #bf0411;
}

.btn-link i {
    margin-right: 5px;
}

/* Estilos para mensajes de error */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Estilos para el indicador de fortaleza de contraseña */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
    width: 20%;
}

.strength-fill.medium {
    background: linear-gradient(90deg, #fd7e14, #ffc107);
    width: 60%;
}

.strength-fill.strong {
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 100%;
}

.strength-text {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Estilos para la sección de reenvío */
.resend-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2d2dd5;
}

.resend-section p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #6c757d;
}

/* Estilos para loaders */
.btn-loader {
    display: none;
}

.btn-loader i {
    font-size: 16px;
    margin-right: 8px;
}

/* Notificación sutil */
.subtle-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 300px;
    font-family: Arial, sans-serif;
}

.subtle-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 16px;
    color: white;
}

.notification-text {
    font-size: 14px;
    font-weight: 500;
    color: white;
}

/* Responsive design */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-section h3 {
        font-size: 20px;
    }
    
    .section-icon {
        font-size: 40px;
    }
    
    .progress-steps {
        gap: 5px;
    }
    
    .step-line {
        width: 20px;
    }
    
    .subtle-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .subtle-notification.show {
        transform: translateY(0);
    }
}